From 5c105a5ff4dc027ba38dde39c2329d031deb1dc3 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Tue, 18 Jan 2011 12:12:47 -0500 Subject: Force flag for Hosts and Services. The add dialogs for Hosts and Services have been updated to include a checkbox to force adding hosts/services that are not in DNS. The widgets has been updated to support tooltips. --- install/static/widget.js | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) (limited to 'install/static/widget.js') diff --git a/install/static/widget.js b/install/static/widget.js index 9221e499..576eef77 100644 --- a/install/static/widget.js +++ b/install/static/widget.js @@ -30,6 +30,7 @@ IPA.widget = function(spec) { that.id = spec.id; that.name = spec.name; that.label = spec.label; + that.tooltip = spec.tooltip; that.read_only = spec.read_only; that._entity_name = spec.entity_name; @@ -81,10 +82,18 @@ IPA.widget = function(spec) { } function init() { - if (that.entity_name && !that.label){ + if (that.entity_name) { that.param_info = IPA.get_param_info(that.entity_name, that.name); - if ((that.param_info) && (that.label === undefined)){ - that.label = that.param_info.label; + + if (that.param_info) { + + if (that.label === undefined) { + that.label = that.param_info.label; + } + + if (that.tooltip === undefined) { + that.tooltip = that.param_info.doc; + } } } } @@ -182,9 +191,10 @@ IPA.text_widget = function(spec) { that.create = function(container) { $('', { - 'type': 'text', - 'name': that.name, - 'size': that.size + type: 'text', + name: that.name, + size: that.size, + title: that.tooltip }).appendTo(container); $('', { @@ -269,7 +279,8 @@ IPA.checkbox_widget = function (spec) { $('', { type: 'checkbox', name: that.name, - checked : is_checked + checked : is_checked, + title: that.tooltip }).appendTo(container); if (that.undo) { @@ -404,9 +415,10 @@ IPA.textarea_widget = function (spec) { that.create = function(container) { $('