From: Wilfried Goesgens Date: Wed, 7 Sep 2011 12:39:03 +0000 (+0000) Subject: Merge branch 'master' of ssh://git.citadel.org/appl/gitroot/citadel X-Git-Tag: v8.01~57 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=23b89ac78ae15780e0c4096e3354e8dc4e4b34d0;hp=36c434f2f80b50cb6d639de046ad33eae72dd885;p=citadel.git Merge branch 'master' of ssh://git.citadel.org/appl/gitroot/citadel --- diff --git a/webcit/static/summaryview.js b/webcit/static/summaryview.js index 280fe7885..0dffd2416 100644 --- a/webcit/static/summaryview.js +++ b/webcit/static/summaryview.js @@ -413,6 +413,23 @@ function deleteAllSelectedMessages() { var msgIds = ""; for(msgId in currentlyMarkedRows) { msgIds += ","+msgId; + + if (msgIds.length > 800) { + if (!room_is_trash) { + mvCommand = encodeURI("g_cmd=MOVE " + msgIds + "|_TRASH_|0"); + } + else { + mvCommand = encodeURI("g_cmd=DELE " + msgIds); + } + new Ajax.Request("ajax_servcmd", { + parameters: mvCommand, + method: 'post', + onSuccess: function(transport) { + WCLog(transport.responseText); + } + }); + msgIds = ""; + } } if (!room_is_trash) { diff --git a/webcit/static/wclib.js b/webcit/static/wclib.js index 1d6935c4e..31a0d7b4a 100644 --- a/webcit/static/wclib.js +++ b/webcit/static/wclib.js @@ -302,17 +302,26 @@ function addRoomToList(floorUL,room, roomToEmphasize) { function roomListDropHandler(target, dropped) { if (dropped.getAttribute("citadel:msgid")) { - var room = getTextContent(target); - var msgIds = ""; - for(msgId in currentlyMarkedRows) { //defined in summaryview.js - msgIds += ","+msgId; - } - var mvCommand = encodeURI("g_cmd=MOVE " + msgIds + "|"+room+"|0"); - new Ajax.Request('ajax_servcmd', { - method: 'post', + var room = getTextContent(target); + var msgIds = ""; + for(msgId in currentlyMarkedRows) { //defined in summaryview.js + msgIds += ","+msgId; + if (msgIds.length > 800) { + var mvCommand = encodeURI("g_cmd=MOVE " + msgIds + "|"+room+"|0"); + new Ajax.Request("ajax_servcmd", { + parameters: mvCommand, + method: 'post', + }); + msgIds = ""; + } + + } + var mvCommand = encodeURI("g_cmd=MOVE " + msgIds + "|"+room+"|0"); + new Ajax.Request('ajax_servcmd', { + method: 'post', parameters: mvCommand, onComplete: deleteAllMarkedRows()}); - } + } } function expandFloorEvent(event) { expandFloor(event.target);