From: <ken...@us...> - 2009-02-11 17:18:29
|
Revision: 1231 http://andro.svn.sourceforge.net/andro/?rev=1231&view=rev Author: kendowns Date: 2009-02-11 17:18:26 +0000 (Wed, 11 Feb 2009) Log Message: ----------- Corrections to x6select: column widths, and assignment of value to input. Modified Paths: -------------- trunk/andro/clib/x6.js Modified: trunk/andro/clib/x6.js =================================================================== --- trunk/andro/clib/x6.js 2009-02-11 17:17:20 UTC (rev 1230) +++ trunk/andro/clib/x6.js 2009-02-11 17:18:26 UTC (rev 1231) @@ -3756,7 +3756,7 @@ if(this.div) { var row = $(this.tbody).find('.hilight>div:first'); if(row.length > 0) { - $(inp).val($(row).html()); + $(inp).val($(row).html().htmlEdit()); } } }, @@ -3924,7 +3924,7 @@ //$(this.input).prop( // {value:this.parentNode.firstChild.innerHTML} //); - $(this.input).val(this.firstChild.innerHTML); + $(this.input).val(this.firstChild.innerHTML.htmlEdit()); x6inputs.afterBlurner(this.input); x6inputs.x6select.hide(); setTimeout( @@ -3959,9 +3959,23 @@ var totalWidth = 0; var colCount = $(this.tbody).find('div.x6selrow:last div').length; for(var x = 0; x<= colCount; x++) { - var width = $(this.div).find('#x6head'+x).width(); - totalWidth+=width+8; - $(this.div).find('.tbody .x6col'+x).width(width); + if(x==colCount) { + maxWidth=15; + } + else { + var maxWidth=0; + $(this.tbody).find('div.x6col'+x).each( + function() { + if($(this).width() > maxWidth) + maxWidth = $(this).width(); + } + ); + } + //var width = $(this.div).find('#x6head'+x).width(); + totalWidth+=maxWidth+8; + //$(this.div).find('.tbody .x6col'+x).width(width); + $(this.div).find('.tbody .x6col'+x).width(maxWidth); + $(this.div).find('#x6head'+x).width(maxWidth); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |