fix(listeners) header: event.path -> getPath (#101)

Replaced non-standard event.path which works in Chrome only
This commit is contained in:
coderaiser 2017-01-27 10:41:56 +02:00
parent e909c929b1
commit d3caa9dcd4

View file

@ -59,7 +59,7 @@ var Util, DOM, CloudFunc, CloudCmd;
if (!/^(name|size|date)$/.test(name))
return;
var panel = event.path
var panel = getPath(el)
.filter(isDataset)
.filter(isPanel)
.pop();
@ -87,6 +87,17 @@ var Util, DOM, CloudFunc, CloudCmd;
});
}
function getPath(el, path) {
path = path || [];
if (!el)
return path;
var parent = el.parentElement;
return getPath(parent, path.concat(el));
}
function config() {
DOM.Files.get('config', function(e, config) {
var type = config && config.packer;