From 3fc28c0142bf8ab4e2cfae44931e2a51aadc4d51 Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Mon, 25 Feb 2013 13:51:37 -0500
Subject: [PATCH] - Added: remoting queries with a lot of results (e.g. email addresses or alias domains or dns rr) lead to non-functioning soap requests - added '#OFFSET#' AND '#LIMIT#' handling to the query - added automatic 'WHERE 1' if an empty array was given as query example: $result = $api->sites_web_domain_get('type' => 'vhost', '#OFFSET#' => 25, '#LIMIT#' => 50); to get the websites 26 to 75
---
interface/web/js/scrigo.js.php | 76 ++++++++++++++++++++++++++------------
1 files changed, 52 insertions(+), 24 deletions(-)
diff --git a/interface/web/js/scrigo.js.php b/interface/web/js/scrigo.js.php
index 1d5d507..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 = '';
@@ -12,6 +16,7 @@
var requestsRunning = 0;
var indicatorPaddingH = -1;
var indicatorPaddingW = -1;
+var indicatorCompleted = false;
redirect = '';
function reportError(request) {
@@ -22,41 +27,59 @@
/*alert(request);*/
}
+function resetFormChanged() {
+ pageFormChanged = false;
+}
+
function showLoadIndicator() {
+ document.body.style.cursor = 'wait';
+
+<?php
+if($server_config_array['misc']['use_loadindicator'] == 'y'){
+?>
requestsRunning += 1;
- var indicator = jQuery('#ajaxloader');
- if(indicator.length < 1) {
- indicator = jQuery('<div id="ajaxloader" style="display: none;"></div>');
- indicator.appendTo('body');
+ 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 parent = jQuery('#content');
- if(parent.length < 1) return;
-
- 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');
-
- /*var atx = parent.offset().left;
- var aty = parent.offset().top;
- if(indicatorPaddingW == -1) indicatorPaddingW = parseInt(indicator.css('padding-left')) + parseInt(indicator.css('padding-right'));
- if(indicatorPaddingH == -1) indicatorPaddingH = parseInt(indicator.css('padding-top')) + parseInt(indicator.css('padding-bottom'));
- var atw = parent.outerWidth() - indicatorPaddingW;
- var ath = parent.outerHeight() - indicatorPaddingH;
-
- indicator.css( {'left': atx, 'top': aty, 'width': atw, 'height': ath } ).fadeIn('fast');*/
+<?php
+}
+?>
}
function hideLoadIndicator() {
+ document.body.style.cursor = '';
+
requestsRunning -= 1;
if(requestsRunning < 1) {
- jQuery('#ajaxloader').fadeOut('fast', function() { jQuery('#ajaxloader').hide(); } );
requestsRunning = 0; // just for the case...
+ if(indicatorCompleted == true) jQuery('#ajaxloader').fadeOut('fast', function() { jQuery('#ajaxloader').hide(); } );
}
}
function onAfterContentLoad() {
+<?php
+if($server_config_array['misc']['use_combobox'] == 'y'){
+?>
$('#pageContent').find("select").combobox();
+<?php
+}
+?>
}
function loadContentRefresh(pagename) {
@@ -126,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(),
@@ -437,14 +465,14 @@
url: pagename,
dataType: "html",
beforeSend: function() {
- showLoadIndicator();
+// showLoadIndicator();
},
success: function(data, textStatus, jqXHR) {
- hideLoadIndicator();
+// hideLoadIndicator();
jQuery('#'+elementid).html(jqXHR.responseText);
},
error: function() {
- hideLoadIndicator();
+// hideLoadIndicator();
reportError('Ajax Request was not successful. 118');
}
});
--
Gitblit v1.9.1