summaryrefslogtreecommitdiffstats
path: root/install/ui/widget.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-01-31 16:29:25 -0600
committerAdam Young <ayoung@redhat.com>2011-02-01 08:30:35 -0500
commit613a3d0f5628a2e844c4f0e8629f0916e3a44794 (patch)
treefbb5e9a8fe829e26d29fd4a1165477a71e55b55b /install/ui/widget.js
parent7c23d5aff955739f2271d510d4f494d67a77d8a3 (diff)
downloadfreeipa-613a3d0f5628a2e844c4f0e8629f0916e3a44794.tar.gz
freeipa-613a3d0f5628a2e844c4f0e8629f0916e3a44794.tar.xz
freeipa-613a3d0f5628a2e844c4f0e8629f0916e3a44794.zip
Added undo for permission rights.
https://fedorahosted.org/freeipa/ticket/884
Diffstat (limited to 'install/ui/widget.js')
-rw-r--r--install/ui/widget.js47
1 files changed, 17 insertions, 30 deletions
diff --git a/install/ui/widget.js b/install/ui/widget.js
index d856f50ec..4a77dda83 100644
--- a/install/ui/widget.js
+++ b/install/ui/widget.js
@@ -190,6 +190,15 @@ IPA.widget = function(spec) {
return false;
};
+ that.create_undo = function(container) {
+ $('<span/>', {
+ name: 'undo',
+ style: 'display: none;',
+ 'class': 'ui-state-highlight ui-corner-all undo',
+ html: 'undo'
+ }).appendTo(container);
+ };
+
that.get_undo = function() {
return $('span[name="undo"]', that.container);
};
@@ -251,11 +260,9 @@ IPA.text_widget = function(spec) {
title: that.tooltip
}).appendTo(container);
- $('<span/>', {
- 'name': 'undo',
- 'style': 'display: none;',
- 'html': 'undo'
- }).appendTo(container);
+ if (that.undo) {
+ that.create_undo(container);
+ }
$("<span/>",{
name:'error_link',
@@ -345,11 +352,7 @@ IPA.checkbox_widget = function (spec) {
}).appendTo(container);
if (that.undo) {
- $('<span/>', {
- 'name': 'undo',
- 'style': 'display: none;',
- 'html': 'undo'
- }).appendTo(container);
+ that.create_undo(container);
}
};
@@ -407,11 +410,7 @@ IPA.checkboxes_widget = function (spec) {
}
if (that.undo) {
- $('<span/>', {
- 'name': 'undo',
- 'style': 'display: none;',
- 'html': 'undo'
- }).appendTo(container);
+ that.create_undo(container);
}
};
@@ -489,11 +488,7 @@ IPA.radio_widget = function(spec) {
}
if (that.undo) {
- $('<span/>', {
- 'name': 'undo',
- 'style': 'display: none;',
- 'html': 'undo'
- }).appendTo(container);
+ that.create_undo(container);
}
};
@@ -568,11 +563,7 @@ IPA.select_widget = function(spec) {
}
if (that.undo) {
- $('<span/>', {
- 'name': 'undo',
- 'style': 'display: none;',
- 'html': 'undo'
- }).appendTo(container);
+ that.create_undo(container);
}
};
@@ -643,11 +634,7 @@ IPA.textarea_widget = function (spec) {
}).appendTo(container);
if (that.undo) {
- $('<span/>', {
- 'name': 'undo',
- 'style': 'display: none;',
- 'html': 'undo'
- }).appendTo(container);
+ that.create_undo(container);
}
};