mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
feature(cloudfunc) rm LEFT, RIGHT
This commit is contained in:
parent
29c63f1f2b
commit
748bb1b7b2
5 changed files with 17 additions and 19 deletions
|
|
@ -1 +1 @@
|
|||
<section id="{{ id }}" class="panel panel-{{ side }}">{{ content }}</section>
|
||||
<section id="js-{{ side }}" class="panel panel-{{ side }}">{{ content }}</section>
|
||||
|
|
@ -267,9 +267,7 @@ var Util, DOM, CloudFunc, join;
|
|||
|
||||
function baseInit(callback) {
|
||||
var dirPath = '',
|
||||
files = DOM.getFiles(),
|
||||
LEFT = CloudFunc.PANEL_LEFT,
|
||||
RIGHT = CloudFunc.PANEL_RIGHT;
|
||||
files = DOM.getFiles();
|
||||
|
||||
/* выделяем строку с первым файлом */
|
||||
if (files)
|
||||
|
|
@ -279,8 +277,8 @@ var Util, DOM, CloudFunc, join;
|
|||
Listeners = CloudCmd.Listeners;
|
||||
Listeners.init();
|
||||
|
||||
Listeners.setOnPanel(LEFT);
|
||||
Listeners.setOnPanel(RIGHT);
|
||||
Listeners.setOnPanel('left');
|
||||
Listeners.setOnPanel('right');
|
||||
|
||||
Listeners.initKeysPanel();
|
||||
|
||||
|
|
@ -427,7 +425,7 @@ var Util, DOM, CloudFunc, join;
|
|||
}
|
||||
});
|
||||
|
||||
Listeners.setOnPanel(panel.id);
|
||||
Listeners.setOnPanel(panel);
|
||||
|
||||
if (!noCurrent) {
|
||||
if (name === '..' && dir !== '/')
|
||||
|
|
|
|||
|
|
@ -59,10 +59,18 @@ var Util, DOM, CloudFunc, CloudCmd;
|
|||
});
|
||||
};
|
||||
|
||||
this.setOnPanel = function(panelId) {
|
||||
var panel = DOM.getById(panelId),
|
||||
filesElement = DOM.getByDataName('js-files', panel),
|
||||
pathElement = DOM.getByDataName('js-path', panel);
|
||||
this.setOnPanel = function(side) {
|
||||
var panel,
|
||||
filesElement,
|
||||
pathElement;
|
||||
|
||||
if (typeof side === 'string')
|
||||
panel = DOM.getById('js-' + side);
|
||||
else
|
||||
panel = side;
|
||||
|
||||
filesElement = DOM.getByDataName('js-files', panel);
|
||||
pathElement = DOM.getByDataName('js-path', panel);
|
||||
|
||||
/* ставим загрузку гифа на клик*/
|
||||
Events.addClick(pathElement, onPathElementClick);
|
||||
|
|
|
|||
|
|
@ -28,11 +28,7 @@ var Util;
|
|||
this.FS = FS = '/fs';
|
||||
|
||||
this.apiURL = '/api/v1';
|
||||
/* id панелей с файлами */
|
||||
this.PANEL_LEFT = 'js-left';
|
||||
this.PANEL_RIGHT = 'js-right';
|
||||
this.MAX_FILE_SIZE = 500 * 1024;
|
||||
|
||||
this.Entity = Entity;
|
||||
|
||||
function entityProto() {
|
||||
|
|
|
|||
|
|
@ -49,8 +49,6 @@
|
|||
function indexProcessing(options) {
|
||||
var left, right, from, to,
|
||||
keysPanel = '<div id="js-keyspanel" class="{{ className }}',
|
||||
LEFT = CloudFunc.PANEL_LEFT,
|
||||
RIGHT = CloudFunc.PANEL_RIGHT,
|
||||
data = options.data,
|
||||
panel = options.panel;
|
||||
|
||||
|
|
@ -67,13 +65,11 @@
|
|||
}
|
||||
|
||||
left = rendy(Template.panel, {
|
||||
id : LEFT,
|
||||
side : 'left',
|
||||
content : panel
|
||||
});
|
||||
|
||||
right = rendy(Template.panel, {
|
||||
id : RIGHT,
|
||||
side : 'right',
|
||||
content : panel
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue