mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-24 03:05:41 +00:00
feature(client) refresh: current, panel[, callbac]k -> panel[, callback]
This commit is contained in:
parent
c2f44c061a
commit
af6d9752c2
2 changed files with 12 additions and 10 deletions
|
|
@ -306,13 +306,15 @@ var Util, DOM, CloudFunc, join;
|
|||
});
|
||||
};
|
||||
|
||||
this.refresh = function(current, panelParam, callback) {
|
||||
var NEEDREFRESH = true,
|
||||
panel = panelParam || current && current.parentElement,
|
||||
this.refresh = function(panelParam, callback) {
|
||||
var panel,
|
||||
NEEDREFRESH = true,
|
||||
path = DOM.getCurrentDirPath(panel),
|
||||
notSlashlLink = CloudFunc.rmLastSlash(path) || '/';
|
||||
|
||||
if (!panel)
|
||||
if (panel)
|
||||
panel = panelParam;
|
||||
else
|
||||
panel = Info.panel;
|
||||
|
||||
CloudCmd.loadDir({
|
||||
|
|
|
|||
|
|
@ -465,7 +465,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
|
||||
if (name)
|
||||
RESTful.write(path, function() {
|
||||
CloudCmd.refresh(null, null, function() {
|
||||
CloudCmd.refresh(null, function() {
|
||||
var current = DOM.getCurrentFileByName(name);
|
||||
|
||||
DOM.setCurrentFile(current);
|
||||
|
|
@ -502,7 +502,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
|
||||
if (name && name !== '..')
|
||||
op(fileFrom, function() {
|
||||
CloudCmd.refresh(null, null, function() {
|
||||
CloudCmd.refresh(null, function() {
|
||||
var byName = DOM.getCurrentFileByName,
|
||||
dir = byName(nameDir),
|
||||
file = byName(nameFile);
|
||||
|
|
@ -1604,11 +1604,11 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
if (!data) {
|
||||
DOM.setCurrentFile(dotDot);
|
||||
|
||||
CloudCmd.refresh(dotDot, panel);
|
||||
CloudCmd.refresh(dotDot, panelPassive);
|
||||
CloudCmd.refresh(panel);
|
||||
CloudCmd.refresh(panelPassive);
|
||||
} else {
|
||||
CloudCmd.refresh(dotDot, panelPassive);
|
||||
CloudCmd.refresh(dotDot, panel);
|
||||
CloudCmd.refresh(panelPassive);
|
||||
CloudCmd.refresh(panel);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue