mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
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:
parent
6f2927b538
commit
233221e2e0
@ -90,8 +90,12 @@ var ss_MainLayout;
|
|||||||
_setupLayout: function() {
|
_setupLayout: function() {
|
||||||
var self = this;
|
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.
|
// layout containing the tree, CMS menu, the main form etc.
|
||||||
var savedLayoutSettings = layoutState.load('ss_MainLayout');
|
var savedLayoutSettings = layoutState.load('ss_MainLayout');
|
||||||
|
|
||||||
var layoutSettings = jQuery.extend({
|
var layoutSettings = jQuery.extend({
|
||||||
defaults: {
|
defaults: {
|
||||||
// TODO Reactivate once we have localized values
|
// TODO Reactivate once we have localized values
|
||||||
@ -115,7 +119,7 @@ var ss_MainLayout;
|
|||||||
togglerLength_open: 0
|
togglerLength_open: 0
|
||||||
},
|
},
|
||||||
west: {
|
west: {
|
||||||
size: this.find('.ui-layout-west').width(),
|
size: (widthWest) ? widthWest : undefined,
|
||||||
fxName: "none"
|
fxName: "none"
|
||||||
},
|
},
|
||||||
east: {
|
east: {
|
||||||
@ -124,8 +128,7 @@ var ss_MainLayout;
|
|||||||
// so a user shouldn't be able to toggle this panel manually
|
// so a user shouldn't be able to toggle this panel manually
|
||||||
initHidden: true,
|
initHidden: true,
|
||||||
spacing_closed: 0,
|
spacing_closed: 0,
|
||||||
fxName: "none",
|
fxName: "none"
|
||||||
size: this.find('.ui-layout-east').width()
|
|
||||||
},
|
},
|
||||||
center: {}
|
center: {}
|
||||||
}, savedLayoutSettings);
|
}, savedLayoutSettings);
|
||||||
|
Loading…
Reference in New Issue
Block a user