Re: [Freeipa-devel] [PATCH] Account activation adjustment
On 12/09/2010 05:02 PM, Endi Sukma Dewata wrote: On 12/9/2010 3:17 PM, Endi Sukma Dewata wrote: Please review the attached patch. This should fix this bug: https://fedorahosted.org/freeipa/ticket/462 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(). Forgot to include the latest changes. Attached is a new patch. Thanks! ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel ACK. Pushed to master ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
[Freeipa-devel] [PATCH] Account activation adjustment
Hi, Please review the attached patch. This should fix this bug: https://fedorahosted.org/freeipa/ticket/462 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(). Thanks! -- Endi S. Dewata From 424bc5785731a2862bbd8bd3dfcd751769d2c07f Mon Sep 17 00:00:00 2001 From: Endi S. Dewata edew...@redhat.com Date: Thu, 9 Dec 2010 14:20:40 -0600 Subject: [PATCH] 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/add.js|2 +- install/static/associate.js |2 +- install/static/details.js| 34 +--- install/static/hbac.js | 16 ++-- install/static/test/details_tests.js |4 +- install/static/user.js | 136 +++--- install/static/widget.js | 55 +- 7 files changed, 128 insertions(+), 121 deletions(-) diff --git a/install/static/add.js b/install/static/add.js index f2eebb8ac2992a5332f6aa929265b5c00898fb69..0048f4b105a2dcc38526a70a28e409b78c750aca 100644 --- a/install/static/add.js +++ b/install/static/add.js @@ -57,7 +57,7 @@ function ipa_add_dialog(spec) { var facet = entity.get_facet('search'); var table = facet.table; table.refresh(); -that.clear(); +that.reset(); } ); }); diff --git a/install/static/associate.js b/install/static/associate.js index 540b1a80f7ee36cbf647ecfdab83be2ad457a5b9..1e6d6b908116aeca75aff01e4922b27ee7e1048b 100644 --- a/install/static/associate.js +++ b/install/static/associate.js @@ -364,7 +364,7 @@ function ipa_association_table_widget(spec) { that.reset(); }; -that.set_values = function(values) { +that.update = function() { that.empty(); diff --git a/install/static/details.js b/install/static/details.js index fcf04ffd1041ec5074e57e3f17c9076b5cd1a9c6..853635b13a67511530c05f2dd16b32786da27f68 100644 --- a/install/static/details.js +++ b/install/static/details.js @@ -40,13 +40,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; @@ -332,20 +332,28 @@ function ipa_details_list_section(spec){ } }; -// This is to allow declarative style programming for details -function input(spec){ -that.create_field(spec); -return that; -} - -that.input = input; - return that; } // shorthand notation used for declarative definitions of details pages function ipa_stanza(spec) { -return ipa_details_list_section(spec); + +spec = spec || {}; + +var that = ipa_details_list_section(spec); + +// This is to allow declarative style programming for details +that.input = function(spec) { +that.create_field(spec); +return that; +}; + +that.custom_input = function(input) { +that.add_field(input); +return that; +}; + +return that; } function ipa_details_facet(spec) { diff --git a/install/static/hbac.js b/install/static/hbac.js index 213dd3e4804e55de26232a19ad3c2acc7f89ae94..d0188fa5a7d00593441e61135798f8687462b552 100755 --- a/install/static/hbac.js +++ b/install/static/hbac.js @@ -806,25 +806,25 @@ function ipa_hbac_accesstime_widget(spec) { } }; -that.load = function(result) { +that.load = function(record) { -that.values = result[that.name] || []; +that.values = record[that.name] || []; that.reset(); }; -that.set_values = function(values) { +that.update = function() { -that.set_radio_value(that.container, values values.length ? '' : 'all'); +that.set_category(that.container, that.values that.values.length ? '' : 'all'); that.table.tbody.empty(); -for (var i=0; values ivalues.length; i++) { +for (var i=0; that.values ithat.values.length; i++) { var record = {}; -record[that.name] = values[i]; +record[that.name] = that.values[i];
Re: [Freeipa-devel] [PATCH] Account activation adjustment
On 12/9/2010 3:17 PM, Endi Sukma Dewata wrote: Please review the attached patch. This should fix this bug: https://fedorahosted.org/freeipa/ticket/462 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(). Forgot to include the latest changes. Attached is a new patch. Thanks! -- Endi S. Dewata From 1f9b00ca8f04818e7da3f37298185f8280a0e60f Mon Sep 17 00:00:00 2001 From: Endi S. Dewata edew...@redhat.com Date: Thu, 9 Dec 2010 14:20:40 -0600 Subject: [PATCH] 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/add.js|2 +- install/static/associate.js |2 +- install/static/details.js| 34 +--- install/static/hbac.js | 16 ++-- install/static/test/details_tests.js |4 +- install/static/user.js | 136 +++--- install/static/widget.js | 68 +++--- 7 files changed, 135 insertions(+), 127 deletions(-) diff --git a/install/static/add.js b/install/static/add.js index f2eebb8ac2992a5332f6aa929265b5c00898fb69..0048f4b105a2dcc38526a70a28e409b78c750aca 100644 --- a/install/static/add.js +++ b/install/static/add.js @@ -57,7 +57,7 @@ function ipa_add_dialog(spec) { var facet = entity.get_facet('search'); var table = facet.table; table.refresh(); -that.clear(); +that.reset(); } ); }); diff --git a/install/static/associate.js b/install/static/associate.js index 540b1a80f7ee36cbf647ecfdab83be2ad457a5b9..1e6d6b908116aeca75aff01e4922b27ee7e1048b 100644 --- a/install/static/associate.js +++ b/install/static/associate.js @@ -364,7 +364,7 @@ function ipa_association_table_widget(spec) { that.reset(); }; -that.set_values = function(values) { +that.update = function() { that.empty(); diff --git a/install/static/details.js b/install/static/details.js index fcf04ffd1041ec5074e57e3f17c9076b5cd1a9c6..853635b13a67511530c05f2dd16b32786da27f68 100644 --- a/install/static/details.js +++ b/install/static/details.js @@ -40,13 +40,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; @@ -332,20 +332,28 @@ function ipa_details_list_section(spec){ } }; -// This is to allow declarative style programming for details -function input(spec){ -that.create_field(spec); -return that; -} - -that.input = input; - return that; } // shorthand notation used for declarative definitions of details pages function ipa_stanza(spec) { -return ipa_details_list_section(spec); + +spec = spec || {}; + +var that = ipa_details_list_section(spec); + +// This is to allow declarative style programming for details +that.input = function(spec) { +that.create_field(spec); +return that; +}; + +that.custom_input = function(input) { +that.add_field(input); +return that; +}; + +return that; } function ipa_details_facet(spec) { diff --git a/install/static/hbac.js b/install/static/hbac.js index 213dd3e4804e55de26232a19ad3c2acc7f89ae94..d0188fa5a7d00593441e61135798f8687462b552 100755 --- a/install/static/hbac.js +++ b/install/static/hbac.js @@ -806,25 +806,25 @@ function ipa_hbac_accesstime_widget(spec) { } }; -that.load = function(result) { +that.load = function(record) { -that.values = result[that.name] || []; +that.values = record[that.name] || []; that.reset(); }; -that.set_values = function(values) { +that.update = function() { -that.set_radio_value(that.container, values values.length ? '' : 'all'); +that.set_category(that.container, that.values that.values.length ? '' : 'all'); that.table.tbody.empty(); -for (var i=0; values ivalues.length; i++) { +for (var i=0; that.values ithat.values.length; i++) { var record = {}; -