mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-24 03:05:41 +00:00
refactor(route) indexProcessing
This commit is contained in:
parent
55fe83265f
commit
ea97da2931
1 changed files with 15 additions and 7 deletions
|
|
@ -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, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue