Changeset 7206


Ignore:
Timestamp:
09/13/12 18:12:21 (8 years ago)
Author:
thiago
Message:

Ticket #3088 - Agora é possivel Mover pastas.

Location:
sandbox/2.5.0-expresso1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.5.0-expresso1/expressoMail1_2/js/mail_archiver.js

    r7205 r7206  
    556556 *@param folder_to Folter that will receive the new folder 
    557557 */ 
    558 MailArchiver.prototype.moveFolder = function(folter_to_move, folter_to){ 
     558MailArchiver.prototype.moveFolder = function(folder_to_move, folder_to){ 
    559559    try{ 
    560560        connector.showProgressBar(); 
    561         ArchiveServices.moveFolder(expresso_mail_archive.getFoldersListOperationOK, expresso_mail_archive.getFoldersListOperationFailure, expresso_mail_archive.session.id, folter_to, folter_to_move); 
     561        ArchiveServices.moveFolder(expresso_mail_archive.moveFolderOK, expresso_mail_archive.moveFolderFailure, expresso_mail_archive.session.id, folder_to_move, folder_to); 
    562562    }catch(e){ 
    563563        expresso_mail_archive.getFaultInfo(); 
    564564    } 
    565      
    566 } 
    567 MailArchiver.prototype.getArchiveOperationOK = function(message){ 
    568     document.write("Sucesso, sucesso, sucesso!!!"); 
    569 } 
    570 MailArchiver.prototype.getArchiveOperationFailure = function(error_message){ 
     565} 
     566MailArchiver.prototype.moveFolderOK = function(message){ 
     567    write_msg(get_lang("Your folder was moved!")); 
     568} 
     569MailArchiver.prototype.moveFolderFailure = function(error_message){ 
    571570    alert("Error: " + error_message.getReturn()); 
    572571} 
  • sandbox/2.5.0-expresso1/prototype/modules/mail/js/foldertree.js

    r7202 r7206  
    317317                $(this).addClass("folders-loading"); 
    318318 
    319                 $.ajax({ 
    320                     url : "controller.php?"+ $.param( { action: "$this.imap_functions.move_folder", folder_to_move: folder_to_move, folder_to: folder_to } ), 
    321                     success : function(data){ 
    322                         cExecute("$this.imap_functions.get_folders_list&onload=true", update_menu); 
    323                         data = connector.unserialize(data); 
    324                         if(data == "Permission denied"){ 
    325                             write_msg(get_lang("Permission denied")); 
    326                         }else if(data){ 
    327                             write_msg(get_lang("The folder was successfully moved")); 
    328                         } else { 
    329                             write_msg(get_lang("ERROR moving your folder.")); 
     319 
     320                if($(this).parent().parent().parent().find("input").val() == "localFolder"){ 
     321                    var idFolder = $(this).parent().attr("id").split("_")[2]; 
     322 
     323                    expresso_mail_archive.moveFolder(idFolder, folder_to_move.split("_")[2]); 
     324                     cExecute("$this.imap_functions.get_folders_list&onload=true", update_menu); 
     325                } else { 
     326                    $.ajax({ 
     327                        url : "controller.php?"+ $.param( { action: "$this.imap_functions.move_folder", folder_to_move: folder_to_move, folder_to: folder_to } ), 
     328                        success : function(data){ 
     329                            cExecute("$this.imap_functions.get_folders_list&onload=true", update_menu); 
     330                            data = connector.unserialize(data); 
     331                            if(data == "Permission denied"){ 
     332                                write_msg(get_lang("Permission denied")); 
     333                            }else if(data){ 
     334                                write_msg(get_lang("The folder was successfully moved")); 
     335                            } else { 
     336                                write_msg(get_lang("ERROR moving your folder.")); 
     337                            } 
    330338                        } 
    331                     } 
    332                 }); 
     339                    }); 
     340                } 
    333341            } 
    334342        } 
Note: See TracChangeset for help on using the changeset viewer.