minor changes

This commit is contained in:
coderaiser 2013-02-18 08:21:57 -05:00
parent 9021a87a4c
commit 33a8fd9aaf
3 changed files with 9 additions and 7 deletions

View file

@ -136,6 +136,8 @@ while menu is showing now.
* Added ability to remove /fs/no-js when go up to root
directory.
* Removed reflows maded by js.
2012.12.12, Version 0.1.8

View file

@ -566,7 +566,7 @@ CloudCmd._ajaxLoad = function(pPath, pOptions){
if (lJSON){
/* переводим из текста в JSON */
lJSON = Util.parseJSON(lJSON);
CloudCmd._createFileTable(lPanel, lJSON);
CloudCmd._createFileTable(lPanel, lJSON, true);
CloudCmd._changeLinks(lPanel);
return;
@ -576,7 +576,7 @@ CloudCmd._ajaxLoad = function(pPath, pOptions){
DOM.getCurrentFileContent({
url : lFSPath,
success : function(pData){
CloudCmd._createFileTable(lPanel, pData);
CloudCmd._createFileTable(lPanel, pData, true);
CloudCmd._changeLinks(lPanel);
/* переводим таблицу файлов в строку, для *
@ -597,7 +597,7 @@ CloudCmd._ajaxLoad = function(pPath, pOptions){
* @param pEleme - родительский элемент
* @param pJSON - данные о файлах
*/
CloudCmd._createFileTable = function(pElem, pJSON){
CloudCmd._createFileTable = function(pElem, pJSON, pSetCurrent){
var lElem = DOM.getById(pElem),
/* getting current element if was refresh */
lPath = DOM.getByClass('path', lElem),
@ -614,7 +614,7 @@ CloudCmd._createFileTable = function(pElem, pJSON){
lElem.removeChild(lElem.lastChild);
/* заполняем панель новыми элементами */
lElem.innerHTML = CloudFunc.buildFromJSON(pJSON, true);
lElem.innerHTML = CloudFunc.buildFromJSON(pJSON, pSetCurrent);
/* searching current file */
if(lWasRefresh_b){

View file

@ -298,7 +298,7 @@ var CloudFunc, exports;
* [{path:'путь',size:'dir'},
* {name:'имя',size:'размер',mode:'права доступа'}]
*/
CloudFunc.buildFromJSON = function(pJSON, pKeyBinded)
CloudFunc.buildFromJSON = function(pJSON, pSetCurrent)
{
var files;
/*
@ -368,7 +368,7 @@ var CloudFunc, exports;
if(lDotDot === '')lDotDot = '/';
/* Сохраняем путь к каталогу верхнего уровня*/
lFileTable += '<li draggable class=current-file>'+
lFileTable += '<li draggable class>'+
'<span class="mini-icon directory">' +
'</span>' +
'<span class=name>' +
@ -437,7 +437,7 @@ var CloudFunc, exports;
* верхний файл еще не выделен -
* выделяем верхний файл
*/
if(lPath === '/')
if(pSetCurrent)
lFileTable = lFileTable.replace('<li draggable class>',
'<li draggable class=current-file>');