Add copy message functionality to drag&drop (drag + shift) [#42]

+ Update jquery to 1.10.2
This commit is contained in:
RainLoop Team 2013-12-09 01:32:19 +04:00
parent 74af8f793a
commit f22b90dbe3
16 changed files with 318 additions and 201 deletions

View file

@ -4316,6 +4316,40 @@ class Actions
'' === $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 $sContentType