diff --git a/header-webbuild.php b/header-webbuild.php index 96c9324..96ed244 100644 --- a/header-webbuild.php +++ b/header-webbuild.php @@ -48,23 +48,25 @@ print ""; +print "" . PHP_EOL; -print ''; +print '' . PHP_EOL; # styles needed by jScrollPane -print ''; +print '' . PHP_EOL; # jQuery -print ''; +print '' . PHP_EOL; # the mousewheel plugin - optional to provide mousewheel suppor -print ''; +print '' . PHP_EOL; # the jScrollPane script -print ''; +print '' . PHP_EOL; # webbuild css -print ''; +print '' . PHP_EOL; # socialbox -print ''; +print '' . PHP_EOL; +# webbuild +#print ''; # distroquery -print ''; +print '' . PHP_EOL; $file = fopen(get_stylesheet_directory() . "/webbuild.js.inc", "r"); print fread($file, 20000); diff --git a/webbuild.js.inc b/webbuild.js.inc index ea3aba8..c00e84f 100644 --- a/webbuild.js.inc +++ b/webbuild.js.inc @@ -36,18 +36,17 @@ function editorChanged() { } function ajax_getvalues(request,confirm) { - var url = "/cgi-bin/webbuild.cgi"; + var url; // limit to this function the scope of xmlhttp to avoid sockets left pending var xmlhttp; if (host != undefined) { webbuildhost=host; } else { - webbuildhost="buildvm01"; - } - if (typeof webbuildhost != 'undefined' && webbuildhost != "") { - url = "/cgi-bin/webbuild-" + webbuildhost + ".cgi"; + alert("ERROR: webbuildhost is not defined!"); + return; } + url = "/cgi-bin/webbuild-" + webbuildhost + ".cgi"; if (confirm) { document.getElementById("status").innerHTML = @@ -159,17 +158,16 @@ function ajax_getvalues(request,confirm) { // ajaxFileUpload function ajaxFileUpload(request) { -/* $("#loading") - .ajaxStart(function(){ - $(this).show(); - }) - .ajaxComplete(function(){ - $(this).hide(); - });*/ + if (host != undefined) { + webbuildhost=host; + } else { + alert("Error: webbuildhost undefined!"); + return; + } $.ajaxFileUpload ( { - url:'/cgi-bin/webbuild.cgi', + url:'/cgi-bin/webbuild-' + webbuildhost + '.cgi', secureuri:false, fileElementId:'fileToUpload', dataType: 'xml',