From cec6703da35a511340ded9a1ec5958be9bd9bc8e Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Thu, 9 Dec 2010 14:20:40 -0600 Subject: Account activation adjustment The user details facet has been modified such that when the account is activated/deactivated the page will be reloaded. Some methods in the framework have been changed: - The ipa_widget.clear() has been removed because it can be replaced by existing reset(). - The ipa_widget.set_values() has been renamed into update(). --- install/static/details.js | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'install/static/details.js') diff --git a/install/static/details.js b/install/static/details.js index 762881cc..5ffd72c9 100644 --- a/install/static/details.js +++ b/install/static/details.js @@ -43,13 +43,13 @@ function ipa_details_field(spec) { that.load = spec.load || load; that.save = spec.save || save; - function load(result) { - that.record = result; - that.values = result[that.name]; + function load(record) { + that.record = record; + that.values = record[that.name]; that.reset(); } - that.set_values = function(values) { + that.update = function() { if (!that.record) return; @@ -335,22 +335,30 @@ function ipa_details_list_section(spec){ } }; + return that; +} + +// shorthand notation used for declarative definitions of details pages +function ipa_stanza(spec) { + + spec = spec || {}; + + var that = ipa_details_list_section(spec); + // This is to allow declarative style programming for details - function input(spec){ + that.input = function(spec) { that.create_field(spec); return that; - } + }; - that.input = input; + that.custom_input = function(input) { + that.add_field(input); + return that; + }; return that; } -// shorthand notation used for declarative definitions of details pages -function ipa_stanza(spec) { - return ipa_details_list_section(spec); -} - function ipa_details_facet(spec) { spec = spec || {}; -- cgit