|
From: <ma...@us...> - 2012-05-30 18:28:45
|
Revision: 847
http://openautomation.svn.sourceforge.net/openautomation/?rev=847&view=rev
Author: mayerch
Date: 2012-05-30 18:28:39 +0000 (Wed, 30 May 2012)
Log Message:
-----------
Reorder main layout to be more flexible for the navbars
Modified Paths:
--------------
CometVisu/trunk/visu/designs/designglobals.css
CometVisu/trunk/visu/designs/planet/basic.css
CometVisu/trunk/visu/designs/planet/design_setup.js
CometVisu/trunk/visu/index.html
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/structure/pure/navbar.js
Modified: CometVisu/trunk/visu/designs/designglobals.css
===================================================================
--- CometVisu/trunk/visu/designs/designglobals.css 2012-05-28 18:11:33 UTC (rev 846)
+++ CometVisu/trunk/visu/designs/designglobals.css 2012-05-30 18:28:39 UTC (rev 847)
@@ -19,8 +19,6 @@
}
#navbarLeft {
width: 0px; /* left bar width */
- right: 0px; /* left bar width */
- margin-left: -100%;
}
#navbarRight {
width: 0px; /* right bar width */
Modified: CometVisu/trunk/visu/designs/planet/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/planet/basic.css 2012-05-28 18:11:33 UTC (rev 846)
+++ CometVisu/trunk/visu/designs/planet/basic.css 2012-05-30 18:28:39 UTC (rev 847)
@@ -130,12 +130,9 @@
#navbarLeft {
width: 10em; /* left bar width */
- right: 10em; /* left bar width */
- /*border: 2px solid red; FIXME */
background-color: #cc6699;
}
#centerContainer {
- padding-left: 10em; /* left bar width */
}
/******************************************************************/
Modified: CometVisu/trunk/visu/designs/planet/design_setup.js
===================================================================
--- CometVisu/trunk/visu/designs/planet/design_setup.js 2012-05-28 18:11:33 UTC (rev 846)
+++ CometVisu/trunk/visu/designs/planet/design_setup.js 2012-05-30 18:28:39 UTC (rev 847)
@@ -22,7 +22,7 @@
//////////////////////////////////////////////////////////////////////////////
//$('head').data('colspanDefault', 1 ); // 6 is already the default
-$('#navbarLeft').data('columns', 1 );
+$('#navbarLeft').data({'columns': 6, 'size': '10em'} );
$('#main').data('columns', 12 );
$('#navbarRight').data('columns', 1 );
Modified: CometVisu/trunk/visu/index.html
===================================================================
--- CometVisu/trunk/visu/index.html 2012-05-28 18:11:33 UTC (rev 846)
+++ CometVisu/trunk/visu/index.html 2012-05-30 18:28:39 UTC (rev 847)
@@ -57,12 +57,12 @@
</div>
<div id="navbarTop" class="loading"></div>
<div id="centerContainer">
+ <div id="navbarLeft" class="loading page"></div>
<div id="main" style="width:900px;position:relative; overflow: hidden;" class="loading">
<div id="pages" class="clearfix" style="width:20000em; position:relative;clear:both;">
<!-- all pages will be inserted here -->
</div>
</div>
- <div id="navbarLeft" class="loading page"></div>
<div id="navbarRight" class="loading page"></div>
</div>
<div id="navbarBottom" class="loading"></div>
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-05-28 18:11:33 UTC (rev 846)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-05-30 18:28:39 UTC (rev 847)
@@ -136,8 +136,8 @@
var uagent = navigator.userAgent.toLowerCase();
var widthNavbarLeft = $( '#navbarLeft' ).width();
var widthNavbarRight = $( '#navbarRight' ).width();
- var width = $( window ).width() - widthNavbarLeft - widthNavbarRight;
-
+ var width = $( 'body' ).width() - widthNavbarLeft - widthNavbarRight;
+
if (/(android|blackberry|iphone|ipod|series60|symbian|windows ce|palm)/i.test(uagent)) {
$( '#main' ).css( 'width', width );
$( 'head' ).append( '<style type="text/css">.page{width:' + (width-0) + 'px;}</style>' );
@@ -446,7 +446,7 @@
// push new state to history
window.history.pushState(page_id, page_id, window.location.href);
- main_scroll.seekTo( $('.page').index( $('#'+page_id)[0] ), speed ); // scroll to it
+ main_scroll.seekTo( $('#'+page_id), speed ); // scroll to it
var pagedivs=$('div', '#'+page_id);
for( var i = 0; i<pagedivs.length; i++) { //check for inline diagrams & refresh
if( pagedivs[i].className == 'diagram_inline') {
@@ -456,7 +456,7 @@
}
function updateTopNavigation() {
- var path = $('.page').eq( this.getIndex() ).attr('id').split( '_' );
+ var path = $('#main .page').eq( this.getIndex() ).attr('id').split( '_' );
var id = ''; //path[0];
var nav = '';
for( var i = 0; i < path.length; i++ ) {
@@ -580,12 +580,11 @@
*/
function navbarSetSize( position, size )
{
- var cssSize = size + 'px';
+ var cssSize = size + (isFinite( size ) ? 'px' : '');
switch( position )
{
case 'left':
- $( '#centerContainer' ).css( 'padding-left', cssSize );
- $( '#navbarLeft' ).css( { width: cssSize, right: cssSize } );
+ $( '#navbarLeft' ).css( { width: cssSize } );
break;
case 'right':
Modified: CometVisu/trunk/visu/structure/pure/navbar.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/navbar.js 2012-05-28 18:11:33 UTC (rev 846)
+++ CometVisu/trunk/visu/structure/pure/navbar.js 2012-05-30 18:28:39 UTC (rev 847)
@@ -35,12 +35,14 @@
case 'left':
$('#navbarLeft').append( container );
- if( dynamic ) navbarSetSize( 'left', 300 ); // FIXME - only a temporal solution
+ var thisSize = $('#navbarLeft').data('size') || 300; // FIXME - only a temporal solution
+ if( dynamic ) navbarSetSize( 'left', thisSize );
break;
case 'right':
$('#navbarRight').append( container );
- if( dynamic ) navbarSetSize( 'right', 300 ); // FIXME - only a temporal solution
+ var thisSize = $('#navbarRight').data('size') || 300; // FIXME - only a temporal solution
+ if( dynamic ) navbarSetSize( 'right', thisSize );
break;
case 'bottom':
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|