diff --git a/html/path.html b/html/path.html
index a2e79700..59a309f4 100644
--- a/html/path.html
+++ b/html/path.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/lib/client/dom.js b/lib/client/dom.js
index cada95bd..7e53a599 100644
--- a/lib/client/dom.js
+++ b/lib/client/dom.js
@@ -319,6 +319,18 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
return ret;
};
+ this.getByAttr = function(attribute, element) {
+ var ret,
+ selector = '[' + 'data="' + attribute + '"]';
+
+ if (!element)
+ element = document;
+
+ ret = element.querySelector(selector);
+
+ return ret;
+ };
+
/**
* Function search element by class name
* @param pClass - className
@@ -768,15 +780,16 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
/**
* get current direcotory path
*/
- this.getCurrentDirPath = function(pPanel) {
- var lPanel = pPanel || this.getPanel(),
- lPath = this.getByClass('js-path', lPanel),
- lRet;
+ this.getCurrentDirPath = function(panel) {
+ var ret, path;
- if (lPath)
- lRet = lPath.textContent;
+ if (!panel)
+ panel = this.getPanel(),
- return lRet;
+ path = this.getByAttr('js-path', panel);
+ ret = path && path.textContent;
+
+ return ret;
};
/**
diff --git a/test/test.js b/test/test.js
index 625fa5a3..ec18c584 100644
--- a/test/test.js
+++ b/test/test.js
@@ -34,7 +34,7 @@
Expect =
- '