summaryrefslogtreecommitdiffstats
path: root/install/ui/src
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2013-04-11 17:02:48 +0200
committerPetr Vobornik <pvoborni@redhat.com>2013-05-06 16:22:24 +0200
commit3b77c63b2acfc36b4f8472018acc2d177c8fd0db (patch)
treeaa4fcbf07a8404e317e3d75b9974ab1fbcb5d372 /install/ui/src
parent0dc4b133fb0795b9c55f8a9fc95b55bc4df7ebf2 (diff)
downloadfreeipa-3b77c63b2acfc36b4f8472018acc2d177c8fd0db.tar.gz
freeipa-3b77c63b2acfc36b4f8472018acc2d177c8fd0db.tar.xz
freeipa-3b77c63b2acfc36b4f8472018acc2d177c8fd0db.zip
Use IPA.object() as a base factory for framework objects
https://fedorahosted.org/freeipa/ticket/3235
Diffstat (limited to 'install/ui/src')
-rw-r--r--install/ui/src/freeipa/association.js4
-rwxr-xr-xinstall/ui/src/freeipa/certificate.js2
-rw-r--r--install/ui/src/freeipa/details.js18
-rw-r--r--install/ui/src/freeipa/dialog.js4
-rw-r--r--install/ui/src/freeipa/entity.js10
-rw-r--r--install/ui/src/freeipa/facet.js18
-rw-r--r--install/ui/src/freeipa/field.js8
-rw-r--r--install/ui/src/freeipa/ipa.js8
-rw-r--r--install/ui/src/freeipa/net.js2
-rw-r--r--install/ui/src/freeipa/widget.js14
10 files changed, 44 insertions, 44 deletions
diff --git a/install/ui/src/freeipa/association.js b/install/ui/src/freeipa/association.js
index 505cbbfd1..e378ad443 100644
--- a/install/ui/src/freeipa/association.js
+++ b/install/ui/src/freeipa/association.js
@@ -29,7 +29,7 @@ IPA.associator = function (spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.entity = IPA.get_entity(spec.entity);
that.pkey = spec.pkey;
@@ -327,7 +327,7 @@ IPA.association_config = function (spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.name = spec.name;
that.associator = spec.associator;
diff --git a/install/ui/src/freeipa/certificate.js b/install/ui/src/freeipa/certificate.js
index 442e1824b..db262159b 100755
--- a/install/ui/src/freeipa/certificate.js
+++ b/install/ui/src/freeipa/certificate.js
@@ -430,7 +430,7 @@ IPA.cert.loader = function(spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.get_pkey = spec.get_pkey;
that.get_name = spec.get_name;
that.get_principal = spec.get_principal;
diff --git a/install/ui/src/freeipa/details.js b/install/ui/src/freeipa/details.js
index dffa187e9..69c85d54e 100644
--- a/install/ui/src/freeipa/details.js
+++ b/install/ui/src/freeipa/details.js
@@ -32,7 +32,7 @@ exp.collapsed_icon = IPA.collapsed_icon = 'collapsed-icon';
exp.details_builder = IPA.details_builder = function(spec) {
- var that = {};
+ var that = IPA.object();
that.widgets = spec.container.widgets;
that.fields = spec.container.fields;
@@ -104,7 +104,7 @@ exp.section_builder = IPA.section_builder = function(spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.container = spec.container;
that.section_factory = spec.section_factory || IPA.details_table_section;
@@ -167,7 +167,7 @@ exp.section_builder = IPA.section_builder = function(spec) {
exp.facet_policy = IPA.facet_policy = function() {
- var that = {};
+ var that = IPA.object();
that.init = function() {
};
@@ -183,7 +183,7 @@ exp.facet_policy = IPA.facet_policy = function() {
exp.facet_policies = IPA.facet_policies = function(spec) {
- var that = {};
+ var that = IPA.object();
that.container = spec.container;
that.policies = [];
@@ -721,7 +721,7 @@ exp.details_facet = IPA.details_facet = function(spec, no_init) {
exp.update_info = IPA.update_info = function(spec) {
- var that = {};
+ var that = IPA.object();
that.fields = spec.fields || [];
that.commands = spec.commands || [];
@@ -741,7 +741,7 @@ exp.update_info = IPA.update_info = function(spec) {
exp.command_info = IPA.command_info = function(spec) {
- var that = {};
+ var that = IPA.object();
that.command = spec.command;
that.priority = spec.priority || IPA.config.default_priority;
@@ -751,7 +751,7 @@ exp.command_info = IPA.command_info = function(spec) {
exp.field_info = IPA.field_info = function(spec) {
- var that = {};
+ var that = IPA.object();
that.field = spec.field;
that.value = spec.value;
@@ -761,7 +761,7 @@ exp.field_info = IPA.field_info = function(spec) {
exp.update_info_builder = IPA.update_info_builder = function() {
- var that = {};
+ var that = IPA.object();
that.new_update_info = function (fields, commands) {
return IPA.update_info({
@@ -801,7 +801,7 @@ exp.update_info_builder = IPA.update_info_builder = function() {
exp.command_builder = IPA.command_builder = function() {
- var that = {};
+ var that = IPA.object();
that.add_field_option = function(command, field, values) {
if (!field || !values) return;
diff --git a/install/ui/src/freeipa/dialog.js b/install/ui/src/freeipa/dialog.js
index 2243c5ac0..36a143d23 100644
--- a/install/ui/src/freeipa/dialog.js
+++ b/install/ui/src/freeipa/dialog.js
@@ -54,7 +54,7 @@ IPA.dialog_button = function(spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.name = spec.name;
that.label = text.get(spec.label || spec.name);
@@ -86,7 +86,7 @@ IPA.dialog = function(spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.entity = IPA.get_entity(spec.entity);
that.name = spec.name || 'dialog';
diff --git a/install/ui/src/freeipa/entity.js b/install/ui/src/freeipa/entity.js
index 2470ac3f7..2d0e97f84 100644
--- a/install/ui/src/freeipa/entity.js
+++ b/install/ui/src/freeipa/entity.js
@@ -32,7 +32,7 @@ IPA.entity = function(spec) {
IPA.details_facet_update_policy()
];
- var that = {};
+ var that = IPA.object();
that.name = spec.name;
that.label = text.get(spec.label);
@@ -172,7 +172,7 @@ IPA.entity = function(spec) {
IPA.entity_builder = function() {
- var that = {};
+ var that = IPA.object();
var entity = null;
var facet_group = null;
@@ -422,7 +422,7 @@ IPA.entity_builder = function() {
IPA.dialog_builder = function(entity) {
- var that = {};
+ var that = IPA.object();
that.build_dialogs = function() {
@@ -450,7 +450,7 @@ IPA.entity_policy = function(spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.entity = spec.entity;
@@ -462,7 +462,7 @@ IPA.entity_policy = function(spec) {
IPA.entity_policies = function(spec) {
- var that = {};
+ var that = IPA.object();
that.entity = spec.entity;
that.policies = [];
diff --git a/install/ui/src/freeipa/facet.js b/install/ui/src/freeipa/facet.js
index 958941291..3afe76e04 100644
--- a/install/ui/src/freeipa/facet.js
+++ b/install/ui/src/freeipa/facet.js
@@ -673,7 +673,7 @@ exp.facet_header = IPA.facet_header = function(spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.facet = spec.facet;
@@ -1004,7 +1004,7 @@ exp.facet_title = IPA.facet_title = function(spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.update = function(data) {
@@ -1432,7 +1432,7 @@ exp.facet_group = IPA.facet_group = function(spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.name = spec.name;
that.label = text.get(spec.label);
@@ -1464,7 +1464,7 @@ exp.facet_group = IPA.facet_group = function(spec) {
exp.facet_builder = IPA.facet_builder = function(entity) {
- var that = {};
+ var that = IPA.object();
that.prepare_methods = {};
@@ -1623,7 +1623,7 @@ exp.action = IPA.action = function(spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.name = spec.name;
that.label = text.get(spec.label);
@@ -1719,7 +1719,7 @@ exp.action_holder = IPA.action_holder = function(spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.actions = $.ordered_map();
@@ -1776,7 +1776,7 @@ exp.state = IPA.state = function(spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.state = $.ordered_map();
@@ -1845,7 +1845,7 @@ exp.summary_evaluator = IPA.summary_evaluator = function(spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.evaluate = function(state) {
@@ -1880,7 +1880,7 @@ exp.state_evaluator = IPA.state_evaluator = function(spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.name = spec.name || 'state_evaluator';
that.event_name = spec.event;
diff --git a/install/ui/src/freeipa/field.js b/install/ui/src/freeipa/field.js
index 0ba823d12..fe14204c0 100644
--- a/install/ui/src/freeipa/field.js
+++ b/install/ui/src/freeipa/field.js
@@ -28,7 +28,7 @@ define(['dojo/_base/array', './ipa', './jquery', './navigation', './text'],
IPA.field = function(spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.entity = IPA.get_entity(spec.entity);
that.facet = spec.facet;
@@ -416,7 +416,7 @@ IPA.validator = function(spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.message = text.get(spec.message || '@i18n:widget.validation.error');
@@ -830,7 +830,7 @@ IPA.field_container = function(spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.container = spec.container; //usually facet or dialog
@@ -866,7 +866,7 @@ IPA.field_builder = function(spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.default_factory = spec.default_factory || IPA.field;
that.container = spec.container;
diff --git a/install/ui/src/freeipa/ipa.js b/install/ui/src/freeipa/ipa.js
index c8bf4daee..a92b23ac8 100644
--- a/install/ui/src/freeipa/ipa.js
+++ b/install/ui/src/freeipa/ipa.js
@@ -591,7 +591,7 @@ IPA.command = function(spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.name = spec.name;
@@ -1029,7 +1029,7 @@ IPA.batch_command = function (spec) {
IPA.concurrent_command = function(spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.commands = [];
that.on_success = spec.on_success;
@@ -1177,7 +1177,7 @@ IPA.default_factory = function(spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
$.extend(that, spec);
@@ -1443,7 +1443,7 @@ IPA.error_dialog = function(spec) {
};
IPA.error_list = function() {
- var that = {};
+ var that = IPA.object();
that.clear = function() {
that.errors = [];
diff --git a/install/ui/src/freeipa/net.js b/install/ui/src/freeipa/net.js
index 11a245c0b..03f2e7e73 100644
--- a/install/ui/src/freeipa/net.js
+++ b/install/ui/src/freeipa/net.js
@@ -32,7 +32,7 @@ NET.ip_address = function(spec) {
};
}
- var that = {};
+ var that = IPA.object();
that.input = spec.address;
diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js
index fc01bc082..6e934fa2b 100644
--- a/install/ui/src/freeipa/widget.js
+++ b/install/ui/src/freeipa/widget.js
@@ -33,7 +33,7 @@ IPA.widget = function(spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.name = spec.name;
that.id = spec.id;
@@ -1247,7 +1247,7 @@ IPA.formatter = function(spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.type = spec.type; // default is text
@@ -1373,7 +1373,7 @@ IPA.column = function (spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.entity = IPA.get_entity(spec.entity);
that.name = spec.name;
@@ -3399,7 +3399,7 @@ IPA.header_widget = function(spec) {
IPA.observer = function(spec) {
- var that = {};
+ var that = IPA.object();
that.listeners = [];
@@ -3430,7 +3430,7 @@ IPA.observer = function(spec) {
IPA.html_util = function() {
- var that = {};
+ var that = IPA.object();
that.id_count = 0;
that.get_next_id = function(prefix) {
@@ -3445,7 +3445,7 @@ IPA.widget_container = function(spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.new_container_for_child = spec.new_container_for_child !== undefined ?
spec.new_container_for_child : true;
@@ -3523,7 +3523,7 @@ IPA.widget_builder = function(spec) {
spec = spec || {};
- var that = {};
+ var that = IPA.object();
that.default_factory = spec.default_factory || IPA.text_widget;
that.container = spec.container;