From a9f619ffc20d1a76f780d2bdbd85dedbee321a9f Mon Sep 17 00:00:00 2001 From: Sanj Date: Tue, 6 Mar 2012 19:19:02 +0530 Subject: [PATCH] firefox changed its UA string; ignore browser checking on upload page for now --- edgware/settings.py | 1 + edgware/static/js/upload/upload.js | 49 ------------------------------ 2 files changed, 1 insertion(+), 49 deletions(-) diff --git a/edgware/settings.py b/edgware/settings.py index 47aeea6..09c67d4 100644 --- a/edgware/settings.py +++ b/edgware/settings.py @@ -75,6 +75,7 @@ TEMPLATE_LOADERS = ( MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', + 'django.middleware.transaction.TransactionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.csrf.CsrfResponseMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', diff --git a/edgware/static/js/upload/upload.js b/edgware/static/js/upload/upload.js index 38d6727..8411f79 100644 --- a/edgware/static/js/upload/upload.js +++ b/edgware/static/js/upload/upload.js @@ -254,54 +254,5 @@ $(document).ready(function() { if (GeckoVersion) { 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(); - - }); - - */ - } });