|
From: <j-...@us...> - 2012-02-08 18:38:51
|
Revision: 690
http://openautomation.svn.sourceforge.net/openautomation/?rev=690&view=rev
Author: j-n-k
Date: 2012-02-08 18:38:45 +0000 (Wed, 08 Feb 2012)
Log Message:
-----------
1) Fix for missing colspan/rowspan-attributes in <page>
2) performance improvement in colspan/rowspan calculation
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2012-02-05 19:49:35 UTC (rev 689)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2012-02-08 18:38:45 UTC (rev 690)
@@ -186,6 +186,8 @@
ga: { type: 'addr', required: false },
visible: { type: 'string', required: false },
type: { type: 'string', required: false },
+ colspan: { type: 'numeric', required: false },
+ rowspan: { type: 'numeric', required: false }
backdrop: { type: 'string', required: false }
},
elements: {
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-02-05 19:49:35 UTC (rev 689)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-02-08 18:38:45 UTC (rev 690)
@@ -142,7 +142,7 @@
function rowspanClass(rowspan) {
var className = 'rowspan'+ rowspan;
- if ( $('<div class="' + className + '" />').height() == 0 ) {
+ if ( !$('head').data(className) ) {
var dummyDiv = $('<div class="clearfix" id="calcrowspan"><div id="containerDiv" class="widget_container"><div class="widget clearfix text" id="innerDiv" /></div></div>')
.appendTo(document.body).show();
@@ -152,7 +152,7 @@
// append css style
- $('head').append('<style>.rowspan' + rowspan + ' { height: ' + rowspan*Math.round(singleHeight) + 'px; overflow:hidden;} </style>');
+ $('head').append('<style>.rowspan' + rowspan + ' { height: ' + rowspan*Math.round(singleHeight) + 'px; overflow:hidden;} </style>').data(className, 1);
}
return className;
@@ -161,7 +161,7 @@
function innerRowspanClass(rowspan) {
var className = 'innerrowspan'+ rowspan;
- if ( $('<div class="' + className + '" />').height() == 0 ) {
+ if ( !$('head').data(className)) {
var dummyDiv = $('<div class="clearfix" id="calcinnerrowspan"><div id="containerDiv" class="widget_container"><div class="widget clearfix text" id="innerDiv" /></div></div>')
.appendTo(document.body).show();
$('#containerDiv').addClass(rowspanClass(rowspan));
@@ -175,7 +175,8 @@
$('#calcinnerrowspan').remove();
// append css style
- $('head').append('<style>.innerrowspan' + rowspan + ' { height: ' + innerHeight + 'px;} </style>');
+ $('head').append('<style>.innerrowspan' + rowspan + ' { height: ' + innerHeight + 'px;} </style>').data(className, 1);
+
}
return className;
@@ -184,7 +185,7 @@
function colspanClass(colspan) {
var className = 'colspan'+ colspan;
- if ( $('<div class="' + className + '" />').width() == 0 ) {
+ if ( !$('head').data(className) ) {
var singleWidth=0;
// loop over all stylesheets and classes and find .widget_container
@@ -211,7 +212,7 @@
}
$('head').append('<style>.colspan' + colspan + ' { width: ' +
- totalWidth + '%; overflow:hidden;} </style>');
+ totalWidth + '%; overflow:hidden;} </style>').data(className, 1);
}
return className;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|