summaryrefslogtreecommitdiffstats
path: root/install/static/details.js
diff options
context:
space:
mode:
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 || {};