@ -1631,7 +1631,7 @@ function rcube_webmail()
add _url += '&_search=' + this . env . search _request ;
add _url += '&_search=' + this . env . search _request ;
// set page=1 if changeing to another mailbox
// set page=1 if changeing to another mailbox
if ( ! page && this . env . mailbox != mbox )
if ( ! page && this . env . mailbox != mbox )
{
{
page = 1 ;
page = 1 ;
this . env . current _page = page ;
this . env . current _page = page ;
@ -2176,7 +2176,10 @@ function rcube_webmail()
var list = this . gui _objects . attachmentlist . getElementsByTagName ( "li" ) ;
var list = this . gui _objects . attachmentlist . getElementsByTagName ( "li" ) ;
for ( i = 0 ; i < list . length ; i ++ )
for ( i = 0 ; i < list . length ; i ++ )
if ( ! String ( list [ i ] . id ) . match ( /^rcmfile/ ) )
if ( ! String ( list [ i ] . id ) . match ( /^rcmfile/ ) )
{
alert ( this . get _label ( 'notuploadedwarning' ) ) ;
return false ;
return false ;
}
}
}
// display localized warning for missing subject
// display localized warning for missing subject
@ -2484,10 +2487,12 @@ function rcube_webmail()
// hide upload form
// hide upload form
this . show _attachment _form ( false ) ;
this . show _attachment _form ( false ) ;
// display upload indicator
// display upload indicator and cancel button
var content = this . get _label ( 'uploading' ) ;
var content = this . get _label ( 'uploading' ) ;
if ( this . env . loadingicon )
if ( this . env . loadingicon )
content = '<img src="' + this . env . loadingicon + '" alt="" />' + content ;
content = '<img src="' + this . env . loadingicon + '" alt="" />' + content ;
if ( this . env . cancelicon )
content = '<a title="' + this . get _label ( 'cancel' ) + '" onclick="return rcmail.cancel_attachment_upload(\'' + ts + '\', \'' + frame _name + '\');" href="#cancelupload"><img src="' + this . env . cancelicon + '" alt="" /></a>' + content ;
this . add2attachment _list ( ts , content ) ;
this . add2attachment _list ( ts , content ) ;
}
}
@ -2535,6 +2540,16 @@ function rcube_webmail()
return true ;
return true ;
} ;
} ;
this . cancel _attachment _upload = function ( name , frame _name )
{
if ( ! name || ! frame _name )
return false ;
this . remove _from _attachment _list ( name ) ;
$ ( "iframe[name='" + frame _name + "']" ) . remove ( ) ;
return false ;
} ;
// send remote request to add a new contact
// send remote request to add a new contact
this . add _contact = function ( value )
this . add _contact = function ( value )
{
{