Small fixes

This commit is contained in:
RainLoop Team 2015-04-23 01:33:02 +04:00
parent 5b38b2c92c
commit f5f067f1f3
11 changed files with 88 additions and 26 deletions

View file

@ -170,8 +170,6 @@
Globals.popupVisibilityNames.push(this.viewModelName);
oViewModel.viewModelDom.css('z-index', 3000 + Globals.popupVisibilityNames().length + 10);
// Utils.delegateRun(this, 'onShow'); // moved to showScreenPopup function (for parameters)
if (this.onShowTrigger)
{
this.onShowTrigger(!this.onShowTrigger());
@ -257,6 +255,8 @@
if (ViewModelClassToShow.__vm && ViewModelClassToShow.__dom)
{
Utils.delegateRun(ViewModelClassToShow.__vm, 'onBeforeShow', aParameters || []);
ViewModelClassToShow.__vm.modalVisibility(true);
Utils.delegateRun(ViewModelClassToShow.__vm, 'onShow', aParameters || []);
@ -383,6 +383,8 @@
if (ViewModelClass.__vm && ViewModelClass.__dom &&
'Popups' !== ViewModelClass.__vm.viewModelPosition())
{
Utils.delegateRun(ViewModelClass.__vm, 'onBeforeShow');
ViewModelClass.__dom.show();
ViewModelClass.__vm.viewModelVisibility(true);

View file

@ -131,6 +131,7 @@
// show
if (self.oCurrentSubScreen)
{
Utils.delegateRun(self.oCurrentSubScreen, 'onBeforeShow');
self.oCurrentSubScreen.viewModelDom.show();
Utils.delegateRun(self.oCurrentSubScreen, 'onShow');
Utils.delegateRun(self.oCurrentSubScreen, 'onShowWithDelay', [], 200);

View file

@ -180,10 +180,12 @@ html.rl-no-preview-pane {
.listThreadUidDesc {
font-size: 16px;
padding: 7px 20px 5px 20px;
background-color: #999;
padding: 7px 20px 6px 20px;
background-color: #aaa;
border-bottom: 1px solid #888;
color: #fff;
cursor: pointer;
text-shadow: 0 1px 0 #000;
text-align: center;
}
@ -410,16 +412,25 @@ html.rl-no-preview-pane {
.threads-len {
.threads-len-data {
background-color: #999;
color: #fff;
background-color: #eee;
color: #666;
border-radius: 6px;
padding: 1px 2px 1px 5px;
padding: 2px 0px 1px 6px;
margin-right: 2px;
border: 1px solid #ccc;
[class^="icon-"],
[class*=" icon-"] {
font-size: 14px;
}
&:hover {
background-color: #aaa;
border-color: #666;
text-shadow: 0 1px 0 #999;
color: #fff;
}
}
}

View file

@ -64,6 +64,14 @@
});
};
LanguagesPopupView.prototype.onBeforeShow = function ()
{
this.fLang = null;
this.userLanguage('');
this.langs([]);
};
LanguagesPopupView.prototype.onShow = function (fLanguage, aLangs, sUserLanguage)
{
this.fLang = fLanguage;
@ -72,13 +80,6 @@
this.langs(aLangs);
};
LanguagesPopupView.prototype.onHide = function ()
{
this.fLang = null;
this.userLanguage('');
this.langs([]);
};
LanguagesPopupView.prototype.changeLanguage = function (sLang)
{
if (this.fLang)

View file

@ -630,7 +630,7 @@
MessageListMailBoxUserView.prototype.gotoThread = function (oMessage)
{
if (oMessage)
if (oMessage && 0 < oMessage.threadsLen())
{
MessageStore.messageListPageBeforeThread(MessageStore.messageListPage());
@ -643,6 +643,13 @@
}
};
MessageListMailBoxUserView.prototype.clearListIsVisible = function ()
{
return '' === this.messageListSearchDesc() && '' === this.messageListError() &&
'' === MessageStore.messageListEndThreadUid() &&
0 < this.messageList().length && (this.isSpamFolder() || this.isTrashFolder());
};
MessageListMailBoxUserView.prototype.onBuild = function (oDom)
{
var self = this;
@ -671,6 +678,9 @@
.on('click', '.messageList .messageListItem .threads-len', function () {
self.gotoThread(ko.dataFor(this));
})
.on('dblclick', '.messageList .messageListItem .actionHandle', function () {
self.gotoThread(ko.dataFor(this));
})
;
this.initUploaderForAppend();