mcramer
2013-07-09 15af404ea2ad11f72e3e2bb61c5511b832f66de4
interface/web/js/scrigo.js.php
@@ -1,8 +1,13 @@
<?php
   session_start();
   include('../../lib/config.inc.php');
    header('Content-Type: text/javascript; charset=utf-8'); // the config file sets the content type header so we have to override it here!
   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,7 +28,16 @@
   /*alert(request);*/
}
function resetFormChanged() {
    pageFormChanged = false;
}
function showLoadIndicator() {
    document.body.style.cursor = 'wait';
<?php
if($server_config_array['misc']['use_loadindicator'] == 'y'){
?>
    requestsRunning += 1;
    
    if(requestsRunning < 2) {
@@ -44,9 +58,14 @@
            if(requestsRunning < 1) $(this).fadeOut('fast', function() { $(this).hide();});
        });
    }
<?php
}
?>
}
function hideLoadIndicator() {
    document.body.style.cursor = '';
    requestsRunning -= 1;
    if(requestsRunning < 1) {
        requestsRunning = 0; // just for the case...
@@ -55,7 +74,13 @@
}
function onAfterContentLoad() {
<?php
if($server_config_array['misc']['use_combobox'] == 'y'){
?>
    $('#pageContent').find("select").combobox();
<?php
}
?>
}
function loadContentRefresh(pagename) {
@@ -125,7 +150,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(),