|
|
@ -128,7 +128,7 @@ GUI_control.prototype.switchery = function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GUI_control.prototype.content_ready = function (callback) {
|
|
|
|
GUI_control.prototype.content_ready = function (callback) {
|
|
|
|
|
|
|
|
const content = $('#content').removeClass('loading');
|
|
|
|
$('.togglesmall').each(function(index, elem) {
|
|
|
|
$('.togglesmall').each(function(index, elem) {
|
|
|
|
var switchery = new Switchery(elem, {
|
|
|
|
var switchery = new Switchery(elem, {
|
|
|
|
size: 'small',
|
|
|
|
size: 'small',
|
|
|
@ -190,7 +190,13 @@ GUI_control.prototype.content_ready = function (callback) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
if (callback) callback();
|
|
|
|
const duration = content.data('empty') ? 0 : 400;
|
|
|
|
|
|
|
|
$('#content .data-loading').fadeOut(duration, function() {
|
|
|
|
|
|
|
|
$(this).remove();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
if (callback) {
|
|
|
|
|
|
|
|
callback();
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
GUI_control.prototype.updateStatusBar = function() {
|
|
|
|
GUI_control.prototype.updateStatusBar = function() {
|
|
|
@ -243,5 +249,15 @@ GUI_control.prototype.simpleBind = function () {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GUI_control.prototype.load = function(rel, callback) {
|
|
|
|
|
|
|
|
const content = $('#content').addClass('loading');
|
|
|
|
|
|
|
|
$.get(rel, function(data) {
|
|
|
|
|
|
|
|
$(data).appendTo(content);
|
|
|
|
|
|
|
|
if (callback) {
|
|
|
|
|
|
|
|
callback();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// initialize object into GUI variable
|
|
|
|
// initialize object into GUI variable
|
|
|
|
var GUI = new GUI_control();
|
|
|
|
var GUI = new GUI_control();
|
|
|
|