diff options
author | Morris Jobke <morris.jobke@gmail.com> | 2013-10-31 04:25:42 -0700 |
---|---|---|
committer | Morris Jobke <morris.jobke@gmail.com> | 2013-10-31 04:25:42 -0700 |
commit | ea4dfa7e389c93c052ca2e496f58904da8967de6 (patch) | |
tree | 6295516a1f666aeb65fbaea833c10454feb0fe7f /core | |
parent | cb0ce90d01575af2e22cb203a56cafe32aea010b (diff) | |
parent | 680f4963dc13505e53a785bb7ee689fa4ffebe7d (diff) | |
download | nextcloud-server-ea4dfa7e389c93c052ca2e496f58904da8967de6.tar.gz nextcloud-server-ea4dfa7e389c93c052ca2e496f58904da8967de6.zip |
Merge pull request #5638 from owncloud/admin-quotafield
Improve quota input field
Diffstat (limited to 'core')
-rw-r--r-- | core/js/singleselect.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/core/js/singleselect.js b/core/js/singleselect.js index 1a018b74148..e2d94a9f287 100644 --- a/core/js/singleselect.js +++ b/core/js/singleselect.js @@ -1,10 +1,13 @@ (function ($) { $.fn.singleSelect = function () { return this.each(function (i, select) { - var input = $('<input/>'); + var input = $('<input/>'), + inputTooltip = $(select).attr('data-inputtitle'); + if (inputTooltip){ + input.attr('title', inputTooltip); + } select = $(select); input.css('position', 'absolute'); - input.css(select.offset()); input.css({ 'box-sizing': 'border-box', '-moz-box-sizing': 'border-box', @@ -28,7 +31,13 @@ select.data('previous', value); } else { event.stopImmediatePropagation(); + // adjust offset, in case the user scrolled + input.css(select.offset()); input.show(); + if ($.fn.tipsy){ + input.tipsy({gravity: 'n', trigger: 'manual'}); + input.tipsy('show'); + } select.css('background-color', 'white'); input.focus(); } @@ -70,6 +79,9 @@ input.on('blur', function () { $(this).change(); + if ($.fn.tipsy){ + $(this).tipsy('hide'); + } }); }); } |