extending implementation, bugfixes

10.3.x-maintenance
cTn 2014-01-22 16:28:52 +01:00
parent a1e4111996
commit 3d5e333c6d
1 changed files with 11 additions and 29 deletions

30
main.js
View File

@ -196,29 +196,20 @@ function add_custom_spinners() {
});
$('.up', spinner).mousedown(function() {
var self = $(this);
self.data('mousedown', true);
GUI.timeout_add('spinner', function() {
if (self.data('mousedown')) {
up();
GUI.interval_add('spinner', function() {
up();
}, 100);
}
}, 100, true);
}, 250);
});
$('.up', spinner).mouseup(function() {
var self = $(this);
self.data('mousedown', false);
GUI.timeout_remove('spinner');
GUI.interval_remove('spinner');
});
$('.up', spinner).mouseleave(function() {
var self = $(this);
self.data('mousedown', false);
GUI.timeout_remove('spinner');
GUI.interval_remove('spinner');
});
@ -228,29 +219,20 @@ function add_custom_spinners() {
});
$('.down', spinner).mousedown(function() {
var self = $(this);
self.data('mousedown', true);
GUI.timeout_add('spinner', function() {
if (self.data('mousedown')) {
down();
GUI.interval_add('spinner', function() {
down();
}, 100);
}
}, 100, true);
}, 250);
});
$('.down', spinner).mouseup(function() {
var self = $(this);
self.data('mousedown', false);
GUI.timeout_remove('spinner');
GUI.interval_remove('spinner');
});
$('.down', spinner).mouseleave(function() {
var self = $(this);
self.data('mousedown', false);
GUI.timeout_remove('spinner');
GUI.interval_remove('spinner');
});