Show/Hide folder list button

This commit is contained in:
RainLoop Team 2014-04-27 04:54:22 +04:00
parent 5fff5afd16
commit ba645f5614
20 changed files with 183 additions and 125 deletions

View file

@ -1815,18 +1815,18 @@ Utils.initLayoutResizer = function (sLeft, sRight, sClientSideKeyName)
}
},
// fDisable = function (bDisable) {
// if (bDisable)
// {
// oLeft.resizable('disable');
// fSetWidth(5);
// }
// else
// {
// oLeft.resizable('enable');
// fSetWidth(RL.local().get(sClientSideKeyName) || 150);
// }
// },
fDisable = function (bDisable) {
if (bDisable)
{
oLeft.resizable('disable');
fSetWidth(5);
}
else
{
oLeft.resizable('enable');
fSetWidth(RL.local().get(sClientSideKeyName) || 170);
}
},
fResizeFunction = function (oEvent, oObject) {
if (oObject && oObject.size && oObject.size.width)
@ -1847,19 +1847,19 @@ Utils.initLayoutResizer = function (sLeft, sRight, sClientSideKeyName)
oLeft.resizable({
'helper': 'ui-resizable-helper',
'minWidth': 120,
'minWidth': 170,
'maxWidth': 400,
'handles': 'e',
'stop': fResizeFunction
});
// RL.sub('ssm.mobile-enter', function () {
// fDisable(true);
// });
//
// RL.sub('ssm.mobile-leave', function () {
// fDisable(false);
// });
RL.sub('left-panel.off', function () {
fDisable(true);
});
RL.sub('left-panel.on', function () {
fDisable(false);
});
};
/**
@ -5650,6 +5650,7 @@ function AdminPaneViewModel()
this.version = ko.observable(RL.settingsGet('Version'));
this.adminManLoadingVisibility = RL.data().adminManLoadingVisibility;
this.leftPanelDisabled = RL.data().leftPanelDisabled;
Knoin.constructorEnd(this);
}
@ -6654,6 +6655,7 @@ AdminLicensing.prototype.licenseExpiredMomentValue = function ()
*/
function AbstractData()
{
this.leftPanelDisabled = ko.observable(false);
this.useKeyboardShortcuts = ko.observable(true);
this.keyScopeReal = ko.observable(Enums.KeyState.All);
@ -6693,6 +6695,10 @@ function AbstractData()
key.setScope(sValue);
});
this.leftPanelDisabled.subscribe(function (bValue) {
RL.pub('left-panel.' + (bValue ? 'off' : 'on'));
});
Globals.dropdownVisibility.subscribe(function (bValue) {
if (bValue)
{
@ -7957,6 +7963,18 @@ AbstractApp.prototype.bootstart = function ()
}
});
RL.sub('ssm.mobile-enter', function () {
RL.data().leftPanelDisabled(true);
});
RL.sub('ssm.mobile-leave', function () {
RL.data().leftPanelDisabled(false);
});
RL.data().leftPanelDisabled.subscribe(function (bValue) {
$html.toggleClass('rl-left-panel-disabled', bValue);
});
ssm.ready();
};

File diff suppressed because one or more lines are too long

View file

@ -1819,18 +1819,18 @@ Utils.initLayoutResizer = function (sLeft, sRight, sClientSideKeyName)
}
},
// fDisable = function (bDisable) {
// if (bDisable)
// {
// oLeft.resizable('disable');
// fSetWidth(5);
// }
// else
// {
// oLeft.resizable('enable');
// fSetWidth(RL.local().get(sClientSideKeyName) || 150);
// }
// },
fDisable = function (bDisable) {
if (bDisable)
{
oLeft.resizable('disable');
fSetWidth(5);
}
else
{
oLeft.resizable('enable');
fSetWidth(RL.local().get(sClientSideKeyName) || 170);
}
},
fResizeFunction = function (oEvent, oObject) {
if (oObject && oObject.size && oObject.size.width)
@ -1851,19 +1851,19 @@ Utils.initLayoutResizer = function (sLeft, sRight, sClientSideKeyName)
oLeft.resizable({
'helper': 'ui-resizable-helper',
'minWidth': 120,
'minWidth': 170,
'maxWidth': 400,
'handles': 'e',
'stop': fResizeFunction
});
// RL.sub('ssm.mobile-enter', function () {
// fDisable(true);
// });
//
// RL.sub('ssm.mobile-leave', function () {
// fDisable(false);
// });
RL.sub('left-panel.off', function () {
fDisable(true);
});
RL.sub('left-panel.on', function () {
fDisable(false);
});
};
/**
@ -11787,6 +11787,8 @@ function MailBoxFolderListViewModel()
this.folderListSystem = oData.folderListSystem;
this.foldersChanging = oData.foldersChanging;
this.leftPanelDisabled = oData.leftPanelDisabled;
this.iDropOverTimer = 0;
this.allowContacts = !!RL.settingsGet('ContactsIsAllowed');
@ -11989,6 +11991,7 @@ function MailBoxMessageListViewModel()
this.folderMenuForMove = oData.folderMenuForMove;
this.useCheckboxesInList = oData.useCheckboxesInList;
this.leftPanelDisabled = oData.leftPanelDisabled;
this.mainMessageListSearch = oData.mainMessageListSearch;
this.messageListEndFolder = oData.messageListEndFolder;
@ -13555,6 +13558,8 @@ function SettingsPaneViewModel()
{
KnoinAbstractViewModel.call(this, 'Right', 'SettingsPane');
this.leftPanelDisabled = RL.data().leftPanelDisabled;
Knoin.constructorEnd(this);
}
@ -14930,6 +14935,7 @@ SettingsOpenPGP.prototype.deleteOpenPgpKey = function (oOpenPgpKeyToRemove)
*/
function AbstractData()
{
this.leftPanelDisabled = ko.observable(false);
this.useKeyboardShortcuts = ko.observable(true);
this.keyScopeReal = ko.observable(Enums.KeyState.All);
@ -14969,6 +14975,10 @@ function AbstractData()
key.setScope(sValue);
});
this.leftPanelDisabled.subscribe(function (bValue) {
RL.pub('left-panel.' + (bValue ? 'off' : 'on'));
});
Globals.dropdownVisibility.subscribe(function (bValue) {
if (bValue)
{
@ -18468,6 +18478,18 @@ AbstractApp.prototype.bootstart = function ()
}
});
RL.sub('ssm.mobile-enter', function () {
RL.data().leftPanelDisabled(true);
});
RL.sub('ssm.mobile-leave', function () {
RL.data().leftPanelDisabled(false);
});
RL.data().leftPanelDisabled.subscribe(function (bValue) {
$html.toggleClass('rl-left-panel-disabled', bValue);
});
ssm.ready();
};

File diff suppressed because one or more lines are too long