mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-28 10:14:13 +00:00
refactor(cloudfunc) LEFTPANEL -> LEFT_PANEL = "js-left"
This commit is contained in:
parent
9797af84a3
commit
0293e0aa50
3 changed files with 14 additions and 9 deletions
|
|
@ -269,15 +269,17 @@
|
|||
fs.readFile(name || INDEX_PATH, 'utf8', function(error, template) {
|
||||
var lPanel, lList,
|
||||
config = main.config,
|
||||
minify = config.minify;
|
||||
minify = config.minify,
|
||||
LEFT = CloudFunc.LEFT_PANEL,
|
||||
RIGHT = CloudFunc.RIGHT_PANEL;
|
||||
|
||||
if (error)
|
||||
main.sendError(p, error);
|
||||
else {
|
||||
p.name = INDEX_PATH,
|
||||
lPanel = CloudFunc.buildFromJSON(pJSON, FileTemplate, PathTemplate, LinkTemplate),
|
||||
lList = '<div id="js-left" class="panel panel-left">' + lPanel + '</div>' +
|
||||
'<div id="js-right" class="panel panel-right">' + lPanel + '</div>';
|
||||
lList = '<div id="' + LEFT + '" class="panel panel-left">' + lPanel + '</div>' +
|
||||
'<div id="' + RIGHT + '" class="panel panel-right">' + lPanel + '</div>';
|
||||
|
||||
main.sendResponse(p, indexProcessing({
|
||||
additional : lList,
|
||||
|
|
|
|||
|
|
@ -232,7 +232,9 @@ var Util, DOM, CloudFunc;
|
|||
function baseInit(pCallBack) {
|
||||
var LIB = CloudCmd.LIBDIR,
|
||||
LIBCLIENT = CloudCmd.LIBDIRCLIENT,
|
||||
files = DOM.getFiles();
|
||||
files = DOM.getFiles(),
|
||||
LEFT = CloudFunc.LEFT_PANEL,
|
||||
RIGHT = CloudFunc.RIGHT_PANEL;
|
||||
|
||||
/* выделяем строку с первым файлом */
|
||||
if (files)
|
||||
|
|
@ -242,8 +244,8 @@ var Util, DOM, CloudFunc;
|
|||
Listeners.init();
|
||||
/* загружаем Google Analytics */
|
||||
Listeners.analytics();
|
||||
Listeners.changeLinks('js-' + CloudFunc.LEFTPANEL);
|
||||
Listeners.changeLinks('js-' + CloudFunc.RIGHTPANEL);
|
||||
Listeners.changeLinks(LEFT);
|
||||
Listeners.changeLinks(RIGHT);
|
||||
|
||||
Listeners.initKeysPanel();
|
||||
|
||||
|
|
@ -456,7 +458,8 @@ var Util, DOM, CloudFunc;
|
|||
*/
|
||||
function getJSONfromFileTable() {
|
||||
var current, name, size, owner, mode, ret,
|
||||
left = DOM.getById('js-left'),
|
||||
LEFT = CloudFunc.LEFT_PANEL,
|
||||
left = DOM.getById(LEFT),
|
||||
path = DOM.getByClass('path').textContent,
|
||||
|
||||
fileTable = {
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ var Util;
|
|||
this.REFRESHICON = 'refresh-icon';
|
||||
|
||||
/* id панелей с файлами */
|
||||
this.LEFTPANEL = 'left';
|
||||
this.RIGHTPANEL = 'right';
|
||||
this.LEFT_PANEL = 'js-left';
|
||||
this.RIGH_TPANEL = 'js-right';
|
||||
|
||||
this.getJoinURL = function(names) {
|
||||
var url, isContain,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue