From 06edfd868603bb622ec17d609214f4b680f8e011 Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Thu, 29 Nov 2012 09:04:14 -0500
Subject: [PATCH] - Added options to disable combobox and load indicator in Interface Config (default is on). - Bugfix: sys.ini and server.ini: if checkbox is not checked, write default value from tform file into database.
---
interface/web/js/scrigo.js.php | 60 ++++++++++++++++++++++++++++++++++++------------------------
1 files changed, 36 insertions(+), 24 deletions(-)
diff --git a/interface/web/js/scrigo.js.php b/interface/web/js/scrigo.js.php
index 1051905..ab31522 100644
--- a/interface/web/js/scrigo.js.php
+++ b/interface/web/js/scrigo.js.php
@@ -24,38 +24,50 @@
}
function showLoadIndicator() {
- requestsRunning += 1;
+ jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {type : "get_use_loadindicator"}, function(data) {
+ if(data.useloadindicator == "y"){
+ requestsRunning += 1;
- if(requestsRunning < 2) {
- var indicator = jQuery('#ajaxloader');
- if(indicator.length < 1) {
- indicator = jQuery('<div id="ajaxloader" style="display: none;"></div>');
- indicator.appendTo('body');
- }
- var parent = jQuery('#content');
- if(parent.length < 1) return;
- indicatorCompleted = false;
+ if(requestsRunning < 2) {
+ var indicator = jQuery('#ajaxloader');
+ if(indicator.length < 1) {
+ indicator = jQuery('<div id="ajaxloader" style="display: none;"></div>');
+ indicator.appendTo('body');
+ }
+ var parent = jQuery('#content');
+ if(parent.length < 1) return;
+ indicatorCompleted = false;
- var atx = parent.offset().left + 150; //((parent.outerWidth(true) - indicator.outerWidth(true)) / 2);
- var aty = parent.offset().top + 150;
- indicator.css( {'left': atx, 'top': aty } ).fadeIn('fast', function() {
- // check if loader should be hidden immediately
- indicatorCompleted = true;
- if(requestsRunning < 1) $(this).fadeOut('fast', function() { $(this).hide();});
- });
- }
+ var atx = parent.offset().left + 150; //((parent.outerWidth(true) - indicator.outerWidth(true)) / 2);
+ var aty = parent.offset().top + 150;
+ indicator.css( {'left': atx, 'top': aty } ).fadeIn('fast', function() {
+ // check if loader should be hidden immediately
+ indicatorCompleted = true;
+ if(requestsRunning < 1) $(this).fadeOut('fast', function() { $(this).hide();});
+ });
+ }
+ }
+ });
}
function hideLoadIndicator() {
- requestsRunning -= 1;
- if(requestsRunning < 1) {
- requestsRunning = 0; // just for the case...
- if(indicatorCompleted == true) jQuery('#ajaxloader').fadeOut('fast', function() { jQuery('#ajaxloader').hide(); } );
- }
+ jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {type : "get_use_loadindicator"}, function(data) {
+ if(data.useloadindicator == "y"){
+ requestsRunning -= 1;
+ if(requestsRunning < 1) {
+ requestsRunning = 0; // just for the case...
+ if(indicatorCompleted == true) jQuery('#ajaxloader').fadeOut('fast', function() { jQuery('#ajaxloader').hide(); } );
+ }
+ }
+ });
}
function onAfterContentLoad() {
- $('#pageContent').find("select").combobox();
+ jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {type : "get_use_combobox"}, function(data) {
+ if(data.usecombobox == "y"){
+ $('#pageContent').find("select").combobox();
+ }
+ });
}
function loadContentRefresh(pagename) {
--
Gitblit v1.9.1