@ -3203,13 +3203,14 @@ function rcube_webmail()
// show wait message
if ( this . env . action == 'show' )
lock = this . set _busy ( true , 'movingmessage' ) ;
else
this . show _contentframe ( false ) ;
// Hide message command buttons until a message is selected
this . enable _command ( this . env . message _commands , false ) ;
this . with _selected _messages ( 'move' , post _data , lock ) ;
if ( this . env . action != 'show' )
this . show _contentframe ( false ) ;
} ;
// delete selected messages from the current mailbox
@ -3252,8 +3253,8 @@ function rcube_webmail()
if ( ! post _data . _uid )
return ;
this . show _contentframe ( false ) ;
this . with _selected _messages ( 'delete' , post _data ) ;
this . show _contentframe ( false ) ;
} ;
// Send a specific move/delete request with UIDs of all selected messages
@ -3265,7 +3266,8 @@ function rcube_webmail()
// update the list (remove rows, clear selection)
if ( this . message _list ) {
var n , len , id , root , roots = [ ] ,
selection = post _data . _uid ;
selection = post _data . _uid ,
display _next = this . env . display _next && this . preview _id ;
if ( selection === '*' )
selection = this . message _list . get _selection ( ) ;
@ -3283,11 +3285,13 @@ function rcube_webmail()
}
}
if ( remove )
this . message _list . remove _row ( id , ( this . env . display _next && n == selection . length - 1 ) ) ;
this . message _list . remove _row ( id , display _next && n == selection . length - 1 ) ;
}
// make sure there are no selected rows
if ( ! this . env . display _next && remove )
if ( ! display _next && remove )
this . message _list . clear _selection ( ) ;
// update thread tree icons
for ( n = 0 , len = roots . length ; n < len ; n ++ ) {
this . add _tree _icons ( roots [ n ] ) ;
@ -3471,7 +3475,8 @@ function rcube_webmail()
lock = this . display _message ( 'markingmessage' , 'loading' ) ,
list = this . message _list ,
rows = list ? list . rows : { } ,
count = 0 ;
count = 0 ,
display _next = this . env . display _next && this . preview _id ;
for ( var i = 0 , len = a _uids . length ; i < len ; i ++ ) {
uid = a _uids [ i ] ;
@ -3481,7 +3486,7 @@ function rcube_webmail()
if ( this . env . skip _deleted ) {
count += this . update _thread ( uid ) ;
list . remove _row ( uid , ( this . env . display _next && i == list . get _selection ( false ) . length - 1 ) ) ;
list . remove _row ( uid , display _next && i == list . get _selection ( false ) . length - 1 ) ;
}
else
this . set _message ( uid , 'deleted' , true ) ;
@ -3490,7 +3495,7 @@ function rcube_webmail()
// make sure there are no selected rows
if ( this . env . skip _deleted && list ) {
if ( ! this . env . display _next || ! list . rowcount )
if ( ! display _next || ! list . rowcount )
list . clear _selection ( ) ;
if ( count < 0 )
post _data . _count = ( count * - 1 ) ;
@ -6336,9 +6341,11 @@ function rcube_webmail()
if ( this . env . search _request )
url . _search = this . env . search _request ;
if ( cid )
url . _cid = this . preview _id = cid ;
url . _action = action ;
url . _source = this . env . source ;
url . _cid = cid ;
this . location _href ( url , target , true ) ;
}
@ -6494,12 +6501,11 @@ function rcube_webmail()
for ( n = 0 ; n < selection . length ; n ++ ) {
id = selection [ n ] ;
a _cids . push ( id ) ;
this . contact _list . remove _row ( id , ( n == selection . length - 1 ) ) ;
this . contact _list . remove _row ( id , this . env . display _next && this . preview _id && n == selection . length - 1 ) ;
}
// hide content frame if we delete the currently displayed contact
if ( selection . length == 1 )
this . show _contentframe ( false ) ;
if ( ! this . env . display _next )
this . contact _list . clear _selection ( ) ;
}
if ( ! post _data )
@ -6697,12 +6703,16 @@ function rcube_webmail()
this . remove _group _contacts = function ( props )
{
if ( this . env . group !== undefined && ( this . env . group === props . gid ) ) {
var n , selection = this . contact _list . get _selection ( ) ;
var n , selection = this . contact _list . get _selection ( ) ,
display _next = this . env . display _next && this . preview _id ;
for ( n = 0 ; n < selection . length ; n ++ ) {
id = selection [ n ] ;
this . contact _list . remove _row ( id , ( n == selection . length - 1 ) ) ;
this . contact _list . clear _selection ( ) ;
this . contact _list . remove _row ( id , display _next && n == selection . length - 1 ) ;
}
if ( ! display _next )
this . contact _list . clear _selection ( ) ;
}
} ;
@ -7278,7 +7288,7 @@ function rcube_webmail()
if ( list && id ) {
list . remove _row ( rid ) ;
this . show _contentframe ( false ) ;
this . show _contentframe ( false ) ;
}
this . enable _command ( 'delete' , false ) ;