Fix search route

This commit is contained in:
RainLoop Team 2013-12-16 02:02:03 +04:00
parent b7c4aad3db
commit ecbe0011fb
8 changed files with 157 additions and 37 deletions

View file

@ -157,8 +157,8 @@ LinkBuilder.prototype.admin = function (sScreenName)
/**
* @param {string} sFolder
* @param {number=} iPage
* @param {string=} sSearch
* @param {number=} iPage = 1
* @param {string=} sSearch = ''
* @return {string}
*/
LinkBuilder.prototype.mailBox = function (sFolder, iPage, sSearch)

View file

@ -211,6 +211,65 @@ MessageModel.replyHelper = function (aMessageEmails, oLocalUnic, aLocalEmails)
}
};
MessageModel.prototype.clear = function ()
{
this.folderFullNameRaw = '';
this.uid = '';
this.requestHash = '';
this.subject('');
this.size(0);
this.dateTimeStampInUTC(0);
this.priority(Enums.MessagePriority.Normal);
this.fromEmailString('');
this.toEmailsString('');
this.senderEmailsString('');
this.prefetched = false;
this.emails = [];
this.from = [];
this.to = [];
this.cc = [];
this.bcc = [];
this.replyTo = [];
this.newForAnimation(false);
this.deleted(false);
this.unseen(false);
this.flagged(false);
this.answered(false);
this.forwarded(false);
this.selected(false);
this.checked(false);
this.hasAttachments(false);
this.attachmentsMainType('');
this.body = null;
this.isRtl(false);
this.isHtml(false);
this.hasImages(false);
this.attachments([]);
this.priority(Enums.MessagePriority.Normal);
this.aDraftInfo = [];
this.sMessageId = '';
this.sInReplyTo = '';
this.sReferences = '';
this.parentUid(0);
this.threads([]);
this.threadsLen(0);
this.hasUnseenSubMessage(false);
this.hasFlaggedSubMessage(false);
this.lastInCollapsedThread(false);
this.lastInCollapsedThreadLoading(false);
};
/**
* @param {AjaxJsonMessage} oJsonMessage
* @return {boolean}

View file

@ -54,19 +54,19 @@ MailBoxScreen.prototype.onRoute = function (sFolderHash, iPage, sSearch)
if (oFolder)
{
oData
.currentFolder(oFolder)
.messageListPage(iPage)
.messageListSearch(sSearch)
;
oData
.currentFolder(oFolder)
.messageListPage(iPage)
.messageListSearch(sSearch)
;
if (!oData.usePreviewPane() && oData.message())
{
oData.message(null);
if (!oData.usePreviewPane() && oData.message())
{
oData.message(null);
}
RL.reloadMessageList();
}
RL.reloadMessageList();
}
};
MailBoxScreen.prototype.onStart = function ()
@ -158,7 +158,8 @@ MailBoxScreen.prototype.routes = function ()
;
return [
[/^([a-zA-Z0-9]+)\/p([1-9][0-9]*)\/?$/, {'normalize_': fNormS}],
[/^([a-zA-Z0-9]+)\/p([1-9][0-9]*)\/(.+)\/?$/, {'normalize_': fNormS}],
[/^([a-zA-Z0-9]+)\/p([1-9][0-9]*)$/, {'normalize_': fNormS}],
[/^([a-zA-Z0-9]+)\/(.+)\/?$/, {'normalize_': fNormD}],
[/^([^\/]*)$/, {'normalize_': fNormS}]
];

View file

@ -450,7 +450,7 @@ MailBoxMessageListViewModel.prototype.dragAndDronHelper = function (oMessageList
MailBoxMessageListViewModel.prototype.onMessageResponse = function (sResult, oData, bCached)
{
var oRainLoopData = RL.data();
oRainLoopData.messageLoading(false);
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
{

View file

@ -2,7 +2,7 @@
"name": "RainLoop",
"title": "RainLoop Webmail",
"version": "1.5.1",
"release": "549",
"release": "550",
"description": "Simple, modern & fast web-based email client",
"homepage": "http://rainloop.net",
"main": "Gruntfile.js",

View file

@ -3038,8 +3038,8 @@ LinkBuilder.prototype.admin = function (sScreenName)
/**
* @param {string} sFolder
* @param {number=} iPage
* @param {string=} sSearch
* @param {number=} iPage = 1
* @param {string=} sSearch = ''
* @return {string}
*/
LinkBuilder.prototype.mailBox = function (sFolder, iPage, sSearch)

View file

@ -3038,8 +3038,8 @@ LinkBuilder.prototype.admin = function (sScreenName)
/**
* @param {string} sFolder
* @param {number=} iPage
* @param {string=} sSearch
* @param {number=} iPage = 1
* @param {string=} sSearch = ''
* @return {string}
*/
LinkBuilder.prototype.mailBox = function (sFolder, iPage, sSearch)
@ -6391,6 +6391,65 @@ MessageModel.replyHelper = function (aMessageEmails, oLocalUnic, aLocalEmails)
}
};
MessageModel.prototype.clear = function ()
{
this.folderFullNameRaw = '';
this.uid = '';
this.requestHash = '';
this.subject('');
this.size(0);
this.dateTimeStampInUTC(0);
this.priority(Enums.MessagePriority.Normal);
this.fromEmailString('');
this.toEmailsString('');
this.senderEmailsString('');
this.prefetched = false;
this.emails = [];
this.from = [];
this.to = [];
this.cc = [];
this.bcc = [];
this.replyTo = [];
this.newForAnimation(false);
this.deleted(false);
this.unseen(false);
this.flagged(false);
this.answered(false);
this.forwarded(false);
this.selected(false);
this.checked(false);
this.hasAttachments(false);
this.attachmentsMainType('');
this.body = null;
this.isRtl(false);
this.isHtml(false);
this.hasImages(false);
this.attachments([]);
this.priority(Enums.MessagePriority.Normal);
this.aDraftInfo = [];
this.sMessageId = '';
this.sInReplyTo = '';
this.sReferences = '';
this.parentUid(0);
this.threads([]);
this.threadsLen(0);
this.hasUnseenSubMessage(false);
this.hasFlaggedSubMessage(false);
this.lastInCollapsedThread(false);
this.lastInCollapsedThreadLoading(false);
};
/**
* @param {AjaxJsonMessage} oJsonMessage
* @return {boolean}
@ -11225,7 +11284,7 @@ MailBoxMessageListViewModel.prototype.dragAndDronHelper = function (oMessageList
MailBoxMessageListViewModel.prototype.onMessageResponse = function (sResult, oData, bCached)
{
var oRainLoopData = RL.data();
oRainLoopData.messageLoading(false);
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
{
@ -15557,19 +15616,19 @@ MailBoxScreen.prototype.onRoute = function (sFolderHash, iPage, sSearch)
if (oFolder)
{
oData
.currentFolder(oFolder)
.messageListPage(iPage)
.messageListSearch(sSearch)
;
oData
.currentFolder(oFolder)
.messageListPage(iPage)
.messageListSearch(sSearch)
;
if (!oData.usePreviewPane() && oData.message())
{
oData.message(null);
if (!oData.usePreviewPane() && oData.message())
{
oData.message(null);
}
RL.reloadMessageList();
}
RL.reloadMessageList();
}
};
MailBoxScreen.prototype.onStart = function ()
@ -15661,7 +15720,8 @@ MailBoxScreen.prototype.routes = function ()
;
return [
[/^([a-zA-Z0-9]+)\/p([1-9][0-9]*)\/?$/, {'normalize_': fNormS}],
[/^([a-zA-Z0-9]+)\/p([1-9][0-9]*)\/(.+)\/?$/, {'normalize_': fNormS}],
[/^([a-zA-Z0-9]+)\/p([1-9][0-9]*)$/, {'normalize_': fNormS}],
[/^([a-zA-Z0-9]+)\/(.+)\/?$/, {'normalize_': fNormD}],
[/^([^\/]*)$/, {'normalize_': fNormS}]
];

File diff suppressed because one or more lines are too long