refactor(path) span>a -> a

This commit is contained in:
coderaiser 2014-03-14 10:12:08 -04:00
parent 8b6747ed4b
commit cbba7b47f8
2 changed files with 8 additions and 4 deletions

View file

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

View file

@ -80,13 +80,13 @@ var Util, DOM, CloudCmd;
url = CloudCmd.HOST,
loadDirOnce = CloudCmd.loadDir(),
panel = DOM.getById(panelId),
pathElement = DOM.getByClass('js-path', panel),
pathElement = DOM.getByAttr('js-path', panel),
filesElement = DOM.getByClass('files', panel),
files = filesElement.children,
pathLinks = DOM.getByClass('links', pathElement).children,
clearStorage = DOM.getByClass('clear-storage', pathElement),
refresh = DOM.getByClass('refresh-icon', pathElement),
refresh = DOM.getByAttr('js-refresh', pathElement),
fileClick = function (event) {
var ctrl = event.ctrlKey;
@ -101,7 +101,11 @@ var Util, DOM, CloudCmd;
};
/* ставим загрузку гифа на клик*/
Events.addClick(CloudCmd.refresh, refresh);
Events.addClick(function(event) {
CloudCmd.refresh();
event.preventDefault();
}, refresh);
Events.addClick(Storage.clear, clearStorage);
n = pathLinks.length;