firefox changed its UA string; ignore browser checking on upload page for now

This commit is contained in:
Sanj 2012-03-06 19:19:02 +05:30
parent b28f9a6f87
commit a9f619ffc2
2 changed files with 1 additions and 49 deletions

View File

@ -75,6 +75,7 @@ TEMPLATE_LOADERS = (
MIDDLEWARE_CLASSES = ( MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware', 'django.middleware.common.CommonMiddleware',
'django.middleware.transaction.TransactionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.csrf.CsrfResponseMiddleware', 'django.middleware.csrf.CsrfResponseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware',

View File

@ -254,54 +254,5 @@ $(document).ready(function() {
if (GeckoVersion) { if (GeckoVersion) {
GeckoVersion = GeckoVersion[1]; GeckoVersion = GeckoVersion[1];
} }
if (!(Chrome || WebKitVersion >= '534.28' ||
(GeckoVersion >= '2.0'))) {
alert("sorry, you need another browser to upload files to edgwareroad.org - try recent versions of firefox or chrome for best results.");
window.location = "/";
// $('#firefogg').hide();
// $('#submit').hide();
/*
$('#file').change(function(e) {
if(this.files.length>0) {
$('#file').hide();
$('#upload').show();
}
});
if($('#file')[0].files.length>0) {
$('#file').hide();
$('#upload').show();
} else {
$('#upload').hide();
}
*/
/*
$('#upload').click(function(e) {
$('#upload').hide();
e.stopPropagation();
var file = $('#file')[0].files[0];
var data = {
'firefogg': 1,
'name': file.name, // Send filename here since Blobs will have no name later
'category': $('#files_category').val()
};
var ogg = FirefoggUploader(file, add_url, data, function(ogg) { //callback
if(ogg.resultUrl) {
document.location.href = ogg.resultUrl;
} else {
$('#progressstatus').html(ogg.status);
}
}, function(progress) { //progress callback
//do something with status and progress, i.e. set progressbar width:
$('#progress').css('width', parseInt(progress*100, 10) +'%');
$('#progressstatus').html(parseInt(progress*100, 10) + '% - ' + ogg.status);
});
$('#submitFile').hide();
});
*/
}
}); });