mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-24 00:21:18 +00:00
fix(key) ALT + LEFT/RIGHT: one panel mode
This commit is contained in:
parent
668561f006
commit
551584d7e9
2 changed files with 25 additions and 20 deletions
|
|
@ -1528,9 +1528,10 @@ var CloudCmd, Util, DOM, CloudFunc;
|
|||
},
|
||||
|
||||
this.duplicatePanel = function() {
|
||||
var isDir = CurrentInfo.isDir,
|
||||
path = CurrentInfo.dirPath,
|
||||
panel = CurrentInfo.panelPassive;
|
||||
var isDir = CurrentInfo.isDir;
|
||||
var path = CurrentInfo.dirPath;
|
||||
var panel = CurrentInfo.panelPassive;
|
||||
var noCurrent = !CurrentInfo.isOnePanel;
|
||||
|
||||
if (isDir)
|
||||
path = CurrentInfo.path;
|
||||
|
|
@ -1538,7 +1539,7 @@ var CloudCmd, Util, DOM, CloudFunc;
|
|||
CloudCmd.loadDir({
|
||||
path: path,
|
||||
panel: panel,
|
||||
noCurrent: true
|
||||
noCurrent: noCurrent,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -391,25 +391,29 @@ var CloudCmd, Util, DOM;
|
|||
break;
|
||||
|
||||
case Key.LEFT:
|
||||
if (alt) {
|
||||
name = Info.panel.getAttribute('data-name');
|
||||
|
||||
if (name === 'js-right') {
|
||||
DOM.duplicatePanel();
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
if (!alt)
|
||||
return;
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
name = Info.panel.getAttribute('data-name');
|
||||
|
||||
if (name === 'js-right')
|
||||
DOM.duplicatePanel();
|
||||
|
||||
break;
|
||||
|
||||
case Key.RIGHT:
|
||||
if (alt) {
|
||||
name = Info.panel.getAttribute('data-name');
|
||||
|
||||
if (name === 'js-left') {
|
||||
DOM.duplicatePanel();
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
if (!alt)
|
||||
return;
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
name = Info.panel.getAttribute('data-name');
|
||||
|
||||
if (name === 'js-left')
|
||||
DOM.duplicatePanel();
|
||||
|
||||
break;
|
||||
|
||||
/* in case of pressing button 'Home', *
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue