|
From: <ma...@us...> - 2010-11-29 22:23:26
|
Revision: 177
http://openautomation.svn.sourceforge.net/openautomation/?rev=177&view=rev
Author: mayerch
Date: 2010-11-29 21:47:35 +0000 (Mon, 29 Nov 2010)
Log Message:
-----------
New Feature: user settable status bar (i.e. footer)
Modified Paths:
--------------
CometVisu/trunk/visu/edit_config.html
CometVisu/trunk/visu/index.html
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/visu_config.xml
Modified: CometVisu/trunk/visu/edit_config.html
===================================================================
--- CometVisu/trunk/visu/edit_config.html 2010-11-29 20:56:06 UTC (rev 176)
+++ CometVisu/trunk/visu/edit_config.html 2010-11-29 21:47:35 UTC (rev 177)
@@ -31,10 +31,7 @@
</div>
<div id="bottom" class="loading">
<hr />
- <div class="footer">
- <img src="icon/comet_64_ff8000.png" alt="CometVisu" />
- by <a href="http://www.cometvisu.org/">ComeVisu.org</a> - <a href="edit_config.html">Reload</a>
- - <a href=".">normal Mode</a>
+ <div class="footer"></div>
</div>
</div>
Modified: CometVisu/trunk/visu/index.html
===================================================================
--- CometVisu/trunk/visu/index.html 2010-11-29 20:56:06 UTC (rev 176)
+++ CometVisu/trunk/visu/index.html 2010-11-29 21:47:35 UTC (rev 177)
@@ -27,10 +27,7 @@
</div>
<div id="bottom" class="loading">
<hr />
- <div class="footer">
- <img src="icon/comet_64_000000.png" alt="CometVisu" />
- by <a href="http://www.cometvisu.org/">CometVisu.org</a> - <a href=".">Reload</a>
- - <a href="edit_config.html">Edit</a>
+ <div class="footer"></div>
</div>
</div>
<div id="loading" style="text-align: center; width: 200px; height: 30px; margin: auto;">
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2010-11-29 20:56:06 UTC (rev 176)
+++ CometVisu/trunk/visu/lib/templateengine.js 2010-11-29 21:47:35 UTC (rev 177)
@@ -169,8 +169,6 @@
var design = $( 'pages', xml ).attr('design');
$( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/' + design + '/basic.css" />' );
$( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/' + design + '/mobile.css" media="only screen and (max-device-width: 480px)" />' );
- // adapt width for pages to show
- handleResize();
// start with the plugins
$( 'meta > plugins plugin', xml ).each( function(i){
@@ -210,6 +208,22 @@
});
});
+ // then the status bar
+ $( 'meta > statusbar status', xml ).each( function(i){
+ var type = $(this).attr('type');
+ var condition = $(this).attr('condition');
+ var sPath = window.location.pathname;
+ var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
+ var editMode = 'edit_config.html' == sPage;
+ if( editMode && '!edit' == condition ) return;
+ if( !editMode && 'edit' == condition ) return;
+ //$('.footer').append( $(this.textContent) );
+ $('.footer').html( $('.footer').html() + this.textContent );
+ });
+
+ // adapt width for pages to show
+ handleResize();
+
// and now setup the pages
var page = $( 'pages > page', xml )[0]; // only one page element allowed...
Modified: CometVisu/trunk/visu/visu_config.xml
===================================================================
--- CometVisu/trunk/visu/visu_config.xml 2010-11-29 20:56:06 UTC (rev 176)
+++ CometVisu/trunk/visu/visu_config.xml 2010-11-29 21:47:35 UTC (rev 177)
@@ -2,7 +2,7 @@
<pages design="pure">
<meta>
<plugins>
- <plugin name="colorChooser" />
+ <plugin name="colorchooser" />
</plugins>
<mappings>
<mapping name="OpenClose">
@@ -34,6 +34,24 @@
<entry range_min="0" range_max="100">red</entry>
</styling>
</stylings>
+ <statusbar>
+ <status type="html">
+ <![CDATA[
+ <img src="icon/comet_64_ff8000.png" alt="CometVisu" /> by <a href="http://www.cometvisu.org/">CometVisu.org</a>
+ - <a href=".">Reload</a>
+ ]]>
+ </status>
+ <status type="html" condition="!edit">
+ <![CDATA[
+ - <a href="edit_config.html">Edit</a>
+ ]]>
+ </status>
+ <status type="html" condition="edit">
+ <![CDATA[
+ - <a href=".">normal Mode</a>
+ ]]>
+ </status>
+ </statusbar>
</meta>
<page name="Übersicht" flavour="orange">
<text align="center">Willkommen bei der CometVisu!</text>
@@ -50,7 +68,7 @@
<info address="12/4/250" datatype="9" styling="BluePurpleRed">Slide Info</info>
<info address="12/4/250" datatype="9" styling="BluePurpleRed" mapping="Sign">Slide Info</info>
<designtoggle>Change design</designtoggle>
- <colorChooser address_r="1/2/59" address_g="1/2/60" address_b="1/2/61" datatype="5.001">A colorChooser</colorChooser>
+ <colorchooser address_r="1/2/59" address_g="1/2/60" address_b="1/2/61" datatype="5.001">A colorChooser</colorchooser>
<info address="1/2/59" datatype="5.001" >R</info>
<info address="1/2/60" datatype="5.001" >G</info>
<info address="1/2/61" datatype="5.001" >B</info>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|