|
From: <ma...@us...> - 2012-05-20 13:21:44
|
Revision: 832
http://openautomation.svn.sourceforge.net/openautomation/?rev=832&view=rev
Author: mayerch
Date: 2012-05-20 13:21:37 +0000 (Sun, 20 May 2012)
Log Message:
-----------
* Ongoing development: Don't resize navbar when config makes them fixed and not dynamic
* Bug fix: for pages with type=text an "position:absolute" was set that would only be needed for 2d or 3d pages. This broke colspan/rowspan support for elements w/o a set rowspan
Modified Paths:
--------------
CometVisu/trunk/visu/structure/pure/_common.js
CometVisu/trunk/visu/structure/pure/break.js
CometVisu/trunk/visu/structure/pure/group.js
CometVisu/trunk/visu/structure/pure/iframe.js
CometVisu/trunk/visu/structure/pure/image.js
CometVisu/trunk/visu/structure/pure/imagetrigger.js
CometVisu/trunk/visu/structure/pure/include.js
CometVisu/trunk/visu/structure/pure/info.js
CometVisu/trunk/visu/structure/pure/infotrigger.js
CometVisu/trunk/visu/structure/pure/line.js
CometVisu/trunk/visu/structure/pure/multitrigger.js
CometVisu/trunk/visu/structure/pure/navbar.js
CometVisu/trunk/visu/structure/pure/page.js
CometVisu/trunk/visu/structure/pure/pagejump.js
CometVisu/trunk/visu/structure/pure/slide.js
CometVisu/trunk/visu/structure/pure/switch.js
CometVisu/trunk/visu/structure/pure/text.js
CometVisu/trunk/visu/structure/pure/toggle.js
CometVisu/trunk/visu/structure/pure/trigger.js
CometVisu/trunk/visu/structure/pure/unknown.js
CometVisu/trunk/visu/structure/pure/video.js
Modified: CometVisu/trunk/visu/structure/pure/_common.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/_common.js 2012-05-19 21:44:51 UTC (rev 831)
+++ CometVisu/trunk/visu/structure/pure/_common.js 2012-05-20 13:21:37 UTC (rev 832)
@@ -381,11 +381,11 @@
e.data.element.css( 'display', floorFilter ? '' : 'none' );
}
-function extractLayout( layout, defaultValues )
+function extractLayout( layout, type, defaultValues )
{
if (typeof defaultValue === 'undefined') defaultValues = [];
- var ret_val = 'position:absolute;';
+ var ret_val = (type == '2d') ? 'position:absolute;' : '';
if( layout.getAttribute('x' ) ) ret_val += 'left:' + layout.getAttribute('x' ) + ';';
else if( defaultValues[ 'x' ] ) ret_val += 'left:' + defaultValues[ 'x' ] + ';';
Modified: CometVisu/trunk/visu/structure/pure/break.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/break.js 2012-05-19 21:44:51 UTC (rev 831)
+++ CometVisu/trunk/visu/structure/pure/break.js 2012-05-20 13:21:37 UTC (rev 832)
@@ -16,7 +16,7 @@
*/
basicdesign.addCreator('break', {
- create: function( element, path ) {
+ create: function( element, path, flavour, type ) {
return $( '<br />' );
},
attributes: {},
Modified: CometVisu/trunk/visu/structure/pure/group.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/group.js 2012-05-19 21:44:51 UTC (rev 831)
+++ CometVisu/trunk/visu/structure/pure/group.js 2012-05-20 13:21:37 UTC (rev 832)
@@ -17,7 +17,7 @@
basicdesign.addCreator('group', {
maturity: Maturity.development,
- create: function( element, path, flavour ) {
+ create: function( element, path, flavour, type ) {
var $e = $(element);
var ret_val = $('<div class="widget clearfix group" />');
if( $e.attr('flavour') ) flavour = $e.attr('flavour');// sub design choice
Modified: CometVisu/trunk/visu/structure/pure/iframe.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/iframe.js 2012-05-19 21:44:51 UTC (rev 831)
+++ CometVisu/trunk/visu/structure/pure/iframe.js 2012-05-20 13:21:37 UTC (rev 832)
@@ -16,10 +16,10 @@
*/
basicdesign.addCreator('iframe', {
- create: function( element, path ) {
+ create: function( element, path, flavour, type ) {
var $e = $(element);
var layout = $e.children('layout')[0];
- var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
+ var style = layout ? 'style="' + extractLayout( layout, type ) + '"' : '';
var ret_val = $('<div class="widget iframe" ' + style + '/>');
ret_val.setWidgetLayout($e);
ret_val.append( extractLabel( $e.find('label')[0] ) );
Modified: CometVisu/trunk/visu/structure/pure/image.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/image.js 2012-05-19 21:44:51 UTC (rev 831)
+++ CometVisu/trunk/visu/structure/pure/image.js 2012-05-20 13:21:37 UTC (rev 832)
@@ -16,10 +16,10 @@
*/
basicdesign.addCreator('image', {
- create: function( element, path ) {
+ create: function( element, path, flavour, type ) {
var $e = $(element);
var layout = $e.children('layout')[0];
- var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
+ var style = layout ? 'style="' + extractLayout( layout, type ) + '"' : '';
var ret_val = $('<div class="widget clearfix image" ' + style + '/>');
ret_val.setWidgetLayout($e);
ret_val.append( extractLabel( $e.find('label')[0] ) );
Modified: CometVisu/trunk/visu/structure/pure/imagetrigger.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/imagetrigger.js 2012-05-19 21:44:51 UTC (rev 831)
+++ CometVisu/trunk/visu/structure/pure/imagetrigger.js 2012-05-20 13:21:37 UTC (rev 832)
@@ -16,7 +16,7 @@
*/
basicdesign.addCreator('imagetrigger', {
- create: function( element, path ) {
+ create: function( element, path, flavour, type ) {
var $e = $(element);
var ret_val = $('<div class="widget clearfix image" />');
ret_val.setWidgetLayout($e);
@@ -25,7 +25,7 @@
ret_val.append( extractLabel( $e.find('label')[0] ) );
var address = makeAddressList($e);
var layout = $e.children('layout')[0];
- var style = layout ? 'style="' + extractLayout( layout, {width:'100%'} ) + '"' : '';
+ var style = layout ? 'style="' + extractLayout( layout, type, {width:'100%'} ) + '"' : '';
var actor = '<div class="actor">';
if ( $e.attr('type')=='show' )
Modified: CometVisu/trunk/visu/structure/pure/include.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/include.js 2012-05-19 21:44:51 UTC (rev 831)
+++ CometVisu/trunk/visu/structure/pure/include.js 2012-05-20 13:21:37 UTC (rev 832)
@@ -17,7 +17,7 @@
basicdesign.addCreator('include', {
maturity: Maturity.development,
- create: function( page, path, flavour ) {
+ create: function( page, path, flavour, type ) {
var p = $.get( $(page).attr('src') );
var p = $.ajax({
url: $(page).attr('src'),
Modified: CometVisu/trunk/visu/structure/pure/info.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/info.js 2012-05-19 21:44:51 UTC (rev 831)
+++ CometVisu/trunk/visu/structure/pure/info.js 2012-05-20 13:21:37 UTC (rev 832)
@@ -19,7 +19,7 @@
create: function( element, path, flavour, type ) {
var $e = $(element);
var layout = $e.children('layout')[0];
- var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
+ var style = layout ? 'style="' + extractLayout( layout, type ) + '"' : '';
var ret_val = $('<div class="widget clearfix info" ' + style + ' />');
//type == '3d' && ret_val.data( extractLayout3d( layout ) ).bind( 'update3d', this.update3d );
type == '3d' && $(document).bind( 'update3d', {element: ret_val, layout: extractLayout3d( layout )}, this.update3d );
Modified: CometVisu/trunk/visu/structure/pure/infotrigger.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/infotrigger.js 2012-05-19 21:44:51 UTC (rev 831)
+++ CometVisu/trunk/visu/structure/pure/infotrigger.js 2012-05-20 13:21:37 UTC (rev 832)
@@ -16,10 +16,10 @@
*/
basicdesign.addCreator('infotrigger', {
- create: function( element, path ) {
+ create: function( element, path, flavour, type ) {
var $e = $(element);
var layout = $e.children('layout')[0];
- var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
+ var style = layout ? 'style="' + extractLayout( layout, type ) + '"' : '';
var ret_val = $('<div class="widget clearfix switch" ' + style + '/>');
ret_val.setWidgetLayout($e);
ret_val.append( extractLabel( $e.find('label')[0] ) );
Modified: CometVisu/trunk/visu/structure/pure/line.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/line.js 2012-05-19 21:44:51 UTC (rev 831)
+++ CometVisu/trunk/visu/structure/pure/line.js 2012-05-20 13:21:37 UTC (rev 832)
@@ -16,7 +16,7 @@
*/
basicdesign.addCreator('line', {
- create: function( element, path ) {
+ create: function( element, path, flavour, type ) {
return $( '<hr />' );
},
attributes: {},
Modified: CometVisu/trunk/visu/structure/pure/multitrigger.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/multitrigger.js 2012-05-19 21:44:51 UTC (rev 831)
+++ CometVisu/trunk/visu/structure/pure/multitrigger.js 2012-05-20 13:21:37 UTC (rev 832)
@@ -16,10 +16,10 @@
*/
basicdesign.addCreator('multitrigger', {
- create: function( element, path ) {
+ create: function( element, path, flavour, type ) {
var $e = $(element);
var layout = $e.children('layout')[0];
- var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
+ var style = layout ? 'style="' + extractLayout( layout, type ) + '"' : '';
var ret_val = $('<div class="widget clearfix switch" ' + style + '/>');
ret_val.setWidgetLayout($e)
ret_val.append( extractLabel( $e.find('label')[0] ) );
Modified: CometVisu/trunk/visu/structure/pure/navbar.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/navbar.js 2012-05-19 21:44:51 UTC (rev 831)
+++ CometVisu/trunk/visu/structure/pure/navbar.js 2012-05-20 13:21:37 UTC (rev 832)
@@ -16,7 +16,7 @@
*/
basicdesign.addCreator('navbar', {
- create: function( navbar, path, flavour ) {
+ create: function( navbar, path, flavour, type ) {
var $n = $(navbar);
var childs = $n.children();
var container = $( '<div class="clearfix"/>' );
@@ -25,7 +25,7 @@
container.append( create_pages( childs[i], path + '_' + i, flavour ) );
} );
- var dynamic = $n.attr('dynamic') ? true : false;
+ var dynamic = $n.attr('dynamic') == 'true' ? true : false;
var position = $n.attr('position') || 'left';
switch( position )
{
@@ -35,12 +35,12 @@
case 'left':
$('#navbarLeft').append( container );
- navbarSetSize( 'left', 300 ); // FIXME - only a temporal solution
+ if( dynamic ) navbarSetSize( 'left', 300 ); // FIXME - only a temporal solution
break;
case 'right':
$('#navbarRight').append( container );
- navbarSetSize( 'right', 300 ); // FIXME - only a temporal solution
+ if( dynamic ) navbarSetSize( 'right', 300 ); // FIXME - only a temporal solution
break;
case 'bottom':
Modified: CometVisu/trunk/visu/structure/pure/page.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/page.js 2012-05-19 21:44:51 UTC (rev 831)
+++ CometVisu/trunk/visu/structure/pure/page.js 2012-05-20 13:21:37 UTC (rev 832)
@@ -16,7 +16,7 @@
*/
basicdesign.addCreator('page', {
- create: function( page, path, flavour ) {
+ create: function( page, path, flavour, type ) {
var $p = $(page);
var address = {};
@@ -41,7 +41,7 @@
ret_val=$('');
} else { // default is visible
var layout = $p.children('layout')[0];
- var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
+ var style = layout ? 'style="' + extractLayout( layout, type ) + '"' : '';
ret_val = $('<div class="widget clearfix link pagelink" ' + style + '/>');
ret_val.setWidgetLayout($p);
var tst = $('<div ' + wstyle + '><a href="javascript:scrollToPage(\''+path+'\')">' + name + '</a></div>');
Modified: CometVisu/trunk/visu/structure/pure/pagejump.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/pagejump.js 2012-05-19 21:44:51 UTC (rev 831)
+++ CometVisu/trunk/visu/structure/pure/pagejump.js 2012-05-20 13:21:37 UTC (rev 832)
@@ -16,10 +16,10 @@
*/
basicdesign.addCreator('pagejump', {
- create: function( element, path ) {
+ create: function( element, path, flavour, type ) {
var $e = $(element);
var layout = $e.children('layout')[0];
- var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
+ var style = layout ? 'style="' + extractLayout( layout, type ) + '"' : '';
var target = $e.attr('target') ? $e.attr('target') : '0';
var ret_val = $('<div class="widget clearfix switch" ' + style + ' />');
ret_val.setWidgetLayout($e);
Modified: CometVisu/trunk/visu/structure/pure/slide.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/slide.js 2012-05-19 21:44:51 UTC (rev 831)
+++ CometVisu/trunk/visu/structure/pure/slide.js 2012-05-20 13:21:37 UTC (rev 832)
@@ -16,10 +16,10 @@
*/
basicdesign.addCreator('slide', {
- create: function( element, path ) {
+ create: function( element, path, flavour, type ) {
var $e = $(element);
var layout = $e.children('layout')[0];
- var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
+ var style = layout ? 'style="' + extractLayout( layout, type ) + '"' : '';
var ret_val = $('<div class="widget clearfix slide" ' + style + ' />');
ret_val.setWidgetLayout($e).makeWidgetLabel($e);
var address = makeAddressList($e);
Modified: CometVisu/trunk/visu/structure/pure/switch.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/switch.js 2012-05-19 21:44:51 UTC (rev 831)
+++ CometVisu/trunk/visu/structure/pure/switch.js 2012-05-20 13:21:37 UTC (rev 832)
@@ -16,10 +16,10 @@
*/
basicdesign.addCreator('switch', {
- create: function( element, path ) {
+ create: function( element, path, flavour, type ) {
var $e = $(element);
var layout = $e.children('layout')[0];
- var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
+ var style = layout ? 'style="' + extractLayout( layout, type ) + '"' : '';
var ret_val = $('<div class="widget clearfix switch" ' + style + '/>');
ret_val.setWidgetLayout($e)
var label = extractLabel( $e.find('label')[0] );
Modified: CometVisu/trunk/visu/structure/pure/text.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/text.js 2012-05-19 21:44:51 UTC (rev 831)
+++ CometVisu/trunk/visu/structure/pure/text.js 2012-05-20 13:21:37 UTC (rev 832)
@@ -16,10 +16,10 @@
*/
basicdesign.addCreator('text', {
- create: function( element, path, flavour ) {
+ create: function( element, path, flavour, type ) {
var $e = $(element);
var layout = $e.children('layout')[0];
- var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
+ var style = layout ? 'style="' + extractLayout( layout, type ) + '"' : '';
var ret_val = $('<div class="widget clearfix text" ' + style + '/>');
ret_val.setWidgetLayout($e);
var style = '';
Modified: CometVisu/trunk/visu/structure/pure/toggle.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/toggle.js 2012-05-19 21:44:51 UTC (rev 831)
+++ CometVisu/trunk/visu/structure/pure/toggle.js 2012-05-20 13:21:37 UTC (rev 832)
@@ -16,10 +16,10 @@
*/
basicdesign.addCreator('toggle', {
- create: function( element, path ) {
+ create: function( element, path, flavour, type ) {
var $e = $(element);
var layout = $e.children('layout')[0];
- var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
+ var style = layout ? 'style="' + extractLayout( layout, type ) + '"' : '';
var ret_val = $('<div class="widget clearfix toggle" ' + style + '/>');
ret_val.setWidgetLayout($e);
var label = extractLabel( $e.find('label')[0] );
Modified: CometVisu/trunk/visu/structure/pure/trigger.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/trigger.js 2012-05-19 21:44:51 UTC (rev 831)
+++ CometVisu/trunk/visu/structure/pure/trigger.js 2012-05-20 13:21:37 UTC (rev 832)
@@ -16,10 +16,10 @@
*/
basicdesign.addCreator('trigger', {
- create: function( element, path ) {
+ create: function( element, path, flavour, type ) {
var $e = $(element);
var layout = $e.children('layout')[0];
- var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
+ var style = layout ? 'style="' + extractLayout( layout, type ) + '"' : '';
var value = $e.attr('value') ? $e.attr('value') : 0;
var ret_val = $('<div class="widget clearfix switch" ' + style + ' />');
ret_val.setWidgetLayout($e);
Modified: CometVisu/trunk/visu/structure/pure/unknown.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/unknown.js 2012-05-19 21:44:51 UTC (rev 831)
+++ CometVisu/trunk/visu/structure/pure/unknown.js 2012-05-20 13:21:37 UTC (rev 832)
@@ -16,7 +16,7 @@
*/
basicdesign.addCreator('unknown', {
- create: function( element, path ) {
+ create: function( element, path, flavour, type ) {
var ret_val = $('<div class="widget clearfix" />');
ret_val.append( '<pre>unknown: ' + element.nodeName + '</pre>' );
return ret_val;
Modified: CometVisu/trunk/visu/structure/pure/video.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/video.js 2012-05-19 21:44:51 UTC (rev 831)
+++ CometVisu/trunk/visu/structure/pure/video.js 2012-05-20 13:21:37 UTC (rev 832)
@@ -16,10 +16,10 @@
*/
basicdesign.addCreator('video', {
- create: function( element, path ) {
+ create: function( element, path, flavour, type ) {
var $e = $(element);
var layout = $e.children('layout')[0];
- var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
+ var style = layout ? 'style="' + extractLayout( layout, type ) + '"' : '';
var ret_val = $('<div class="widget clearfix video" ' + style + '/>');
ret_val.setWidgetLayout($e);
ret_val.append( extractLabel( $e.find('label')[0] ) );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|