Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-10-30 23:45:47 +0400
committerVincent Petry <pvince81@owncloud.com>2013-10-30 23:46:53 +0400
commit9d230bcc75185e855d28656ab898ff05c15bebc8 (patch)
tree979d5ad4071aa1a3d493941839e7370e366d8831 /core
parentca4a1ee5f7e223b521e41784b0d9b7ed2af162af (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.js15
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');
+ }
});
});
}