mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
fix(listeners) if click on path of passive panel change content on active panel
This commit is contained in:
parent
9f881dbdd8
commit
7181631450
2 changed files with 14 additions and 6 deletions
|
|
@ -36,7 +36,7 @@ var Util, DOM, CloudFunc;
|
|||
*/
|
||||
this.loadDir = function(paramLink, needRefresh, panel) {
|
||||
return function(event) {
|
||||
var link,
|
||||
var link, imgPosition, panelChanged,
|
||||
currentLink = DOM.getCurrentLink(),
|
||||
href = currentLink.href;
|
||||
|
||||
|
|
@ -48,9 +48,17 @@ var Util, DOM, CloudFunc;
|
|||
link += '?json';
|
||||
|
||||
if (link || currentLink.target !== '_blank') {
|
||||
Images.showLoad(!needRefresh ? null: {
|
||||
top:true
|
||||
});
|
||||
if (panel && panel !== Info.panel) {
|
||||
DOM.changePanel();
|
||||
panelChanged = true;
|
||||
}
|
||||
|
||||
if (panelChanged || needRefresh)
|
||||
imgPosition = {
|
||||
top: true
|
||||
};
|
||||
|
||||
Images.showLoad(imgPosition);
|
||||
|
||||
/* загружаем содержимое каталога */
|
||||
CloudCmd.ajaxLoad(link, {
|
||||
|
|
@ -389,7 +397,7 @@ var Util, DOM, CloudFunc;
|
|||
|
||||
if (!ret && json) {
|
||||
json = Util.parseJSON(json);
|
||||
CloudCmd.createFileTable(json);
|
||||
CloudCmd.createFileTable(json, panel);
|
||||
setTitle();
|
||||
} else
|
||||
DOM.getCurrentFileContent({
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ var Util, DOM, CloudCmd;
|
|||
for (i = 0; i < n; i++) {
|
||||
ai = pathLinks[i];
|
||||
link = Util.removeStr(ai.href, url),
|
||||
loadDir = CloudCmd.loadDir(link),
|
||||
loadDir = CloudCmd.loadDir(link, false, panel),
|
||||
Events.addClick(loadDir, ai);
|
||||
OnPathLinks.push(loadDir);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue