webbuild: fix file upload
This commit is contained in:
parent
c211d764be
commit
df488c625c
@ -48,23 +48,25 @@ print "<script>";
|
||||
print "var user = \"" . wp_get_current_user()->user_login . "\";";
|
||||
print "var user_email = \"" . wp_get_current_user()->user_email . "\";";
|
||||
print "var secret = \"" . wp_get_current_user()->user_pass . "\";";
|
||||
print "</script>";
|
||||
print "</script>" . PHP_EOL;
|
||||
|
||||
print '<link rel="shortcut icon" type="image/x-icon" href="' . get_stylesheet_directory_uri() . '/images/webbuild.ico" />';
|
||||
print '<link rel="shortcut icon" type="image/x-icon" href="' . get_stylesheet_directory_uri() . '/images/webbuild.ico" />' . PHP_EOL;
|
||||
# styles needed by jScrollPane
|
||||
print '<link type="text/css" href="' . get_stylesheet_directory_uri() . '/scripts/jquery.jscrollpane.css" rel="stylesheet" media="all" >';
|
||||
print '<link type="text/css" href="' . get_stylesheet_directory_uri() . '/scripts/jquery.jscrollpane.css" rel="stylesheet" media="all" >' . PHP_EOL;
|
||||
# jQuery
|
||||
print '<script type="text/javascript" src="' . get_stylesheet_directory_uri() . '/scripts/jquery.js"></script>';
|
||||
print '<script type="text/javascript" src="' . get_stylesheet_directory_uri() . '/scripts/jquery.js"></script>' . PHP_EOL;
|
||||
# the mousewheel plugin - optional to provide mousewheel suppor
|
||||
print '<script type="text/javascript" src="' . get_stylesheet_directory_uri() . '/scripts/jquery.mousewheel.js"></script>';
|
||||
print '<script type="text/javascript" src="' . get_stylesheet_directory_uri() . '/scripts/jquery.mousewheel.js"></script>' . PHP_EOL;
|
||||
# the jScrollPane script
|
||||
print '<script type="text/javascript" src="' . get_stylesheet_directory_uri() . '/scripts/jquery.jscrollpane.min.js"></script>';
|
||||
print '<script type="text/javascript" src="' . get_stylesheet_directory_uri() . '/scripts/jquery.jscrollpane.min.js"></script>' . PHP_EOL;
|
||||
# webbuild css
|
||||
print '<link rel="stylesheet" type="text/css" href="' . get_stylesheet_directory_uri() . '/styles/webbuild.css">';
|
||||
print '<link rel="stylesheet" type="text/css" href="' . get_stylesheet_directory_uri() . '/styles/webbuild.css">' . PHP_EOL;
|
||||
# socialbox
|
||||
print '<script type="text/javascript" src="' . get_stylesheet_directory_uri() . '/scripts/socialbox.js"></script>';
|
||||
print '<script type="text/javascript" src="' . get_stylesheet_directory_uri() . '/scripts/socialbox.js"></script>' . PHP_EOL;
|
||||
# webbuild
|
||||
#print '<script type="text/javascript" src="' . get_stylesheet_directory_uri() . '/scripts/webbuild.js"></script>';
|
||||
# distroquery
|
||||
print '<script type="text/javascript" src="' . get_stylesheet_directory_uri() . '/scripts/distroquery.js"></script>';
|
||||
print '<script type="text/javascript" src="' . get_stylesheet_directory_uri() . '/scripts/distroquery.js"></script>' . PHP_EOL;
|
||||
|
||||
$file = fopen(get_stylesheet_directory() . "/webbuild.js.inc", "r");
|
||||
print fread($file, 20000);
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user