diff options
Diffstat (limited to 'app/assets/javascripts/lib/common_utils.js.coffee')
-rw-r--r-- | app/assets/javascripts/lib/common_utils.js.coffee | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/app/assets/javascripts/lib/common_utils.js.coffee b/app/assets/javascripts/lib/common_utils.js.coffee index cf7c27cb265..e39dcb2daa9 100644 --- a/app/assets/javascripts/lib/common_utils.js.coffee +++ b/app/assets/javascripts/lib/common_utils.js.coffee @@ -23,6 +23,24 @@ return if @isInGroupsPage() then $('body').data 'group' else null + + gl.utils.updateTooltipTitle = ($tooltipEl, newTitle) -> + + $tooltipEl + .tooltip 'destroy' + .attr 'title', newTitle + .tooltip 'fixTitle' + + + gl.utils.preventDisabledButtons = -> + + $('.btn').click (e) -> + if $(this).hasClass 'disabled' + e.preventDefault() + e.stopImmediatePropagation() + return false + + jQuery.timefor = (time, suffix, expiredLabel) -> return '' unless time @@ -44,5 +62,4 @@ return timefor - ) window |