app/views/knitkit/online_document_sections/index.html.erb in knitkit-2.1.15 vs app/views/knitkit/online_document_sections/index.html.erb in knitkit-3.0.0
- old
+ new
@@ -1,6 +1,8 @@
-<div id="document_content">
+<div style="margin-top:10px;" class="container">
+ <div id="document_content">
+ </div>
</div>
<script type="text/javascript" charset="utf-8">
var selectedNode = null;
@@ -102,11 +104,11 @@
window_height = Ext.getBody().getViewSize().height;
header_height = Ext.get("header").getHeight();
footer_height = Ext.get("footer").getHeight();
document_content_height = window_height - header_height - footer_height;
Ext.get("document_content").setHeight(document_content_height);
- Ext.getCmp("fittedPanelDiv").setHeight(document_content_height - 20);
+ Ext.getCmp("fittedPanelDiv").setHeight(document_content_height);
}
Ext.onReady(function () {
var currentItem, treePanel, tabPanel;
@@ -208,14 +210,13 @@
});
Ext.createWidget('panel', {
id: 'fittedPanelDiv',
layout: 'border',
- width: 800,
+ //width: 800,
header: false,
defaults: {
- collapsible: true,
split: true
},
renderTo: 'document_content',
items: [
treePanel,
@@ -227,11 +228,11 @@
// Load root page
Ext.Ajax.request({
url: '/online_document_sections/get_content',
params: {
- document_section_id:'<%= @root.internal_identifier %>',
+ document_section_id: '<%= @root.internal_identifier %>',
section_id:<%= @root.id %>
},
success: function (response) {
var responseObj = Ext.JSON.decode(response.responseText);
if (responseObj.success) {
@@ -241,9 +242,10 @@
html: responseObj.html,
closable: false
});
tabPanel.add(panel).show();
+ tabPanel.setActiveTab(panel);
}
else {
Ext.Msg.alert('Error', 'Could not load content');
}
},
\ No newline at end of file