From: Moritz Bunkus Date: Wed, 9 Nov 2016 09:27:33 +0000 (+0100) Subject: ActionBar: Unterstützung für Tooltips für deaktivierte Actions X-Git-Tag: release-3.5.4~1374 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=8817139d57b9a916933a2b210cd2135a90d0ebef;p=kivitendo-erp.git ActionBar: Unterstützung für Tooltips für deaktivierte Actions --- diff --git a/SL/Layout/ActionBar/Action.pm b/SL/Layout/ActionBar/Action.pm index 1ee9a3e95..5d03b7c05 100644 --- a/SL/Layout/ActionBar/Action.pm +++ b/SL/Layout/ActionBar/Action.pm @@ -78,7 +78,7 @@ on click submit the form specified by form-selector with the additional params on click call the specified function (is this a special case of checks?) -- disabled => true/false (done) +- disabled => true/false/tooltip explaning why disabled (done) TODO: diff --git a/js/kivi.ActionBar.js b/js/kivi.ActionBar.js index 597b48528..4d5fb54c4 100644 --- a/js/kivi.ActionBar.js +++ b/js/kivi.ActionBar.js @@ -103,6 +103,8 @@ namespace('kivi', function(k){ if (data.disabled) { $(e).addClass(CLASSES.disabled); + if (!data.tooltip && (data.disabled != '1')) + data.tooltip = data.disabled; } if (data.accesskey) {