tbrehm
2010-09-19 d2212dda734bb8c4b899faab848fa1bd7c1bf66e
interface/web/js/scrigo.js.php
@@ -6,13 +6,21 @@
redirect = '';
function reportError(request) {
   /* Error reporting is disabled by default as some browsers like safari
      sometimes throw errors when a ajax request is delayed even if the
      ajax request worked. */
   /*alert(request);*/
}
function loadContentRefresh(pagename) {
   var pageContentCallbackRefresh = {
      success: function(o) {
         document.getElementById('pageContent').innerHTML = o.responseText;
      },
      failure: function(o) {
         alert('Ajax Request was not successful.'+pagename);
         reportError('Ajax Request was not successful.'+pagename);
      }
   }
   
@@ -36,7 +44,7 @@
         loadMenus();
      },
      failure: function(o) {
         alert('Ajax Request was not successful.');
         reportError('Ajax Request was not successful.'+module);
      }
   }
   var submitFormObj = YAHOO.util.Connect.asyncRequest('GET', 'capp.php?mod='+module, cappCallback);
@@ -61,7 +69,7 @@
         loadMenus();
      },
      failure: function(o) {
         alert('Ajax Request was not successful.');
         reportError('Ajax Request was not successful.110');
      }
   }
   
@@ -84,8 +92,9 @@
      loadContent(redirect);
      redirect = '';
   }
   document.getElementById('footer').innerHTML = 'Powered by <a href="http://www.ispconfig.org" target="_blank">ISPConfig</a>';
   */
   document.getElementById('footer').innerHTML = 'Powered by <a href="http://www.ispconfig.org" target="_blank">ISPConfig <?php echo ISPC_APP_VERSION ?></a>';
}
function submitForm(formname,target) {
@@ -104,7 +113,7 @@
      },
      failure: function(o) {
         var parts = o.responseText.split(':');
         alert('Ajax Request was not successful. '+parts[1]);
         reportError('Ajax Request was not successful. 111');
      }
   }
   
@@ -144,7 +153,7 @@
         }
        },
      failure: function(o) {
         alert('Ajax Request was not successful. 1');
         reportError('Ajax Request was not successful. 112');
      }
   }
   
@@ -172,7 +181,7 @@
         }
      },
      failure: function(o) {
         alert('Ajax Request was not successful.');
         reportError('Ajax Request was not successful. 113');
      }
   }
   
@@ -206,7 +215,7 @@
         */
      },
      failure: function(o) {
         alert('Ajax Request was not successful.');
         reportError('Ajax Request was not successful. 114');
      }
   }
   
@@ -237,7 +246,10 @@
         if(flag)break;
      }
*/
  document.pageForm.username.focus();
   try {
      document.pageForm.username.focus();
   } catch (e) {
   }
}
@@ -248,7 +260,7 @@
         document.getElementById('sideNav').innerHTML = o.responseText;
      },
      failure: function(o) {
         alert('Ajax Request was not successful.');
         reportError('Ajax Request was not successful. 115');
      }
   }
   
@@ -259,7 +271,7 @@
         document.getElementById('topNav').innerHTML = o.responseText;
      },
      failure: function(o) {
         alert('Ajax Request was not successful.');
         reportError('Ajax Request was not successful. 116');
      }
   }
   
@@ -272,13 +284,6 @@
   document.pageForm.next_tab.value = tab;
   submitForm('pageForm',target);
}
function reportError(request)
   {
      alert('Sorry. There was an error.');
   }
   
function del_record(link,confirmation) {
  if(window.confirm(confirmation)) {
@@ -292,7 +297,7 @@
         document.getElementById(elementid).innerHTML = o.responseText;
      },
      failure: function(o) {
         alert('Ajax Request was not successful.');
         reportError('Ajax Request was not successful. 118');
      }
   }
   
@@ -316,7 +321,7 @@
         }
      },
      failure: function(o) {
      alert('Ajax Request was not successful.');
      reportError('Ajax Request was not successful. 119');
      }
   }
   var pageContentObject2 = YAHOO.util.Connect.asyncRequest('GET', pagename, itemContentCallback);
@@ -328,7 +333,7 @@
         setTimeout( keepalive, 1000000 );
      },
      failure: function(o) {
         alert('Sorry. There was an error.');
         reportError('Session expired. Please login again.');
      }
   }
   
@@ -459,11 +464,12 @@
function addAdditionalTemplate(){
   var tpl_add = document.getElementById('template_additional').value;
   if(tpl_add != '') {
     var tpl_list = document.getElementById('template_additional_list').innerHTML;
     var addTemplate = document.getElementById('tpl_add_select').value.split('|',2);
     var addTplId = addTemplate[0];
     var addTplText = addTemplate[1];
   if(addTplId > 0) {
     var newVal = tpl_add + '/' + addTplId + '/';
     newVal = newVal.replace('//', '/');
     var newList = tpl_list + '<br>' + addTplText;