summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2014-07-24 16:01:44 +0200
committerPetr Vobornik <pvoborni@redhat.com>2014-08-21 10:47:08 +0200
commitdef8696819e923bc7126af54bcd9f1452de30dcd (patch)
treee4557cd8016f56011bb7ac1114590326d1a6eb49
parent4832f2986d1a457acf3ff000433aa0732364c19c (diff)
downloadfreeipa-def8696819e923bc7126af54bcd9f1452de30dcd.tar.gz
freeipa-def8696819e923bc7126af54bcd9f1452de30dcd.tar.xz
freeipa-def8696819e923bc7126af54bcd9f1452de30dcd.zip
webui: rename tooltip to title
- use title for input's elements 'title' attribute - tooltip for Bootstrap's tooltip component https://fedorahosted.org/freeipa/ticket/4471 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
-rw-r--r--install/ui/src/freeipa/dialog.js2
-rw-r--r--install/ui/src/freeipa/dns.js2
-rw-r--r--install/ui/src/freeipa/facet.js36
-rw-r--r--install/ui/src/freeipa/field.js8
-rw-r--r--install/ui/src/freeipa/host.js2
-rw-r--r--install/ui/src/freeipa/idrange.js20
-rw-r--r--install/ui/src/freeipa/navigation/MenuItem.js2
-rw-r--r--install/ui/src/freeipa/widget.js18
8 files changed, 43 insertions, 47 deletions
diff --git a/install/ui/src/freeipa/dialog.js b/install/ui/src/freeipa/dialog.js
index 22bda3e99..f430e5604 100644
--- a/install/ui/src/freeipa/dialog.js
+++ b/install/ui/src/freeipa/dialog.js
@@ -405,7 +405,7 @@ IPA.dialog = function(spec) {
that.title_node = $('<h4/>', {
'class': 'modal-title',
- text: that.title
+ text: that.title || ''
}).appendTo(that.header_node);
return that.header_node;
diff --git a/install/ui/src/freeipa/dns.js b/install/ui/src/freeipa/dns.js
index ae6a5986e..c5e7b24d8 100644
--- a/install/ui/src/freeipa/dns.js
+++ b/install/ui/src/freeipa/dns.js
@@ -666,7 +666,7 @@ IPA.dnszone_name_widget = function(spec) {
IPA.force_dnszone_add_checkbox_widget = function(spec) {
var metadata = IPA.get_command_option('dnszone_add', spec.name);
spec.label = metadata.label;
- spec.tooltip = metadata.doc;
+ spec.title = metadata.doc;
return IPA.checkbox_widget(spec);
};
diff --git a/install/ui/src/freeipa/facet.js b/install/ui/src/freeipa/facet.js
index 50c12d49c..594f9af5c 100644
--- a/install/ui/src/freeipa/facet.js
+++ b/install/ui/src/freeipa/facet.js
@@ -1118,9 +1118,9 @@ exp.facet_header = IPA.facet_header = function(spec) {
that.update_breadcrumb(limited_value);
var title_info = {
- title: that.facet.label,
+ text: that.facet.label,
pkey: limited_value,
- pkey_tooltip: value
+ pkey_title: value
};
that.title_widget.update(title_info);
};
@@ -1277,7 +1277,7 @@ exp.facet_header = IPA.facet_header = function(spec) {
}
that.title_widget.create(container);
- that.title_widget.update({ title: that.facet.label });
+ that.title_widget.update({ text: that.facet.label });
if (!that.facet.disable_facet_tabs) {
that.facet_tabs = $('<div/>', {
@@ -1349,7 +1349,7 @@ exp.facet_header = IPA.facet_header = function(spec) {
/**
* Reflect facet's action state summary into title widget class and icon
- * tooltip.
+ * title.
*/
that.update_summary = function() {
var summary = that.facet.action_state.summary();
@@ -1357,7 +1357,7 @@ exp.facet_header = IPA.facet_header = function(spec) {
if (summary.state.length > 0) {
var css_class = summary.state.join(' ');
that.title_widget.set_class(css_class);
- that.title_widget.set_icon_tooltip(summary.description);
+ that.title_widget.set_icon_title(summary.description);
}
};
@@ -1409,30 +1409,26 @@ exp.facet_title = IPA.facet_title = function(spec) {
*
* @param {Object} data
* @param {string} data.pkey
+ * @param {string} data.text
* @param {string} data.title
- * @param {string} data.tooltip
- * @param {string} data.icon_tooltip
+ * @param {string} data.icon_title
* @param {string} data.css_class css class for title container
*/
that.update = function(data) {
- var tooltip = data.tooltip || data.title;
- var pkey_tooltip = data.pkey_tooltip || data.pkey;
- var icon_tooltip = data.icon_tooltip || '';
-
- that.title.text(data.title);
- that.title.prop('title', tooltip);
+ that.title.text(data.text);
+ that.title.prop('title', data.title || '');
that.title_container.toggleClass('no-pkey', !data.pkey);
if (data.pkey) {
- that.title.text(data.title + ': ');
+ that.title.text(data.text + ': ');
that.pkey.text(data.pkey);
- that.pkey.attr('title', pkey_tooltip);
+ that.pkey.attr('title', data.pkey_title || data.pkey);
}
if (data.css_class) that.set_class(data.css_class);
- that.set_icon_tooltip(icon_tooltip);
+ that.set_icon_title(data.icon_title || '');
};
/**
@@ -1487,12 +1483,12 @@ exp.facet_title = IPA.facet_title = function(spec) {
};
/**
- * Set icon tooltip
+ * Set icon title
*
- * @param {string} tooltip
+ * @param {string} title
*/
- that.set_icon_tooltip = function(tooltip) {
- that.icon.attr('title', tooltip);
+ that.set_icon_title = function(title) {
+ that.icon.attr('title', title);
};
return that;
diff --git a/install/ui/src/freeipa/field.js b/install/ui/src/freeipa/field.js
index 5905bbab6..ea22d6d06 100644
--- a/install/ui/src/freeipa/field.js
+++ b/install/ui/src/freeipa/field.js
@@ -112,10 +112,10 @@ field.field = IPA.field = function(spec) {
that.label = text.get(spec.label);
/**
- * Tooltip
+ * Title
* @property {string}
*/
- that.tooltip = text.get(spec.tooltip);
+ that.title = text.get(spec.title);
/**
* Measurement unit
@@ -299,8 +299,8 @@ field.field = IPA.field = function(spec) {
if (!that.label) {
that.label = that.metadata.label || '';
}
- if (!that.tooltip) {
- that.tooltip = that.metadata.doc || '';
+ if (!that.title) {
+ that.title = that.metadata.doc || '';
}
}
diff --git a/install/ui/src/freeipa/host.js b/install/ui/src/freeipa/host.js
index 0740a3b49..4ccebe4c3 100644
--- a/install/ui/src/freeipa/host.js
+++ b/install/ui/src/freeipa/host.js
@@ -531,7 +531,7 @@ IPA.host_dnsrecord_entity_link_widget = function(spec) {
IPA.force_host_add_checkbox_widget = function(spec) {
var metadata = IPA.get_command_option('host_add', spec.name);
spec.label = metadata.label;
- spec.tooltip = metadata.doc;
+ spec.title = metadata.doc;
return IPA.checkbox_widget(spec);
};
diff --git a/install/ui/src/freeipa/idrange.js b/install/ui/src/freeipa/idrange.js
index c7dc5c683..a2c182fdb 100644
--- a/install/ui/src/freeipa/idrange.js
+++ b/install/ui/src/freeipa/idrange.js
@@ -56,27 +56,27 @@ return {
{
name: 'ipabaseid',
label: '@i18n:objects.idrange.ipabaseid',
- tooltip: '@mo-param:idrange:ipabaseid:label'
+ title: '@mo-param:idrange:ipabaseid:label'
},
{
name: 'ipaidrangesize',
label: '@i18n:objects.idrange.ipaidrangesize',
- tooltip: '@mo-param:idrange:ipaidrangesize:label'
+ title: '@mo-param:idrange:ipaidrangesize:label'
},
{
name: 'ipabaserid',
label: '@i18n:objects.idrange.ipabaserid',
- tooltip: '@mo-param:idrange:ipabaserid:label'
+ title: '@mo-param:idrange:ipabaserid:label'
},
{
name: 'ipasecondarybaserid',
label: '@i18n:objects.idrange.ipasecondarybaserid',
- tooltip: '@mo-param:idrange:ipasecondarybaserid:label'
+ title: '@mo-param:idrange:ipasecondarybaserid:label'
},
{
name: 'ipanttrusteddomainsid',
label: '@i18n:objects.idrange.ipanttrusteddomainsid',
- tooltip: '@mo-param:idrange:ipanttrusteddomainsid:label'
+ title: '@mo-param:idrange:ipanttrusteddomainsid:label'
}
]
}
@@ -91,17 +91,17 @@ return {
{
name: 'ipabaseid',
label: '@i18n:objects.idrange.ipabaseid',
- tooltip: '@mo-param:idrange:ipabaseid:label'
+ title: '@mo-param:idrange:ipabaseid:label'
},
{
name: 'ipaidrangesize',
label: '@i18n:objects.idrange.ipaidrangesize',
- tooltip: '@mo-param:idrange:ipaidrangesize:label'
+ title: '@mo-param:idrange:ipaidrangesize:label'
},
{
name: 'ipabaserid',
label: '@i18n:objects.idrange.ipabaserid',
- tooltip: '@mo-param:idrange:ipabaserid:label'
+ title: '@mo-param:idrange:ipabaserid:label'
},
{
name: 'iparangetype',
@@ -135,12 +135,12 @@ return {
{
name: 'ipasecondarybaserid',
label: '@i18n:objects.idrange.ipasecondarybaserid',
- tooltip: '@mo-param:idrange:ipasecondarybaserid:label'
+ title: '@mo-param:idrange:ipasecondarybaserid:label'
},
{
name: 'ipanttrusteddomainsid',
label: '@i18n:objects.idrange.ipanttrusteddomainsid',
- tooltip: '@mo-param:idrange:ipanttrusteddomainsid:label',
+ title: '@mo-param:idrange:ipanttrusteddomainsid:label',
enabled: false
}
],
diff --git a/install/ui/src/freeipa/navigation/MenuItem.js b/install/ui/src/freeipa/navigation/MenuItem.js
index 1b2358cf6..8534d2ec2 100644
--- a/install/ui/src/freeipa/navigation/MenuItem.js
+++ b/install/ui/src/freeipa/navigation/MenuItem.js
@@ -48,7 +48,7 @@ var MenuItem = {
label: '',
/**
- * Title/Tooltip
+ * Title
*/
title: '',
diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js
index da901d9e9..8324a8795 100644
--- a/install/ui/src/freeipa/widget.js
+++ b/install/ui/src/freeipa/widget.js
@@ -102,10 +102,10 @@ IPA.widget = function(spec) {
that.label = text.get(spec.label);
/**
- * Helper text
+ * Title text
* @property {string}
*/
- that.tooltip = text.get(spec.tooltip);
+ that.title = text.get(spec.title);
/**
* Measurement unit
@@ -732,7 +732,7 @@ IPA.text_widget = function(spec) {
id: id,
'class': 'form-control',
size: that.size,
- title: that.tooltip,
+ title: that.title,
placeholder: that.placeholder,
keyup: function() {
that.on_value_changed();
@@ -1313,7 +1313,7 @@ IPA.option_widget_base = function(spec, that) {
// classic properties
that.name = spec.name;
that.label = spec.label;
- that.tooltip = spec.tooltip;
+ that.title = spec.title;
that.sort = spec.sort === undefined ? false : spec.sort;
that.value_changed = that.value_changed || IPA.observer();
@@ -1488,12 +1488,12 @@ IPA.option_widget_base = function(spec, that) {
name: input_name,
disabled: !enabled,
value: option.value,
- title: option.tooltip || that.tooltip,
+ title: option.title || that.title || '',
change: that.on_input_change
}, opt_cont);
option.label_node = construct.create('label', {
- title: option.tooltip || that.tooltip,
+ title: option.title || that.title || '',
'for': id
}, opt_cont);
option.label_node.textContent = option.label || '';
@@ -2093,7 +2093,7 @@ IPA.textarea_widget = function (spec) {
cols: that.cols,
'class': 'form-control',
readOnly: !!that.read_only,
- title: that.tooltip,
+ title: that.title || '',
placeholder: that.placeholder,
keyup: function() {
that.on_value_changed();
@@ -3485,7 +3485,7 @@ IPA.combobox_widget = function(spec) {
name: that.name,
'class': 'form-control',
id: id,
- title: that.tooltip,
+ title: that.title,
keydown: that.on_input_keydown,
mousedown: that.on_no_close,
click: function() {
@@ -4251,7 +4251,7 @@ IPA.button_widget = function(spec) {
that.button = IPA.button({
id: that.id,
name: that.name,
- title: that.tooltip,
+ title: that.title,
label: that.label,
'class': that['class'],
button_class: that.button_class,