refactor(index) .path -> #js-path

This commit is contained in:
coderaiser 2014-01-22 10:59:30 -05:00
parent f562657d58
commit c634b44828
5 changed files with 7 additions and 13 deletions

View file

@ -460,7 +460,7 @@ var Util, DOM, CloudFunc;
var current, name, size, owner, mode, ret,
LEFT = CloudFunc.LEFT_PANEL,
left = DOM.getById(LEFT),
path = DOM.getByClass('path').textContent,
path = DOM.getCurrentDirPath(),
fileTable = {
path : path,

View file

@ -845,11 +845,8 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
this.getCurrentDirName = function() {
var lRet,
lSubstr,
lPanel = this.getPanel(),
/* получаем имя каталога в котором находимся */
lHref = this.getByClass('path', lPanel);
lHref = lHref.textContent;
lHref = this.getCurrentDirPath();
lHref = CloudFunc.rmLastSlash(lHref);
lSubstr = lHref.substr(lHref , lHref.lastIndexOf('/'));
@ -863,7 +860,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
*/
this.getCurrentDirPath = function(pPanel) {
var lPanel = pPanel || this.getPanel(),
lPath = this.getByClass('path', lPanel),
lPath = this.getById('js-path', lPanel),
lRet;
if (lPath)
@ -891,7 +888,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
*/
this.getNotCurrentDirPath = function() {
var lPanel = this.getPanel(true),
lPath = this.getByClass('path', lPanel),
lPath = this.getById('js-path', lPanel),
lRet;
if (lPath)

View file

@ -77,7 +77,7 @@ var Util, DOM, CloudCmd;
this.changeLinks = function(pPanelID) {
/* назначаем кнопку очистить кэш и показываем её */
var lPanel = DOM.getById(pPanelID),
pathElement = DOM.getByClass('path', lPanel),
pathElement = DOM.getById('js-path', lPanel),
pathLinks = DOM.getByClass('links', pathElement).children,
clearStorage = DOM.getByClass('clear-storage', pathElement),
refresh = DOM.getByClass('refresh-icon', pathElement),