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

@ -31,7 +31,7 @@ body {
background-color:white;
}
.fm, .panel-left>li, .panel-right>li, .path, .fm-header,
.fm, .panel-left>li, .panel-right>li, .fm-header,
.mini-icon, .name, .size, .owner, .mode, .keyspanel, .cmd-button {
-webkit-user-select : none;
-moz-user-select : none;
@ -40,9 +40,6 @@ body {
user-select : none;
}
.path {
}
.path-icon {
position : relative;
top : 3px;

View file

@ -1 +1 @@
<div class="path reduce-text" title="{{ fullPath }}"><span class="path-icon clear-storage" title="clear storage (Ctrl+D)"></span><span class="path-icon refresh-icon" title="refresh (Ctrl+R)"><a href="{{ link }}"></a></span><span class=links>{{ path }}</span></div>
<div id="js-path" class="reduce-text" title="{{ fullPath }}"><span class="path-icon clear-storage" title="clear storage (Ctrl+D)"></span><span class="path-icon refresh-icon" title="refresh (Ctrl+R)"><a href="{{ link }}"></a></span><span class=links>{{ path }}</span></div>

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),