Permalink
Browse files

MINOR Removed jQuery.layout implementation

  • Loading branch information...
1 parent d5efacb commit 11a3b86fefe9f117ce65db28eeaf156f5f845f5f @chillu chillu committed Mar 30, 2011
@@ -202,8 +202,6 @@ function init() {
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');
View
@@ -556,14 +556,6 @@
}
/**
- * jQuery UI Datepicker - necessary because of custom
- * z-indexing performed in jQuery.layout
- */
-#ui-datepicker-div {
- z-index: 1002;
-}
-
-/**
* Upload Image (Image Toolbar)
*/
#Form_EditorToolbarImageForm .file,
View
@@ -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 */
@@ -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');
@@ -104,73 +76,6 @@ var ss_MainLayout;
},
/**
- * 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
*
* This function is called by prototype when it receives notification that the user was logged out.
@@ -1,4 +1,4 @@
-<div id="SearchForm_holder" class="leftbottom ss-tabset ui-layout-content">
+<div id="SearchForm_holder" class="leftbottom ss-tabset">
<% if SearchClassSelector = tabs %>
<ul>
<% control ModelForms %>
@@ -15,27 +15,27 @@
</div>
</div>
- <div class="ui-layout-north ss-cms-top-menu">
+ <div class="main-menu">
$CMSTopMenu
</div>
- <div class="ui-layout-west">
+ <div>
$Left
</div>
- <div class="ui-layout-center right" id="right">
+ <div class="right" id="right">
$Right
</div>
- <div class="ui-layout-east" id="contentPanel">
+ <div id="contentPanel">
<% control EditorToolbar %>
$ImageForm
$LinkForm
$FlashForm
<% end_control %>
</div>
- <div class="ui-layout-south ss-cms-bottom-bar">
+ <div class="ss-cms-bottom-bar">
<div class="holder">
<div id="logInStatus">
<a href="$ApplicationLink" title="<% _t('SSWEB','Silverstripe Website') %>">$ApplicationName</a>
@@ -1 +0,0 @@
-See http://layout.jquery-dev.net/downloads.html
@@ -1,60 +0,0 @@
-1.2.0
-* ADDED maskIframesOnResize option: true=ALL -OR- a selector string
-* ADDED options to set different animations on open and close
-* ADDED new callback events, ie: onshow, onhide
-* ADDED start/end callbacks, eg: onopen_start, onopen_end, etc.
-* ADDED ability to cancel events using callbacks, eg: onopen_start
-* CHANGED Layout.config.fxDefaults to Layout.effects (internal use)
-* FIXED missing semi-colon so minified version works in IE
-
-1.1.3
-* FIXED typo in cursor-hotkeys code
-* ADDED scrollToBookmarkOnLoad options - enables use of URL hash:
- o www.site.com/page.html#myBookmark
- o AFTER layout is created, attempts to scroll to bookmark
- o default = true - otherwise bookmarks are non-functional
-
-1.1.2
-* UPDATED paneSelector rules to handle FORMS and pane-nesting
- o automatically looks for panes inside 'first form' in container
- o if using an ID as paneSelector, pane can be 'deeply nested'
-* ADDED auto-CSS for 'containers' other than BODY
- o overflow: hidden - ensures no scrollbars on container
- o position: relative - IF NOT: fixed, absolute or relative
- o height: 100% - IF NOT specified or is 'auto'
-* ADDED noAnimation param to open() and close() - not used internally
-
-1.1.1
-* CHANGED toggler element from a SPAN to a DIV
-* CHANGED auto-generated custom-buttons classes for better consistency
- o [buttonClass]-[pane]-[buttonType] ==> [buttonClass]-[buttonType]-[pane]
- o ui-layout-button-west-open ==> ui-layout-button-open-west
- o ui-layout-button-west-pin-up ==> ui-layout-button-pin-west-up
-* CHANGED default for hideTogglerOnSlide to false
-* CHANGED internal 'cDims' hash to alias for state.container
-* CHANGED internal aliases: s = state[pane] and o = options[pane]
-* UPDATED toggler-text to auto-show correct spans (content-open/closed)
-* FIXED toggler-text - now centers text span correctly
-* FIXED bug affecting IE6 when layout has no north or south pane
-* ADDED new layout property 'state' - eg: myLayout.state.west.size
-* REMOVED layout.containerDimensions property - USE: layout.state.container
-* CHANGED data returned to callbacks - added pane-state as 3rd param
-
-1.1.0
-* RENAMED raisePaneZindexOnHover ==> showOverflowOnHover
-* REMOVED "overflow: auto" from base-styles. Overflow must now be set by
- CSS - unless applyDefaultStyles==true. No longer need "!important" to
- set pane overflow in your stylesheet.
-* CHANGED minSize default from 50 to 0 (still auto-limited to 'css size')
-* FIXED bug in allowOverflow - now works with 'custom paneClass'
-* EXPOSED two CSS utility methods
- o myLayout.cssWidth( elem )
- o myLayout.cssHeight( elem )
-* NEW auto-resize for ALL layouts on windows.resize
-* UPDATED auto-resizing of panes after a container-resize
-* NEW flow-code to prevent simultaneous pane animations
-* NEW options to add text inside toggler-buttons
-* NEW options for hotkeys - standard (cursors) and user-defined
-
-1.0
-* Initial release
@@ -1,23 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Layout Example</TITLE>
-<SCRIPT type="text/javascript" src="jquery.js"></SCRIPT>
-<SCRIPT type="text/javascript" src="jquery.layout.js"></SCRIPT>
-<SCRIPT type="text/javascript">
-$(document).ready(function () {
- $('body').layout({ applyDefaultStyles: true });
-});
-</SCRIPT>
-</HEAD>
-<BODY>
-<DIV class="ui-layout-center">Center
- <P><A href="http://layout.jquery-dev.net/demos.html">Go to the Demos page</A></P>
- <P>* Pane-resizing is disabled because ui.draggable.js is not linked</P>
- <P>* Pane-animation is disabled because ui.effects.js is not linked</P>
-</DIV>
-<DIV class="ui-layout-north">North</DIV>
-<DIV class="ui-layout-south">South</DIV>
-<DIV class="ui-layout-east">East</DIV>
-<DIV class="ui-layout-west">West</DIV>
-</BODY>
-</HTML>
Oops, something went wrong.

0 comments on commit 11a3b86

Please sign in to comment.