[PATCH] 713 webui: replace action_buttons with action_widget
Simplify code base by reuse of 'disable' feature of button_widget. All
occurrences of action-button which were disabled/enabled were replaced
by button-widget.
https://fedorahosted.org/freeipa/ticket/4258
[PATCH] 714 webui: remove remaining action-button-disabled occurrences
Buttons in hbactest check for 'action-button-disabled' but it's never set.
https://fedorahosted.org/freeipa/ticket/4258
--
Petr Vobornik
From 8151b70b2ac3cdc856c3e888eeb9cfd76a3ab140 Mon Sep 17 00:00:00 2001
From: Petr Vobornik pvobo...@redhat.com
Date: Tue, 22 Jul 2014 16:43:28 +0200
Subject: [PATCH] webui: remove remaining action-button-disabled occurrences
Buttons in hbactest check for 'action-button-disabled' but it's never set.
https://fedorahosted.org/freeipa/ticket/4258
---
install/ui/ipa.css | 9 -
install/ui/src/freeipa/hbactest.js | 35 +--
2 files changed, 5 insertions(+), 39 deletions(-)
diff --git a/install/ui/ipa.css b/install/ui/ipa.css
index ec79688a2efc9a3620334e72368816e454ba3c47..2e70a1adc9c97fd9930925adbe6a76b778022eb6 100644
--- a/install/ui/ipa.css
+++ b/install/ui/ipa.css
@@ -252,15 +252,6 @@ div[name=settings].facet-group li a {
word-wrap: break-word;
}
-.action-button-disabled,
-.action-button-disabled:focus,
-.action-button-disabled:hover {
-color: gray;
-cursor: default;
-text-decoration: none;
-outline: none;
-}
-
.aci-attribute-table tbody {
height: 10em;
}
diff --git a/install/ui/src/freeipa/hbactest.js b/install/ui/src/freeipa/hbactest.js
index 7a9d85ab33ea34b9bcc176bb366aadee83d38509..9ac4e8293e3b5c624f156f7f70a5dd051237e44e 100644
--- a/install/ui/src/freeipa/hbactest.js
+++ b/install/ui/src/freeipa/hbactest.js
@@ -184,12 +184,7 @@ IPA.hbac.test_facet = function(spec) {
name: 'prev',
label: '@i18n:widget.prev',
icon: 'fa-chevron-left',
-click: function() {
-if (!that.prev_button.hasClass('action-button-disabled')) {
-that.prev();
-}
-return false;
-}
+click: that.prev
}).appendTo(buttons);
buttons.append(' ');
@@ -199,12 +194,7 @@ IPA.hbac.test_facet = function(spec) {
name: 'next',
label: '@i18n:widget.next',
icon: 'fa-chevron-right',
-click: function() {
-if (!that.next_button.hasClass('action-button-disabled')) {
-that.next();
-}
-return false;
-}
+click: that.next
}).appendTo(buttons);
};
@@ -535,12 +525,7 @@ IPA.hbac.test_run_facet = function(spec) {
name: 'run_test',
label: '@i18n:objects.hbactest.run_test',
icon: 'fa-gear',
-click: function() {
-if (!that.run_button.hasClass('action-button-disabled')) {
-that.run();
-}
-return false;
-}
+click: that.run
}).appendTo(button_panel);
var result_panel = $('div/', {
@@ -608,12 +593,7 @@ IPA.hbac.test_run_facet = function(spec) {
name: 'prev',
label: '@i18n:widget.prev',
icon: 'fa-chevron-left',
-click: function() {
-if (!that.prev_button.hasClass('action-button-disabled')) {
-that.prev();
-}
-return false;
-}
+click: that.prev
}).appendTo(buttons);
buttons.append(' ');
@@ -622,12 +602,7 @@ IPA.hbac.test_run_facet = function(spec) {
name: 'new_test',
label: '@i18n:objects.hbactest.new_test',
icon: 'fa-repeat',
-click: function() {
-if (!that.new_test_button.hasClass('action-button-disabled')) {
-that.new_test();
-}
-return false;
-}
+click: that.new_test
}).appendTo(buttons);
};
--
1.9.3
From ff9dacb6b231008e19888e614cacd10598d116ba Mon Sep 17 00:00:00 2001
From: Petr Vobornik pvobo...@redhat.com
Date: Tue, 22 Jul 2014 16:39:36 +0200
Subject: [PATCH] webui: replace action_buttons with action_widget
Simplify code base by reuse of 'disable' feature of button_widget. All
occurrences of action-button which were disabled/enabled were replaced
by button-widget.
https://fedorahosted.org/freeipa/ticket/4258
---
install/ui/src/freeipa/association.js | 45 +++-
install/ui/src/freeipa/dns.js | 45 +++-
install/ui/src/freeipa/sudo.js| 34 --
install/ui/src/freeipa/widget.js | 55 +--
ipatests/test_webui/ui_driver.py | 42