mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
fixed bug with go to parent directory
From now, if parent directory not in view area, page will scroll to needed place.
This commit is contained in:
parent
368767eb8e
commit
c17d938830
1 changed files with 7 additions and 5 deletions
12
client.js
12
client.js
|
|
@ -680,11 +680,11 @@ CloudClient._currentToParent = (function(pDirName){
|
|||
/* опредиляем в какой мы панели:
|
||||
* правой или левой
|
||||
*/
|
||||
var lCurrentFile = getByClass(CloudClient.CURRENT_FILE);
|
||||
var lPanel = lCurrentFile[0].parentElement;
|
||||
var lCurrentFile = Util.getCurrentFile();
|
||||
var lPanel = Util.getPanel();
|
||||
|
||||
/* убираем слэш с имени каталога*/
|
||||
pDirName=pDirName.replace('/','');
|
||||
pDirName = pDirName.replace('/','');
|
||||
|
||||
var lRootDir = getById(pDirName + '(' + lPanel.id + ')');
|
||||
|
||||
|
|
@ -692,8 +692,10 @@ CloudClient._currentToParent = (function(pDirName){
|
|||
* set it to current file
|
||||
*/
|
||||
if(lRootDir){
|
||||
!(lCurrentFile[0].className = '') &&
|
||||
(lRootDir.className = CloudClient.CURRENT_FILE);
|
||||
lCurrentFile.className = '';
|
||||
|
||||
lRootDir.className = CloudClient.CURRENT_FILE;
|
||||
lRootDir.scrollIntoViewIfNeeded();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue