From c1fcaed2ee8f05a5030fe4e8e211ca4eae7a9489 Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Tue, 11 Jun 2013 11:44:57 -0400
Subject: [PATCH] - Fixed FS#2921 - RBL list field in server config can not be empty.
---
interface/web/js/scrigo.js.php | 87 +++++++++++++++++++++++++++----------------
1 files changed, 54 insertions(+), 33 deletions(-)
diff --git a/interface/web/js/scrigo.js.php b/interface/web/js/scrigo.js.php
index 0369ded..b1b2ef4 100644
--- a/interface/web/js/scrigo.js.php
+++ b/interface/web/js/scrigo.js.php
@@ -1,8 +1,12 @@
<?php
session_start();
include('../../lib/config.inc.php');
+ require_once('../../lib/app.inc.php');
$lang = (isset($_SESSION['s']['language']) && $_SESSION['s']['language'] != '')?$_SESSION['s']['language']:'en';
include_once(ISPC_ROOT_PATH.'/web/strengthmeter/lib/lang/'.$lang.'_strengthmeter.lng');
+
+ $app->uses('ini_parser,getconf');
+ $server_config_array = $app->getconf->get_global_config();
?>
var pageFormChanged = false;
var tabChangeWarningTxt = '';
@@ -23,47 +27,59 @@
/*alert(request);*/
}
+function resetFormChanged() {
+ pageFormChanged = false;
+}
+
function showLoadIndicator() {
- jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {type : "get_use_loadindicator"}, function(data) {
- if(data.useloadindicator == "y"){
- requestsRunning += 1;
+ document.body.style.cursor = 'wait';
+
+<?php
+if($server_config_array['misc']['use_loadindicator'] == '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;
-
- 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();});
- });
- }
+ 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();});
+ });
+ }
+<?php
+}
+?>
}
function hideLoadIndicator() {
- requestsRunning -= 1;
- if(requestsRunning < 1) {
- requestsRunning = 0; // just for the case...
- if(indicatorCompleted == true) jQuery('#ajaxloader').fadeOut('fast', function() { jQuery('#ajaxloader').hide(); } );
- }
+ document.body.style.cursor = '';
+
+ requestsRunning -= 1;
+ if(requestsRunning < 1) {
+ requestsRunning = 0; // just for the case...
+ if(indicatorCompleted == true) jQuery('#ajaxloader').fadeOut('fast', function() { jQuery('#ajaxloader').hide(); } );
+ }
}
function onAfterContentLoad() {
- 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();
- }
- });
+<?php
+if($server_config_array['misc']['use_combobox'] == 'y'){
+?>
+ $('#pageContent').find("select").combobox();
+<?php
+}
+?>
}
function loadContentRefresh(pagename) {
@@ -133,7 +149,12 @@
if(passwordObj.value == ''){
passwordObj.focus();
return;
- }
+ }
+
+ $('#dummy_username').val(userNameObj.value);
+ $('#dummy_passwort').val(passwordObj.value);
+ $('#dummy_login_form').submit();
+
var submitFormObj = jQuery.ajax({ type: "POST",
url: "content.php",
data: jQuery('#'+formname).serialize(),
--
Gitblit v1.9.1