webbuild.js: fixes
This commit is contained in:
parent
81153435c1
commit
61960704b0
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
WEBBUILD_HOST=mambanana
|
||||
if [ "$QUERY_STRING" ]; then
|
||||
# get (download, preserve content-type and content-disposition headrs)
|
||||
# get (download, preserve content-type and content-disposition headers)
|
||||
contentdisposition=`curl -4 --connect-timeout 40 -sI "http://$WEBBUILD_HOST/cgi-bin/webbuild?$QUERY_STRING" -H "Content-Type: $CONTENT_TYPE" | grep Content-Disposition`
|
||||
echo "\
|
||||
$contentdisposition
|
||||
|
@ -185,14 +185,21 @@ function getDownload(request) {
|
||||
// ajaxFileUpload
|
||||
|
||||
jQuery.extend({
|
||||
|
||||
|
||||
handleError: function( s, xhr, status, e ) {
|
||||
// If a local callback was specified, fire it
|
||||
if ( s.error )
|
||||
s.error( xhr, status, e );
|
||||
// If we have some XML response text (e.g. from an AJAX call) then log it in the console
|
||||
else if(xhr.responseText)
|
||||
console.log(xhr.responseText);
|
||||
},
|
||||
createUploadIframe: function(id, uri)
|
||||
{
|
||||
//create frame
|
||||
var frameId = 'jUploadFrame' + id;
|
||||
var iframeHtml = '<iframe id="' + frameId + '" name="' + frameId + '" style="position:absolute; top:-9999px; left:-9999px"';
|
||||
if(window.ActiveXObject)
|
||||
if(window.ActiveXObject)
|
||||
{
|
||||
if(typeof uri== 'boolean'){
|
||||
iframeHtml += ' src="' + 'javascript:false' + '"';
|
||||
@ -238,13 +245,13 @@ jQuery.extend({
|
||||
},
|
||||
|
||||
ajaxFileUpload: function(s) {
|
||||
// TODO introduce global settings, allowing the client to modify them for all requests, not only timeout
|
||||
// TODO introduce global settings, allowing the client to modify them for all requests, not only timeout
|
||||
s = jQuery.extend({}, jQuery.ajaxSettings, s);
|
||||
var id = new Date().getTime()
|
||||
var form = $.createUploadForm(id, s.fileElementId, (typeof(s.data)=='undefined'?false:s.data));
|
||||
var io = $.createUploadIframe(id, s.secureuri);
|
||||
var frameId = 'jUploadFrame' + id;
|
||||
var formId = 'jUploadForm' + id;
|
||||
var id = new Date().getTime();
|
||||
var form = $.createUploadForm(id, s.fileElementId, (typeof(s.data)=='undefined'?false:s.data));
|
||||
var io = $.createUploadIframe(id, s.secureuri);
|
||||
var frameId = 'jUploadFrame' + id;
|
||||
var formId = 'jUploadForm' + id;
|
||||
// Watch for a new set of requests
|
||||
if ( s.global && ! jQuery.active++ )
|
||||
{
|
||||
@ -263,14 +270,13 @@ jQuery.extend({
|
||||
{
|
||||
if(io.contentWindow)
|
||||
{
|
||||
xml.responseText = io.contentWindow.document.body?io.contentWindow.document.body.innerHTML:null;
|
||||
xml.responseXML = io.contentWindow.document.XMLDocument?io.contentWindow.document.XMLDocument:io.contentWindow.document;
|
||||
|
||||
xml.responseText = io.contentWindow.document.body?io.contentWindow.document.body.innerHTML:null;
|
||||
xml.responseXML = io.contentWindow.document.XMLDocument?io.contentWindow.document.XMLDocument:io.contentWindow.document;
|
||||
}else if(io.contentDocument)
|
||||
{
|
||||
xml.responseText = io.contentDocument.document.body?io.contentDocument.document.body.innerHTML:null;
|
||||
xml.responseXML = io.contentDocument.document.XMLDocument?io.contentDocument.document.XMLDocument:io.contentDocument.document;
|
||||
}
|
||||
xml.responseText = io.contentDocument.document.body?io.contentDocument.document.body.innerHTML:null;
|
||||
xml.responseXML = io.contentDocument.document.XMLDocument?io.contentDocument.document.XMLDocument:io.contentDocument.document;
|
||||
}
|
||||
}catch(e)
|
||||
{
|
||||
$.handleError(s, xml, null, e);
|
||||
|
Loading…
Reference in New Issue
Block a user