silverstripe-cms/javascript/CMSMain.js
Ingo Schommer ae56eba853 ENHANCEMENT Using jQuery layout manager plugin to size panels in main CMS interface. Removed custom javascript resizing and CSS rules.
API CHANGE Removed custom resizing javascript methods: window.ontabschanged, window.onresize, fixRightWidth(), fixHeight_left()
API CHANGE Removed DraggableSeparator, SideTabs, SideTabItem javascript classes
API CHANGE Removed Effect.ReSize and Highlighter javascript helper classes
API CHANGE Modified template structure in CMSMain_left.ss, CMSMain_right.ss and LeftAndMain.ss
API CHANGE Modified markup IDs in LeftAndMain/CMSMain templates, removed "left", "right", "contentPanel", "bottom"
ENHANCEMENT Using jquery-latest (currently 1.3) in CMSMain and LeftAndMain
ENHANCEMENT Added jQuery UI library and "smoothness" theme to default CMS interface

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92581 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-21 02:35:20 +00:00

66 lines
1.4 KiB
JavaScript

var outerLayout;
var innerLayout;
jQuery(document).ready(function () {
// layout containing the tree, CMS menu, the main form etc.
outerLayout = jQuery('body').layout({
defaults: {
// TODO Reactivate once we have localized values
togglerTip_open: '',
togglerTip_closed: '',
resizerTip: '',
sliderTip: ''
},
// contains CMSMenu
north: {
slidable: false,
resizable: false,
size: 35,
togglerLength_open: 0
},
// "Page view", "profile" and "logout" links
south: {
slidable: false,
resizable: false,
size: 20,
togglerLength_open: 0
},
// "Insert link" etc.
east: {
initClosed: true,
fxName: "none"
},
// Tree, page version history
west: {
size: 250,
onresize: function () { jQuery("#treepanes").accordion("resize"); },
onopen: function () { jQuery("#treepanes").accordion("resize"); },
fxName: "none"
},
// Page forms
center: {
onresize: "innerLayout.resizeAll"
}
});
// Layout for the form and its buttons
innerLayout = jQuery('#right').layout({
center: {},
south: {
slidable: false,
resizable: false,
size: 30,
togglerLength_open: 0
}
})
// Adjust tree accordion etc. in left panel to work correctly
// with jQuery.layout (see http://layout.jquery-dev.net/tips.html#Widget_Accordion)
jQuery("#treepanes").accordion({
fillSpace: true,
animated: false
});
});