From 11a3b86fefe9f117ce65db28eeaf156f5f845f5f Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 31 Mar 2011 11:57:09 +1300 Subject: [PATCH] MINOR Removed jQuery.layout implementation --- admin/code/LeftAndMain.php | 2 - admin/css/cms_right.css | 8 - admin/css/layout.css | 11 - admin/javascript/LeftAndMain.js | 95 - admin/templates/Includes/ModelAdmin_left.ss | 2 +- admin/templates/LeftAndMain.ss | 10 +- admin/thirdparty/jquery-layout/README.txt | 1 - admin/thirdparty/jquery-layout/changelog.txt | 60 - admin/thirdparty/jquery-layout/example.html | 23 - admin/thirdparty/jquery-layout/jquery.js | 8176 ----------- .../thirdparty/jquery-layout/jquery.layout.js | 4332 ------ .../jquery-layout/jquery.layout.min.js | 142 - .../jquery-layout/jquery.layout.state.js | 140 - .../thirdparty/jquery-layout/jquery.ui.all.js | 11545 ---------------- admin/thirdparty/jquery-layout/nested.html | 150 - admin/thirdparty/jquery-layout/simple.html | 197 - 16 files changed, 6 insertions(+), 24888 deletions(-) delete mode 100644 admin/thirdparty/jquery-layout/README.txt delete mode 100755 admin/thirdparty/jquery-layout/changelog.txt delete mode 100755 admin/thirdparty/jquery-layout/example.html delete mode 100755 admin/thirdparty/jquery-layout/jquery.js delete mode 100755 admin/thirdparty/jquery-layout/jquery.layout.js delete mode 100755 admin/thirdparty/jquery-layout/jquery.layout.min.js delete mode 100644 admin/thirdparty/jquery-layout/jquery.layout.state.js delete mode 100755 admin/thirdparty/jquery-layout/jquery.ui.all.js delete mode 100755 admin/thirdparty/jquery-layout/nested.html delete mode 100755 admin/thirdparty/jquery-layout/simple.html diff --git a/admin/code/LeftAndMain.php b/admin/code/LeftAndMain.php index d139e9500..20560411a 100644 --- a/admin/code/LeftAndMain.php +++ b/admin/code/LeftAndMain.php @@ -202,8 +202,6 @@ class LeftAndMain extends Controller { Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-ui/jquery-ui.js'); //import all of jquery ui - Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/thirdparty/jquery-layout/jquery.layout.js'); - Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/thirdparty/jquery-layout/jquery.layout.state.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/json-js/json2.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-metadata/jquery.metadata.js'); Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/jquery-fitheighttoparent/jquery.fitheighttoparent.js'); diff --git a/admin/css/cms_right.css b/admin/css/cms_right.css index 661e5449f..35c7e2a0b 100644 --- a/admin/css/cms_right.css +++ b/admin/css/cms_right.css @@ -555,14 +555,6 @@ margin-left: 0; } -/** - * jQuery UI Datepicker - necessary because of custom - * z-indexing performed in jQuery.layout - */ -#ui-datepicker-div { - z-index: 1002; -} - /** * Upload Image (Image Toolbar) */ diff --git a/admin/css/layout.css b/admin/css/layout.css index 9029d2543..332921502 100644 --- a/admin/css/layout.css +++ b/admin/css/layout.css @@ -5,15 +5,6 @@ font-family: Arial, Helvetica, sans-serif; } -html { - overflow: hidden; -} - -body { - background: #ccdef3; - height: 100%; -} - .ss-loading-screen, .ss-loading-screen .loading-logo { width: 100%; height: 100%; @@ -85,8 +76,6 @@ body { */ .ui-layout-pane { /* all 'panes' */ background: #FFF; - /*border: 1px solid #BBB;*/ - overflow: auto; } /* Overflow is handled by tabsets inside the panel */ diff --git a/admin/javascript/LeftAndMain.js b/admin/javascript/LeftAndMain.js index e2a802e4d..9f1031033 100644 --- a/admin/javascript/LeftAndMain.js +++ b/admin/javascript/LeftAndMain.js @@ -2,12 +2,6 @@ * File: LeftAndMain.js */ -/** - * Variable: ss_MainLayout - * jquery.layout Global variable so layout state management can pick it up. - */ -var ss_MainLayout; - (function($) { $.entwine('ss', function($){ /** @@ -44,11 +38,6 @@ var ss_MainLayout; * loadnewpage - ... */ $('.LeftAndMain').entwine({ - /** - * Variable: MainLayout - * (Object) Reference to jQuery.layout element - */ - MainLayout: null, /** * Variable: PingIntervalSeconds @@ -67,25 +56,8 @@ var ss_MainLayout; $('body').removeClass('stillLoading'); $(window).unbind('resize', positionLoadingSpinner); - // Layout - ss_MainLayout = this._setupLayout(); - this.setMainLayout(ss_MainLayout); - layoutState.options.keys = "west.size,west.isClosed"; - $(window).unload(function(){ layoutState.save('ss_MainLayout');}); - this._setupPinging(); - // HACK Delay resizing to give jquery-ui tabs a change their dimensions - // through dynamically added css classes - $(window).resize(function () { - var timerID = "timerLeftAndMainResize"; - if (window[timerID]) clearTimeout(window[timerID]); - window[timerID] = setTimeout(function() { - self._resizeChildren(); - }, 200); - }); - $(window).resize(); - // If tab has no nested tabs, set overflow to auto $(this).find('.tab').not(':has(.tab)').css('overflow', 'auto'); @@ -103,73 +75,6 @@ var ss_MainLayout; this._super(); }, - /** - * Function: _setupLayout - * - * Initialize jQuery layout manager with the following panes: - * - east: Tree, Page Version History, Site Reports - * - center: Form - * - west: "Insert Image", "Insert Link", "Insert Flash" panes - * - north: CMS area menu bar - * - south: "Page view", "profile" and "logout" links - */ - _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 - togglerTip_open: '', - togglerTip_closed: '', - resizerTip: '', - sliderTip: '', - onresize: function() {self._resizeChildren();}, - onopen: function() {self._resizeChildren();} - }, - north: { - slidable: false, - resizable: false, - size: this.find('.ui-layout-north').height(), - togglerLength_open: 0 - }, - south: { - slidable: false, - resizable: false, - size: this.find('.ui-layout-south').height(), - togglerLength_open: 0 - }, - west: { - size: (widthWest) ? widthWest : undefined, - fxName: "none" - }, - east: { - initClosed: true, - // multiple panels which are triggered through tinymce buttons, - // so a user shouldn't be able to toggle this panel manually - initHidden: true, - spacing_closed: 0, - fxName: "none" - }, - center: {} - }, savedLayoutSettings); - var layout = $('body').layout(layoutSettings); - - // Adjust tree accordion etc. in left panel to work correctly - // with jQuery.layout (see http://layout.jquery-dev.net/tips.html#Widget_Accordion) - this.find("#treepanes").accordion({ - fillSpace: true, - animated: false - }); - - return layout; - }, - /** * Function: _setupPinging * diff --git a/admin/templates/Includes/ModelAdmin_left.ss b/admin/templates/Includes/ModelAdmin_left.ss index c73d0f887..6d7644b09 100755 --- a/admin/templates/Includes/ModelAdmin_left.ss +++ b/admin/templates/Includes/ModelAdmin_left.ss @@ -1,4 +1,4 @@ -
+
<% if SearchClassSelector = tabs %>
    <% control ModelForms %> diff --git a/admin/templates/LeftAndMain.ss b/admin/templates/LeftAndMain.ss index 59f646a98..d94c97ba9 100644 --- a/admin/templates/LeftAndMain.ss +++ b/admin/templates/LeftAndMain.ss @@ -15,19 +15,19 @@
-
+ -
+
$Left
-