diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2011-11-18 19:47:39 -0600 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2011-12-06 22:08:07 +0000 |
commit | caa9d52666e5beb7321dc6c80820eeacca356077 (patch) | |
tree | 01b91c26442e559632afbf652968c0dbd9c0291b /install/ui/automount.js | |
parent | a8ea42bda841c8773d68886614faf9efd38e33bd (diff) | |
download | freeipa-caa9d52666e5beb7321dc6c80820eeacca356077.tar.gz freeipa-caa9d52666e5beb7321dc6c80820eeacca356077.tar.xz freeipa-caa9d52666e5beb7321dc6c80820eeacca356077.zip |
Refactored facet.load().
The load() in IPA.facet has been modified to accept the complete
data returned by the server instead of just the result. This is
needed by HBAC Test to access other attributes returned in the
test result.
Ticket #388
Diffstat (limited to 'install/ui/automount.js')
-rw-r--r-- | install/ui/automount.js | 58 |
1 files changed, 40 insertions, 18 deletions
diff --git a/install/ui/automount.js b/install/ui/automount.js index 8db08e384..6c0f64ff9 100644 --- a/install/ui/automount.js +++ b/install/ui/automount.js @@ -160,6 +160,7 @@ IPA.automount.key_entity = function(spec) { that.builder.containing_entity('automountmap'). details_facet({ + factory: IPA.automount.key_details_facet, sections: [ { name:'identity', @@ -173,24 +174,7 @@ IPA.automount.key_entity = function(spec) { ] } ], - disable_breadcrumb: false, - pre_execute_hook : function (command){ - var entity_name = this.entity_name; - var info = IPA.nav.get_state(entity_name + '-info'); - var key = IPA.nav.get_state(entity_name + '-pkey'); - - - if (command.args.length ==3){ - command.args.pop(); - } - if (command.method === 'mod'){ - command.options['newautomountinformation'] = - command.options['automountinformation']; - - } - command.options['automountkey'] = key; - command.options['automountinformation'] = info; - } + disable_breadcrumb: false }). adder_dialog({ show_edit_page : function(entity, result){ @@ -210,6 +194,44 @@ IPA.automount.key_entity = function(spec) { return that; }; +IPA.automount.key_details_facet = function(spec) { + + var that = IPA.details_facet(spec); + + that.create_update_command = function() { + + var command = that.details_facet_create_update_command(); + + command.args.pop(); + + var key = IPA.nav.get_state(that.entity.name + '-pkey'); + var info = IPA.nav.get_state(that.entity.name + '-info'); + + command.options.newautomountinformation = command.options.automountinformation; + command.options.automountkey = key; + command.options.automountinformation = info; + + return command; + }; + + that.create_refresh_command = function() { + + var command = that.details_facet_create_refresh_command(); + + command.args.pop(); + + var key = IPA.nav.get_state(that.entity.name + '-pkey'); + var info = IPA.nav.get_state(that.entity.name + '-info'); + + command.options.automountkey = key; + command.options.automountinformation = info; + + return command; + }; + + return that; +}; + IPA.automount_key_column = function(spec) { var that = IPA.column(spec); |