Hello everyone,

I just made a patch for the https://fedorahosted.org/freeipa/ticket/5428 
ticket. The patch adds tool tips to the buttons in detail views. The text of 
new tool tips is written in the comment of the ticket.

Pavel Vomacka
Intern
From 8e291c698b0bb6275ce4cb220815ba54446f62fe Mon Sep 17 00:00:00 2001
From: Pavel Vomacka <pvoma...@redhat.com>
Date: Mon, 25 Jan 2016 13:23:20 +0100
Subject: [PATCH] Add tool tips for Revert, Refresh, Undo, and Undo All

Add tool tips for buttons in detail view. New tooltips:
Reload - Reload current settings from the server.
Revert - Undo all unsaved changes.
Undo - Undo this change.
Undo all - Undo all changes in this field.

https://fedorahosted.org/freeipa/ticket/5428
---
 install/ui/src/freeipa/details.js  | 2 ++
 install/ui/src/freeipa/widget.js   | 2 ++
 install/ui/test/data/ipa_init.json | 4 ++++
 ipalib/plugins/internal.py         | 6 ++++--
 4 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/install/ui/src/freeipa/details.js b/install/ui/src/freeipa/details.js
index c708a878b7d6d29815535b7508da0c4cc30a3b5c..bb3e3ec2170029fcce780939127fa4426fe81d99 100644
--- a/install/ui/src/freeipa/details.js
+++ b/install/ui/src/freeipa/details.js
@@ -482,6 +482,7 @@ exp.details_facet_pre_op = function(spec, context) {
         spec.control_buttons.unshift(
             {
                 name: 'revert',
+                title: '@i18n:buttons.revert_title',
                 label: '@i18n:buttons.revert',
                 icon: 'fa-undo'
             },
@@ -494,6 +495,7 @@ exp.details_facet_pre_op = function(spec, context) {
     spec.control_buttons.unshift(
         {
             name: 'refresh',
+            title: '@i18n:buttons.refresh_title',
             label: '@i18n:buttons.refresh',
             icon: 'fa-refresh'
         });
diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js
index 434a4b1bbe2ce1e71914f8543410de9212b389fe..41d75fe0cd80024f6bb44405456bedc5f3fbca47 100644
--- a/install/ui/src/freeipa/widget.js
+++ b/install/ui/src/freeipa/widget.js
@@ -486,6 +486,7 @@ IPA.input_widget = function(spec) {
             name: 'undo',
             style: 'display: none;',
             'class': 'undo',
+            title: text.get('@i18n:widget.undo_title'),
             label: text.get('@i18n:widget.undo')
         }).appendTo(container);
 
@@ -1234,6 +1235,7 @@ IPA.multivalued_widget = function(spec) {
             name: 'undo_all',
             style: 'display: none;',
             'class': 'undo',
+            title: text.get('@i18n:widget.undo_all_title'),
             label: text.get('@i18n:widget.undo_all'),
             click: function() {
                 that.undo_clicked.notify([], that);
diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json
index 310eef1055a19dd40f8221c2967b09773595b80b..b25fa9357d264ef5d82d24205cb6be9ec094bed7 100644
--- a/install/ui/test/data/ipa_init.json
+++ b/install/ui/test/data/ipa_init.json
@@ -77,12 +77,14 @@
                         "issue": "Issue",
                         "ok": "OK",
                         "refresh": "Refresh",
+                        "refresh_title": "Reload current settings from the server.",
                         "remove": "Delete",
                         "reset": "Reset",
                         "reset_password_and_login": "Reset Password and Login",
                         "restore": "Restore",
                         "retry": "Retry",
                         "revert": "Revert",
+                        "revert_title": "Undo all unsaved changes.",
                         "revoke": "Revoke",
                         "save": "Save",
                         "set": "Set",
@@ -684,7 +686,9 @@
                         "page": "Page",
                         "prev": "Prev",
                         "undo": "Undo",
+                        "undo_title": "Undo this change.",
                         "undo_all": "Undo All",
+                        "undo_all_title": "Undo all changes.",
                         "validation": {
                             "error": "Text does not match field pattern",
                             "datetime": "Must be an UTC date/time value (e.g., \"2014-01-20 17:58:01Z\")",
diff --git a/ipalib/plugins/internal.py b/ipalib/plugins/internal.py
index a75772673ae198165e4666271eaa57147e58ab31..7156d4f47004dd702d3896ca736cc1f42227a321 100644
--- a/ipalib/plugins/internal.py
+++ b/ipalib/plugins/internal.py
@@ -220,12 +220,14 @@ class i18n_messages(Command):
             "issue": _("Issue"),
             "ok": _("OK"),
             "refresh": _("Refresh"),
+            "refresh_title": _("Reload current settings from the server."),
             "remove": _("Delete"),
             "reset": _("Reset"),
             "reset_password_and_login": _("Reset Password and Login"),
             "restore": _("Restore"),
             "retry": _("Retry"),
             "revert": _("Revert"),
+            "revert_title": ("Undo all unsaved changes."),
             "revoke": _("Revoke"),
             "save": _("Save"),
             "set": _("Set"),
@@ -830,7 +832,9 @@ class i18n_messages(Command):
             "page": _("Page"),
             "prev": _("Prev"),
             "undo": _("Undo"),
+            "undo_title": _("Undo this change."),
             "undo_all": _("Undo All"),
+            "undo_all_title": _("Undo all changes in this field."),
             "validation": {
                 "error": _("Text does not match field pattern"),
                 "datetime": _("Must be an UTC date/time value (e.g., \"2014-01-20 17:58:01Z\")"),
@@ -858,5 +862,3 @@ class i18n_messages(Command):
 
     def output_for_cli(self, textui, result, *args, **options):
         print(json.dumps(result, default=json_serialize))
-
-
-- 
2.5.0

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to