summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa/ipa.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2013-04-11 16:42:11 +0200
committerPetr Vobornik <pvoborni@redhat.com>2013-05-06 16:22:24 +0200
commit0dc4b133fb0795b9c55f8a9fc95b55bc4df7ebf2 (patch)
treedc2d84162fa70ffff2b5ae4eed0b2f1896faf2a8 /install/ui/src/freeipa/ipa.js
parent9dc8e26b735c7ad6b9ed2277a95c8745edfc7f40 (diff)
downloadfreeipa-0dc4b133fb0795b9c55f8a9fc95b55bc4df7ebf2.tar.gz
freeipa-0dc4b133fb0795b9c55f8a9fc95b55bc4df7ebf2.tar.xz
freeipa-0dc4b133fb0795b9c55f8a9fc95b55bc4df7ebf2.zip
Builder: return object when it's already built
https://fedorahosted.org/freeipa/ticket/3235
Diffstat (limited to 'install/ui/src/freeipa/ipa.js')
-rw-r--r--install/ui/src/freeipa/ipa.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/install/ui/src/freeipa/ipa.js b/install/ui/src/freeipa/ipa.js
index e252a782d..c8bf4daee 100644
--- a/install/ui/src/freeipa/ipa.js
+++ b/install/ui/src/freeipa/ipa.js
@@ -293,9 +293,26 @@ var IPA = function() {
}
};
+ that.obj_cls = function() {};
+ that.obj_cls.prototype.__fw_obj = true;
+
return that;
}();
+/**
+ * Basic object
+ *
+ * Framework objects created by factories should use this instead of {} when
+ * creating base objects. As an alternative they can just set __fw_obj
+ * property.
+ *
+ * __fw_obj property serves for telling the framework that it's instantiated
+ * object and not an object specification (spec).
+ */
+IPA.object = function() {
+ return new IPA.obj_cls();
+};
+
IPA.get_credentials = function() {
var status;