Browse Source

Adjust panel render

pull/202/head
Artur Arseniev 9 years ago
parent
commit
f9598aa43d
  1. 69
      index.html
  2. 2
      src/panels/config/config.js
  3. 3
      src/panels/view/PanelsView.js

69
index.html

@ -10,38 +10,9 @@
</head> </head>
<style> <style>
body, html{ height: 100%; margin: 0;} body, html{ height: 100%; margin: 0;}
.panel-options-c {
background-color: red;
padding: 5px;
}
.panel-block-c {
background-color: blue;
padding: 5px;
}
</style> </style>
<body> <body>
<div id="gjs" style="height:0px; overflow:hidden;">
<div class="panel-options">
<div class="title">My options panel</div>
<div class="panel-options-c"></div>
</div>
<div class="panel-options">
<div class="title">My options panel 2</div>
<div class="panel-options-c"></div>
</div>
<div class="panel-block">
<div class="title">My block</div>
<div class="panel-block-c"></div>
</div>
<div id="gjs2" style="height:0px; overflow:hidden;">
</div>
<div id="gjs" style="height:0px; overflow:hidden; display:none;">
<header class="header-banner"> <header class="header-banner">
<div class="container-width"> <div class="container-width">
<div class="logo-container"> <div class="logo-container">
@ -829,9 +800,8 @@
showOffsets: 1, showOffsets: 1,
autorender: 0, autorender: 0,
noticeOnUnload: 0, noticeOnUnload: 0,
container : '#gjs2', container : '#gjs',
height: '200px', height: '100%',
width: '900px',
fromElement: true, fromElement: true,
clearOnRender: 0, clearOnRender: 0,
@ -1185,40 +1155,7 @@
attributes: { title: 'Empty canvas' } attributes: { title: 'Empty canvas' }
}]); }]);
//pnm.getPanels().reset();
editor.render(); editor.render();
pnm.addPanel({
id: 'options',
appendTo: '.panel-options-c',
resizable: true,
buttons: [{
id: 'sw-visibility',
active: true,
className: 'fa fa-square-o',
command: 'sw-visibility',
context: 'sw-visibility',
attributes: { title: 'View components' },
},{
id: 'preview',
className: 'fa fa-eye',
command: 'preview',
context: 'preview',
attributes: { title: 'Preview' },
},{
id: 'fullscreen',
className: 'fa fa-arrows-alt',
command: 'fullscreen',
context: 'fullscreen',
attributes: { title: 'Fullscreen' },
},{
id: 'export-template',
className: 'fa fa-code',
command: 'export-template',
attributes: { title: 'View code' },
}],
});
</script> </script>
</body> </body>
</html> </html>

2
src/panels/config/config.js

@ -17,7 +17,7 @@ module.exports = {
id: 'commands', id: 'commands',
buttons: [{}], buttons: [{}],
},{ },{
id: 'option', id: 'options',
buttons: [{ buttons: [{
active: true, active: true,
id: swv, id: swv,

3
src/panels/view/PanelsView.js

@ -51,9 +51,8 @@ module.exports = Backbone.View.extend({
this.$el.append(rendered); this.$el.append(rendered);
} }
} }
view.initResize();
view.initResize();
return rendered; return rendered;
}, },

Loading…
Cancel
Save