summaryrefslogtreecommitdiffstats
path: root/install/ui/sudorule.js
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2011-02-16 14:26:35 +0100
committerAdam Young <ayoung@redhat.com>2011-02-18 09:49:37 -0500
commitb7700ea815222b4de80741ad77b31707051300bd (patch)
tree4c92ba518468af34f9587131c8f4de3bb13613e3 /install/ui/sudorule.js
parent27532f54687297e5dfa7d66503f22186d7fc3237 (diff)
downloadfreeipa-b7700ea815222b4de80741ad77b31707051300bd.tar.gz
freeipa-b7700ea815222b4de80741ad77b31707051300bd.tar.xz
freeipa-b7700ea815222b4de80741ad77b31707051300bd.zip
Remove WebUI identifiers from global namespace
Many WebUI identifiers were defined in a global namespace. This is not a good programming practice and may result in name clashes, for example with other libraries. This patch moves these variables to IPA namespace or its sub-namespaces, when meaningful. https://fedorahosted.org/freeipa/ticket/212
Diffstat (limited to 'install/ui/sudorule.js')
-rw-r--r--install/ui/sudorule.js22
1 files changed, 12 insertions, 10 deletions
diff --git a/install/ui/sudorule.js b/install/ui/sudorule.js
index b25a9dd3..b9fc7be8 100644
--- a/install/ui/sudorule.js
+++ b/install/ui/sudorule.js
@@ -22,6 +22,8 @@
/* REQUIRES: ipa.js, details.js, search.js, add.js, entity.js */
+IPA.sudo = {};
+
IPA.entity_factories.sudorule = function () {
var that = IPA.entity({
@@ -35,7 +37,7 @@ IPA.entity_factories.sudorule = function () {
'label': 'Search'
});
- var dialog = IPA.sudorule_add_dialog({
+ var dialog = IPA.sudo.rule_add_dialog({
'name': 'add',
'title': 'Add New Rule'
});
@@ -55,7 +57,7 @@ IPA.entity_factories.sudorule = function () {
};
-IPA.sudorule_add_dialog = function (spec) {
+IPA.sudo.rule_add_dialog = function (spec) {
spec = spec || {};
@@ -109,7 +111,7 @@ IPA.sudorule_details_facet = function (spec) {
});
} else {
- section = IPA.sudorule_details_general_section({
+ section = IPA.sudo.rule_details_general_section({
'name': 'general',
'label': 'General'
});
@@ -176,13 +178,13 @@ IPA.sudorule_details_facet = function (spec) {
'other_entity': 'hostgroup', 'add_method': 'add_host', 'remove_method': 'remove_host'
}));
- section = IPA.sudorule_details_command_section({
+ section = IPA.sudo.rule_details_command_section({
'name': 'command',
'label': 'Run Commands'
});
that.add_section(section);
- section = IPA.sudorule_details_runas_section({
+ section = IPA.sudo.rule_details_runas_section({
'name': 'runas',
'label': 'As Whom'
});
@@ -377,7 +379,7 @@ IPA.sudorule_details_facet = function (spec) {
};
-IPA.sudorule_details_general_section = function (spec){
+IPA.sudo.rule_details_general_section = function (spec){
spec = spec || {};
@@ -514,7 +516,7 @@ IPA.sudorule_details_general_section = function (spec){
};
-IPA.sudorule_details_command_section = function (spec){
+IPA.sudo.rule_details_command_section = function (spec){
spec = spec || {};
@@ -686,7 +688,7 @@ IPA.sudorule_details_command_section = function (spec){
};
-IPA.sudorule_details_runas_section = function (spec){
+IPA.sudo.rule_details_runas_section = function (spec){
spec = spec || {};
@@ -913,7 +915,7 @@ IPA.sudorule_association_table_widget = function (spec) {
template = 'sudorule-'+that.other_entity+'-dialog.html #contents';
}
- return IPA.sudorule_association_adder_dialog({
+ return IPA.sudo.rule_association_adder_dialog({
'title': title,
'entity_name': that.entity_name,
'pkey': pkey,
@@ -936,7 +938,7 @@ IPA.sudorule_association_table_widget = function (spec) {
};
-IPA.sudorule_association_adder_dialog = function (spec) {
+IPA.sudo.rule_association_adder_dialog = function (spec) {
spec = spec || {};