Code refactoring (3) (es5 -> es2015)

This commit is contained in:
RainLoop Team 2016-07-08 02:22:58 +03:00
parent 739ed215ea
commit e49f3c6692
11 changed files with 619 additions and 571 deletions

35
dev/Common/Cmd.jsx Normal file
View file

@ -0,0 +1,35 @@
// import window from 'window';
import $ from '$';
import _ from '_';
import {$body} from 'Common/Globals';
let
opened = false,
cmdDom = null;
/**
* @returns {void}
*/
function init()
{
if (null === cmdDom)
{
cmdDom = $('<div class="rl-cmd"></div>');
cmdDom.appendTo($body);
}
}
/**
* @returns {void}
*/
export function toggle()
{
init();
opened = !opened;
_.delay(() => {
cmdDom.toggleClass('opened', opened);
}, 50);
}