A new way to move in message list (message focused state).

Delete/Move optimizations.
Display next message after deletion (Closes #120)
Scrolling in message view (Closes #109)
This commit is contained in:
RainLoop Team 2014-04-08 20:08:16 +04:00
parent a96e1d80c3
commit 0b30bac43f
17 changed files with 784 additions and 431 deletions

View file

@ -11,10 +11,13 @@ function RainLoopApp()
this.oData = null; this.oData = null;
this.oRemote = null; this.oRemote = null;
this.oCache = null; this.oCache = null;
this.oMoveCache = {};
this.quotaDebounce = _.debounce(this.quota, 1000 * 30); this.quotaDebounce = _.debounce(this.quota, 1000 * 30);
this.moveOrDeleteResponseHelper = _.bind(this.moveOrDeleteResponseHelper, this); this.moveOrDeleteResponseHelper = _.bind(this.moveOrDeleteResponseHelper, this);
this.messagesMoveTrigger = _.debounce(this.messagesMoveTrigger, 500);
window.setInterval(function () { window.setInterval(function () {
RL.pub('interval.30s'); RL.pub('interval.30s');
}, 30000); }, 30000);
@ -164,6 +167,57 @@ RainLoopApp.prototype.recacheInboxMessageList = function ()
RL.remote().messageList(Utils.emptyFunction, 'INBOX', 0, RL.data().messagesPerPage(), '', true); RL.remote().messageList(Utils.emptyFunction, 'INBOX', 0, RL.data().messagesPerPage(), '', true);
}; };
RainLoopApp.prototype.reloadMessageListHelper = function (bEmptyList)
{
RL.reloadMessageList(bEmptyList);
};
RainLoopApp.prototype.messagesMoveTrigger = function ()
{
var self = this;
_.each(this.oMoveCache, function (oItem) {
RL.remote().messagesMove(self.moveOrDeleteResponseHelper, oItem['From'], oItem['To'], oItem['Uid']);
});
this.oMoveCache = {};
};
RainLoopApp.prototype.messagesMoveHelper = function (sFromFolderFullNameRaw, sToFolderFullNameRaw, aUidForMove)
{
var sH = '$$' + sFromFolderFullNameRaw + '$$' + sToFolderFullNameRaw + '$$';
if (!this.oMoveCache[sH])
{
this.oMoveCache[sH] = {
'From': sFromFolderFullNameRaw,
'To': sToFolderFullNameRaw,
'Uid': []
};
}
this.oMoveCache[sH]['Uid'] = _.union(this.oMoveCache[sH]['Uid'], aUidForMove);
this.messagesMoveTrigger();
};
RainLoopApp.prototype.messagesCopyHelper = function (sFromFolderFullNameRaw, sToFolderFullNameRaw, aUidForCopy)
{
RL.remote().messagesCopy(
this.moveOrDeleteResponseHelper,
sFromFolderFullNameRaw,
sToFolderFullNameRaw,
aUidForCopy
);
};
RainLoopApp.prototype.messagesDeleteHelper = function (sFromFolderFullNameRaw, aUidForRemove)
{
RL.remote().messagesDelete(
this.moveOrDeleteResponseHelper,
sFromFolderFullNameRaw,
aUidForRemove
);
};
RainLoopApp.prototype.moveOrDeleteResponseHelper = function (sResult, oData) RainLoopApp.prototype.moveOrDeleteResponseHelper = function (sResult, oData)
{ {
if (Enums.StorageResultType.Success === sResult && RL.data().currentFolder()) if (Enums.StorageResultType.Success === sResult && RL.data().currentFolder())
@ -183,7 +237,7 @@ RainLoopApp.prototype.moveOrDeleteResponseHelper = function (sResult, oData)
} }
} }
RL.reloadMessageList(0 === RL.data().messageList().length); RL.reloadMessageListHelper(0 === RL.data().messageList().length);
RL.quotaDebounce(); RL.quotaDebounce();
} }
}; };
@ -194,12 +248,7 @@ RainLoopApp.prototype.moveOrDeleteResponseHelper = function (sResult, oData)
*/ */
RainLoopApp.prototype.deleteMessagesFromFolderWithoutCheck = function (sFromFolderFullNameRaw, aUidForRemove) RainLoopApp.prototype.deleteMessagesFromFolderWithoutCheck = function (sFromFolderFullNameRaw, aUidForRemove)
{ {
RL.remote().messagesDelete( this.messagesDeleteHelper(sFromFolderFullNameRaw, aUidForRemove);
this.moveOrDeleteResponseHelper,
sFromFolderFullNameRaw,
aUidForRemove
);
RL.data().removeMessagesFromList(sFromFolderFullNameRaw, aUidForRemove); RL.data().removeMessagesFromList(sFromFolderFullNameRaw, aUidForRemove);
}; };
@ -255,25 +304,14 @@ RainLoopApp.prototype.deleteMessagesFromFolder = function (iDeleteType, sFromFol
{ {
kn.showScreenPopup(PopupsAskViewModel, [Utils.i18n('POPUPS_ASK/DESC_WANT_DELETE_MESSAGES'), function () { kn.showScreenPopup(PopupsAskViewModel, [Utils.i18n('POPUPS_ASK/DESC_WANT_DELETE_MESSAGES'), function () {
RL.remote().messagesDelete( self.messagesDeleteHelper(sFromFolderFullNameRaw, aUidForRemove);
self.moveOrDeleteResponseHelper,
sFromFolderFullNameRaw,
aUidForRemove
);
oData.removeMessagesFromList(sFromFolderFullNameRaw, aUidForRemove); oData.removeMessagesFromList(sFromFolderFullNameRaw, aUidForRemove);
}]); }]);
} }
else if (oMoveFolder) else if (oMoveFolder)
{ {
RL.remote().messagesMove( this.messagesMoveHelper(sFromFolderFullNameRaw, oMoveFolder.fullNameRaw, aUidForRemove);
this.moveOrDeleteResponseHelper,
sFromFolderFullNameRaw,
oMoveFolder.fullNameRaw,
aUidForRemove
);
oData.removeMessagesFromList(sFromFolderFullNameRaw, aUidForRemove, oMoveFolder.fullNameRaw); oData.removeMessagesFromList(sFromFolderFullNameRaw, aUidForRemove, oMoveFolder.fullNameRaw);
} }
}; };
@ -295,14 +333,14 @@ RainLoopApp.prototype.moveMessagesToFolder = function (sFromFolderFullNameRaw, a
if (oFromFolder && oToFolder) if (oFromFolder && oToFolder)
{ {
bCopy = Utils.isUnd(bCopy) ? false : !!bCopy; if (Utils.isUnd(bCopy) ? false : !!bCopy)
{
RL.remote()[bCopy ? 'messagesCopy' : 'messagesMove']( this.messagesCopyHelper(oFromFolder.fullNameRaw, oToFolder.fullNameRaw, aUidForMove);
this.moveOrDeleteResponseHelper, }
oFromFolder.fullNameRaw, else
oToFolder.fullNameRaw, {
aUidForMove this.messagesMoveHelper(oFromFolder.fullNameRaw, oToFolder.fullNameRaw, aUidForMove);
); }
RL.data().removeMessagesFromList(oFromFolder.fullNameRaw, aUidForMove, oToFolder.fullNameRaw, bCopy); RL.data().removeMessagesFromList(oFromFolder.fullNameRaw, aUidForMove, oToFolder.fullNameRaw, bCopy);
return true; return true;

View file

@ -137,6 +137,7 @@ Enums.EventKeyCode = {
'Down': 40, 'Down': 40,
'End': 35, 'End': 35,
'Home': 36, 'Home': 36,
'Space': 32,
'Insert': 45, 'Insert': 45,
'Delete': 46, 'Delete': 46,
'A': 65, 'A': 65,

View file

@ -3,16 +3,35 @@
/** /**
* @constructor * @constructor
* @param {koProperty} oKoList * @param {koProperty} oKoList
* @param {koProperty} oKoFocusedItem
* @param {koProperty} oKoSelectedItem * @param {koProperty} oKoSelectedItem
* @param {string} sItemSelector * @param {string} sItemSelector
* @param {string} sItemSelectedSelector * @param {string} sItemSelectedSelector
* @param {string} sItemCheckedSelector * @param {string} sItemCheckedSelector
* @param {string} sItemFocusedSelector
*/ */
function Selector(oKoList, oKoSelectedItem, sItemSelector, sItemSelectedSelector, sItemCheckedSelector) function Selector(oKoList, oKoFocusedItem, oKoSelectedItem,
sItemSelector, sItemSelectedSelector, sItemCheckedSelector, sItemFocusedSelector)
{ {
this.list = oKoList; this.list = oKoList;
this.focusedItem = oKoFocusedItem;
this.selectedItem = oKoSelectedItem; this.selectedItem = oKoSelectedItem;
this.focusedItem.extend({'toggleSubscribe': [null,
function (oPrev) {
if (oPrev)
{
oPrev.focused(false);
}
}, function (oNext) {
if (oNext)
{
oNext.focused(true);
}
}
]});
this.selectedItem.extend({'toggleSubscribe': [null, this.selectedItem.extend({'toggleSubscribe': [null,
function (oPrev) { function (oPrev) {
if (oPrev) if (oPrev)
@ -33,29 +52,38 @@ function Selector(oKoList, oKoSelectedItem, sItemSelector, sItemSelectedSelector
this.sItemSelector = sItemSelector; this.sItemSelector = sItemSelector;
this.sItemSelectedSelector = sItemSelectedSelector; this.sItemSelectedSelector = sItemSelectedSelector;
this.sItemCheckedSelector = sItemCheckedSelector; this.sItemCheckedSelector = sItemCheckedSelector;
this.sItemFocusedSelector = sItemFocusedSelector;
this.sLastUid = ''; this.sLastUid = '';
this.oCallbacks = {}; this.oCallbacks = {};
this.iSelectTimer = 0; this.iSelectTimer = 0;
this.bUseKeyboard = true; this.bUseKeyboard = true;
this.bAutoSelect = true;
this.emptyFunction = function () {}; this.emptyFunction = function () {};
this.useItemSelectCallback = true; this.useItemSelectCallback = true;
this.throttleSelection = false;
this.selectedItem.subscribe(function (oItem) { this.selectedItem.subscribe(function (oItem) {
if (oItem)
{
this.sLastUid = this.getItemUid(oItem);
this.focusedItem(oItem);
}
if (this.useItemSelectCallback) if (this.useItemSelectCallback)
{ {
if (this.throttleSelection) this.selectItemCallbacks(oItem);
{ }
this.throttleSelection = false;
this.selectItemCallbacksThrottle(oItem); }, this);
}
else this.focusedItem.subscribe(function (oItem) {
{ if (oItem)
this.selectItemCallbacks(oItem); {
} this.sLastUid = this.getItemUid(oItem);
} }
}, this); }, this);
@ -86,25 +114,43 @@ function Selector(oKoList, oKoSelectedItem, sItemSelector, sItemSelectedSelector
this.list.subscribe(function (aItems) { this.list.subscribe(function (aItems) {
this.useItemSelectCallback = false; this.useItemSelectCallback = false;
var
self = this,
iLen = 0,
sFocusedUid = this.focusedItem() ? this.getItemUid(this.focusedItem()) : ''
;
this.selectedItem(null); this.selectedItem(null);
this.focusedItem(null);
if (Utils.isArray(aItems)) if (Utils.isArray(aItems))
{ {
var self = this, iLen = aCheckedCache.length; iLen = aCheckedCache.length;
_.each(aItems, function (oItem) { _.each(aItems, function (oItem) {
if (0 < iLen && -1 < Utils.inArray(self.getItemUid(oItem), aCheckedCache))
var sUid = self.getItemUid(oItem);
if (0 < iLen && -1 < Utils.inArray(sUid, aCheckedCache))
{ {
oItem.checked(true); oItem.checked(true);
iLen--; iLen--;
} }
if ('' !== sFocusedUid && sUid === sFocusedUid)
{
self.focusedItem(oItem);
}
if (null !== mSelected && mSelected === self.getItemUid(oItem)) if (null !== mSelected && mSelected === self.getItemUid(oItem))
{ {
oItem.selected(true); if (!oItem.selected())
{
self.selectedItem(oItem);
}
mSelected = null; mSelected = null;
self.selectedItem(oItem);
} }
}); });
} }
@ -113,6 +159,7 @@ function Selector(oKoList, oKoSelectedItem, sItemSelector, sItemSelectedSelector
aCheckedCache = []; aCheckedCache = [];
mSelected = null; mSelected = null;
}, this); }, this);
this.list.setSelectedByUid = function (sUid) { this.list.setSelectedByUid = function (sUid) {
@ -185,14 +232,23 @@ Selector.prototype.init = function (oContentVisible, oContentScrollable, sKeySco
}) })
; ;
key('space, enter', sKeyScope, function () { key('enter', sKeyScope, function () {
return false; if (!self.bAutoSelect)
{
if (self.focusedItem())
{
self.actionClick(self.focusedItem());
}
return false;
}
}); });
key('up, shift+up, down, shift+down, insert, home, end, pageup, pagedown', sKeyScope, function (event, handler) { key('up, shift+up, down, shift+down, home, end, pageup, pagedown, insert, space', sKeyScope, function (event, handler) {
if (event && handler && handler.shortcut) if (event && handler && handler.shortcut)
{ {
var iKey = 0, aCodes = null; // TODO
var iKey = 0;
switch (handler.shortcut) switch (handler.shortcut)
{ {
case 'up': case 'up':
@ -204,15 +260,22 @@ Selector.prototype.init = function (oContentVisible, oContentScrollable, sKeySco
iKey = Enums.EventKeyCode.Down; iKey = Enums.EventKeyCode.Down;
break; break;
case 'insert': case 'insert':
iKey = Enums.EventKeyCode.Insert;
break;
case 'space':
iKey = Enums.EventKeyCode.Space;
break;
case 'home': case 'home':
iKey = Enums.EventKeyCode.Home;
break;
case 'end': case 'end':
iKey = Enums.EventKeyCode.End;
break;
case 'pageup': case 'pageup':
iKey = Enums.EventKeyCode.PageUp;
break;
case 'pagedown': case 'pagedown':
aCodes = key.getPressedKeyCodes(); iKey = Enums.EventKeyCode.PageDown;
if (aCodes && aCodes[0])
{
iKey = aCodes[0];
}
break; break;
} }
@ -250,6 +313,11 @@ Selector.prototype.useKeyboard = function (bValue)
this.bUseKeyboard = !!bValue; this.bUseKeyboard = !!bValue;
}; };
Selector.prototype.autoSelect = function (bValue)
{
this.bAutoSelect = !!bValue;
};
/** /**
* @param {Object} oItem * @param {Object} oItem
* @returns {string} * @returns {string}
@ -284,14 +352,14 @@ Selector.prototype.newSelectPosition = function (iEventKeyCode, bShiftKey)
oResult = null, oResult = null,
aList = this.list(), aList = this.list(),
iListLen = aList ? aList.length : 0, iListLen = aList ? aList.length : 0,
oSelected = this.selectedItem() oFocused = this.focusedItem()
; ;
if (0 < iListLen) if (0 < iListLen)
{ {
if (!oSelected) if (!oFocused)
{ {
if (Enums.EventKeyCode.Down === iEventKeyCode || Enums.EventKeyCode.Insert === iEventKeyCode || Enums.EventKeyCode.Home === iEventKeyCode || Enums.EventKeyCode.PageUp === iEventKeyCode) if (Enums.EventKeyCode.Down === iEventKeyCode || Enums.EventKeyCode.Insert === iEventKeyCode || Enums.EventKeyCode.Space === iEventKeyCode || Enums.EventKeyCode.Home === iEventKeyCode || Enums.EventKeyCode.PageUp === iEventKeyCode)
{ {
oResult = aList[0]; oResult = aList[0];
} }
@ -300,16 +368,16 @@ Selector.prototype.newSelectPosition = function (iEventKeyCode, bShiftKey)
oResult = aList[aList.length - 1]; oResult = aList[aList.length - 1];
} }
} }
else if (oSelected) else if (oFocused)
{ {
if (Enums.EventKeyCode.Down === iEventKeyCode || Enums.EventKeyCode.Up === iEventKeyCode || Enums.EventKeyCode.Insert === iEventKeyCode) if (Enums.EventKeyCode.Down === iEventKeyCode || Enums.EventKeyCode.Up === iEventKeyCode || Enums.EventKeyCode.Insert === iEventKeyCode || Enums.EventKeyCode.Space === iEventKeyCode)
{ {
_.each(aList, function (oItem) { _.each(aList, function (oItem) {
if (!bStop) if (!bStop)
{ {
switch (iEventKeyCode) { switch (iEventKeyCode) {
case Enums.EventKeyCode.Up: case Enums.EventKeyCode.Up:
if (oSelected === oItem) if (oFocused === oItem)
{ {
bStop = true; bStop = true;
} }
@ -320,12 +388,13 @@ Selector.prototype.newSelectPosition = function (iEventKeyCode, bShiftKey)
break; break;
case Enums.EventKeyCode.Down: case Enums.EventKeyCode.Down:
case Enums.EventKeyCode.Insert: case Enums.EventKeyCode.Insert:
case Enums.EventKeyCode.Space:
if (bNext) if (bNext)
{ {
oResult = oItem; oResult = oItem;
bStop = true; bStop = true;
} }
else if (oSelected === oItem) else if (oFocused === oItem)
{ {
bNext = true; bNext = true;
} }
@ -349,7 +418,7 @@ Selector.prototype.newSelectPosition = function (iEventKeyCode, bShiftKey)
{ {
for (; iIndex < iListLen; iIndex++) for (; iIndex < iListLen; iIndex++)
{ {
if (oSelected === aList[iIndex]) if (oFocused === aList[iIndex])
{ {
iIndex += iPageStep; iIndex += iPageStep;
iIndex = iListLen - 1 < iIndex ? iListLen - 1 : iIndex; iIndex = iListLen - 1 < iIndex ? iListLen - 1 : iIndex;
@ -362,7 +431,7 @@ Selector.prototype.newSelectPosition = function (iEventKeyCode, bShiftKey)
{ {
for (iIndex = iListLen; iIndex >= 0; iIndex--) for (iIndex = iListLen; iIndex >= 0; iIndex--)
{ {
if (oSelected === aList[iIndex]) if (oFocused === aList[iIndex])
{ {
iIndex -= iPageStep; iIndex -= iPageStep;
iIndex = 0 > iIndex ? 0 : iIndex; iIndex = 0 > iIndex ? 0 : iIndex;
@ -376,53 +445,43 @@ Selector.prototype.newSelectPosition = function (iEventKeyCode, bShiftKey)
if (oResult) if (oResult)
{ {
if (oSelected) if (oFocused)
{ {
if (bShiftKey) if (bShiftKey)
{ {
if (Enums.EventKeyCode.Up === iEventKeyCode || Enums.EventKeyCode.Down === iEventKeyCode) if (Enums.EventKeyCode.Up === iEventKeyCode || Enums.EventKeyCode.Down === iEventKeyCode)
{ {
oSelected.checked(!oSelected.checked()); oFocused.checked(!oFocused.checked());
} }
} }
else if (Enums.EventKeyCode.Insert === iEventKeyCode) else if (Enums.EventKeyCode.Insert === iEventKeyCode || Enums.EventKeyCode.Space === iEventKeyCode)
{ {
oSelected.checked(!oSelected.checked()); oFocused.checked(!oFocused.checked());
} }
} }
this.throttleSelection = true; this.focusedItem(oResult);
this.selectedItem(oResult);
this.throttleSelection = true;
if (0 !== this.iSelectTimer) if (this.bAutoSelect && Enums.EventKeyCode.Space !== iEventKeyCode)
{ {
window.clearTimeout(this.iSelectTimer); window.clearTimeout(this.iSelectTimer);
this.iSelectTimer = window.setTimeout(function () { this.iSelectTimer = window.setTimeout(function () {
self.iSelectTimer = 0; self.iSelectTimer = 0;
self.actionClick(oResult); self.actionClick(oResult);
}, 1000); }, 300);
}
else
{
this.iSelectTimer = window.setTimeout(function () {
self.iSelectTimer = 0;
}, 200);
this.actionClick(oResult);
} }
this.scrollToSelected(); this.scrollToFocused();
} }
else if (oSelected) else if (oFocused)
{ {
if (bShiftKey && (Enums.EventKeyCode.Up === iEventKeyCode || Enums.EventKeyCode.Down === iEventKeyCode)) if (bShiftKey && (Enums.EventKeyCode.Up === iEventKeyCode || Enums.EventKeyCode.Down === iEventKeyCode))
{ {
oSelected.checked(!oSelected.checked()); oFocused.checked(!oFocused.checked());
} }
else if (Enums.EventKeyCode.Insert === iEventKeyCode) else if (Enums.EventKeyCode.Insert === iEventKeyCode || Enums.EventKeyCode.Space === iEventKeyCode)
{ {
oSelected.checked(!oSelected.checked()); oFocused.checked(!oFocused.checked());
} }
} }
}; };
@ -430,7 +489,7 @@ Selector.prototype.newSelectPosition = function (iEventKeyCode, bShiftKey)
/** /**
* @return {boolean} * @return {boolean}
*/ */
Selector.prototype.scrollToSelected = function () Selector.prototype.scrollToFocused = function ()
{ {
if (!this.oContentVisible || !this.oContentScrollable) if (!this.oContentVisible || !this.oContentScrollable)
{ {
@ -439,13 +498,13 @@ Selector.prototype.scrollToSelected = function ()
var var
iOffset = 20, iOffset = 20,
oSelected = $(this.sItemSelectedSelector, this.oContentScrollable), oFocused = $(this.sItemFocusedSelector, this.oContentScrollable),
oPos = oSelected.position(), oPos = oFocused.position(),
iVisibleHeight = this.oContentVisible.height(), iVisibleHeight = this.oContentVisible.height(),
iSelectedHeight = oSelected.outerHeight() iFocusedHeight = oFocused.outerHeight()
; ;
if (oPos && (oPos.top < 0 || oPos.top + iSelectedHeight > iVisibleHeight)) if (oPos && (oPos.top < 0 || oPos.top + iFocusedHeight > iVisibleHeight))
{ {
if (oPos.top < 0) if (oPos.top < 0)
{ {
@ -453,7 +512,7 @@ Selector.prototype.scrollToSelected = function ()
} }
else else
{ {
this.oContentScrollable.scrollTop(this.oContentScrollable.scrollTop() + oPos.top - iVisibleHeight + iSelectedHeight + iOffset); this.oContentScrollable.scrollTop(this.oContentScrollable.scrollTop() + oPos.top - iVisibleHeight + iFocusedHeight + iOffset);
} }
return true; return true;
@ -511,7 +570,6 @@ Selector.prototype.eventClickFunction = function (oItem, oEvent)
}; };
/** /**
*
* @param {Object} oItem * @param {Object} oItem
* @param {Object=} oEvent * @param {Object=} oEvent
*/ */
@ -535,6 +593,7 @@ Selector.prototype.actionClick = function (oItem, oEvent)
} }
oItem.checked(!oItem.checked()); oItem.checked(!oItem.checked());
this.eventClickFunction(oItem, oEvent); this.eventClickFunction(oItem, oEvent);
} }
else if (oEvent.ctrlKey) else if (oEvent.ctrlKey)
@ -549,7 +608,6 @@ Selector.prototype.actionClick = function (oItem, oEvent)
if (bClick) if (bClick)
{ {
this.selectedItem(oItem); this.selectedItem(oItem);
this.sLastUid = sUid;
} }
} }
}; };

View file

@ -584,7 +584,7 @@ WebMailAjaxRemoteStorage.prototype.messagesMove = function (fCallback, sFolder,
'FromFolder': sFolder, 'FromFolder': sFolder,
'ToFolder': sToFolder, 'ToFolder': sToFolder,
'Uids': aUids.join(',') 'Uids': aUids.join(',')
}, null, '', ['MessageList', 'Message']); }, null, '', ['MessageList']);
}; };
/** /**
@ -612,7 +612,7 @@ WebMailAjaxRemoteStorage.prototype.messagesDelete = function (fCallback, sFolder
this.defaultRequest(fCallback, 'MessageDelete', { this.defaultRequest(fCallback, 'MessageDelete', {
'Folder': sFolder, 'Folder': sFolder,
'Uids': aUids.join(',') 'Uids': aUids.join(',')
}, null, '', ['MessageList', 'Message']); }, null, '', ['MessageList']);
}; };
/** /**

View file

@ -297,6 +297,7 @@ function WebMailDataStorage()
}, this); }, this);
this.currentMessage = ko.observable(null); this.currentMessage = ko.observable(null);
this.currentFocusedMessage = ko.observable(null);
this.message.subscribe(function (oMessage) { this.message.subscribe(function (oMessage) {
if (null === oMessage) if (null === oMessage)
@ -778,11 +779,15 @@ WebMailDataStorage.prototype.removeMessagesFromList = function (
iUnseenCount = 0, iUnseenCount = 0,
oData = RL.data(), oData = RL.data(),
oCache = RL.cache(), oCache = RL.cache(),
bMoveSelected = false,
bGetNext = false,
oNextMessage = null,
aMessageList = oData.messageList(),
oFromFolder = RL.cache().getFolderFromCacheList(sFromFolderFullNameRaw), oFromFolder = RL.cache().getFolderFromCacheList(sFromFolderFullNameRaw),
oToFolder = '' === sToFolderFullNameRaw ? null : oCache.getFolderFromCacheList(sToFolderFullNameRaw || ''), oToFolder = '' === sToFolderFullNameRaw ? null : oCache.getFolderFromCacheList(sToFolderFullNameRaw || ''),
sCurrentFolderFullNameRaw = oData.currentFolderFullNameRaw(), sCurrentFolderFullNameRaw = oData.currentFolderFullNameRaw(),
oCurrentMessage = oData.message(), oCurrentMessage = oData.message(),
aMessages = sCurrentFolderFullNameRaw === sFromFolderFullNameRaw ? _.filter(oData.messageList(), function (oMessage) { aMessages = sCurrentFolderFullNameRaw === sFromFolderFullNameRaw ? _.filter(aMessageList, function (oMessage) {
return oMessage && -1 < Utils.inArray(Utils.pInt(oMessage.uid), aUidForRemove); return oMessage && -1 < Utils.inArray(Utils.pInt(oMessage.uid), aUidForRemove);
}) : [] }) : []
; ;
@ -792,6 +797,11 @@ WebMailDataStorage.prototype.removeMessagesFromList = function (
{ {
iUnseenCount++; iUnseenCount++;
} }
if (oMessage.selected())
{
bMoveSelected = true;
}
}); });
if (oFromFolder && !bCopy) if (oFromFolder && !bCopy)
@ -827,10 +837,33 @@ WebMailDataStorage.prototype.removeMessagesFromList = function (
} }
else else
{ {
// select next message
if (bMoveSelected)
{
_.each(aMessageList, function (oMessage) {
if (!oNextMessage && oMessage)
{
if (bGetNext && !oMessage.checked() && !oMessage.deleted() && !oMessage.selected())
{
oNextMessage = oMessage;
}
else if (!bGetNext && oMessage.selected())
{
bGetNext = true;
}
}
});
if (oNextMessage)
{
this.currentMessage(oNextMessage);
}
}
oData.messageListIsNotCompleted(true); oData.messageListIsNotCompleted(true);
_.each(aMessages, function (oMessage) { _.each(aMessages, function (oMessage) {
if (oCurrentMessage && oCurrentMessage.requestHash === oMessage.requestHash) if (oCurrentMessage && oCurrentMessage.hash === oMessage.hash)
{ {
oCurrentMessage = null; oCurrentMessage = null;
oData.message(null); oData.message(null);

View file

@ -161,6 +161,10 @@
height: 100%; height: 100%;
} }
&.focused .sidebarParent {
background-color: #aaa;
}
&.deleted { &.deleted {
max-height: 0px; max-height: 0px;
border-color: transparent !important; border-color: transparent !important;
@ -213,15 +217,24 @@
.sidebarParent { .sidebarParent {
background-color: #69A8F5; background-color: #69A8F5;
} }
&.focused .sidebarParent {
background-color: darken(#69A8F5, 5%) !important;
}
} }
&.selected { &.selected {
background-color: #fff; background-color: #fff;
z-index: 102; z-index: 102;
.sidebarParent { .sidebarParent {
background-color: #398CF2; background-color: #398CF2;
} }
&.focused .sidebarParent {
background-color: darken(#398CF2, 5%) !important;
}
} }
} }
} }

View file

@ -229,6 +229,10 @@ html.rl-no-preview-pane {
height: 100%; height: 100%;
} }
&.focused .sidebarParent {
background-color: #aaa !important;
}
&.e-single-line { &.e-single-line {
height: 35px; height: 35px;
} }
@ -409,6 +413,10 @@ html.rl-no-preview-pane {
.sidebarParent { .sidebarParent {
background-color: orange; background-color: orange;
} }
&.focused .sidebarParent {
background-color: darken(orange, 10%) !important;
}
} }
&.hasUnseenSubMessage { &.hasUnseenSubMessage {
@ -416,6 +424,9 @@ html.rl-no-preview-pane {
.sidebarParent { .sidebarParent {
background-color: lighten(orange, 30%); background-color: lighten(orange, 30%);
} }
&.focused .sidebarParent {
background-color: darken(orange, 10%) !important;
}
} }
&.hasParentMessage { &.hasParentMessage {
@ -425,11 +436,20 @@ html.rl-no-preview-pane {
background-color: #bdc3c7; background-color: #bdc3c7;
} }
&.focused .sidebarParent {
background-color: darken(#bdc3c7, 10%) !important;
}
&.unseen { &.unseen {
background-color: darken(#ecf0f1, 5%); background-color: darken(#ecf0f1, 5%);
.sidebarParent { .sidebarParent {
background-color: darken(#bdc3c7, 30%); background-color: darken(#bdc3c7, 30%);
} }
&.focused .sidebarParent {
background-color: darken(#bdc3c7, 40%) !important;
}
} }
} }
@ -437,6 +457,10 @@ html.rl-no-preview-pane {
.sidebarParent { .sidebarParent {
background-color: lighten(#398CF2, 10%) !important; background-color: lighten(#398CF2, 10%) !important;
} }
&.focused .sidebarParent {
background-color: darken(#398CF2, 5%) !important;
}
} }
&.selected { &.selected {
@ -447,6 +471,10 @@ html.rl-no-preview-pane {
background-color: #398CF2 !important; background-color: #398CF2 !important;
} }
&.focused .sidebarParent {
background-color: darken(#398CF2, 5%) !important;
}
.delimiter { .delimiter {
background-color: #398CF2; background-color: #398CF2;
.opacity(20); .opacity(20);
@ -483,7 +511,7 @@ html.rl-no-preview-pane {
background-color: #000; background-color: #000;
} }
.b-content { .b-content {
.opacity(98); .opacity(97);
} }
} }

View file

@ -19,6 +19,7 @@ function MailBoxMessageListViewModel()
this.message = oData.message; this.message = oData.message;
this.messageList = oData.messageList; this.messageList = oData.messageList;
this.currentMessage = oData.currentMessage; this.currentMessage = oData.currentMessage;
this.currentFocusedMessage = oData.currentFocusedMessage;
this.isMessageSelected = oData.isMessageSelected; this.isMessageSelected = oData.isMessageSelected;
this.messageListSearch = oData.messageListSearch; this.messageListSearch = oData.messageListSearch;
this.messageListError = oData.messageListError; this.messageListError = oData.messageListError;
@ -191,8 +192,9 @@ function MailBoxMessageListViewModel()
this.quotaTooltip = _.bind(this.quotaTooltip, this); this.quotaTooltip = _.bind(this.quotaTooltip, this);
this.selector = new Selector(this.messageList, this.currentMessage, this.selector = new Selector(this.messageList, this.currentFocusedMessage, this.currentMessage,
'.messageListItem .actionHandle', '.messageListItem.selected', '.messageListItem .checkboxMessage'); '.messageListItem .actionHandle', '.messageListItem.selected', '.messageListItem .checkboxMessage',
'.messageListItem.focused');
this.selector.on('onItemSelect', _.bind(function (oMessage) { this.selector.on('onItemSelect', _.bind(function (oMessage) {
if (oMessage) if (oMessage)
@ -214,7 +216,14 @@ function MailBoxMessageListViewModel()
this.selector.on('onItemGetUid', function (oMessage) { this.selector.on('onItemGetUid', function (oMessage) {
return oMessage ? oMessage.generateUid() : ''; return oMessage ? oMessage.generateUid() : '';
}); });
// this.selector.autoSelect(false);
oData.layout.subscribe(function (mValue) {
this.selector.autoSelect(Enums.Layout.NoPreview !== mValue);
}, this);
oData.layout.valueHasMutated();
RL RL
.sub('mailbox.message-list.selector.go-down', function () { .sub('mailbox.message-list.selector.go-down', function () {
this.selector.goDown(); this.selector.goDown();
@ -687,7 +696,7 @@ MailBoxMessageListViewModel.prototype.initShortcuts = function ()
}); });
// change focused state // change focused state
key('tab, enter', Enums.KeyState.MessageList, function () { key('tab', Enums.KeyState.MessageList, function () {
if (oData.useKeyboardShortcuts()) if (oData.useKeyboardShortcuts())
{ {
if (self.message()) if (self.message())

View file

@ -385,11 +385,10 @@ MailBoxMessageViewViewModel.prototype.escShortcuts = function ()
else else
{ {
this.message.focused(false); this.message.focused(false);
} if (Enums.Layout.NoPreview === RL.data().layout())
{
if (Enums.Layout.NoPreview === RL.data().layout()) RL.historyBack();
{ }
RL.historyBack();
} }
return false; return false;
@ -493,7 +492,6 @@ MailBoxMessageViewViewModel.prototype.initShortcuts = function ()
key('delete, shift+delete', Enums.KeyState.MessageView, function (event, handler) { key('delete, shift+delete', Enums.KeyState.MessageView, function (event, handler) {
if (oData.useKeyboardShortcuts() && event) if (oData.useKeyboardShortcuts() && event)
{ {
self.deleteCommand();
if (handler && 'shift+delete' === handler.shortcut) if (handler && 'shift+delete' === handler.shortcut)
{ {
self.deleteWithoutMoveCommand(); self.deleteWithoutMoveCommand();

View file

@ -33,7 +33,9 @@ function PopupsContactsViewModel()
this.contacts = ko.observableArray([]); this.contacts = ko.observableArray([]);
this.contacts.loading = ko.observable(false).extend({'throttle': 200}); this.contacts.loading = ko.observable(false).extend({'throttle': 200});
this.contacts.importing = ko.observable(false).extend({'throttle': 200}); this.contacts.importing = ko.observable(false).extend({'throttle': 200});
this.currentContact = ko.observable(null); this.currentContact = ko.observable(null);
this.currentFocusedContact = ko.observable(null);
this.importUploaderButton = ko.observable(null); this.importUploaderButton = ko.observable(null);
@ -160,8 +162,9 @@ function PopupsContactsViewModel()
}); });
}, this); }, this);
this.selector = new Selector(this.contacts, this.currentContact, this.selector = new Selector(this.contacts, this.currentFocusedContact, this.currentContact,
'.e-contact-item .actionHandle', '.e-contact-item.selected', '.e-contact-item .checkboxItem'); '.e-contact-item .actionHandle', '.e-contact-item.selected', '.e-contact-item .checkboxItem',
'.e-contact-item.focused');
this.selector.on('onItemSelect', _.bind(function (oContact) { this.selector.on('onItemSelect', _.bind(function (oContact) {
this.populateViewContact(oContact ? oContact : null); this.populateViewContact(oContact ? oContact : null);

View file

@ -637,7 +637,7 @@
border-radius: 8px; border-radius: 8px;
} }
/*! normalize.css 2012-03-11T12:53 UTC - http://github.com/necolas/normalize.css */ /*! normalize.css 2012-03-11T12:53 UTC - http://github.com/necolas/normalize.css */
/* ============================================================================= /* =============================================================================
@ -1142,7 +1142,7 @@ table {
border-collapse: collapse; border-collapse: collapse;
border-spacing: 0; border-spacing: 0;
} }
@charset "UTF-8"; @charset "UTF-8";
@font-face { @font-face {
@ -1483,7 +1483,7 @@ table {
.icon-filter:before { .icon-filter:before {
content: "\e063"; content: "\e063";
} }
/** initial setup **/ /** initial setup **/
.nano { .nano {
/* /*
@ -1600,7 +1600,7 @@ table {
.nano > .pane2:hover > .slider2, .nano > .pane2.active > .slider2 { .nano > .pane2:hover > .slider2, .nano > .pane2.active > .slider2 {
background-color: rgba(0, 0, 0, 0.4); background-color: rgba(0, 0, 0, 0.4);
} }
/* Magnific Popup CSS */ /* Magnific Popup CSS */
.mfp-bg { .mfp-bg {
top: 0; top: 0;
@ -1965,7 +1965,7 @@ img.mfp-img {
right: 0; right: 0;
padding-top: 0; } padding-top: 0; }
/* overlay at start */ /* overlay at start */
.mfp-fade.mfp-bg { .mfp-fade.mfp-bg {
@ -2011,7 +2011,7 @@ img.mfp-img {
-moz-transform: translateX(50px); -moz-transform: translateX(50px);
transform: translateX(50px); transform: translateX(50px);
} }
.simple-pace { .simple-pace {
-webkit-pointer-events: none; -webkit-pointer-events: none;
pointer-events: none; pointer-events: none;
@ -2082,7 +2082,7 @@ img.mfp-img {
@keyframes simple-pace-stripe-animation { @keyframes simple-pace-stripe-animation {
0% { transform: none; transform: none; } 0% { transform: none; transform: none; }
100% { transform: translate(-32px, 0); transform: translate(-32px, 0); } 100% { transform: translate(-32px, 0); transform: translate(-32px, 0); }
} }
.inputosaurus-container { .inputosaurus-container {
background-color:#fff; background-color:#fff;
border:1px solid #bcbec0; border:1px solid #bcbec0;
@ -2150,7 +2150,7 @@ img.mfp-img {
box-shadow:none; box-shadow:none;
} }
.inputosaurus-input-hidden { display:none; } .inputosaurus-input-hidden { display:none; }
.flag-wrapper { .flag-wrapper {
width: 24px; width: 24px;
height: 16px; height: 16px;
@ -2194,7 +2194,7 @@ img.mfp-img {
.flag.flag-pt-br {background-position: -192px -11px} .flag.flag-pt-br {background-position: -192px -11px}
.flag.flag-cn, .flag.flag-zh-tw, .flag.flag-zh-cn, .flag.flag-zh-hk {background-position: -208px -22px} .flag.flag-cn, .flag.flag-zh-tw, .flag.flag-zh-cn, .flag.flag-zh-hk {background-position: -208px -22px}
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */ /* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
.clearfix { .clearfix {
*zoom: 1; *zoom: 1;
@ -6843,6 +6843,9 @@ html.rl-no-preview-pane .messageList.message-selected {
float: left; float: left;
height: 100%; height: 100%;
} }
.messageList .b-content .messageListItem.focused .sidebarParent {
background-color: #aaa !important;
}
.messageList .b-content .messageListItem.e-single-line { .messageList .b-content .messageListItem.e-single-line {
height: 35px; height: 35px;
} }
@ -6999,27 +7002,42 @@ html.rl-no-preview-pane .messageList.message-selected {
.messageList .b-content .messageListItem.unseen .sidebarParent { .messageList .b-content .messageListItem.unseen .sidebarParent {
background-color: orange; background-color: orange;
} }
.messageList .b-content .messageListItem.unseen.focused .sidebarParent {
background-color: #cc8400 !important;
}
.messageList .b-content .messageListItem.hasUnseenSubMessage { .messageList .b-content .messageListItem.hasUnseenSubMessage {
background-color: #FFFFD9; background-color: #FFFFD9;
} }
.messageList .b-content .messageListItem.hasUnseenSubMessage .sidebarParent { .messageList .b-content .messageListItem.hasUnseenSubMessage .sidebarParent {
background-color: #ffdb99; background-color: #ffdb99;
} }
.messageList .b-content .messageListItem.hasUnseenSubMessage.focused .sidebarParent {
background-color: #cc8400 !important;
}
.messageList .b-content .messageListItem.hasParentMessage { .messageList .b-content .messageListItem.hasParentMessage {
background-color: #ecf0f1; background-color: #ecf0f1;
} }
.messageList .b-content .messageListItem.hasParentMessage .sidebarParent { .messageList .b-content .messageListItem.hasParentMessage .sidebarParent {
background-color: #bdc3c7; background-color: #bdc3c7;
} }
.messageList .b-content .messageListItem.hasParentMessage.focused .sidebarParent {
background-color: #a1aab0 !important;
}
.messageList .b-content .messageListItem.hasParentMessage.unseen { .messageList .b-content .messageListItem.hasParentMessage.unseen {
background-color: #dde4e6; background-color: #dde4e6;
} }
.messageList .b-content .messageListItem.hasParentMessage.unseen .sidebarParent { .messageList .b-content .messageListItem.hasParentMessage.unseen .sidebarParent {
background-color: #6c777f; background-color: #6c777f;
} }
.messageList .b-content .messageListItem.hasParentMessage.unseen.focused .sidebarParent {
background-color: #545e64 !important;
}
.messageList .b-content .messageListItem.checked .sidebarParent { .messageList .b-content .messageListItem.checked .sidebarParent {
background-color: #69a8f5 !important; background-color: #69a8f5 !important;
} }
.messageList .b-content .messageListItem.checked.focused .sidebarParent {
background-color: #217ef0 !important;
}
.messageList .b-content .messageListItem.selected { .messageList .b-content .messageListItem.selected {
background-color: #DFEFFF; background-color: #DFEFFF;
z-index: 102; z-index: 102;
@ -7027,6 +7045,9 @@ html.rl-no-preview-pane .messageList.message-selected {
.messageList .b-content .messageListItem.selected .sidebarParent { .messageList .b-content .messageListItem.selected .sidebarParent {
background-color: #398CF2 !important; background-color: #398CF2 !important;
} }
.messageList .b-content .messageListItem.selected.focused .sidebarParent {
background-color: #217ef0 !important;
}
.messageList .b-content .messageListItem.selected .delimiter { .messageList .b-content .messageListItem.selected .delimiter {
background-color: #398CF2; background-color: #398CF2;
opacity: 0.2; opacity: 0.2;
@ -7055,8 +7076,8 @@ html.rl-no-preview-pane .messageList.message-selected {
background-color: #000; background-color: #000;
} }
.messageList.message-focused .b-content { .messageList.message-focused .b-content {
opacity: 0.98; opacity: 0.97;
filter: alpha(opacity=98); filter: alpha(opacity=97);
} }
.messageList.hideMessageListCheckbox .checkedParent, .messageList.hideMessageListCheckbox .checkedParent,
.messageList.hideMessageListCheckbox .checkboxCkeckAll { .messageList.hideMessageListCheckbox .checkboxCkeckAll {
@ -7595,6 +7616,9 @@ html.rl-message-fullscreen .messageView .b-content .buttonFull {
float: left; float: left;
height: 100%; height: 100%;
} }
.b-contacts-content.modal .b-list-content .e-contact-item.focused .sidebarParent {
background-color: #aaa;
}
.b-contacts-content.modal .b-list-content .e-contact-item.deleted { .b-contacts-content.modal .b-list-content .e-contact-item.deleted {
max-height: 0px; max-height: 0px;
border-color: transparent !important; border-color: transparent !important;
@ -7641,6 +7665,9 @@ html.rl-message-fullscreen .messageView .b-content .buttonFull {
.b-contacts-content.modal .b-list-content .e-contact-item.checked .sidebarParent { .b-contacts-content.modal .b-list-content .e-contact-item.checked .sidebarParent {
background-color: #69A8F5; background-color: #69A8F5;
} }
.b-contacts-content.modal .b-list-content .e-contact-item.checked.focused .sidebarParent {
background-color: #519af3 !important;
}
.b-contacts-content.modal .b-list-content .e-contact-item.selected { .b-contacts-content.modal .b-list-content .e-contact-item.selected {
background-color: #fff; background-color: #fff;
z-index: 102; z-index: 102;
@ -7648,6 +7675,9 @@ html.rl-message-fullscreen .messageView .b-content .buttonFull {
.b-contacts-content.modal .b-list-content .e-contact-item.selected .sidebarParent { .b-contacts-content.modal .b-list-content .e-contact-item.selected .sidebarParent {
background-color: #398CF2; background-color: #398CF2;
} }
.b-contacts-content.modal .b-list-content .e-contact-item.selected.focused .sidebarParent {
background-color: #217ef0 !important;
}
.b-contacts-content.modal .b-view-content { .b-contacts-content.modal .b-view-content {
position: absolute; position: absolute;
top: 0; top: 0;

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
/*! RainLoop Webmail Admin Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */ /*! RainLoop Webmail Admin Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
(function (window, $, ko, crossroads, hasher, _) { (function (window, $, ko, crossroads, hasher, _) {
'use strict'; 'use strict';
@ -70,14 +70,14 @@ var
$document = $(window.document), $document = $(window.document),
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
; ;
/*jshint onevar: false*/ /*jshint onevar: false*/
/** /**
* @type {?AdminApp} * @type {?AdminApp}
*/ */
var RL = null; var RL = null;
/*jshint onevar: true*/ /*jshint onevar: true*/
/** /**
* @type {?} * @type {?}
*/ */
@ -221,7 +221,7 @@ if (Globals.bAllowPdfPreview && navigator && navigator.mimeTypes)
return oType && 'application/pdf' === oType.type; return oType && 'application/pdf' === oType.type;
}); });
} }
Consts.Defaults = {}; Consts.Defaults = {};
Consts.Values = {}; Consts.Values = {};
Consts.DataImages = {}; Consts.DataImages = {};
@ -339,7 +339,7 @@ Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
* @type {string} * @type {string}
*/ */
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII='; Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
/** /**
* @enum {string} * @enum {string}
*/ */
@ -477,6 +477,7 @@ Enums.EventKeyCode = {
'Down': 40, 'Down': 40,
'End': 35, 'End': 35,
'Home': 36, 'Home': 36,
'Space': 32,
'Insert': 45, 'Insert': 45,
'Delete': 46, 'Delete': 46,
'A': 65, 'A': 65,
@ -713,7 +714,7 @@ Enums.Notification = {
'UnknownNotification': 999, 'UnknownNotification': 999,
'UnknownError': 999 'UnknownError': 999
}; };
Utils.trim = $.trim; Utils.trim = $.trim;
Utils.inArray = $.inArray; Utils.inArray = $.inArray;
Utils.isArray = _.isArray; Utils.isArray = _.isArray;
@ -2461,7 +2462,7 @@ Utils.restoreKeyFilter = function ()
}; };
} }
}; };
// Base64 encode / decode // Base64 encode / decode
// http://www.webtoolkit.info/ // http://www.webtoolkit.info/
@ -2624,7 +2625,7 @@ Base64 = {
} }
}; };
/*jslint bitwise: false*/ /*jslint bitwise: false*/
ko.bindingHandlers.tooltip = { ko.bindingHandlers.tooltip = {
'init': function (oElement, fValueAccessor) { 'init': function (oElement, fValueAccessor) {
if (!Globals.bMobileDevice) if (!Globals.bMobileDevice)
@ -3273,7 +3274,7 @@ ko.observable.fn.validateFunc = function (fFunc)
return this; return this;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -3571,7 +3572,7 @@ LinkBuilder.prototype.socialFacebook = function ()
{ {
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : ''); return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
}; };
/** /**
* @type {Object} * @type {Object}
*/ */
@ -3665,7 +3666,7 @@ Plugins.settingsGet = function (sPluginSection, sName)
}; };
/** /**
* @constructor * @constructor
*/ */
@ -3739,7 +3740,7 @@ CookieDriver.prototype.get = function (sKey)
return mResult; return mResult;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -3810,7 +3811,7 @@ LocalStorageDriver.prototype.get = function (sKey)
return mResult; return mResult;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -3853,7 +3854,7 @@ LocalStorage.prototype.get = function (iKey)
{ {
return this.oDriver ? this.oDriver.get('p' + iKey) : null; return this.oDriver ? this.oDriver.get('p' + iKey) : null;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -3866,7 +3867,7 @@ KnoinAbstractBoot.prototype.bootstart = function ()
{ {
}; };
/** /**
* @param {string=} sPosition = '' * @param {string=} sPosition = ''
* @param {string=} sTemplate = '' * @param {string=} sTemplate = ''
@ -3955,7 +3956,7 @@ KnoinAbstractViewModel.prototype.registerPopupEscapeKey = function ()
return true; return true;
}); });
}; };
/** /**
* @param {string} sScreenName * @param {string} sScreenName
* @param {?=} aViewModels = [] * @param {?=} aViewModels = []
@ -4031,7 +4032,7 @@ KnoinAbstractScreen.prototype.__start = function ()
this.oCross = oRoute; this.oCross = oRoute;
} }
}; };
/** /**
* @constructor * @constructor
*/ */
@ -4420,7 +4421,7 @@ Knoin.prototype.bootstart = function ()
}; };
kn = new Knoin(); kn = new Knoin();
/** /**
* @param {string=} sEmail * @param {string=} sEmail
* @param {string=} sName * @param {string=} sName
@ -4784,7 +4785,7 @@ EmailModel.prototype.inputoTagLine = function ()
{ {
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email; return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5002,7 +5003,7 @@ PopupsDomainViewModel.prototype.clearForm = function ()
this.smtpAuth(true); this.smtpAuth(true);
this.whiteList(''); this.whiteList('');
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5139,7 +5140,7 @@ PopupsPluginViewModel.prototype.onBuild = function ()
} }
}, this)); }, this));
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5255,7 +5256,7 @@ PopupsActivateViewModel.prototype.validateSubscriptionKey = function ()
{ {
var sValue = this.key(); var sValue = this.key();
return '' === sValue || !!/^RL[\d]+-[A-Z0-9\-]+Z$/.test(Utils.trim(sValue)); return '' === sValue || !!/^RL[\d]+-[A-Z0-9\-]+Z$/.test(Utils.trim(sValue));
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5315,7 +5316,7 @@ PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
RL.data().mainLanguage(sLang); RL.data().mainLanguage(sLang);
this.cancelCommand(); this.cancelCommand();
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5423,7 +5424,7 @@ PopupsAskViewModel.prototype.onBuild = function ()
}, this)); }, this));
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5510,7 +5511,7 @@ AdminLoginViewModel.prototype.onHide = function ()
{ {
this.loginFocus(false); this.loginFocus(false);
}; };
/** /**
* @param {?} oScreen * @param {?} oScreen
* *
@ -5532,7 +5533,7 @@ AdminMenuViewModel.prototype.link = function (sRoute)
{ {
return '#/' + sRoute; return '#/' + sRoute;
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5554,7 +5555,7 @@ AdminPaneViewModel.prototype.logoutClick = function ()
RL.remote().adminLogout(function () { RL.remote().adminLogout(function () {
RL.loginAndLogoutReload(); RL.loginAndLogoutReload();
}); });
}; };
/** /**
* @constructor * @constructor
*/ */
@ -5654,7 +5655,7 @@ AdminGeneral.prototype.selectLanguage = function ()
{ {
kn.showScreenPopup(PopupsLanguagesViewModel); kn.showScreenPopup(PopupsLanguagesViewModel);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -5706,7 +5707,7 @@ AdminLogin.prototype.onBuild = function ()
}, 50); }, 50);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -5775,7 +5776,7 @@ AdminBranding.prototype.onBuild = function ()
}, 50); }, 50);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -5995,7 +5996,7 @@ AdminContacts.prototype.onBuild = function ()
}, 50); }, 50);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6084,7 +6085,7 @@ AdminDomains.prototype.onDomainListChangeRequest = function ()
{ {
RL.reloadDomainList(); RL.reloadDomainList();
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6179,7 +6180,7 @@ AdminSecurity.prototype.phpInfoLink = function ()
{ {
return RL.link().phpInfo(); return RL.link().phpInfo();
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6295,7 +6296,7 @@ AdminSocial.prototype.onBuild = function ()
}, 50); }, 50);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6392,7 +6393,7 @@ AdminPlugins.prototype.onPluginDisableRequest = function (sResult, oData)
RL.reloadPluginList(); RL.reloadPluginList();
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6496,7 +6497,7 @@ AdminPackages.prototype.installPackage = function (oPackage)
RL.remote().packageInstall(this.requestHelper(oPackage, true), oPackage); RL.remote().packageInstall(this.requestHelper(oPackage, true), oPackage);
} }
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6547,7 +6548,7 @@ AdminLicensing.prototype.licenseExpiredMomentValue = function ()
{ {
var oDate = moment.unix(this.licenseExpired()); var oDate = moment.unix(this.licenseExpired());
return oDate.format('LL') + ' (' + oDate.from(moment()) + ')'; return oDate.format('LL') + ' (' + oDate.from(moment()) + ')';
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6638,7 +6639,7 @@ AbstractData.prototype.populateDataOnStart = function()
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed')); this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
}; };
/** /**
* @constructor * @constructor
* @extends AbstractData * @extends AbstractData
@ -6672,7 +6673,7 @@ _.extend(AdminDataStorage.prototype, AbstractData.prototype);
AdminDataStorage.prototype.populateDataOnStart = function() AdminDataStorage.prototype.populateDataOnStart = function()
{ {
AbstractData.prototype.populateDataOnStart.call(this); AbstractData.prototype.populateDataOnStart.call(this);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6946,7 +6947,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
'Version': sVersion 'Version': sVersion
}); });
}; };
/** /**
* @constructor * @constructor
* @extends AbstractAjaxRemoteStorage * @extends AbstractAjaxRemoteStorage
@ -7190,7 +7191,7 @@ AdminAjaxRemoteStorage.prototype.adminPing = function (fCallback)
{ {
this.defaultRequest(fCallback, 'AdminPing'); this.defaultRequest(fCallback, 'AdminPing');
}; };
/** /**
* @constructor * @constructor
*/ */
@ -7256,7 +7257,7 @@ AbstractCacheStorage.prototype.setEmailsPicsHashesData = function (oData)
{ {
this.oEmailsPicsHashes = oData; this.oEmailsPicsHashes = oData;
}; };
/** /**
* @constructor * @constructor
* @extends AbstractCacheStorage * @extends AbstractCacheStorage
@ -7267,7 +7268,7 @@ function AdminCacheStorage()
} }
_.extend(AdminCacheStorage.prototype, AbstractCacheStorage.prototype); _.extend(AdminCacheStorage.prototype, AbstractCacheStorage.prototype);
/** /**
* @param {Array} aViewModels * @param {Array} aViewModels
* @constructor * @constructor
@ -7445,7 +7446,7 @@ AbstractSettings.prototype.routes = function ()
['', oRules] ['', oRules]
]; ];
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractScreen * @extends KnoinAbstractScreen
@ -7460,7 +7461,7 @@ _.extend(AdminLoginScreen.prototype, KnoinAbstractScreen.prototype);
AdminLoginScreen.prototype.onShow = function () AdminLoginScreen.prototype.onShow = function ()
{ {
RL.setTitle(''); RL.setTitle('');
}; };
/** /**
* @constructor * @constructor
* @extends AbstractSettings * @extends AbstractSettings
@ -7480,7 +7481,7 @@ AdminSettingsScreen.prototype.onShow = function ()
// AbstractSettings.prototype.onShow.call(this); // AbstractSettings.prototype.onShow.call(this);
RL.setTitle(''); RL.setTitle('');
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractBoot * @extends KnoinAbstractBoot
@ -7800,7 +7801,7 @@ AbstractApp.prototype.bootstart = function ()
ssm.ready(); ssm.ready();
}; };
/** /**
* @constructor * @constructor
* @extends AbstractApp * @extends AbstractApp
@ -8039,7 +8040,7 @@ AdminApp.prototype.bootstart = function ()
* @type {AdminApp} * @type {AdminApp}
*/ */
RL = new AdminApp(); RL = new AdminApp();
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile'); $html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
$window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS); $window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS);
@ -8086,9 +8087,9 @@ window['__RLBOOT'] = function (fCall) {
window['__RLBOOT'] = null; window['__RLBOOT'] = null;
}); });
}; };
if (window.SimplePace) { if (window.SimplePace) {
window.SimplePace.add(10); window.SimplePace.add(10);
} }
}(window, jQuery, ko, crossroads, hasher, _)); }(window, jQuery, ko, crossroads, hasher, _));

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long