100 lines
2.6 KiB
Diff
100 lines
2.6 KiB
Diff
From 17a6b3f29d20c46a279bc189d5d565a680354f63 Mon Sep 17 00:00:00 2001
|
|
From: Petr Vobornik <pvoborni@redhat.com>
|
|
Date: Wed, 25 Jul 2012 12:32:39 +0200
|
|
Subject: [PATCH 64/79] Unified buttons
|
|
|
|
Buttons in association dialog and action list have different style and behavior than buttons in dialogs. This patch unifies it by using jquery.button widget.
|
|
|
|
https://fedorahosted.org/freeipa/ticket/2817
|
|
---
|
|
install/ui/ipa.css | 9 ++++-----
|
|
install/ui/widget.js | 31 ++++++++++++++++++++++++-------
|
|
2 files changed, 28 insertions(+), 12 deletions(-)
|
|
|
|
diff --git a/install/ui/ipa.css b/install/ui/ipa.css
|
|
index 6f6d862b03895646cacc58c6c0d93f34fce6aabc..ddbe71c1f13bafb6cdd381f871f6eaf6f28ea893 100644
|
|
--- a/install/ui/ipa.css
|
|
+++ b/install/ui/ipa.css
|
|
@@ -1238,6 +1238,10 @@ table.scrollable tbody {
|
|
width: 98%;
|
|
}
|
|
|
|
+.adder-dialog-buttons > div:first-child{
|
|
+ margin-bottom: 0.5em;
|
|
+}
|
|
+
|
|
/* ---- Widgets ---- */
|
|
|
|
.text-widget input {
|
|
@@ -1655,11 +1659,6 @@ form#login {
|
|
margin-left: 10px;
|
|
}
|
|
|
|
-/* TODO: replace with button */
|
|
- #content .facet-action-list div[name=apply] a.ui-state-default {
|
|
- padding: 3px 5px 1px 5px;
|
|
-}
|
|
-
|
|
.facet-action-list select {
|
|
font-size: 11px;
|
|
padding-left: 4px;
|
|
diff --git a/install/ui/widget.js b/install/ui/widget.js
|
|
index 80fc1da1d6f652b22b292ea9e5e80350592ced83..9e78c360b7debc2a4d4f7b49f83172a8c826799e 100644
|
|
--- a/install/ui/widget.js
|
|
+++ b/install/ui/widget.js
|
|
@@ -2455,12 +2455,6 @@ IPA.link_widget = function(spec) {
|
|
};
|
|
|
|
IPA.action_button = function(spec) {
|
|
- var button = IPA.button(spec);
|
|
- button.removeClass("ui-state-default").addClass("action-button");
|
|
- return button;
|
|
-};
|
|
-
|
|
-IPA.button = function(spec) {
|
|
|
|
spec = spec || {};
|
|
|
|
@@ -2469,7 +2463,7 @@ IPA.button = function(spec) {
|
|
name: spec.name,
|
|
href: spec.href || '#' + (spec.name || 'button'),
|
|
title: spec.title || spec.label,
|
|
- 'class': 'ui-state-default ui-corner-all button',
|
|
+ 'class': 'button action-button',
|
|
style: spec.style,
|
|
click: spec.click,
|
|
blur: spec.blur
|
|
@@ -2493,6 +2487,29 @@ IPA.button = function(spec) {
|
|
return button;
|
|
};
|
|
|
|
+IPA.button = function(spec) {
|
|
+
|
|
+ spec = spec || {};
|
|
+
|
|
+ var button = $('<a/>', {
|
|
+ id: spec.id,
|
|
+ name: spec.name,
|
|
+ href: spec.href || '#' + (spec.name || 'button')
|
|
+ });
|
|
+
|
|
+ var icons = { primary: spec.icon };
|
|
+ var label = spec.label;
|
|
+
|
|
+ button.button({
|
|
+ icons: icons,
|
|
+ label: label
|
|
+ });
|
|
+
|
|
+ button.click(spec.click);
|
|
+
|
|
+ return button;
|
|
+};
|
|
+
|
|
IPA.button_widget = function(spec) {
|
|
|
|
spec = spec || {};
|
|
--
|
|
1.7.11.2
|
|
|