From 28d8dfdfaf1a44ed25600f915d9aa01bd445aae3 Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Tue, 6 Nov 2007 05:39:14 +0000 Subject: [PATCH] Move flash, image and link forms to right git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@44365 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- css/cms_right.css | 1 + css/layout.css | 17 ++++++++++++++--- javascript/LeftAndMain.js | 20 +++++++++++++++++--- templates/Includes/CMSMain_right.ss | 1 + templates/Includes/Editor_toolbar.ss | 8 +------- templates/LeftAndMain.ss | 10 +++++++++- 6 files changed, 43 insertions(+), 14 deletions(-) diff --git a/css/cms_right.css b/css/cms_right.css index 001bd399..8785c6d0 100644 --- a/css/cms_right.css +++ b/css/cms_right.css @@ -432,3 +432,4 @@ div.originallang_holder.field.CompositeField.nolabel { .nonTranslating { display: none; } + diff --git a/css/layout.css b/css/layout.css index 6c820704..3992647e 100644 --- a/css/layout.css +++ b/css/layout.css @@ -177,7 +177,8 @@ body.stillLoading select { border-top: 1px solid #77BBEE; } -#left h2 { +#left h2, +#contentPanel h2 { background-image:url(../images/textures/obar-18.gif); height: 18px; line-height: 18px; @@ -380,7 +381,6 @@ div.spacer, li.spacer { } .thumbnailstrip { - height: 58px; overflow: auto; white-space: nowrap; width: 100%; @@ -403,4 +403,15 @@ ul.tree li.Root span.Root span.c a { /* Misc Styling */ iframe { border: none; -} \ No newline at end of file +} + +#contentPanel { + background-color: #FFFFFF; + width: 205px; + float: left; + position: absolute; + border: 1px solid #ACBBCC; + top: 45px; + padding 3px; +} + diff --git a/javascript/LeftAndMain.js b/javascript/LeftAndMain.js index d7be14d0..e38d4d7f 100644 --- a/javascript/LeftAndMain.js +++ b/javascript/LeftAndMain.js @@ -42,7 +42,16 @@ function fixRightWidth() { $('right').style.left = (sep + 6) + 'px'; // Give the remaining space to right - var rightWidth = parseInt(document.body.offsetWidth) - parseInt($('left').offsetWidth) - $('separator').offsetWidth - 8; + var bodyWidth = parseInt(document.body.offsetWidth); + var leftWidth = parseInt($('left').offsetWidth); + var sepWidth = parseInt($('separator').offsetWidth - 8); + var rightWidth = bodyWidth - leftWidth - sepWidth -18; + + // Extra pane in right for insert image/flash/link things + if($('contentPanel').style.display != "none") { + rightWidth -= 210; + $('contentPanel').style.left = leftWidth + sepWidth + rightWidth + sepWidth + 23 + 'px'; + } if( rightWidth >= 0 ) $('right').style.width = rightWidth + 'px'; @@ -144,7 +153,12 @@ window.onresize = function(init) { var rightbottom = $('rightbottom'); if(rightbottom) rightbottom.style.display = 'none'; - if(typeof fitToParent == 'function') fitToParent('right', 12); + if(typeof fitToParent == 'function') { + fitToParent('right', 12); + if($('contentPanel')) { + fitToParent('contentPanel', 12); + } + } if( $('left') && $('separator') && right ) { // #right has padding-bottom to make room for AJAX Action buttons so we need to add that @@ -836,4 +850,4 @@ function showIndicator(id, container, imgSrc, insertionType, displayType) { function hideIndicator(id) { Effect.Fade(id, {duration: 0.3}); -} \ No newline at end of file +} diff --git a/templates/Includes/CMSMain_right.ss b/templates/Includes/CMSMain_right.ss index 51378d5a..9b281bd4 100755 --- a/templates/Includes/CMSMain_right.ss +++ b/templates/Includes/CMSMain_right.ss @@ -1,3 +1,4 @@ + <% include Editor_toolbar %> diff --git a/templates/Includes/Editor_toolbar.ss b/templates/Includes/Editor_toolbar.ss index 834556c8..94829294 100755 --- a/templates/Includes/Editor_toolbar.ss +++ b/templates/Includes/Editor_toolbar.ss @@ -32,10 +32,4 @@ -$LinkForm - -$ImageForm - -$FlashForm - -<% end_control %> \ No newline at end of file +<% end_control %> diff --git a/templates/LeftAndMain.ss b/templates/LeftAndMain.ss index c3fea588..48fc8171 100644 --- a/templates/LeftAndMain.ss +++ b/templates/LeftAndMain.ss @@ -33,6 +33,14 @@ <% end_if %> + +
@@ -59,4 +67,4 @@
- \ No newline at end of file +