summaryrefslogtreecommitdiffstats
path: root/install/static/details.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2010-12-09 14:20:40 -0600
committerAdam Young <ayoung@redhat.com>2010-12-14 16:45:41 -0500
commitcec6703da35a511340ded9a1ec5958be9bd9bc8e (patch)
tree7bd3bd24d60f6ccd43ed99831dbf1d8dd2dd421a /install/static/details.js
parente0a39234f777c9c32af639195ec198b08fd7d452 (diff)
downloadfreeipa.git-cec6703da35a511340ded9a1ec5958be9bd9bc8e.tar.gz
freeipa.git-cec6703da35a511340ded9a1ec5958be9bd9bc8e.tar.xz
freeipa.git-cec6703da35a511340ded9a1ec5958be9bd9bc8e.zip
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().
Diffstat (limited to 'install/static/details.js')
-rw-r--r--install/static/details.js32
1 files changed, 20 insertions, 12 deletions
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 || {};