mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 15:45:55 +08:00
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:
parent
a96e1d80c3
commit
0b30bac43f
|
@ -11,10 +11,13 @@ function RainLoopApp()
|
|||
this.oData = null;
|
||||
this.oRemote = null;
|
||||
this.oCache = null;
|
||||
|
||||
this.oMoveCache = {};
|
||||
|
||||
this.quotaDebounce = _.debounce(this.quota, 1000 * 30);
|
||||
this.moveOrDeleteResponseHelper = _.bind(this.moveOrDeleteResponseHelper, this);
|
||||
|
||||
this.messagesMoveTrigger = _.debounce(this.messagesMoveTrigger, 500);
|
||||
|
||||
window.setInterval(function () {
|
||||
RL.pub('interval.30s');
|
||||
}, 30000);
|
||||
|
@ -164,6 +167,57 @@ RainLoopApp.prototype.recacheInboxMessageList = function ()
|
|||
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)
|
||||
{
|
||||
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();
|
||||
}
|
||||
};
|
||||
|
@ -194,12 +248,7 @@ RainLoopApp.prototype.moveOrDeleteResponseHelper = function (sResult, oData)
|
|||
*/
|
||||
RainLoopApp.prototype.deleteMessagesFromFolderWithoutCheck = function (sFromFolderFullNameRaw, aUidForRemove)
|
||||
{
|
||||
RL.remote().messagesDelete(
|
||||
this.moveOrDeleteResponseHelper,
|
||||
sFromFolderFullNameRaw,
|
||||
aUidForRemove
|
||||
);
|
||||
|
||||
this.messagesDeleteHelper(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 () {
|
||||
|
||||
RL.remote().messagesDelete(
|
||||
self.moveOrDeleteResponseHelper,
|
||||
sFromFolderFullNameRaw,
|
||||
aUidForRemove
|
||||
);
|
||||
|
||||
self.messagesDeleteHelper(sFromFolderFullNameRaw, aUidForRemove);
|
||||
oData.removeMessagesFromList(sFromFolderFullNameRaw, aUidForRemove);
|
||||
|
||||
}]);
|
||||
}
|
||||
else if (oMoveFolder)
|
||||
{
|
||||
RL.remote().messagesMove(
|
||||
this.moveOrDeleteResponseHelper,
|
||||
sFromFolderFullNameRaw,
|
||||
oMoveFolder.fullNameRaw,
|
||||
aUidForRemove
|
||||
);
|
||||
|
||||
this.messagesMoveHelper(sFromFolderFullNameRaw, oMoveFolder.fullNameRaw, aUidForRemove);
|
||||
oData.removeMessagesFromList(sFromFolderFullNameRaw, aUidForRemove, oMoveFolder.fullNameRaw);
|
||||
}
|
||||
};
|
||||
|
@ -295,14 +333,14 @@ RainLoopApp.prototype.moveMessagesToFolder = function (sFromFolderFullNameRaw, a
|
|||
|
||||
if (oFromFolder && oToFolder)
|
||||
{
|
||||
bCopy = Utils.isUnd(bCopy) ? false : !!bCopy;
|
||||
|
||||
RL.remote()[bCopy ? 'messagesCopy' : 'messagesMove'](
|
||||
this.moveOrDeleteResponseHelper,
|
||||
oFromFolder.fullNameRaw,
|
||||
oToFolder.fullNameRaw,
|
||||
aUidForMove
|
||||
);
|
||||
if (Utils.isUnd(bCopy) ? false : !!bCopy)
|
||||
{
|
||||
this.messagesCopyHelper(oFromFolder.fullNameRaw, oToFolder.fullNameRaw, aUidForMove);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.messagesMoveHelper(oFromFolder.fullNameRaw, oToFolder.fullNameRaw, aUidForMove);
|
||||
}
|
||||
|
||||
RL.data().removeMessagesFromList(oFromFolder.fullNameRaw, aUidForMove, oToFolder.fullNameRaw, bCopy);
|
||||
return true;
|
||||
|
|
|
@ -137,6 +137,7 @@ Enums.EventKeyCode = {
|
|||
'Down': 40,
|
||||
'End': 35,
|
||||
'Home': 36,
|
||||
'Space': 32,
|
||||
'Insert': 45,
|
||||
'Delete': 46,
|
||||
'A': 65,
|
||||
|
|
|
@ -3,16 +3,35 @@
|
|||
/**
|
||||
* @constructor
|
||||
* @param {koProperty} oKoList
|
||||
* @param {koProperty} oKoFocusedItem
|
||||
* @param {koProperty} oKoSelectedItem
|
||||
* @param {string} sItemSelector
|
||||
* @param {string} sItemSelectedSelector
|
||||
* @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.focusedItem = oKoFocusedItem;
|
||||
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,
|
||||
function (oPrev) {
|
||||
if (oPrev)
|
||||
|
@ -33,29 +52,38 @@ function Selector(oKoList, oKoSelectedItem, sItemSelector, sItemSelectedSelector
|
|||
this.sItemSelector = sItemSelector;
|
||||
this.sItemSelectedSelector = sItemSelectedSelector;
|
||||
this.sItemCheckedSelector = sItemCheckedSelector;
|
||||
this.sItemFocusedSelector = sItemFocusedSelector;
|
||||
|
||||
this.sLastUid = '';
|
||||
this.oCallbacks = {};
|
||||
this.iSelectTimer = 0;
|
||||
|
||||
this.bUseKeyboard = true;
|
||||
this.bAutoSelect = true;
|
||||
|
||||
this.emptyFunction = function () {};
|
||||
|
||||
this.useItemSelectCallback = true;
|
||||
this.throttleSelection = false;
|
||||
|
||||
this.selectedItem.subscribe(function (oItem) {
|
||||
|
||||
if (oItem)
|
||||
{
|
||||
this.sLastUid = this.getItemUid(oItem);
|
||||
this.focusedItem(oItem);
|
||||
}
|
||||
|
||||
if (this.useItemSelectCallback)
|
||||
{
|
||||
if (this.throttleSelection)
|
||||
{
|
||||
this.throttleSelection = false;
|
||||
this.selectItemCallbacksThrottle(oItem);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.selectItemCallbacks(oItem);
|
||||
}
|
||||
this.selectItemCallbacks(oItem);
|
||||
}
|
||||
|
||||
}, this);
|
||||
|
||||
this.focusedItem.subscribe(function (oItem) {
|
||||
if (oItem)
|
||||
{
|
||||
this.sLastUid = this.getItemUid(oItem);
|
||||
}
|
||||
}, this);
|
||||
|
||||
|
@ -86,25 +114,43 @@ function Selector(oKoList, oKoSelectedItem, sItemSelector, sItemSelectedSelector
|
|||
this.list.subscribe(function (aItems) {
|
||||
|
||||
this.useItemSelectCallback = false;
|
||||
|
||||
var
|
||||
self = this,
|
||||
iLen = 0,
|
||||
sFocusedUid = this.focusedItem() ? this.getItemUid(this.focusedItem()) : ''
|
||||
;
|
||||
|
||||
this.selectedItem(null);
|
||||
this.focusedItem(null);
|
||||
|
||||
if (Utils.isArray(aItems))
|
||||
{
|
||||
var self = this, iLen = aCheckedCache.length;
|
||||
iLen = aCheckedCache.length;
|
||||
|
||||
_.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);
|
||||
iLen--;
|
||||
}
|
||||
|
||||
if ('' !== sFocusedUid && sUid === sFocusedUid)
|
||||
{
|
||||
self.focusedItem(oItem);
|
||||
}
|
||||
|
||||
if (null !== mSelected && mSelected === self.getItemUid(oItem))
|
||||
{
|
||||
oItem.selected(true);
|
||||
if (!oItem.selected())
|
||||
{
|
||||
self.selectedItem(oItem);
|
||||
}
|
||||
|
||||
mSelected = null;
|
||||
|
||||
self.selectedItem(oItem);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -113,6 +159,7 @@ function Selector(oKoList, oKoSelectedItem, sItemSelector, sItemSelectedSelector
|
|||
|
||||
aCheckedCache = [];
|
||||
mSelected = null;
|
||||
|
||||
}, this);
|
||||
|
||||
this.list.setSelectedByUid = function (sUid) {
|
||||
|
@ -185,14 +232,23 @@ Selector.prototype.init = function (oContentVisible, oContentScrollable, sKeySco
|
|||
})
|
||||
;
|
||||
|
||||
key('space, enter', sKeyScope, function () {
|
||||
return false;
|
||||
key('enter', sKeyScope, function () {
|
||||
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)
|
||||
{
|
||||
var iKey = 0, aCodes = null;
|
||||
// TODO
|
||||
var iKey = 0;
|
||||
switch (handler.shortcut)
|
||||
{
|
||||
case 'up':
|
||||
|
@ -204,15 +260,22 @@ Selector.prototype.init = function (oContentVisible, oContentScrollable, sKeySco
|
|||
iKey = Enums.EventKeyCode.Down;
|
||||
break;
|
||||
case 'insert':
|
||||
iKey = Enums.EventKeyCode.Insert;
|
||||
break;
|
||||
case 'space':
|
||||
iKey = Enums.EventKeyCode.Space;
|
||||
break;
|
||||
case 'home':
|
||||
iKey = Enums.EventKeyCode.Home;
|
||||
break;
|
||||
case 'end':
|
||||
iKey = Enums.EventKeyCode.End;
|
||||
break;
|
||||
case 'pageup':
|
||||
iKey = Enums.EventKeyCode.PageUp;
|
||||
break;
|
||||
case 'pagedown':
|
||||
aCodes = key.getPressedKeyCodes();
|
||||
if (aCodes && aCodes[0])
|
||||
{
|
||||
iKey = aCodes[0];
|
||||
}
|
||||
iKey = Enums.EventKeyCode.PageDown;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -250,6 +313,11 @@ Selector.prototype.useKeyboard = function (bValue)
|
|||
this.bUseKeyboard = !!bValue;
|
||||
};
|
||||
|
||||
Selector.prototype.autoSelect = function (bValue)
|
||||
{
|
||||
this.bAutoSelect = !!bValue;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {Object} oItem
|
||||
* @returns {string}
|
||||
|
@ -284,14 +352,14 @@ Selector.prototype.newSelectPosition = function (iEventKeyCode, bShiftKey)
|
|||
oResult = null,
|
||||
aList = this.list(),
|
||||
iListLen = aList ? aList.length : 0,
|
||||
oSelected = this.selectedItem()
|
||||
oFocused = this.focusedItem()
|
||||
;
|
||||
|
||||
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];
|
||||
}
|
||||
|
@ -300,16 +368,16 @@ Selector.prototype.newSelectPosition = function (iEventKeyCode, bShiftKey)
|
|||
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) {
|
||||
if (!bStop)
|
||||
{
|
||||
switch (iEventKeyCode) {
|
||||
case Enums.EventKeyCode.Up:
|
||||
if (oSelected === oItem)
|
||||
if (oFocused === oItem)
|
||||
{
|
||||
bStop = true;
|
||||
}
|
||||
|
@ -320,12 +388,13 @@ Selector.prototype.newSelectPosition = function (iEventKeyCode, bShiftKey)
|
|||
break;
|
||||
case Enums.EventKeyCode.Down:
|
||||
case Enums.EventKeyCode.Insert:
|
||||
case Enums.EventKeyCode.Space:
|
||||
if (bNext)
|
||||
{
|
||||
oResult = oItem;
|
||||
bStop = true;
|
||||
}
|
||||
else if (oSelected === oItem)
|
||||
else if (oFocused === oItem)
|
||||
{
|
||||
bNext = true;
|
||||
}
|
||||
|
@ -349,7 +418,7 @@ Selector.prototype.newSelectPosition = function (iEventKeyCode, bShiftKey)
|
|||
{
|
||||
for (; iIndex < iListLen; iIndex++)
|
||||
{
|
||||
if (oSelected === aList[iIndex])
|
||||
if (oFocused === aList[iIndex])
|
||||
{
|
||||
iIndex += iPageStep;
|
||||
iIndex = iListLen - 1 < iIndex ? iListLen - 1 : iIndex;
|
||||
|
@ -362,7 +431,7 @@ Selector.prototype.newSelectPosition = function (iEventKeyCode, bShiftKey)
|
|||
{
|
||||
for (iIndex = iListLen; iIndex >= 0; iIndex--)
|
||||
{
|
||||
if (oSelected === aList[iIndex])
|
||||
if (oFocused === aList[iIndex])
|
||||
{
|
||||
iIndex -= iPageStep;
|
||||
iIndex = 0 > iIndex ? 0 : iIndex;
|
||||
|
@ -376,53 +445,43 @@ Selector.prototype.newSelectPosition = function (iEventKeyCode, bShiftKey)
|
|||
|
||||
if (oResult)
|
||||
{
|
||||
if (oSelected)
|
||||
if (oFocused)
|
||||
{
|
||||
if (bShiftKey)
|
||||
{
|
||||
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.selectedItem(oResult);
|
||||
this.throttleSelection = true;
|
||||
this.focusedItem(oResult);
|
||||
|
||||
if (0 !== this.iSelectTimer)
|
||||
if (this.bAutoSelect && Enums.EventKeyCode.Space !== iEventKeyCode)
|
||||
{
|
||||
window.clearTimeout(this.iSelectTimer);
|
||||
this.iSelectTimer = window.setTimeout(function () {
|
||||
self.iSelectTimer = 0;
|
||||
self.actionClick(oResult);
|
||||
}, 1000);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.iSelectTimer = window.setTimeout(function () {
|
||||
self.iSelectTimer = 0;
|
||||
}, 200);
|
||||
|
||||
this.actionClick(oResult);
|
||||
}, 300);
|
||||
}
|
||||
|
||||
this.scrollToSelected();
|
||||
this.scrollToFocused();
|
||||
}
|
||||
else if (oSelected)
|
||||
else if (oFocused)
|
||||
{
|
||||
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}
|
||||
*/
|
||||
Selector.prototype.scrollToSelected = function ()
|
||||
Selector.prototype.scrollToFocused = function ()
|
||||
{
|
||||
if (!this.oContentVisible || !this.oContentScrollable)
|
||||
{
|
||||
|
@ -439,13 +498,13 @@ Selector.prototype.scrollToSelected = function ()
|
|||
|
||||
var
|
||||
iOffset = 20,
|
||||
oSelected = $(this.sItemSelectedSelector, this.oContentScrollable),
|
||||
oPos = oSelected.position(),
|
||||
oFocused = $(this.sItemFocusedSelector, this.oContentScrollable),
|
||||
oPos = oFocused.position(),
|
||||
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)
|
||||
{
|
||||
|
@ -453,7 +512,7 @@ Selector.prototype.scrollToSelected = function ()
|
|||
}
|
||||
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;
|
||||
|
@ -511,7 +570,6 @@ Selector.prototype.eventClickFunction = function (oItem, oEvent)
|
|||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Object} oItem
|
||||
* @param {Object=} oEvent
|
||||
*/
|
||||
|
@ -535,6 +593,7 @@ Selector.prototype.actionClick = function (oItem, oEvent)
|
|||
}
|
||||
|
||||
oItem.checked(!oItem.checked());
|
||||
|
||||
this.eventClickFunction(oItem, oEvent);
|
||||
}
|
||||
else if (oEvent.ctrlKey)
|
||||
|
@ -549,7 +608,6 @@ Selector.prototype.actionClick = function (oItem, oEvent)
|
|||
if (bClick)
|
||||
{
|
||||
this.selectedItem(oItem);
|
||||
this.sLastUid = sUid;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -584,7 +584,7 @@ WebMailAjaxRemoteStorage.prototype.messagesMove = function (fCallback, sFolder,
|
|||
'FromFolder': sFolder,
|
||||
'ToFolder': sToFolder,
|
||||
'Uids': aUids.join(',')
|
||||
}, null, '', ['MessageList', 'Message']);
|
||||
}, null, '', ['MessageList']);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -612,7 +612,7 @@ WebMailAjaxRemoteStorage.prototype.messagesDelete = function (fCallback, sFolder
|
|||
this.defaultRequest(fCallback, 'MessageDelete', {
|
||||
'Folder': sFolder,
|
||||
'Uids': aUids.join(',')
|
||||
}, null, '', ['MessageList', 'Message']);
|
||||
}, null, '', ['MessageList']);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -297,6 +297,7 @@ function WebMailDataStorage()
|
|||
}, this);
|
||||
|
||||
this.currentMessage = ko.observable(null);
|
||||
this.currentFocusedMessage = ko.observable(null);
|
||||
|
||||
this.message.subscribe(function (oMessage) {
|
||||
if (null === oMessage)
|
||||
|
@ -778,11 +779,15 @@ WebMailDataStorage.prototype.removeMessagesFromList = function (
|
|||
iUnseenCount = 0,
|
||||
oData = RL.data(),
|
||||
oCache = RL.cache(),
|
||||
bMoveSelected = false,
|
||||
bGetNext = false,
|
||||
oNextMessage = null,
|
||||
aMessageList = oData.messageList(),
|
||||
oFromFolder = RL.cache().getFolderFromCacheList(sFromFolderFullNameRaw),
|
||||
oToFolder = '' === sToFolderFullNameRaw ? null : oCache.getFolderFromCacheList(sToFolderFullNameRaw || ''),
|
||||
sCurrentFolderFullNameRaw = oData.currentFolderFullNameRaw(),
|
||||
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);
|
||||
}) : []
|
||||
;
|
||||
|
@ -792,6 +797,11 @@ WebMailDataStorage.prototype.removeMessagesFromList = function (
|
|||
{
|
||||
iUnseenCount++;
|
||||
}
|
||||
|
||||
if (oMessage.selected())
|
||||
{
|
||||
bMoveSelected = true;
|
||||
}
|
||||
});
|
||||
|
||||
if (oFromFolder && !bCopy)
|
||||
|
@ -827,10 +837,33 @@ WebMailDataStorage.prototype.removeMessagesFromList = function (
|
|||
}
|
||||
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);
|
||||
|
||||
_.each(aMessages, function (oMessage) {
|
||||
if (oCurrentMessage && oCurrentMessage.requestHash === oMessage.requestHash)
|
||||
if (oCurrentMessage && oCurrentMessage.hash === oMessage.hash)
|
||||
{
|
||||
oCurrentMessage = null;
|
||||
oData.message(null);
|
||||
|
|
|
@ -161,6 +161,10 @@
|
|||
height: 100%;
|
||||
}
|
||||
|
||||
&.focused .sidebarParent {
|
||||
background-color: #aaa;
|
||||
}
|
||||
|
||||
&.deleted {
|
||||
max-height: 0px;
|
||||
border-color: transparent !important;
|
||||
|
@ -213,15 +217,24 @@
|
|||
.sidebarParent {
|
||||
background-color: #69A8F5;
|
||||
}
|
||||
|
||||
&.focused .sidebarParent {
|
||||
background-color: darken(#69A8F5, 5%) !important;
|
||||
}
|
||||
}
|
||||
|
||||
&.selected {
|
||||
|
||||
background-color: #fff;
|
||||
z-index: 102;
|
||||
|
||||
.sidebarParent {
|
||||
background-color: #398CF2;
|
||||
}
|
||||
|
||||
&.focused .sidebarParent {
|
||||
background-color: darken(#398CF2, 5%) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -229,6 +229,10 @@ html.rl-no-preview-pane {
|
|||
height: 100%;
|
||||
}
|
||||
|
||||
&.focused .sidebarParent {
|
||||
background-color: #aaa !important;
|
||||
}
|
||||
|
||||
&.e-single-line {
|
||||
height: 35px;
|
||||
}
|
||||
|
@ -409,6 +413,10 @@ html.rl-no-preview-pane {
|
|||
.sidebarParent {
|
||||
background-color: orange;
|
||||
}
|
||||
|
||||
&.focused .sidebarParent {
|
||||
background-color: darken(orange, 10%) !important;
|
||||
}
|
||||
}
|
||||
|
||||
&.hasUnseenSubMessage {
|
||||
|
@ -416,6 +424,9 @@ html.rl-no-preview-pane {
|
|||
.sidebarParent {
|
||||
background-color: lighten(orange, 30%);
|
||||
}
|
||||
&.focused .sidebarParent {
|
||||
background-color: darken(orange, 10%) !important;
|
||||
}
|
||||
}
|
||||
|
||||
&.hasParentMessage {
|
||||
|
@ -425,11 +436,20 @@ html.rl-no-preview-pane {
|
|||
background-color: #bdc3c7;
|
||||
}
|
||||
|
||||
&.focused .sidebarParent {
|
||||
background-color: darken(#bdc3c7, 10%) !important;
|
||||
}
|
||||
|
||||
&.unseen {
|
||||
background-color: darken(#ecf0f1, 5%);
|
||||
|
||||
.sidebarParent {
|
||||
background-color: darken(#bdc3c7, 30%);
|
||||
}
|
||||
|
||||
&.focused .sidebarParent {
|
||||
background-color: darken(#bdc3c7, 40%) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -437,6 +457,10 @@ html.rl-no-preview-pane {
|
|||
.sidebarParent {
|
||||
background-color: lighten(#398CF2, 10%) !important;
|
||||
}
|
||||
|
||||
&.focused .sidebarParent {
|
||||
background-color: darken(#398CF2, 5%) !important;
|
||||
}
|
||||
}
|
||||
|
||||
&.selected {
|
||||
|
@ -447,6 +471,10 @@ html.rl-no-preview-pane {
|
|||
background-color: #398CF2 !important;
|
||||
}
|
||||
|
||||
&.focused .sidebarParent {
|
||||
background-color: darken(#398CF2, 5%) !important;
|
||||
}
|
||||
|
||||
.delimiter {
|
||||
background-color: #398CF2;
|
||||
.opacity(20);
|
||||
|
@ -483,7 +511,7 @@ html.rl-no-preview-pane {
|
|||
background-color: #000;
|
||||
}
|
||||
.b-content {
|
||||
.opacity(98);
|
||||
.opacity(97);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ function MailBoxMessageListViewModel()
|
|||
this.message = oData.message;
|
||||
this.messageList = oData.messageList;
|
||||
this.currentMessage = oData.currentMessage;
|
||||
this.currentFocusedMessage = oData.currentFocusedMessage;
|
||||
this.isMessageSelected = oData.isMessageSelected;
|
||||
this.messageListSearch = oData.messageListSearch;
|
||||
this.messageListError = oData.messageListError;
|
||||
|
@ -191,8 +192,9 @@ function MailBoxMessageListViewModel()
|
|||
|
||||
this.quotaTooltip = _.bind(this.quotaTooltip, this);
|
||||
|
||||
this.selector = new Selector(this.messageList, this.currentMessage,
|
||||
'.messageListItem .actionHandle', '.messageListItem.selected', '.messageListItem .checkboxMessage');
|
||||
this.selector = new Selector(this.messageList, this.currentFocusedMessage, this.currentMessage,
|
||||
'.messageListItem .actionHandle', '.messageListItem.selected', '.messageListItem .checkboxMessage',
|
||||
'.messageListItem.focused');
|
||||
|
||||
this.selector.on('onItemSelect', _.bind(function (oMessage) {
|
||||
if (oMessage)
|
||||
|
@ -214,7 +216,14 @@ function MailBoxMessageListViewModel()
|
|||
this.selector.on('onItemGetUid', function (oMessage) {
|
||||
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
|
||||
.sub('mailbox.message-list.selector.go-down', function () {
|
||||
this.selector.goDown();
|
||||
|
@ -687,7 +696,7 @@ MailBoxMessageListViewModel.prototype.initShortcuts = function ()
|
|||
});
|
||||
|
||||
// change focused state
|
||||
key('tab, enter', Enums.KeyState.MessageList, function () {
|
||||
key('tab', Enums.KeyState.MessageList, function () {
|
||||
if (oData.useKeyboardShortcuts())
|
||||
{
|
||||
if (self.message())
|
||||
|
|
|
@ -385,11 +385,10 @@ MailBoxMessageViewViewModel.prototype.escShortcuts = function ()
|
|||
else
|
||||
{
|
||||
this.message.focused(false);
|
||||
}
|
||||
|
||||
if (Enums.Layout.NoPreview === RL.data().layout())
|
||||
{
|
||||
RL.historyBack();
|
||||
if (Enums.Layout.NoPreview === RL.data().layout())
|
||||
{
|
||||
RL.historyBack();
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -493,7 +492,6 @@ MailBoxMessageViewViewModel.prototype.initShortcuts = function ()
|
|||
key('delete, shift+delete', Enums.KeyState.MessageView, function (event, handler) {
|
||||
if (oData.useKeyboardShortcuts() && event)
|
||||
{
|
||||
self.deleteCommand();
|
||||
if (handler && 'shift+delete' === handler.shortcut)
|
||||
{
|
||||
self.deleteWithoutMoveCommand();
|
||||
|
|
|
@ -33,7 +33,9 @@ function PopupsContactsViewModel()
|
|||
this.contacts = ko.observableArray([]);
|
||||
this.contacts.loading = ko.observable(false).extend({'throttle': 200});
|
||||
this.contacts.importing = ko.observable(false).extend({'throttle': 200});
|
||||
|
||||
this.currentContact = ko.observable(null);
|
||||
this.currentFocusedContact = ko.observable(null);
|
||||
|
||||
this.importUploaderButton = ko.observable(null);
|
||||
|
||||
|
@ -160,8 +162,9 @@ function PopupsContactsViewModel()
|
|||
});
|
||||
}, this);
|
||||
|
||||
this.selector = new Selector(this.contacts, this.currentContact,
|
||||
'.e-contact-item .actionHandle', '.e-contact-item.selected', '.e-contact-item .checkboxItem');
|
||||
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.focused');
|
||||
|
||||
this.selector.on('onItemSelect', _.bind(function (oContact) {
|
||||
this.populateViewContact(oContact ? oContact : null);
|
||||
|
|
|
@ -637,7 +637,7 @@
|
|||
border-radius: 8px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*! normalize.css 2012-03-11T12:53 UTC - http://github.com/necolas/normalize.css */
|
||||
|
||||
/* =============================================================================
|
||||
|
@ -1142,7 +1142,7 @@ table {
|
|||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
|
||||
@charset "UTF-8";
|
||||
|
||||
@font-face {
|
||||
|
@ -1483,7 +1483,7 @@ table {
|
|||
.icon-filter:before {
|
||||
content: "\e063";
|
||||
}
|
||||
|
||||
|
||||
/** initial setup **/
|
||||
.nano {
|
||||
/*
|
||||
|
@ -1600,7 +1600,7 @@ table {
|
|||
.nano > .pane2:hover > .slider2, .nano > .pane2.active > .slider2 {
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
|
||||
/* Magnific Popup CSS */
|
||||
.mfp-bg {
|
||||
top: 0;
|
||||
|
@ -1965,7 +1965,7 @@ img.mfp-img {
|
|||
right: 0;
|
||||
padding-top: 0; }
|
||||
|
||||
|
||||
|
||||
|
||||
/* overlay at start */
|
||||
.mfp-fade.mfp-bg {
|
||||
|
@ -2011,7 +2011,7 @@ img.mfp-img {
|
|||
-moz-transform: translateX(50px);
|
||||
transform: translateX(50px);
|
||||
}
|
||||
|
||||
|
||||
.simple-pace {
|
||||
-webkit-pointer-events: none;
|
||||
pointer-events: none;
|
||||
|
@ -2082,7 +2082,7 @@ img.mfp-img {
|
|||
@keyframes simple-pace-stripe-animation {
|
||||
0% { transform: none; transform: none; }
|
||||
100% { transform: translate(-32px, 0); transform: translate(-32px, 0); }
|
||||
}
|
||||
}
|
||||
.inputosaurus-container {
|
||||
background-color:#fff;
|
||||
border:1px solid #bcbec0;
|
||||
|
@ -2150,7 +2150,7 @@ img.mfp-img {
|
|||
box-shadow:none;
|
||||
}
|
||||
.inputosaurus-input-hidden { display:none; }
|
||||
|
||||
|
||||
.flag-wrapper {
|
||||
width: 24px;
|
||||
height: 16px;
|
||||
|
@ -2194,7 +2194,7 @@ img.mfp-img {
|
|||
.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}
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
.clearfix {
|
||||
*zoom: 1;
|
||||
|
@ -6843,6 +6843,9 @@ html.rl-no-preview-pane .messageList.message-selected {
|
|||
float: left;
|
||||
height: 100%;
|
||||
}
|
||||
.messageList .b-content .messageListItem.focused .sidebarParent {
|
||||
background-color: #aaa !important;
|
||||
}
|
||||
.messageList .b-content .messageListItem.e-single-line {
|
||||
height: 35px;
|
||||
}
|
||||
|
@ -6999,27 +7002,42 @@ html.rl-no-preview-pane .messageList.message-selected {
|
|||
.messageList .b-content .messageListItem.unseen .sidebarParent {
|
||||
background-color: orange;
|
||||
}
|
||||
.messageList .b-content .messageListItem.unseen.focused .sidebarParent {
|
||||
background-color: #cc8400 !important;
|
||||
}
|
||||
.messageList .b-content .messageListItem.hasUnseenSubMessage {
|
||||
background-color: #FFFFD9;
|
||||
}
|
||||
.messageList .b-content .messageListItem.hasUnseenSubMessage .sidebarParent {
|
||||
background-color: #ffdb99;
|
||||
}
|
||||
.messageList .b-content .messageListItem.hasUnseenSubMessage.focused .sidebarParent {
|
||||
background-color: #cc8400 !important;
|
||||
}
|
||||
.messageList .b-content .messageListItem.hasParentMessage {
|
||||
background-color: #ecf0f1;
|
||||
}
|
||||
.messageList .b-content .messageListItem.hasParentMessage .sidebarParent {
|
||||
background-color: #bdc3c7;
|
||||
}
|
||||
.messageList .b-content .messageListItem.hasParentMessage.focused .sidebarParent {
|
||||
background-color: #a1aab0 !important;
|
||||
}
|
||||
.messageList .b-content .messageListItem.hasParentMessage.unseen {
|
||||
background-color: #dde4e6;
|
||||
}
|
||||
.messageList .b-content .messageListItem.hasParentMessage.unseen .sidebarParent {
|
||||
background-color: #6c777f;
|
||||
}
|
||||
.messageList .b-content .messageListItem.hasParentMessage.unseen.focused .sidebarParent {
|
||||
background-color: #545e64 !important;
|
||||
}
|
||||
.messageList .b-content .messageListItem.checked .sidebarParent {
|
||||
background-color: #69a8f5 !important;
|
||||
}
|
||||
.messageList .b-content .messageListItem.checked.focused .sidebarParent {
|
||||
background-color: #217ef0 !important;
|
||||
}
|
||||
.messageList .b-content .messageListItem.selected {
|
||||
background-color: #DFEFFF;
|
||||
z-index: 102;
|
||||
|
@ -7027,6 +7045,9 @@ html.rl-no-preview-pane .messageList.message-selected {
|
|||
.messageList .b-content .messageListItem.selected .sidebarParent {
|
||||
background-color: #398CF2 !important;
|
||||
}
|
||||
.messageList .b-content .messageListItem.selected.focused .sidebarParent {
|
||||
background-color: #217ef0 !important;
|
||||
}
|
||||
.messageList .b-content .messageListItem.selected .delimiter {
|
||||
background-color: #398CF2;
|
||||
opacity: 0.2;
|
||||
|
@ -7055,8 +7076,8 @@ html.rl-no-preview-pane .messageList.message-selected {
|
|||
background-color: #000;
|
||||
}
|
||||
.messageList.message-focused .b-content {
|
||||
opacity: 0.98;
|
||||
filter: alpha(opacity=98);
|
||||
opacity: 0.97;
|
||||
filter: alpha(opacity=97);
|
||||
}
|
||||
.messageList.hideMessageListCheckbox .checkedParent,
|
||||
.messageList.hideMessageListCheckbox .checkboxCkeckAll {
|
||||
|
@ -7595,6 +7616,9 @@ html.rl-message-fullscreen .messageView .b-content .buttonFull {
|
|||
float: left;
|
||||
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 {
|
||||
max-height: 0px;
|
||||
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 {
|
||||
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 {
|
||||
background-color: #fff;
|
||||
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 {
|
||||
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 {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
|
2
rainloop/v/0.0.0/static/css/app.min.css
vendored
2
rainloop/v/0.0.0/static/css/app.min.css
vendored
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
|||
/*! RainLoop Webmail Admin Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
(function (window, $, ko, crossroads, hasher, _) {
|
||||
/*! RainLoop Webmail Admin Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
(function (window, $, ko, crossroads, hasher, _) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
@ -70,14 +70,14 @@ var
|
|||
$document = $(window.document),
|
||||
|
||||
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
|
||||
;
|
||||
;
|
||||
/*jshint onevar: false*/
|
||||
/**
|
||||
* @type {?AdminApp}
|
||||
*/
|
||||
var RL = null;
|
||||
/*jshint onevar: true*/
|
||||
|
||||
|
||||
/**
|
||||
* @type {?}
|
||||
*/
|
||||
|
@ -221,7 +221,7 @@ if (Globals.bAllowPdfPreview && navigator && navigator.mimeTypes)
|
|||
return oType && 'application/pdf' === oType.type;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Consts.Defaults = {};
|
||||
Consts.Values = {};
|
||||
Consts.DataImages = {};
|
||||
|
@ -339,7 +339,7 @@ Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
|
|||
* @type {string}
|
||||
*/
|
||||
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
|
||||
|
||||
|
||||
/**
|
||||
* @enum {string}
|
||||
*/
|
||||
|
@ -477,6 +477,7 @@ Enums.EventKeyCode = {
|
|||
'Down': 40,
|
||||
'End': 35,
|
||||
'Home': 36,
|
||||
'Space': 32,
|
||||
'Insert': 45,
|
||||
'Delete': 46,
|
||||
'A': 65,
|
||||
|
@ -713,7 +714,7 @@ Enums.Notification = {
|
|||
'UnknownNotification': 999,
|
||||
'UnknownError': 999
|
||||
};
|
||||
|
||||
|
||||
Utils.trim = $.trim;
|
||||
Utils.inArray = $.inArray;
|
||||
Utils.isArray = _.isArray;
|
||||
|
@ -2461,7 +2462,7 @@ Utils.restoreKeyFilter = function ()
|
|||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Base64 encode / decode
|
||||
// http://www.webtoolkit.info/
|
||||
|
||||
|
@ -2624,7 +2625,7 @@ Base64 = {
|
|||
}
|
||||
};
|
||||
|
||||
/*jslint bitwise: false*/
|
||||
/*jslint bitwise: false*/
|
||||
ko.bindingHandlers.tooltip = {
|
||||
'init': function (oElement, fValueAccessor) {
|
||||
if (!Globals.bMobileDevice)
|
||||
|
@ -3273,7 +3274,7 @@ ko.observable.fn.validateFunc = function (fFunc)
|
|||
return this;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
@ -3571,7 +3572,7 @@ LinkBuilder.prototype.socialFacebook = function ()
|
|||
{
|
||||
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @type {Object}
|
||||
*/
|
||||
|
@ -3665,7 +3666,7 @@ Plugins.settingsGet = function (sPluginSection, sName)
|
|||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
@ -3739,7 +3740,7 @@ CookieDriver.prototype.get = function (sKey)
|
|||
|
||||
return mResult;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
@ -3810,7 +3811,7 @@ LocalStorageDriver.prototype.get = function (sKey)
|
|||
|
||||
return mResult;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
@ -3853,7 +3854,7 @@ LocalStorage.prototype.get = function (iKey)
|
|||
{
|
||||
return this.oDriver ? this.oDriver.get('p' + iKey) : null;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
@ -3866,7 +3867,7 @@ KnoinAbstractBoot.prototype.bootstart = function ()
|
|||
{
|
||||
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string=} sPosition = ''
|
||||
* @param {string=} sTemplate = ''
|
||||
|
@ -3955,7 +3956,7 @@ KnoinAbstractViewModel.prototype.registerPopupEscapeKey = function ()
|
|||
return true;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} sScreenName
|
||||
* @param {?=} aViewModels = []
|
||||
|
@ -4031,7 +4032,7 @@ KnoinAbstractScreen.prototype.__start = function ()
|
|||
this.oCross = oRoute;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
@ -4420,7 +4421,7 @@ Knoin.prototype.bootstart = function ()
|
|||
};
|
||||
|
||||
kn = new Knoin();
|
||||
|
||||
|
||||
/**
|
||||
* @param {string=} sEmail
|
||||
* @param {string=} sName
|
||||
|
@ -4784,7 +4785,7 @@ EmailModel.prototype.inputoTagLine = function ()
|
|||
{
|
||||
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
@ -5002,7 +5003,7 @@ PopupsDomainViewModel.prototype.clearForm = function ()
|
|||
this.smtpAuth(true);
|
||||
this.whiteList('');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
@ -5139,7 +5140,7 @@ PopupsPluginViewModel.prototype.onBuild = function ()
|
|||
}
|
||||
}, this));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
@ -5255,7 +5256,7 @@ PopupsActivateViewModel.prototype.validateSubscriptionKey = function ()
|
|||
{
|
||||
var sValue = this.key();
|
||||
return '' === sValue || !!/^RL[\d]+-[A-Z0-9\-]+Z$/.test(Utils.trim(sValue));
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
@ -5315,7 +5316,7 @@ PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
|
|||
RL.data().mainLanguage(sLang);
|
||||
this.cancelCommand();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
@ -5423,7 +5424,7 @@ PopupsAskViewModel.prototype.onBuild = function ()
|
|||
}, this));
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
@ -5510,7 +5511,7 @@ AdminLoginViewModel.prototype.onHide = function ()
|
|||
{
|
||||
this.loginFocus(false);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {?} oScreen
|
||||
*
|
||||
|
@ -5532,7 +5533,7 @@ AdminMenuViewModel.prototype.link = function (sRoute)
|
|||
{
|
||||
return '#/' + sRoute;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
|
@ -5554,7 +5555,7 @@ AdminPaneViewModel.prototype.logoutClick = function ()
|
|||
RL.remote().adminLogout(function () {
|
||||
RL.loginAndLogoutReload();
|
||||
});
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
@ -5654,7 +5655,7 @@ AdminGeneral.prototype.selectLanguage = function ()
|
|||
{
|
||||
kn.showScreenPopup(PopupsLanguagesViewModel);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
@ -5706,7 +5707,7 @@ AdminLogin.prototype.onBuild = function ()
|
|||
|
||||
}, 50);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
@ -5775,7 +5776,7 @@ AdminBranding.prototype.onBuild = function ()
|
|||
|
||||
}, 50);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
@ -5995,7 +5996,7 @@ AdminContacts.prototype.onBuild = function ()
|
|||
|
||||
}, 50);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
@ -6084,7 +6085,7 @@ AdminDomains.prototype.onDomainListChangeRequest = function ()
|
|||
{
|
||||
RL.reloadDomainList();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
@ -6179,7 +6180,7 @@ AdminSecurity.prototype.phpInfoLink = function ()
|
|||
{
|
||||
return RL.link().phpInfo();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
@ -6295,7 +6296,7 @@ AdminSocial.prototype.onBuild = function ()
|
|||
|
||||
}, 50);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
@ -6392,7 +6393,7 @@ AdminPlugins.prototype.onPluginDisableRequest = function (sResult, oData)
|
|||
|
||||
RL.reloadPluginList();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
@ -6496,7 +6497,7 @@ AdminPackages.prototype.installPackage = function (oPackage)
|
|||
RL.remote().packageInstall(this.requestHelper(oPackage, true), oPackage);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
@ -6547,7 +6548,7 @@ AdminLicensing.prototype.licenseExpiredMomentValue = function ()
|
|||
{
|
||||
var oDate = moment.unix(this.licenseExpired());
|
||||
return oDate.format('LL') + ' (' + oDate.from(moment()) + ')';
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
@ -6638,7 +6639,7 @@ AbstractData.prototype.populateDataOnStart = function()
|
|||
|
||||
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends AbstractData
|
||||
|
@ -6672,7 +6673,7 @@ _.extend(AdminDataStorage.prototype, AbstractData.prototype);
|
|||
AdminDataStorage.prototype.populateDataOnStart = function()
|
||||
{
|
||||
AbstractData.prototype.populateDataOnStart.call(this);
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
@ -6946,7 +6947,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
|
|||
'Version': sVersion
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends AbstractAjaxRemoteStorage
|
||||
|
@ -7190,7 +7191,7 @@ AdminAjaxRemoteStorage.prototype.adminPing = function (fCallback)
|
|||
{
|
||||
this.defaultRequest(fCallback, 'AdminPing');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
@ -7256,7 +7257,7 @@ AbstractCacheStorage.prototype.setEmailsPicsHashesData = function (oData)
|
|||
{
|
||||
this.oEmailsPicsHashes = oData;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends AbstractCacheStorage
|
||||
|
@ -7267,7 +7268,7 @@ function AdminCacheStorage()
|
|||
}
|
||||
|
||||
_.extend(AdminCacheStorage.prototype, AbstractCacheStorage.prototype);
|
||||
|
||||
|
||||
/**
|
||||
* @param {Array} aViewModels
|
||||
* @constructor
|
||||
|
@ -7445,7 +7446,7 @@ AbstractSettings.prototype.routes = function ()
|
|||
['', oRules]
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractScreen
|
||||
|
@ -7460,7 +7461,7 @@ _.extend(AdminLoginScreen.prototype, KnoinAbstractScreen.prototype);
|
|||
AdminLoginScreen.prototype.onShow = function ()
|
||||
{
|
||||
RL.setTitle('');
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @constructor
|
||||
* @extends AbstractSettings
|
||||
|
@ -7480,7 +7481,7 @@ AdminSettingsScreen.prototype.onShow = function ()
|
|||
// AbstractSettings.prototype.onShow.call(this);
|
||||
|
||||
RL.setTitle('');
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractBoot
|
||||
|
@ -7800,7 +7801,7 @@ AbstractApp.prototype.bootstart = function ()
|
|||
|
||||
ssm.ready();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends AbstractApp
|
||||
|
@ -8039,7 +8040,7 @@ AdminApp.prototype.bootstart = function ()
|
|||
* @type {AdminApp}
|
||||
*/
|
||||
RL = new AdminApp();
|
||||
|
||||
|
||||
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
|
||||
|
||||
$window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS);
|
||||
|
@ -8086,9 +8087,9 @@ window['__RLBOOT'] = function (fCall) {
|
|||
window['__RLBOOT'] = null;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
if (window.SimplePace) {
|
||||
window.SimplePace.add(10);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}(window, jQuery, ko, crossroads, hasher, _));
|
8
rainloop/v/0.0.0/static/js/admin.min.js
vendored
8
rainloop/v/0.0.0/static/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
17
rainloop/v/0.0.0/static/js/app.min.js
vendored
17
rainloop/v/0.0.0/static/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue