mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Add copy message functionality to drag&drop (drag + shift) [#42]
+ Update jquery to 1.10.2
This commit is contained in:
parent
74af8f793a
commit
f22b90dbe3
16 changed files with 318 additions and 201 deletions
|
|
@ -113,7 +113,7 @@ module.exports = function (grunt) {
|
||||||
src: [
|
src: [
|
||||||
"vendors/modernizr.js",
|
"vendors/modernizr.js",
|
||||||
"vendors/underscore/underscore-1.5.2.min.js",
|
"vendors/underscore/underscore-1.5.2.min.js",
|
||||||
"vendors/jquery-1.10.1.min.js",
|
"vendors/jquery-1.10.2.min.js",
|
||||||
"vendors/jquery-ui/js/jquery-ui-1.10.3.custom.min.js",
|
"vendors/jquery-ui/js/jquery-ui-1.10.3.custom.min.js",
|
||||||
"vendors/jquery-cookie/jquery.cookie-1.4.0.min.js",
|
"vendors/jquery-cookie/jquery.cookie-1.4.0.min.js",
|
||||||
"vendors/jquery-mousewheel/jquery.mousewheel-3.1.4.min.js",
|
"vendors/jquery-mousewheel/jquery.mousewheel-3.1.4.min.js",
|
||||||
|
|
|
||||||
|
|
@ -289,6 +289,7 @@ Enums.Notification = {
|
||||||
'CantGetMessage': 202,
|
'CantGetMessage': 202,
|
||||||
'CantDeleteMessage': 203,
|
'CantDeleteMessage': 203,
|
||||||
'CantMoveMessage': 204,
|
'CantMoveMessage': 204,
|
||||||
|
'CantCopyMessage': 205,
|
||||||
|
|
||||||
'CantSaveMessage': 301,
|
'CantSaveMessage': 301,
|
||||||
'CantSendMessage': 302,
|
'CantSendMessage': 302,
|
||||||
|
|
|
||||||
|
|
@ -270,7 +270,7 @@ ko.bindingHandlers.draggable = {
|
||||||
}
|
}
|
||||||
|
|
||||||
oConf['helper'] = function (oEvent) {
|
oConf['helper'] = function (oEvent) {
|
||||||
return fValueAccessor()(oEvent && oEvent.target ? ko.dataFor(oEvent.target) : null);
|
return fValueAccessor()(oEvent && oEvent.target ? ko.dataFor(oEvent.target) : null, !!oEvent.shiftKey);
|
||||||
};
|
};
|
||||||
|
|
||||||
$(oElement).draggable(oConf).on('mousedown', function () {
|
$(oElement).draggable(oConf).on('mousedown', function () {
|
||||||
|
|
|
||||||
|
|
@ -525,6 +525,7 @@ Utils.initNotificationLanguage = function ()
|
||||||
NotificationI18N[Enums.Notification.CantGetMessage] = Utils.i18n('NOTIFICATIONS/CANT_GET_MESSAGE');
|
NotificationI18N[Enums.Notification.CantGetMessage] = Utils.i18n('NOTIFICATIONS/CANT_GET_MESSAGE');
|
||||||
NotificationI18N[Enums.Notification.CantDeleteMessage] = Utils.i18n('NOTIFICATIONS/CANT_DELETE_MESSAGE');
|
NotificationI18N[Enums.Notification.CantDeleteMessage] = Utils.i18n('NOTIFICATIONS/CANT_DELETE_MESSAGE');
|
||||||
NotificationI18N[Enums.Notification.CantMoveMessage] = Utils.i18n('NOTIFICATIONS/CANT_MOVE_MESSAGE');
|
NotificationI18N[Enums.Notification.CantMoveMessage] = Utils.i18n('NOTIFICATIONS/CANT_MOVE_MESSAGE');
|
||||||
|
NotificationI18N[Enums.Notification.CantCopyMessage] = Utils.i18n('NOTIFICATIONS/CANT_MOVE_MESSAGE');
|
||||||
|
|
||||||
NotificationI18N[Enums.Notification.CantSaveMessage] = Utils.i18n('NOTIFICATIONS/CANT_SAVE_MESSAGE');
|
NotificationI18N[Enums.Notification.CantSaveMessage] = Utils.i18n('NOTIFICATIONS/CANT_SAVE_MESSAGE');
|
||||||
NotificationI18N[Enums.Notification.CantSendMessage] = Utils.i18n('NOTIFICATIONS/CANT_SEND_MESSAGE');
|
NotificationI18N[Enums.Notification.CantSendMessage] = Utils.i18n('NOTIFICATIONS/CANT_SEND_MESSAGE');
|
||||||
|
|
|
||||||
|
|
@ -507,6 +507,21 @@ WebMailAjaxRemoteStorage.prototype.messagesMove = function (fCallback, sFolder,
|
||||||
}, null, '', ['MessageList', 'Message']);
|
}, null, '', ['MessageList', 'Message']);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {?Function} fCallback
|
||||||
|
* @param {string} sFolder
|
||||||
|
* @param {string} sToFolder
|
||||||
|
* @param {Array} aUids
|
||||||
|
*/
|
||||||
|
WebMailAjaxRemoteStorage.prototype.messagesCopy = function (fCallback, sFolder, sToFolder, aUids)
|
||||||
|
{
|
||||||
|
this.defaultRequest(fCallback, 'MessageCopy', {
|
||||||
|
'FromFolder': sFolder,
|
||||||
|
'ToFolder': sToFolder,
|
||||||
|
'Uids': aUids.join(',')
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {?Function} fCallback
|
* @param {?Function} fCallback
|
||||||
* @param {string} sFolder
|
* @param {string} sFolder
|
||||||
|
|
|
||||||
|
|
@ -88,13 +88,14 @@ MailBoxFolderListViewModel.prototype.messagesDrop = function (oToFolder, oUi)
|
||||||
{
|
{
|
||||||
var
|
var
|
||||||
sFromFolderFullNameRaw = oUi.helper.data('rl-folder'),
|
sFromFolderFullNameRaw = oUi.helper.data('rl-folder'),
|
||||||
|
bCopy = '1' === oUi.helper.data('rl-copy'),
|
||||||
aUids = oUi.helper.data('rl-uids')
|
aUids = oUi.helper.data('rl-uids')
|
||||||
;
|
;
|
||||||
|
|
||||||
if (MailBoxMessageListViewModel && MailBoxMessageListViewModel.__vm && Utils.isNormal(sFromFolderFullNameRaw) && Utils.isArray(aUids))
|
if (MailBoxMessageListViewModel && MailBoxMessageListViewModel.__vm && Utils.isNormal(sFromFolderFullNameRaw) && Utils.isArray(aUids))
|
||||||
{
|
{
|
||||||
MailBoxMessageListViewModel.__vm.moveMessagesToFolder(
|
MailBoxMessageListViewModel.__vm.moveMessagesToFolder(
|
||||||
sFromFolderFullNameRaw, aUids, oToFolder.fullNameRaw);
|
sFromFolderFullNameRaw, aUids, oToFolder.fullNameRaw, bCopy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -202,12 +202,12 @@ MailBoxMessageListViewModel.prototype.cancelSearch = function ()
|
||||||
* @param {string} sFromFolderFullNameRaw
|
* @param {string} sFromFolderFullNameRaw
|
||||||
* @param {Array} aUidForRemove
|
* @param {Array} aUidForRemove
|
||||||
* @param {string=} sToFolderFullNameRaw
|
* @param {string=} sToFolderFullNameRaw
|
||||||
* @param {boolean=} bVisialEffectOnly = false
|
* @param {boolean=} bCopy = false
|
||||||
*/
|
*/
|
||||||
MailBoxMessageListViewModel.prototype.removeMessagesFromList = function (sFromFolderFullNameRaw, aUidForRemove, sToFolderFullNameRaw, bVisialEffectOnly)
|
MailBoxMessageListViewModel.prototype.removeMessagesFromList = function (sFromFolderFullNameRaw, aUidForRemove, sToFolderFullNameRaw, bCopy)
|
||||||
{
|
{
|
||||||
sToFolderFullNameRaw = Utils.isNormal(sToFolderFullNameRaw) ? sToFolderFullNameRaw : '';
|
sToFolderFullNameRaw = Utils.isNormal(sToFolderFullNameRaw) ? sToFolderFullNameRaw : '';
|
||||||
bVisialEffectOnly = Utils.isUnd(bVisialEffectOnly) ? false : !!bVisialEffectOnly;
|
bCopy = Utils.isUnd(bCopy) ? false : !!bCopy;
|
||||||
|
|
||||||
var
|
var
|
||||||
iUnseenCount = 0 ,
|
iUnseenCount = 0 ,
|
||||||
|
|
@ -221,17 +221,14 @@ MailBoxMessageListViewModel.prototype.removeMessagesFromList = function (sFromFo
|
||||||
}) : []
|
}) : []
|
||||||
;
|
;
|
||||||
|
|
||||||
if (!bVisialEffectOnly)
|
_.each(aMessages, function (oMessage) {
|
||||||
{
|
if (oMessage && oMessage.unseen())
|
||||||
_.each(aMessages, function (oMessage) {
|
{
|
||||||
if (oMessage && oMessage.unseen())
|
iUnseenCount++;
|
||||||
{
|
}
|
||||||
iUnseenCount++;
|
});
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (oFromFolder && !bVisialEffectOnly)
|
if (oFromFolder && !bCopy)
|
||||||
{
|
{
|
||||||
oFromFolder.messageCountAll(0 <= oFromFolder.messageCountAll() - aUidForRemove.length ?
|
oFromFolder.messageCountAll(0 <= oFromFolder.messageCountAll() - aUidForRemove.length ?
|
||||||
oFromFolder.messageCountAll() - aUidForRemove.length : 0);
|
oFromFolder.messageCountAll() - aUidForRemove.length : 0);
|
||||||
|
|
@ -243,7 +240,7 @@ MailBoxMessageListViewModel.prototype.removeMessagesFromList = function (sFromFo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oToFolder && !bVisialEffectOnly)
|
if (oToFolder)
|
||||||
{
|
{
|
||||||
oToFolder.messageCountAll(oToFolder.messageCountAll() + aUidForRemove.length);
|
oToFolder.messageCountAll(oToFolder.messageCountAll() + aUidForRemove.length);
|
||||||
if (0 < iUnseenCount)
|
if (0 < iUnseenCount)
|
||||||
|
|
@ -254,31 +251,37 @@ MailBoxMessageListViewModel.prototype.removeMessagesFromList = function (sFromFo
|
||||||
|
|
||||||
if (0 < aMessages.length)
|
if (0 < aMessages.length)
|
||||||
{
|
{
|
||||||
_.each(aMessages, function (oMessage) {
|
if (bCopy)
|
||||||
if (oCurrentMessage && oCurrentMessage.requestHash === oMessage.requestHash)
|
|
||||||
{
|
|
||||||
oCurrentMessage = null;
|
|
||||||
oData.message(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
oMessage.deleted(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
_.delay(function () {
|
|
||||||
_.each(aMessages, function (oMessage) {
|
|
||||||
oData.messageList.remove(oMessage);
|
|
||||||
});
|
|
||||||
}, 400);
|
|
||||||
|
|
||||||
if (!bVisialEffectOnly)
|
|
||||||
{
|
{
|
||||||
|
_.each(aMessages, function (oMessage) {
|
||||||
|
oMessage.checked(false);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_.each(aMessages, function (oMessage) {
|
||||||
|
if (oCurrentMessage && oCurrentMessage.requestHash === oMessage.requestHash)
|
||||||
|
{
|
||||||
|
oCurrentMessage = null;
|
||||||
|
oData.message(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
oMessage.deleted(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
_.delay(function () {
|
||||||
|
_.each(aMessages, function (oMessage) {
|
||||||
|
oData.messageList.remove(oMessage);
|
||||||
|
});
|
||||||
|
}, 400);
|
||||||
|
|
||||||
RL.data().messageListIsNotCompleted(true);
|
RL.data().messageListIsNotCompleted(true);
|
||||||
RL.cache().setFolderHash(sFromFolderFullNameRaw, '');
|
RL.cache().setFolderHash(sFromFolderFullNameRaw, '');
|
||||||
|
}
|
||||||
|
|
||||||
if (Utils.isNormal(sToFolderFullNameRaw))
|
if (Utils.isNormal(sToFolderFullNameRaw))
|
||||||
{
|
{
|
||||||
RL.cache().setFolderHash(sToFolderFullNameRaw || '', '');
|
RL.cache().setFolderHash(sToFolderFullNameRaw || '', '');
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -303,9 +306,10 @@ MailBoxMessageListViewModel.prototype.moveOrDeleteResponse = function (sResult,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (oData && Enums.Notification.CantMoveMessage === oData.ErrorCode)
|
if (oData && -1 < Utils.inArray(oData.ErrorCode,
|
||||||
|
[Enums.Notification.CantMoveMessage, Enums.Notification.CantCopyMessage]))
|
||||||
{
|
{
|
||||||
window.alert(Utils.getNotification(Enums.Notification.CantMoveMessage));
|
window.alert(Utils.getNotification(oData.ErrorCode));
|
||||||
}
|
}
|
||||||
|
|
||||||
RL.cache().setFolderHash(RL.data().currentFolderFullNameRaw(), '');
|
RL.cache().setFolderHash(RL.data().currentFolderFullNameRaw(), '');
|
||||||
|
|
@ -321,8 +325,9 @@ MailBoxMessageListViewModel.prototype.moveOrDeleteResponse = function (sResult,
|
||||||
* @param {string} sFromFolderFullNameRaw
|
* @param {string} sFromFolderFullNameRaw
|
||||||
* @param {Array} aUidForRemove
|
* @param {Array} aUidForRemove
|
||||||
* @param {string} sToFolderFullNameRaw
|
* @param {string} sToFolderFullNameRaw
|
||||||
|
* @param {boolean=} bCopy = false
|
||||||
*/
|
*/
|
||||||
MailBoxMessageListViewModel.prototype.moveMessagesToFolder = function (sFromFolderFullNameRaw, aUidForRemove, sToFolderFullNameRaw)
|
MailBoxMessageListViewModel.prototype.moveMessagesToFolder = function (sFromFolderFullNameRaw, aUidForRemove, sToFolderFullNameRaw, bCopy)
|
||||||
{
|
{
|
||||||
if (sFromFolderFullNameRaw !== sToFolderFullNameRaw && Utils.isArray(aUidForRemove) && 0 < aUidForRemove.length)
|
if (sFromFolderFullNameRaw !== sToFolderFullNameRaw && Utils.isArray(aUidForRemove) && 0 < aUidForRemove.length)
|
||||||
{
|
{
|
||||||
|
|
@ -333,7 +338,9 @@ MailBoxMessageListViewModel.prototype.moveMessagesToFolder = function (sFromFold
|
||||||
|
|
||||||
if (oFromFolder && oToFolder)
|
if (oFromFolder && oToFolder)
|
||||||
{
|
{
|
||||||
RL.remote().messagesMove(
|
bCopy = Utils.isUnd(bCopy) ? false : !!bCopy;
|
||||||
|
|
||||||
|
RL.remote()[bCopy ? 'messagesCopy' : 'messagesMove'](
|
||||||
_.bind(this.moveOrDeleteResponse, this),
|
_.bind(this.moveOrDeleteResponse, this),
|
||||||
oFromFolder.fullNameRaw,
|
oFromFolder.fullNameRaw,
|
||||||
oToFolder.fullNameRaw,
|
oToFolder.fullNameRaw,
|
||||||
|
|
@ -342,7 +349,7 @@ MailBoxMessageListViewModel.prototype.moveMessagesToFolder = function (sFromFold
|
||||||
|
|
||||||
oToFolder.actionBlink(true);
|
oToFolder.actionBlink(true);
|
||||||
|
|
||||||
this.removeMessagesFromList(sFromFolderFullNameRaw, aUidForRemove, sToFolderFullNameRaw);
|
this.removeMessagesFromList(sFromFolderFullNameRaw, aUidForRemove, sToFolderFullNameRaw, bCopy);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -408,7 +415,7 @@ MailBoxMessageListViewModel.prototype.deleteSelectedMessageFromCurrentFolder = f
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
MailBoxMessageListViewModel.prototype.dragAndDronHelper = function (oMessageListItem)
|
MailBoxMessageListViewModel.prototype.dragAndDronHelper = function (oMessageListItem, bCopy)
|
||||||
{
|
{
|
||||||
if (oMessageListItem)
|
if (oMessageListItem)
|
||||||
{
|
{
|
||||||
|
|
@ -418,7 +425,8 @@ MailBoxMessageListViewModel.prototype.dragAndDronHelper = function (oMessageList
|
||||||
var oEl = Utils.draggeblePlace();
|
var oEl = Utils.draggeblePlace();
|
||||||
oEl.data('rl-folder', RL.data().currentFolderFullNameRaw());
|
oEl.data('rl-folder', RL.data().currentFolderFullNameRaw());
|
||||||
oEl.data('rl-uids', RL.data().messageListCheckedOrSelectedUidsWithSubMails());
|
oEl.data('rl-uids', RL.data().messageListCheckedOrSelectedUidsWithSubMails());
|
||||||
oEl.find('.text').text(RL.data().messageListCheckedOrSelectedUidsWithSubMails().length);
|
oEl.data('rl-copy', bCopy ? '1' : '0');
|
||||||
|
oEl.find('.text').text((bCopy ? '+' : '') + '' + RL.data().messageListCheckedOrSelectedUidsWithSubMails().length);
|
||||||
|
|
||||||
return oEl;
|
return oEl;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -561,6 +561,32 @@ class MailClient
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $sFromFolder
|
||||||
|
* @param string $sToFolder
|
||||||
|
* @param array $aIndexRange
|
||||||
|
* @param bool $bIndexIsUid
|
||||||
|
*
|
||||||
|
* @return \MailSo\Mail\MailClient
|
||||||
|
*
|
||||||
|
* @throws \MailSo\Base\Exceptions\InvalidArgumentException
|
||||||
|
* @throws \MailSo\Net\Exceptions\Exception
|
||||||
|
* @throws \MailSo\Imap\Exceptions\Exception
|
||||||
|
*/
|
||||||
|
public function MessageCopy($sFromFolder, $sToFolder, $aIndexRange, $bIndexIsUid)
|
||||||
|
{
|
||||||
|
if (0 === \strlen($sFromFolder) || 0 === \strlen($sToFolder) ||
|
||||||
|
!\is_array($aIndexRange) || 0 === \count($aIndexRange))
|
||||||
|
{
|
||||||
|
throw new \MailSo\Base\Exceptions\InvalidArgumentException();
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->oImapClient->FolderSelect($sFromFolder);
|
||||||
|
$this->oImapClient->MessageCopy($sToFolder, \implode(',', $aIndexRange), $bIndexIsUid);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param resource $rMessageStream
|
* @param resource $rMessageStream
|
||||||
* @param int $iMessageStreamSize
|
* @param int $iMessageStreamSize
|
||||||
|
|
|
||||||
|
|
@ -4316,6 +4316,40 @@ class Actions
|
||||||
'' === $sHash ? false : array($sFromFolder, $sHash));
|
'' === $sHash ? false : array($sFromFolder, $sHash));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
* @throws \MailSo\Base\Exceptions\Exception
|
||||||
|
*/
|
||||||
|
public function DoMessageCopy()
|
||||||
|
{
|
||||||
|
$this->initMailClientConnection();
|
||||||
|
|
||||||
|
$sFromFolder = $this->GetActionParam('FromFolder', '');
|
||||||
|
$sToFolder = $this->GetActionParam('ToFolder', '');
|
||||||
|
$aUids = explode(',', (string) $this->GetActionParam('Uids', ''));
|
||||||
|
|
||||||
|
$aFilteredUids = array_filter($aUids, function (&$mUid) {
|
||||||
|
$mUid = (int) trim($mUid);
|
||||||
|
return 0 < $mUid;
|
||||||
|
});
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$this->MailClient()->MessageCopy($sFromFolder, $sToFolder,
|
||||||
|
$aFilteredUids, true);
|
||||||
|
|
||||||
|
$sHash = $this->MailClient()->FolderHash($sFromFolder);
|
||||||
|
}
|
||||||
|
catch (\Exception $oException)
|
||||||
|
{
|
||||||
|
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantCopyMessage, $oException);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->DefaultResponse(__FUNCTION__,
|
||||||
|
'' === $sHash ? false : array($sFromFolder, $sHash));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $sFileName
|
* @param string $sFileName
|
||||||
* @param string $sContentType
|
* @param string $sContentType
|
||||||
|
|
|
||||||
|
|
@ -1,101 +1,102 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace RainLoop;
|
namespace RainLoop;
|
||||||
|
|
||||||
class Notifications
|
class Notifications
|
||||||
{
|
{
|
||||||
const InvalidToken = 101;
|
const InvalidToken = 101;
|
||||||
const AuthError = 102;
|
const AuthError = 102;
|
||||||
const AccessError = 103;
|
const AccessError = 103;
|
||||||
const ConnectionError = 104;
|
const ConnectionError = 104;
|
||||||
const CaptchaError = 105;
|
const CaptchaError = 105;
|
||||||
const SocialFacebookLoginAccessDisable = 106;
|
const SocialFacebookLoginAccessDisable = 106;
|
||||||
const SocialTwitterLoginAccessDisable = 107;
|
const SocialTwitterLoginAccessDisable = 107;
|
||||||
const SocialGoogleLoginAccessDisable = 108;
|
const SocialGoogleLoginAccessDisable = 108;
|
||||||
const DomainNotAllowed = 109;
|
const DomainNotAllowed = 109;
|
||||||
const AccountNotAllowed = 110;
|
const AccountNotAllowed = 110;
|
||||||
|
|
||||||
const CantGetMessageList = 201;
|
const CantGetMessageList = 201;
|
||||||
const CantGetMessage = 202;
|
const CantGetMessage = 202;
|
||||||
const CantDeleteMessage = 203;
|
const CantDeleteMessage = 203;
|
||||||
const CantMoveMessage = 204;
|
const CantMoveMessage = 204;
|
||||||
|
const CantCopyMessage = 205;
|
||||||
const CantSaveMessage = 301;
|
|
||||||
const CantSendMessage = 302;
|
const CantSaveMessage = 301;
|
||||||
const InvalidRecipients = 303;
|
const CantSendMessage = 302;
|
||||||
|
const InvalidRecipients = 303;
|
||||||
const CantCreateFolder = 400;
|
|
||||||
const CantRenameFolder = 401;
|
const CantCreateFolder = 400;
|
||||||
const CantDeleteFolder = 402;
|
const CantRenameFolder = 401;
|
||||||
const CantSubscribeFolder = 403;
|
const CantDeleteFolder = 402;
|
||||||
const CantUnsubscribeFolder = 404;
|
const CantSubscribeFolder = 403;
|
||||||
const CantDeleteNonEmptyFolder = 405;
|
const CantUnsubscribeFolder = 404;
|
||||||
|
const CantDeleteNonEmptyFolder = 405;
|
||||||
const CantSaveSettings = 501;
|
|
||||||
const CantSavePluginSettings = 502;
|
const CantSaveSettings = 501;
|
||||||
|
const CantSavePluginSettings = 502;
|
||||||
const DomainAlreadyExists = 601;
|
|
||||||
|
const DomainAlreadyExists = 601;
|
||||||
const CantInstallPackage = 701;
|
|
||||||
const CantDeletePackage = 702;
|
const CantInstallPackage = 701;
|
||||||
const InvalidPluginPackage = 703;
|
const CantDeletePackage = 702;
|
||||||
const UnsupportedPluginPackage = 704;
|
const InvalidPluginPackage = 703;
|
||||||
|
const UnsupportedPluginPackage = 704;
|
||||||
const LicensingServerIsUnavailable = 710;
|
|
||||||
const LicensingExpired = 711;
|
const LicensingServerIsUnavailable = 710;
|
||||||
const LicensingBanned = 712;
|
const LicensingExpired = 711;
|
||||||
|
const LicensingBanned = 712;
|
||||||
const DemoSendMessageError = 750;
|
|
||||||
|
const DemoSendMessageError = 750;
|
||||||
const AccountAlreadyExists = 801;
|
|
||||||
|
const AccountAlreadyExists = 801;
|
||||||
const MailServerError = 901;
|
|
||||||
const UnknownNotification = 998;
|
const MailServerError = 901;
|
||||||
const UnknownError = 999;
|
const UnknownNotification = 998;
|
||||||
|
const UnknownError = 999;
|
||||||
static public function GetNotificationsMessage($iCode)
|
|
||||||
{
|
static public function GetNotificationsMessage($iCode)
|
||||||
static $aMap = array(
|
{
|
||||||
self::InvalidToken => 'InvalidToken',
|
static $aMap = array(
|
||||||
self::AuthError => 'AuthError',
|
self::InvalidToken => 'InvalidToken',
|
||||||
self::AccessError => 'AccessError',
|
self::AuthError => 'AuthError',
|
||||||
self::ConnectionError => 'ConnectionError',
|
self::AccessError => 'AccessError',
|
||||||
self::CaptchaError => 'CaptchaError',
|
self::ConnectionError => 'ConnectionError',
|
||||||
self::SocialFacebookLoginAccessDisable => 'SocialFacebookLoginAccessDisable',
|
self::CaptchaError => 'CaptchaError',
|
||||||
self::SocialTwitterLoginAccessDisable => 'SocialTwitterLoginAccessDisable',
|
self::SocialFacebookLoginAccessDisable => 'SocialFacebookLoginAccessDisable',
|
||||||
self::SocialGoogleLoginAccessDisable => 'SocialGoogleLoginAccessDisable',
|
self::SocialTwitterLoginAccessDisable => 'SocialTwitterLoginAccessDisable',
|
||||||
self::DomainNotAllowed => 'DomainNotAllowed',
|
self::SocialGoogleLoginAccessDisable => 'SocialGoogleLoginAccessDisable',
|
||||||
self::AccountNotAllowed => 'AccountNotAllowed',
|
self::DomainNotAllowed => 'DomainNotAllowed',
|
||||||
self::CantGetMessageList => 'CantGetMessageList',
|
self::AccountNotAllowed => 'AccountNotAllowed',
|
||||||
self::CantGetMessage => 'CantGetMessage',
|
self::CantGetMessageList => 'CantGetMessageList',
|
||||||
self::CantDeleteMessage => 'CantDeleteMessage',
|
self::CantGetMessage => 'CantGetMessage',
|
||||||
self::CantMoveMessage => 'CantMoveMessage',
|
self::CantDeleteMessage => 'CantDeleteMessage',
|
||||||
self::CantSaveMessage => 'CantSaveMessage',
|
self::CantMoveMessage => 'CantMoveMessage',
|
||||||
self::CantSendMessage => 'CantSendMessage',
|
self::CantSaveMessage => 'CantSaveMessage',
|
||||||
self::InvalidRecipients => 'InvalidRecipients',
|
self::CantSendMessage => 'CantSendMessage',
|
||||||
self::CantCreateFolder => 'CantCreateFolder',
|
self::InvalidRecipients => 'InvalidRecipients',
|
||||||
self::CantRenameFolder => 'CantRenameFolder',
|
self::CantCreateFolder => 'CantCreateFolder',
|
||||||
self::CantDeleteFolder => 'CantDeleteFolder',
|
self::CantRenameFolder => 'CantRenameFolder',
|
||||||
self::CantSubscribeFolder => 'CantSubscribeFolder',
|
self::CantDeleteFolder => 'CantDeleteFolder',
|
||||||
self::CantUnsubscribeFolder => 'CantUnsubscribeFolder',
|
self::CantSubscribeFolder => 'CantSubscribeFolder',
|
||||||
self::CantDeleteNonEmptyFolder => 'CantDeleteNonEmptyFolder',
|
self::CantUnsubscribeFolder => 'CantUnsubscribeFolder',
|
||||||
self::CantSaveSettings => 'CantSaveSettings',
|
self::CantDeleteNonEmptyFolder => 'CantDeleteNonEmptyFolder',
|
||||||
self::CantSavePluginSettings => 'CantSavePluginSettings',
|
self::CantSaveSettings => 'CantSaveSettings',
|
||||||
self::DomainAlreadyExists => 'DomainAlreadyExists',
|
self::CantSavePluginSettings => 'CantSavePluginSettings',
|
||||||
self::CantInstallPackage => 'CantInstallPackage',
|
self::DomainAlreadyExists => 'DomainAlreadyExists',
|
||||||
self::CantDeletePackage => 'CantDeletePackage',
|
self::CantInstallPackage => 'CantInstallPackage',
|
||||||
self::InvalidPluginPackage => 'InvalidPluginPackage',
|
self::CantDeletePackage => 'CantDeletePackage',
|
||||||
self::UnsupportedPluginPackage => 'UnsupportedPluginPackage',
|
self::InvalidPluginPackage => 'InvalidPluginPackage',
|
||||||
self::LicensingServerIsUnavailable => 'LicensingServerIsUnavailable',
|
self::UnsupportedPluginPackage => 'UnsupportedPluginPackage',
|
||||||
self::LicensingExpired => 'LicensingExpired',
|
self::LicensingServerIsUnavailable => 'LicensingServerIsUnavailable',
|
||||||
self::LicensingBanned => 'LicensingBanned',
|
self::LicensingExpired => 'LicensingExpired',
|
||||||
self::DemoSendMessageError => 'DemoSendMessageError',
|
self::LicensingBanned => 'LicensingBanned',
|
||||||
self::AccountAlreadyExists => 'AccountAlreadyExists',
|
self::DemoSendMessageError => 'DemoSendMessageError',
|
||||||
self::MailServerError => 'MailServerError',
|
self::AccountAlreadyExists => 'AccountAlreadyExists',
|
||||||
self::UnknownNotification => 'UnknownNotification',
|
self::MailServerError => 'MailServerError',
|
||||||
self::UnknownError => 'UnknownError'
|
self::UnknownNotification => 'UnknownNotification',
|
||||||
);
|
self::UnknownError => 'UnknownError'
|
||||||
|
);
|
||||||
return isset($aMap[$iCode]) ? $aMap[$iCode].'['.$iCode.']' : 'UnknownNotification['.$iCode.']';
|
|
||||||
}
|
return isset($aMap[$iCode]) ? $aMap[$iCode].'['.$iCode.']' : 'UnknownNotification['.$iCode.']';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -551,6 +551,7 @@ Enums.Notification = {
|
||||||
'CantGetMessage': 202,
|
'CantGetMessage': 202,
|
||||||
'CantDeleteMessage': 203,
|
'CantDeleteMessage': 203,
|
||||||
'CantMoveMessage': 204,
|
'CantMoveMessage': 204,
|
||||||
|
'CantCopyMessage': 205,
|
||||||
|
|
||||||
'CantSaveMessage': 301,
|
'CantSaveMessage': 301,
|
||||||
'CantSendMessage': 302,
|
'CantSendMessage': 302,
|
||||||
|
|
@ -1111,6 +1112,7 @@ Utils.initNotificationLanguage = function ()
|
||||||
NotificationI18N[Enums.Notification.CantGetMessage] = Utils.i18n('NOTIFICATIONS/CANT_GET_MESSAGE');
|
NotificationI18N[Enums.Notification.CantGetMessage] = Utils.i18n('NOTIFICATIONS/CANT_GET_MESSAGE');
|
||||||
NotificationI18N[Enums.Notification.CantDeleteMessage] = Utils.i18n('NOTIFICATIONS/CANT_DELETE_MESSAGE');
|
NotificationI18N[Enums.Notification.CantDeleteMessage] = Utils.i18n('NOTIFICATIONS/CANT_DELETE_MESSAGE');
|
||||||
NotificationI18N[Enums.Notification.CantMoveMessage] = Utils.i18n('NOTIFICATIONS/CANT_MOVE_MESSAGE');
|
NotificationI18N[Enums.Notification.CantMoveMessage] = Utils.i18n('NOTIFICATIONS/CANT_MOVE_MESSAGE');
|
||||||
|
NotificationI18N[Enums.Notification.CantCopyMessage] = Utils.i18n('NOTIFICATIONS/CANT_MOVE_MESSAGE');
|
||||||
|
|
||||||
NotificationI18N[Enums.Notification.CantSaveMessage] = Utils.i18n('NOTIFICATIONS/CANT_SAVE_MESSAGE');
|
NotificationI18N[Enums.Notification.CantSaveMessage] = Utils.i18n('NOTIFICATIONS/CANT_SAVE_MESSAGE');
|
||||||
NotificationI18N[Enums.Notification.CantSendMessage] = Utils.i18n('NOTIFICATIONS/CANT_SEND_MESSAGE');
|
NotificationI18N[Enums.Notification.CantSendMessage] = Utils.i18n('NOTIFICATIONS/CANT_SEND_MESSAGE');
|
||||||
|
|
@ -2476,7 +2478,7 @@ ko.bindingHandlers.draggable = {
|
||||||
}
|
}
|
||||||
|
|
||||||
oConf['helper'] = function (oEvent) {
|
oConf['helper'] = function (oEvent) {
|
||||||
return fValueAccessor()(oEvent && oEvent.target ? ko.dataFor(oEvent.target) : null);
|
return fValueAccessor()(oEvent && oEvent.target ? ko.dataFor(oEvent.target) : null, !!oEvent.shiftKey);
|
||||||
};
|
};
|
||||||
|
|
||||||
$(oElement).draggable(oConf).on('mousedown', function () {
|
$(oElement).draggable(oConf).on('mousedown', function () {
|
||||||
|
|
|
||||||
4
rainloop/v/0.0.0/static/js/admin.min.js
vendored
4
rainloop/v/0.0.0/static/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -551,6 +551,7 @@ Enums.Notification = {
|
||||||
'CantGetMessage': 202,
|
'CantGetMessage': 202,
|
||||||
'CantDeleteMessage': 203,
|
'CantDeleteMessage': 203,
|
||||||
'CantMoveMessage': 204,
|
'CantMoveMessage': 204,
|
||||||
|
'CantCopyMessage': 205,
|
||||||
|
|
||||||
'CantSaveMessage': 301,
|
'CantSaveMessage': 301,
|
||||||
'CantSendMessage': 302,
|
'CantSendMessage': 302,
|
||||||
|
|
@ -1111,6 +1112,7 @@ Utils.initNotificationLanguage = function ()
|
||||||
NotificationI18N[Enums.Notification.CantGetMessage] = Utils.i18n('NOTIFICATIONS/CANT_GET_MESSAGE');
|
NotificationI18N[Enums.Notification.CantGetMessage] = Utils.i18n('NOTIFICATIONS/CANT_GET_MESSAGE');
|
||||||
NotificationI18N[Enums.Notification.CantDeleteMessage] = Utils.i18n('NOTIFICATIONS/CANT_DELETE_MESSAGE');
|
NotificationI18N[Enums.Notification.CantDeleteMessage] = Utils.i18n('NOTIFICATIONS/CANT_DELETE_MESSAGE');
|
||||||
NotificationI18N[Enums.Notification.CantMoveMessage] = Utils.i18n('NOTIFICATIONS/CANT_MOVE_MESSAGE');
|
NotificationI18N[Enums.Notification.CantMoveMessage] = Utils.i18n('NOTIFICATIONS/CANT_MOVE_MESSAGE');
|
||||||
|
NotificationI18N[Enums.Notification.CantCopyMessage] = Utils.i18n('NOTIFICATIONS/CANT_MOVE_MESSAGE');
|
||||||
|
|
||||||
NotificationI18N[Enums.Notification.CantSaveMessage] = Utils.i18n('NOTIFICATIONS/CANT_SAVE_MESSAGE');
|
NotificationI18N[Enums.Notification.CantSaveMessage] = Utils.i18n('NOTIFICATIONS/CANT_SAVE_MESSAGE');
|
||||||
NotificationI18N[Enums.Notification.CantSendMessage] = Utils.i18n('NOTIFICATIONS/CANT_SEND_MESSAGE');
|
NotificationI18N[Enums.Notification.CantSendMessage] = Utils.i18n('NOTIFICATIONS/CANT_SEND_MESSAGE');
|
||||||
|
|
@ -2476,7 +2478,7 @@ ko.bindingHandlers.draggable = {
|
||||||
}
|
}
|
||||||
|
|
||||||
oConf['helper'] = function (oEvent) {
|
oConf['helper'] = function (oEvent) {
|
||||||
return fValueAccessor()(oEvent && oEvent.target ? ko.dataFor(oEvent.target) : null);
|
return fValueAccessor()(oEvent && oEvent.target ? ko.dataFor(oEvent.target) : null, !!oEvent.shiftKey);
|
||||||
};
|
};
|
||||||
|
|
||||||
$(oElement).draggable(oConf).on('mousedown', function () {
|
$(oElement).draggable(oConf).on('mousedown', function () {
|
||||||
|
|
@ -10493,13 +10495,14 @@ MailBoxFolderListViewModel.prototype.messagesDrop = function (oToFolder, oUi)
|
||||||
{
|
{
|
||||||
var
|
var
|
||||||
sFromFolderFullNameRaw = oUi.helper.data('rl-folder'),
|
sFromFolderFullNameRaw = oUi.helper.data('rl-folder'),
|
||||||
|
bCopy = '1' === oUi.helper.data('rl-copy'),
|
||||||
aUids = oUi.helper.data('rl-uids')
|
aUids = oUi.helper.data('rl-uids')
|
||||||
;
|
;
|
||||||
|
|
||||||
if (MailBoxMessageListViewModel && MailBoxMessageListViewModel.__vm && Utils.isNormal(sFromFolderFullNameRaw) && Utils.isArray(aUids))
|
if (MailBoxMessageListViewModel && MailBoxMessageListViewModel.__vm && Utils.isNormal(sFromFolderFullNameRaw) && Utils.isArray(aUids))
|
||||||
{
|
{
|
||||||
MailBoxMessageListViewModel.__vm.moveMessagesToFolder(
|
MailBoxMessageListViewModel.__vm.moveMessagesToFolder(
|
||||||
sFromFolderFullNameRaw, aUids, oToFolder.fullNameRaw);
|
sFromFolderFullNameRaw, aUids, oToFolder.fullNameRaw, bCopy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -10719,12 +10722,12 @@ MailBoxMessageListViewModel.prototype.cancelSearch = function ()
|
||||||
* @param {string} sFromFolderFullNameRaw
|
* @param {string} sFromFolderFullNameRaw
|
||||||
* @param {Array} aUidForRemove
|
* @param {Array} aUidForRemove
|
||||||
* @param {string=} sToFolderFullNameRaw
|
* @param {string=} sToFolderFullNameRaw
|
||||||
* @param {boolean=} bVisialEffectOnly = false
|
* @param {boolean=} bCopy = false
|
||||||
*/
|
*/
|
||||||
MailBoxMessageListViewModel.prototype.removeMessagesFromList = function (sFromFolderFullNameRaw, aUidForRemove, sToFolderFullNameRaw, bVisialEffectOnly)
|
MailBoxMessageListViewModel.prototype.removeMessagesFromList = function (sFromFolderFullNameRaw, aUidForRemove, sToFolderFullNameRaw, bCopy)
|
||||||
{
|
{
|
||||||
sToFolderFullNameRaw = Utils.isNormal(sToFolderFullNameRaw) ? sToFolderFullNameRaw : '';
|
sToFolderFullNameRaw = Utils.isNormal(sToFolderFullNameRaw) ? sToFolderFullNameRaw : '';
|
||||||
bVisialEffectOnly = Utils.isUnd(bVisialEffectOnly) ? false : !!bVisialEffectOnly;
|
bCopy = Utils.isUnd(bCopy) ? false : !!bCopy;
|
||||||
|
|
||||||
var
|
var
|
||||||
iUnseenCount = 0 ,
|
iUnseenCount = 0 ,
|
||||||
|
|
@ -10738,17 +10741,14 @@ MailBoxMessageListViewModel.prototype.removeMessagesFromList = function (sFromFo
|
||||||
}) : []
|
}) : []
|
||||||
;
|
;
|
||||||
|
|
||||||
if (!bVisialEffectOnly)
|
_.each(aMessages, function (oMessage) {
|
||||||
{
|
if (oMessage && oMessage.unseen())
|
||||||
_.each(aMessages, function (oMessage) {
|
{
|
||||||
if (oMessage && oMessage.unseen())
|
iUnseenCount++;
|
||||||
{
|
}
|
||||||
iUnseenCount++;
|
});
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (oFromFolder && !bVisialEffectOnly)
|
if (oFromFolder && !bCopy)
|
||||||
{
|
{
|
||||||
oFromFolder.messageCountAll(0 <= oFromFolder.messageCountAll() - aUidForRemove.length ?
|
oFromFolder.messageCountAll(0 <= oFromFolder.messageCountAll() - aUidForRemove.length ?
|
||||||
oFromFolder.messageCountAll() - aUidForRemove.length : 0);
|
oFromFolder.messageCountAll() - aUidForRemove.length : 0);
|
||||||
|
|
@ -10760,7 +10760,7 @@ MailBoxMessageListViewModel.prototype.removeMessagesFromList = function (sFromFo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oToFolder && !bVisialEffectOnly)
|
if (oToFolder)
|
||||||
{
|
{
|
||||||
oToFolder.messageCountAll(oToFolder.messageCountAll() + aUidForRemove.length);
|
oToFolder.messageCountAll(oToFolder.messageCountAll() + aUidForRemove.length);
|
||||||
if (0 < iUnseenCount)
|
if (0 < iUnseenCount)
|
||||||
|
|
@ -10771,31 +10771,37 @@ MailBoxMessageListViewModel.prototype.removeMessagesFromList = function (sFromFo
|
||||||
|
|
||||||
if (0 < aMessages.length)
|
if (0 < aMessages.length)
|
||||||
{
|
{
|
||||||
_.each(aMessages, function (oMessage) {
|
if (bCopy)
|
||||||
if (oCurrentMessage && oCurrentMessage.requestHash === oMessage.requestHash)
|
|
||||||
{
|
|
||||||
oCurrentMessage = null;
|
|
||||||
oData.message(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
oMessage.deleted(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
_.delay(function () {
|
|
||||||
_.each(aMessages, function (oMessage) {
|
|
||||||
oData.messageList.remove(oMessage);
|
|
||||||
});
|
|
||||||
}, 400);
|
|
||||||
|
|
||||||
if (!bVisialEffectOnly)
|
|
||||||
{
|
{
|
||||||
|
_.each(aMessages, function (oMessage) {
|
||||||
|
oMessage.checked(false);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_.each(aMessages, function (oMessage) {
|
||||||
|
if (oCurrentMessage && oCurrentMessage.requestHash === oMessage.requestHash)
|
||||||
|
{
|
||||||
|
oCurrentMessage = null;
|
||||||
|
oData.message(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
oMessage.deleted(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
_.delay(function () {
|
||||||
|
_.each(aMessages, function (oMessage) {
|
||||||
|
oData.messageList.remove(oMessage);
|
||||||
|
});
|
||||||
|
}, 400);
|
||||||
|
|
||||||
RL.data().messageListIsNotCompleted(true);
|
RL.data().messageListIsNotCompleted(true);
|
||||||
RL.cache().setFolderHash(sFromFolderFullNameRaw, '');
|
RL.cache().setFolderHash(sFromFolderFullNameRaw, '');
|
||||||
|
}
|
||||||
|
|
||||||
if (Utils.isNormal(sToFolderFullNameRaw))
|
if (Utils.isNormal(sToFolderFullNameRaw))
|
||||||
{
|
{
|
||||||
RL.cache().setFolderHash(sToFolderFullNameRaw || '', '');
|
RL.cache().setFolderHash(sToFolderFullNameRaw || '', '');
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -10820,9 +10826,10 @@ MailBoxMessageListViewModel.prototype.moveOrDeleteResponse = function (sResult,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (oData && Enums.Notification.CantMoveMessage === oData.ErrorCode)
|
if (oData && -1 < Utils.inArray(oData.ErrorCode,
|
||||||
|
[Enums.Notification.CantMoveMessage, Enums.Notification.CantCopyMessage]))
|
||||||
{
|
{
|
||||||
window.alert(Utils.getNotification(Enums.Notification.CantMoveMessage));
|
window.alert(Utils.getNotification(oData.ErrorCode));
|
||||||
}
|
}
|
||||||
|
|
||||||
RL.cache().setFolderHash(RL.data().currentFolderFullNameRaw(), '');
|
RL.cache().setFolderHash(RL.data().currentFolderFullNameRaw(), '');
|
||||||
|
|
@ -10838,8 +10845,9 @@ MailBoxMessageListViewModel.prototype.moveOrDeleteResponse = function (sResult,
|
||||||
* @param {string} sFromFolderFullNameRaw
|
* @param {string} sFromFolderFullNameRaw
|
||||||
* @param {Array} aUidForRemove
|
* @param {Array} aUidForRemove
|
||||||
* @param {string} sToFolderFullNameRaw
|
* @param {string} sToFolderFullNameRaw
|
||||||
|
* @param {boolean=} bCopy = false
|
||||||
*/
|
*/
|
||||||
MailBoxMessageListViewModel.prototype.moveMessagesToFolder = function (sFromFolderFullNameRaw, aUidForRemove, sToFolderFullNameRaw)
|
MailBoxMessageListViewModel.prototype.moveMessagesToFolder = function (sFromFolderFullNameRaw, aUidForRemove, sToFolderFullNameRaw, bCopy)
|
||||||
{
|
{
|
||||||
if (sFromFolderFullNameRaw !== sToFolderFullNameRaw && Utils.isArray(aUidForRemove) && 0 < aUidForRemove.length)
|
if (sFromFolderFullNameRaw !== sToFolderFullNameRaw && Utils.isArray(aUidForRemove) && 0 < aUidForRemove.length)
|
||||||
{
|
{
|
||||||
|
|
@ -10850,7 +10858,9 @@ MailBoxMessageListViewModel.prototype.moveMessagesToFolder = function (sFromFold
|
||||||
|
|
||||||
if (oFromFolder && oToFolder)
|
if (oFromFolder && oToFolder)
|
||||||
{
|
{
|
||||||
RL.remote().messagesMove(
|
bCopy = Utils.isUnd(bCopy) ? false : !!bCopy;
|
||||||
|
|
||||||
|
RL.remote()[bCopy ? 'messagesCopy' : 'messagesMove'](
|
||||||
_.bind(this.moveOrDeleteResponse, this),
|
_.bind(this.moveOrDeleteResponse, this),
|
||||||
oFromFolder.fullNameRaw,
|
oFromFolder.fullNameRaw,
|
||||||
oToFolder.fullNameRaw,
|
oToFolder.fullNameRaw,
|
||||||
|
|
@ -10859,7 +10869,7 @@ MailBoxMessageListViewModel.prototype.moveMessagesToFolder = function (sFromFold
|
||||||
|
|
||||||
oToFolder.actionBlink(true);
|
oToFolder.actionBlink(true);
|
||||||
|
|
||||||
this.removeMessagesFromList(sFromFolderFullNameRaw, aUidForRemove, sToFolderFullNameRaw);
|
this.removeMessagesFromList(sFromFolderFullNameRaw, aUidForRemove, sToFolderFullNameRaw, bCopy);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -10925,7 +10935,7 @@ MailBoxMessageListViewModel.prototype.deleteSelectedMessageFromCurrentFolder = f
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
MailBoxMessageListViewModel.prototype.dragAndDronHelper = function (oMessageListItem)
|
MailBoxMessageListViewModel.prototype.dragAndDronHelper = function (oMessageListItem, bCopy)
|
||||||
{
|
{
|
||||||
if (oMessageListItem)
|
if (oMessageListItem)
|
||||||
{
|
{
|
||||||
|
|
@ -10935,7 +10945,8 @@ MailBoxMessageListViewModel.prototype.dragAndDronHelper = function (oMessageList
|
||||||
var oEl = Utils.draggeblePlace();
|
var oEl = Utils.draggeblePlace();
|
||||||
oEl.data('rl-folder', RL.data().currentFolderFullNameRaw());
|
oEl.data('rl-folder', RL.data().currentFolderFullNameRaw());
|
||||||
oEl.data('rl-uids', RL.data().messageListCheckedOrSelectedUidsWithSubMails());
|
oEl.data('rl-uids', RL.data().messageListCheckedOrSelectedUidsWithSubMails());
|
||||||
oEl.find('.text').text(RL.data().messageListCheckedOrSelectedUidsWithSubMails().length);
|
oEl.data('rl-copy', bCopy ? '1' : '0');
|
||||||
|
oEl.find('.text').text((bCopy ? '+' : '') + '' + RL.data().messageListCheckedOrSelectedUidsWithSubMails().length);
|
||||||
|
|
||||||
return oEl;
|
return oEl;
|
||||||
};
|
};
|
||||||
|
|
@ -14381,6 +14392,21 @@ WebMailAjaxRemoteStorage.prototype.messagesMove = function (fCallback, sFolder,
|
||||||
}, null, '', ['MessageList', 'Message']);
|
}, null, '', ['MessageList', 'Message']);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {?Function} fCallback
|
||||||
|
* @param {string} sFolder
|
||||||
|
* @param {string} sToFolder
|
||||||
|
* @param {Array} aUids
|
||||||
|
*/
|
||||||
|
WebMailAjaxRemoteStorage.prototype.messagesCopy = function (fCallback, sFolder, sToFolder, aUids)
|
||||||
|
{
|
||||||
|
this.defaultRequest(fCallback, 'MessageCopy', {
|
||||||
|
'FromFolder': sFolder,
|
||||||
|
'ToFolder': sToFolder,
|
||||||
|
'Uids': aUids.join(',')
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {?Function} fCallback
|
* @param {?Function} fCallback
|
||||||
* @param {string} sFolder
|
* @param {string} sFolder
|
||||||
|
|
|
||||||
10
rainloop/v/0.0.0/static/js/app.min.js
vendored
10
rainloop/v/0.0.0/static/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
3
vendors/jquery-1.10.2.min.js
vendored
Normal file
3
vendors/jquery-1.10.2.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue