refactor(route) indexProcessing

This commit is contained in:
coderaiser 2015-02-18 04:37:01 -05:00
parent 55fe83265f
commit ea97da2931

View file

@ -45,15 +45,23 @@
* additional processing of index file
*/
function indexProcessing(options) {
var keysPanel, left, right,
LEFT = CloudFunc.PANEL_LEFT,
RIGHT = CloudFunc.PANEL_RIGHT,
data = options.data,
panel = options.panel;
var left, right, from, to,
keysPanel = '<div id="js-keyspanel" class="{{ className }}',
LEFT = CloudFunc.PANEL_LEFT,
RIGHT = CloudFunc.PANEL_RIGHT,
data = options.data,
panel = options.panel;
if (!config('showKeysPanel')) {
keysPanel = '<div id="js-keyspanel" class="keyspanel';
data = data.replace(keysPanel + '"', keysPanel +' hidden"');
from = rendy(keysPanel, {
className: 'keyspanel'
});
to = rendy(keysPanel, {
className: 'keyspanel hidden'
});
data = data.replace(from, to);
}
left = rendy(Template.panel, {