MINOR More robust width/height detectino for layout manager in LeftAndMain.js

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92768 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-11-21 03:17:38 +00:00
parent 6f2927b538
commit 233221e2e0

View File

@ -90,8 +90,12 @@ var ss_MainLayout;
_setupLayout: function() {
var self = this;
var widthEast = this.find('.ui-layout-east').width();
var widthWest = this.find('.ui-layout-west').width();
// layout containing the tree, CMS menu, the main form etc.
var savedLayoutSettings = layoutState.load('ss_MainLayout');
var layoutSettings = jQuery.extend({
defaults: {
// TODO Reactivate once we have localized values
@ -115,7 +119,7 @@ var ss_MainLayout;
togglerLength_open: 0
},
west: {
size: this.find('.ui-layout-west').width(),
size: (widthWest) ? widthWest : undefined,
fxName: "none"
},
east: {
@ -124,8 +128,7 @@ var ss_MainLayout;
// so a user shouldn't be able to toggle this panel manually
initHidden: true,
spacing_closed: 0,
fxName: "none",
size: this.find('.ui-layout-east').width()
fxName: "none"
},
center: {}
}, savedLayoutSettings);