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 {string} sFolder
* @param {number=} iPage * @param {number=} iPage = 1
* @param {string=} sSearch * @param {string=} sSearch = ''
* @return {string} * @return {string}
*/ */
LinkBuilder.prototype.mailBox = function (sFolder, iPage, sSearch) 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 * @param {AjaxJsonMessage} oJsonMessage
* @return {boolean} * @return {boolean}

View file

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

View file

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

View file

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

View file

@ -3038,8 +3038,8 @@ LinkBuilder.prototype.admin = function (sScreenName)
/** /**
* @param {string} sFolder * @param {string} sFolder
* @param {number=} iPage * @param {number=} iPage = 1
* @param {string=} sSearch * @param {string=} sSearch = ''
* @return {string} * @return {string}
*/ */
LinkBuilder.prototype.mailBox = function (sFolder, iPage, sSearch) 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 * @param {AjaxJsonMessage} oJsonMessage
* @return {boolean} * @return {boolean}
@ -15557,19 +15616,19 @@ MailBoxScreen.prototype.onRoute = function (sFolderHash, iPage, sSearch)
if (oFolder) if (oFolder)
{ {
oData oData
.currentFolder(oFolder) .currentFolder(oFolder)
.messageListPage(iPage) .messageListPage(iPage)
.messageListSearch(sSearch) .messageListSearch(sSearch)
; ;
if (!oData.usePreviewPane() && oData.message()) if (!oData.usePreviewPane() && oData.message())
{ {
oData.message(null); oData.message(null);
}
RL.reloadMessageList();
} }
RL.reloadMessageList();
}
}; };
MailBoxScreen.prototype.onStart = function () MailBoxScreen.prototype.onStart = function ()
@ -15661,7 +15720,8 @@ MailBoxScreen.prototype.routes = function ()
; ;
return [ 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}], [/^([a-zA-Z0-9]+)\/(.+)\/?$/, {'normalize_': fNormD}],
[/^([^\/]*)$/, {'normalize_': fNormS}] [/^([^\/]*)$/, {'normalize_': fNormS}]
]; ];

File diff suppressed because one or more lines are too long