|
From: <ma...@us...> - 2012-05-31 20:40:52
|
Revision: 850
http://openautomation.svn.sourceforge.net/openautomation/?rev=850&view=rev
Author: mayerch
Date: 2012-05-31 20:40:46 +0000 (Thu, 31 May 2012)
Log Message:
-----------
Global change: enable and disable pages via classes and not via individual style-attribute anymore - this allows designs to react to it
Planet design: move page heading
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/lib/templateengine.js
CometVisu/trunk/visu/structure/pure/page.js
Modified: CometVisu/trunk/visu/designs/designglobals.css
===================================================================
--- CometVisu/trunk/visu/designs/designglobals.css 2012-05-31 19:30:14 UTC (rev 849)
+++ CometVisu/trunk/visu/designs/designglobals.css 2012-05-31 20:40:46 UTC (rev 850)
@@ -44,6 +44,16 @@
}
/*
+ * Disable all pages except the active ones
+ */
+.page {
+ display: none;
+}
+
+.pageActive {
+ display: block;
+}
+/*
* global color declarations for stylings in all designs
* may be overloaded by designs
*/
Modified: CometVisu/trunk/visu/designs/planet/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/planet/basic.css 2012-05-31 19:30:14 UTC (rev 849)
+++ CometVisu/trunk/visu/designs/planet/basic.css 2012-05-31 20:40:46 UTC (rev 850)
@@ -129,7 +129,7 @@
}
#navbarLeft {
- width: 11em; /* left bar width */
+ width: 12em; /* left bar width */
overflow-y: hidden;
margin-left: 0; /* overwrite the margin-left of .page */
}
@@ -145,27 +145,39 @@
#navbarLeft .widget, #navbarLeft hr {
margin-left: 0;
- margin-right: 1em;
+ margin-right: 2em;
}
#navbarLeft .switch, #navbarLeft .trigger, #navbarLeft .multitrigger {
- margin-right: 0em;
+ margin-right: 1em;
}
#centerContainer {
}
+#main {
+ overflow-y: visible !important;
+}
+
/******************************************************************/
h1 {
color: #999;
+ position: fixed;
+ top: 0;
+ right: 0.5em;
+ display: none;
}
+.activePage h1 {
+ display: block;
+}
+
.page
{
float:left;
overflow: auto;
position: relative;
- margin-left: 1em; /* to stay out of the knee */
+ /*margin-left: 1em;*/ /* to stay out of the knee */
}
.colspan0 {
Modified: CometVisu/trunk/visu/designs/planet/design_setup.js
===================================================================
--- CometVisu/trunk/visu/designs/planet/design_setup.js 2012-05-31 19:30:14 UTC (rev 849)
+++ CometVisu/trunk/visu/designs/planet/design_setup.js 2012-05-31 20:40:46 UTC (rev 850)
@@ -22,7 +22,7 @@
//////////////////////////////////////////////////////////////////////////////
//$('head').data('colspanDefault', 1 ); // 6 is already the default
-$('#navbarLeft').data({'columns': 6, 'size': '11em'} );
+$('#navbarLeft').data({'columns': 6, 'size': '12em'} );
$('#main').data('columns', 12 );
$('#navbarRight').data('columns', 1 );
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-05-31 19:30:14 UTC (rev 849)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-05-31 20:40:46 UTC (rev 850)
@@ -426,7 +426,8 @@
}
function scrollToPage( page_id, speed ) {
- $('#'+page_id).css( 'display', '' ); // show new page
+ $('.activePage').removeClass('activePage');
+ $('#'+page_id).addClass('pageActive activePage'); // show new page
// which is the parent of target page_id?
// => set this id as lastpage in url for window.onpopstate handling
@@ -473,7 +474,7 @@
path = path.join('_');
for( var i = new_array.length; i < old_array.length; i++ ) {
path += '_' + old_array[i]; // reuse of path...
- $('#'+path).css('display','none');
+ $('#'+path).removeClass('pageActive');
}
}
Modified: CometVisu/trunk/visu/structure/pure/page.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/page.js 2012-05-31 19:30:14 UTC (rev 849)
+++ CometVisu/trunk/visu/structure/pure/page.js 2012-05-31 20:40:46 UTC (rev 850)
@@ -26,7 +26,6 @@
address[ '_' + $p.attr('ga') ] = [ 'DPT:1.001', 0 ];
}
- var pstyle = ( '0' != path ) ? 'display:none;' : ''; // subPage style
var name = $p.attr('name');
var type = $p.attr('type') || 'text'; //text, 2d or 3d
var backdrop = $p.attr('backdrop');
@@ -52,7 +51,7 @@
var childs = $p.children();
//var container = $( '<div class="clearfix" />' );
- var subpage = $( '<div class="page" id="' + path + '" style="'+pstyle+';"/>' );
+ var subpage = $( '<div class="page" id="' + path + '"/>' );
var $container = $( '<div class="clearfix" path="'+path+'" style="height:100%;position:relative;" />');
for( var addr in address ) $container.bind( addr, this.update );
var container=$container;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|