From a1f6e73e6459f6684e59967ec9af125784a7a528 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Tue, 8 Oct 2019 16:28:06 +0200 Subject: [PATCH] =?utf8?q?ActionBar:=20Javascript:=20jquery-Selektor=20zu?= =?utf8?q?=20Objekt=20aufl=C3=B6sen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Sonst lassen sich die Funktionen removeTooltip, setTooltip, setDisabled, setEnabled nicht mit einem Selektor via ClientJs->run Danke Mosu. --- js/kivi.ActionBar.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/js/kivi.ActionBar.js b/js/kivi.ActionBar.js index 09393610a..210123251 100644 --- a/js/kivi.ActionBar.js +++ b/js/kivi.ActionBar.js @@ -107,20 +107,23 @@ namespace('kivi.ActionBar', function(k){ } }; - k.removeTooltip = function($e) { + k.removeTooltip = function(e) { + var $e = $(e); if ($e.hasClass('tooltipstered')) $e.tooltipster('destroy'); $e.prop('title', ''); }; - k.setTooltip = function($e, tooltip) { + 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) { + k.setDisabled = function(e, tooltip) { + var $e = $(e); var data = $e.data('action'); $e.addClass(CLASSES.disabled); @@ -131,7 +134,8 @@ namespace('kivi.ActionBar', function(k){ kivi.ActionBar.removeTooltip($e); }; - k.setEnabled = function($e) { + k.setEnabled = function(e) { + var $e = $(e); var data = $e.data('action'); $e.removeClass(CLASSES.disabled); -- 2.20.1