|
From: <ma...@us...> - 2011-02-20 15:52:50
|
Revision: 300
http://openautomation.svn.sourceforge.net/openautomation/?rev=300&view=rev
Author: mayerch
Date: 2011-02-20 15:52:44 +0000 (Sun, 20 Feb 2011)
Log Message:
-----------
New Feature: Allow the page links to be aligned (e.g. centered).
Note: This feature isn't supported by the editor yet, it has to be set manually in the config file
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2011-02-20 14:48:44 UTC (rev 299)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2011-02-20 15:52:44 UTC (rev 300)
@@ -57,8 +57,11 @@
var style = ( '0' != path ) ? 'display:none' : '';
var name = $p.attr('name');
var type = $p.attr('type'); //text, 2d or 3d
+ var style = '';
+ if( $p.attr('align') ) style += 'text-align:' + $p.attr('align') + ';';
+ if( style != '' ) style = 'style="' + style + '"';
ret_val.addClass( 'link' ).addClass('pagelink');
- ret_val.append( '<a href="javascript:scrollToPage(\''+path+'\')">' + name + '</a>' );
+ ret_val.append( '<div ' + style + '><a href="javascript:scrollToPage(\''+path+'\')">' + name + '</a></div>' );
var childs = $p.children();
var container = $( '<div class="clearfix"/>' );
container.append( '<h1>' + name + '</h1>' );
@@ -69,6 +72,7 @@
return ret_val;
},
attributes: {
+ align:{ type: 'string', required: false },
name: { type: 'string', required: true }
},
elements: {
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2011-02-20 14:48:44 UTC (rev 299)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2011-02-20 15:52:44 UTC (rev 300)
@@ -88,7 +88,7 @@
<label>Update every 10 sec</label>
</image>
<designtoggle>Change design</designtoggle>
- <page name="iframe Test">
+ <page name="iframe Test" align="center" >
<iframe src="http://www.cometvisu.org" width="500px" height="500px"/>
</page>
<colorchooser>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|