witten
/
luminotes
Archived
1
0
Fork 0

Once an upload has started, you can no longer close the Upload_pulldown by

clicking somewhere else. You have to click "cancel". This is to prevent
accidental upload cancellations.
This commit is contained in:
Dan Helfman 2008-02-19 20:48:43 +00:00
parent a34ffe2dc6
commit 8443f7e5cb
2 changed files with 8 additions and 3 deletions

View File

@ -425,7 +425,7 @@ class Files( object ):
<td></td>
<td><span id="status"></span></td>
<td></td>
<td><input type="submit" id="cancel_button" class="button" value="cancel" onclick="withDocument( window.parent.document, function () { getElement( 'upload_frame' ).pulldown.shutdown(); } );" /></td>
<td><input type="submit" id="cancel_button" class="button" value="cancel" onclick="withDocument( window.parent.document, function () { getElement( 'upload_frame' ).pulldown.shutdown( true ); } );" /></td>
</tr></table>
<script type="text/javascript">
function tick( fraction ) {

View File

@ -2340,14 +2340,19 @@ Upload_pulldown.prototype.upload_complete = function () {
this.link.href = "/files/download?file_id=" + this.file_id
new File_link_pulldown( this.wiki, this.notebook_id, this.invoker, this.editor, this.link );
this.shutdown();
this.shutdown( true );
}
Upload_pulldown.prototype.update_position = function ( anchor, relative_to ) {
Pulldown.prototype.update_position.call( this, anchor, relative_to );
}
Upload_pulldown.prototype.shutdown = function () {
Upload_pulldown.prototype.shutdown = function ( force ) {
// if there's a file id set, then an upload is in progress. so if the force flag is not set, bail
// without performing a shutdown
if ( this.file_id && !force )
return;
Pulldown.prototype.shutdown.call( this );
if ( this.link )
this.link.pulldown = null;