+ k.removeTooltip = function(e) {
+ var $e = $(e);
+ if ($e.hasClass('tooltipstered'))
+ $e.tooltipster('destroy');
+ $e.prop('title', '');
+ };
+
+ k.setTooltip = function(e, tooltip) {
+ var $e = $(e);
+ if ($e.hasClass('tooltipstered'))
+ $e.tooltipster('content', tooltip);
+ else
+ $e.tooltipster({ content: tooltip, theme: 'tooltipster-light' });
+ };
+
+ k.setDisabled = function(e, tooltip) {
+ var $e = $(e);
+
+ $e.addClass(CLASSES.disabled);
+
+ if (tooltip && (tooltip != '1'))
+ kivi.ActionBar.setTooltip($e, tooltip);
+ else
+ kivi.ActionBar.removeTooltip($e);
+ };
+
+ k.setEnabled = function(e) {
+ var $e = $(e);
+ var data = $e.data('action');
+
+ $e.removeClass(CLASSES.disabled);
+
+ if (data.tooltip)
+ kivi.ActionBar.setTooltip($e, data.tooltip);
+ else
+ kivi.ActionBar.removeTooltip($e);
+ };
+
+ k.Action = function(e) {
+ var $e = $(e);
+ var instance = $e.data('instance');
+ if (instance)
+ return instance;
+
+ var data = $e.data('action');