mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
feature(cloudfunc) buildFromJSON ul.files:add data-name
This commit is contained in:
parent
0f7d4a2e04
commit
bd5e4d1499
2 changed files with 14 additions and 7 deletions
|
|
@ -275,17 +275,24 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
}
|
||||
|
||||
function clickProcessing() {
|
||||
var element, isCurrent,
|
||||
layer = DOM.getById('context-menu-layer');
|
||||
var element, isCurrent, parent, name,
|
||||
layer = DOM.getById('context-menu-layer');
|
||||
|
||||
if (layer) {
|
||||
DOM.hide(layer);
|
||||
|
||||
element = DOM.getCurrentByPosition(Position);
|
||||
isCurrent = DOM.isCurrentFile(element);
|
||||
element = DOM.getCurrentByPosition(Position);
|
||||
if (element) {
|
||||
parent = element.parentElement;
|
||||
name = parent && parent.getAttribute('data-name');
|
||||
|
||||
if (!isCurrent)
|
||||
DOM.setCurrentFile(element);
|
||||
if (name === 'js-files') {
|
||||
isCurrent = DOM.isCurrentFile(element);
|
||||
|
||||
if (!isCurrent)
|
||||
DOM.setCurrentFile(element);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Key.setBind();
|
||||
|
|
|
|||
|
|
@ -405,7 +405,7 @@ var Util;
|
|||
/* сохраняем путь */
|
||||
CloudFunc.Path = path;
|
||||
|
||||
fileTable += '<ul class="files">';
|
||||
fileTable += '<ul data-name="js-files" class="files">';
|
||||
/* Если мы не в корне */
|
||||
if (path !== '/') {
|
||||
/* убираем последний слеш и каталог в котором мы сейчас находимся*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue