diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-10-30 23:45:47 +0400 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2013-10-30 23:46:53 +0400 |
commit | 9d230bcc75185e855d28656ab898ff05c15bebc8 (patch) | |
tree | 979d5ad4071aa1a3d493941839e7370e366d8831 /core | |
parent | ca4a1ee5f7e223b521e41784b0d9b7ed2af162af (diff) |
Improve quota input field
- Added tooltip with examples
- The quota value returned by the server is now displayed after update
- Fixes #5346
Diffstat (limited to 'core')
-rw-r--r-- | core/js/singleselect.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/core/js/singleselect.js b/core/js/singleselect.js index 1a018b74148..0b7fc20a8f0 100644 --- a/core/js/singleselect.js +++ b/core/js/singleselect.js @@ -1,8 +1,15 @@ (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); + if ($.fn.tipsy){ + input.tipsy({gravity: 'n', trigger: 'manual'}); + } input.css('position', 'absolute'); input.css(select.offset()); input.css({ @@ -29,6 +36,9 @@ } else { event.stopImmediatePropagation(); input.show(); + if ($.fn.tipsy){ + input.tipsy('show'); + } select.css('background-color', 'white'); input.focus(); } @@ -70,6 +80,9 @@ input.on('blur', function () { $(this).change(); + if ($.fn.tipsy){ + $(this).tipsy('hide'); + } }); }); } |