mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-25 17:04:16 +00:00
feature(cloudcmd) add one-panel-mode
This commit is contained in:
parent
1ce8a78e04
commit
5b4f7368ad
10 changed files with 52 additions and 13 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue