From 33a8fd9aaf6b2e97dabac28d1140c64f61940071 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 18 Feb 2013 08:21:57 -0500 Subject: [PATCH] minor changes --- ChangeLog | 2 ++ lib/client.js | 8 ++++---- lib/cloudfunc.js | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9ec6842c..6971ee77 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/lib/client.js b/lib/client.js index 43aad27e..96bf874e 100644 --- a/lib/client.js +++ b/lib/client.js @@ -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){ diff --git a/lib/cloudfunc.js b/lib/cloudfunc.js index e0e2faf8..7b059b08 100644 --- a/lib/cloudfunc.js +++ b/lib/cloudfunc.js @@ -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 += '
  • '+ + lFileTable += '
  • '+ '' + '' + '' + @@ -437,7 +437,7 @@ var CloudFunc, exports; * верхний файл еще не выделен - * выделяем верхний файл */ - if(lPath === '/') + if(pSetCurrent) lFileTable = lFileTable.replace('
  • ', '
  • ');