[pLog-svn] r5943 - plog/trunk/js/ui
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Thu Sep 20 16:21:19 EDT 2007
Author: oscar
Date: 2007-09-20 16:21:18 -0400 (Thu, 20 Sep 2007)
New Revision: 5943
Modified:
plog/trunk/js/ui/upload.js
Log:
Fix for IE
Modified: plog/trunk/js/ui/upload.js
===================================================================
--- plog/trunk/js/ui/upload.js 2007-09-20 19:10:10 UTC (rev 5942)
+++ plog/trunk/js/ui/upload.js 2007-09-20 20:21:18 UTC (rev 5943)
@@ -94,21 +94,23 @@
var ul = document.createElement( 'ul' );
queueContainer.appendChild( ul );
- // append all the elements to the main container
+ // append all the elements to the main container
var container = Lifetype.Dom.$( Lifetype.UI.Upload.params.container );
- container.appendChild( browseLink );
+ container.appendChild( browseLink );
container.appendChild( queueContainer );
- // add our 'upload' button
- var uploadButton = Lifetype.Dom.$( Lifetype.UI.Upload.params.uploadButton );
- if( uploadButton ) {
- uploadButton.type = 'button';
- uploadButton.onclick = Lifetype.UI.Upload.uploadQueue;
- }
- else
- window.alert( 'Could not find the upload button: ' + params.uploadButton );
-
- this.showUI(); // Let SWFUpload finish loading the UI.
+ // add our 'upload' button by cloning the old one and replacing it
+ // with our own
+ var btn = Lifetype.Dom.$( Lifetype.UI.Upload.params.uploadButton );
+ var upload = document.createElement( 'input' );
+ upload.type = 'button';
+ upload.name = btn.name;
+ upload.value = btn.value;
+ upload.onclick = Lifetype.UI.Upload.uploadQueue;
+ upload.className = btn.className;
+ btn.parentNode.replaceChild( upload, btn );
+
+ this.showUI(); // Let SWFUpload finish loading the UI.
}
/**
More information about the pLog-svn
mailing list