diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2014-03-14 13:50:00 +0100 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2014-03-20 10:02:31 +0100 |
commit | 5efcb240ce4b304ecc9f90a9bb70e1f85436d5c0 (patch) | |
tree | 14514198bafa36ce6c0f109803d54f8e5d2ad492 /install/ui/src/freeipa/widget.js | |
parent | 4de360fd2c9ec2c67737821ddeb1c5a0b34737b1 (diff) | |
download | freeipa-5efcb240ce4b304ecc9f90a9bb70e1f85436d5c0.tar.gz freeipa-5efcb240ce4b304ecc9f90a9bb70e1f85436d5c0.tar.xz freeipa-5efcb240ce4b304ecc9f90a9bb70e1f85436d5c0.zip |
webui: change permissions UI to v2
reflect ipalib permission changes in Web UI.
- http://www.freeipa.org/page/V4/Permissions_V2
- http://www.freeipa.org/page/V4/Anonymous_and_All_permissions
- http://www.freeipa.org/page/V4/Managed_Read_permissions
- http://www.freeipa.org/page/V4/Multivalued_target_filters_in_permissions
https://fedorahosted.org/freeipa/ticket/4079
Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
Reviewed-By: Petr Viktorin <pviktori@redhat.com>
Diffstat (limited to 'install/ui/src/freeipa/widget.js')
-rw-r--r-- | install/ui/src/freeipa/widget.js | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js index f149cd2e8..6f3e1b1ef 100644 --- a/install/ui/src/freeipa/widget.js +++ b/install/ui/src/freeipa/widget.js @@ -676,7 +676,7 @@ IPA.multivalued_widget = function(spec) { var that = IPA.input_widget(spec); - that.widget_factory = spec.widget_factory || IPA.text_widget; + that.child_spec = spec.child_spec; that.size = spec.size || 30; that.undo_control; that.initialized = false; @@ -811,14 +811,18 @@ IPA.multivalued_widget = function(spec) { row.container = $('<div/>', { name: 'value'}); - row.widget = that.widget_factory({ - name: that.name+'-'+row_index, - undo: that.undo || row.is_new, - read_only: that.read_only, - writable: that.writable, - enabled: that.enabled - }); + var spec = that.child_spec || {}; + if (typeof spec !== 'function') { + lang.mixin(spec, { + name: that.name+'-'+row_index, + undo: that.undo || row.is_new, + read_only: that.read_only, + writable: that.writable, + enabled: that.enabled + }); + } + row.widget = builder.build('widget', spec); row.widget.create(row.container); row.original_values = values; @@ -1415,7 +1419,7 @@ IPA.option_widget_base = function(spec, that) { that.set_enabled = function(enabled) { - that.enabled = enabled; + that.widget_set_enabled(enabled); that.update_enabled(enabled); }; @@ -4718,7 +4722,7 @@ IPA.widget_builder = function(spec) { IPA.sshkeys_widget = function(spec) { spec = spec || {}; - spec.widget_factory = IPA.sshkey_widget; + spec.child_spec = IPA.sshkey_widget; var that = IPA.multivalued_widget(spec); |