mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Code refactoring
This commit is contained in:
parent
60bac7192f
commit
90d95d3ca4
28 changed files with 977 additions and 924 deletions
|
|
@ -1117,29 +1117,7 @@
|
|||
oText = $(oMessage.body).clone();
|
||||
if (oText)
|
||||
{
|
||||
oText.find('blockquote.rl-bq-switcher').removeClass('rl-bq-switcher hidden-bq');
|
||||
oText.find('.rlBlockquoteSwitcher').off('.rlBlockquoteSwitcher').remove();
|
||||
oText.find('[data-html-editor-font-wrapper]').removeAttr('data-html-editor-font-wrapper');
|
||||
|
||||
// (function () {
|
||||
//
|
||||
// var oTmp = null, iLimit = 0;
|
||||
//
|
||||
// while (true)
|
||||
// {
|
||||
// iLimit++;
|
||||
//
|
||||
// oTmp = oText.children();
|
||||
// if (10 > iLimit && oTmp.is('div') && 1 === oTmp.length)
|
||||
// {
|
||||
// oTmp.children().unwrap();
|
||||
// continue;
|
||||
// }
|
||||
//
|
||||
// break;
|
||||
// }
|
||||
//
|
||||
// }());
|
||||
Utils.clearBqSwitcher(oText);
|
||||
|
||||
sText = oText.html();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -289,43 +289,40 @@
|
|||
this.goToUpUpOrDownDown(bV);
|
||||
}, this));
|
||||
|
||||
Events
|
||||
.sub('mailbox.message-list.selector.go-down', function (bSelect) {
|
||||
this.selector.goDown(bSelect);
|
||||
}, this)
|
||||
.sub('mailbox.message-list.selector.go-up', function (bSelect) {
|
||||
this.selector.goUp(bSelect);
|
||||
}, this)
|
||||
;
|
||||
Events.sub('mailbox.message-list.selector.go-down', function (bSelect) {
|
||||
this.selector.goDown(bSelect);
|
||||
}, this);
|
||||
|
||||
Events
|
||||
.sub('mailbox.message.show', function (sFolder, sUid) {
|
||||
Events.sub('mailbox.message-list.selector.go-up', function (bSelect) {
|
||||
this.selector.goUp(bSelect);
|
||||
}, this);
|
||||
|
||||
var oMessage = _.find(this.messageList(), function (oItem) {
|
||||
return oItem && sFolder === oItem.folderFullNameRaw && sUid === oItem.uid;
|
||||
});
|
||||
Events.sub('mailbox.message.show', function (sFolder, sUid) {
|
||||
|
||||
if ('INBOX' === sFolder)
|
||||
var oMessage = _.find(this.messageList(), function (oItem) {
|
||||
return oItem && sFolder === oItem.folderFullNameRaw && sUid === oItem.uid;
|
||||
});
|
||||
|
||||
if ('INBOX' === sFolder)
|
||||
{
|
||||
kn.setHash(Links.mailBox(sFolder, 1));
|
||||
}
|
||||
|
||||
if (oMessage)
|
||||
{
|
||||
this.selector.selectMessageItem(oMessage);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ('INBOX' !== sFolder)
|
||||
{
|
||||
kn.setHash(Links.mailBox(sFolder, 1));
|
||||
}
|
||||
|
||||
if (oMessage)
|
||||
{
|
||||
this.selector.selectMessageItem(oMessage);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ('INBOX' !== sFolder)
|
||||
{
|
||||
kn.setHash(Links.mailBox(sFolder, 1));
|
||||
}
|
||||
MessageStore.selectMessageByFolderAndUid(sFolder, sUid);
|
||||
}
|
||||
|
||||
MessageStore.selectMessageByFolderAndUid(sFolder, sUid);
|
||||
}
|
||||
|
||||
}, this)
|
||||
;
|
||||
}, this);
|
||||
|
||||
MessageStore.messageListEndHash.subscribe(function () {
|
||||
this.selector.scrollToTop();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue