chore(dom) uopdateCurrentInfo: es2015-ify

This commit is contained in:
coderaiser 2017-02-24 15:58:11 +02:00
parent 9e95d5fe97
commit c334873c26

View file

@ -1,6 +1,5 @@
/* global CloudCmd */
/* global CloudFunc */
/* global Util */
'use strict';
@ -8,6 +7,7 @@ const itype = require('itype/legacy');
const rendy = require('rendy');
const exec = require('execon');
const jonny = require('jonny');
const Util = require('../common/util');
const DOMFunc = function() {};
@ -1472,19 +1472,18 @@ function CmdProto() {
this.CurrentInfo = CurrentInfo,
this.updateCurrentInfo = function(currentFile) {
var info = Cmd.CurrentInfo,
current = currentFile || Cmd.getCurrentFile(),
files = current.parentElement,
panel = files.parentElement,
panelPassive = Cmd.getPanel({
active: false
}),
filesPassive = DOM.getFiles(panelPassive),
name = Cmd.getCurrentName(current);
this.updateCurrentInfo = (currentFile) => {
const info = Cmd.CurrentInfo;
const current = currentFile || Cmd.getCurrentFile();
const files = current.parentElement;
const panel = files.parentElement;
const panelPassive = Cmd.getPanel({
active: false
});
const filesPassive = DOM.getFiles(panelPassive);
const name = Cmd.getCurrentName(current);
info.dir = Cmd.getCurrentDirName();
info.dirPath = Cmd.getCurrentDirPath();