#1755 - Can't upload any files using the 'Upload' tab on a folder in Files and Images section (merged from branches/2.2.0, r44824)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@44900 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2007-11-15 22:31:57 +00:00
parent b4b4311eb6
commit fac5e576f1
2 changed files with 21 additions and 3 deletions

View File

@ -5,7 +5,14 @@
*/
CMSMain_upload = Class.create();
CMSMain_upload.prototype = {
initialize: function() {
initialize: function() {
// Due to a bug in the flash plugin on Linux and Mac, we need at least version 9.0.64 to use SWFUpload
if(navigator.appVersion.indexOf("Mac") != -1 || navigator.appVersion.indexOf("X11") != -1 || navigator.appVersion.indexOf("Linux") != -1) {
pv = getFlashPlayerVersion();
if(pv.major < 9 || (pv.major == 9 && pv.minor == 0 && pv.rev < 64)) {
return;
}
}
this.iframe = window.top.document.getElementById('AssetAdmin_upload');
this.onLoad();
},

View File

@ -5,7 +5,7 @@
TinyMCEImageEnhancement = Class.create();
TinyMCEImageEnhancement.prototype = {
initialize: function() {
this.filesUploaed = 0;
this.filesUploaded = 0;
this.processInProgress = false;
Event.observe(window,'load',this.onWindowLoad.bind(this));
},
@ -130,7 +130,18 @@ TinyMCEImageEnhancement.prototype = {
* Called on window.onload
*/
onWindowLoad: function() {
onWindowLoad: function() {
// Due to a bug in the flash plugin on Linux and Mac, we need at least version 9.0.64 to use SWFUpload
if(navigator.appVersion.indexOf("Mac") != -1 || navigator.appVersion.indexOf("X11") != -1 || navigator.appVersion.indexOf("Linux") != -1) {
pv = getFlashPlayerVersion();
if(pv.major < 9 || (pv.major == 9 && pv.minor == 0 && pv.rev < 64)) {
$('AddFolderGroup').style.display = 'none';
$('PipeSeparator').style.display = 'none';
$('UploadGroup').style.display = 'none';
return;
}
}
if($('FolderID') != null) {
this.upload = new Upload(
{