feature(cloudcmd) add one-panel-mode

This commit is contained in:
coderaiser 2016-06-15 19:45:49 +03:00
parent 1ce8a78e04
commit 5b4f7368ad
10 changed files with 52 additions and 13 deletions

View file

@ -182,6 +182,9 @@ var Util, DOM, CloudFunc, join;
htmlDialogs: !error && config.htmlDialogs
};
if (config.onePanelMode)
CloudCmd.MIN_ONE_PANEL_WIDTH = Infinity;
if (error)
CloudCmd.log(error);

View file

@ -58,8 +58,11 @@
* additional processing of index file
*/
function indexProcessing(options) {
var left, right, from, to,
var from, to,
left = '',
right = '',
keysPanel = '<div id="js-keyspanel" class="{{ className }}',
isOnePanel = config('onePanelMode'),
data = options.data,
panel = options.panel;
@ -75,15 +78,23 @@
data = data.replace(from, to);
}
if (isOnePanel)
data = data
.replace('icon-move', 'icon-move none')
.replace('icon-copy', 'icon-copy none');
left = rendy(Template.panel, {
side : 'left',
content : panel
side : 'left',
content : panel,
className : !isOnePanel ? '' : 'panel-single'
});
right = rendy(Template.panel, {
side : 'right',
content : panel
});
if (!isOnePanel)
right = rendy(Template.panel, {
side : 'right',
content : panel,
className : ''
});
data = rendy(data, {
title : CloudFunc.getTitle(),