You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by js...@apache.org on 2009/03/19 11:37:20 UTC

svn commit: r755904 [31/40] - in /camel/trunk/components/camel-web/src/main/webapp/js/dojox: ./ analytics/ analytics/logger/ analytics/plugins/ analytics/profiles/ atom/ atom/io/ atom/widget/ atom/widget/nls/ atom/widget/nls/cs/ atom/widget/nls/de/ ato...

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/scroller.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/scroller.js?rev=755904&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/scroller.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/scroller.js Thu Mar 19 10:37:00 2009
@@ -0,0 +1,373 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.grid.compat._grid.scroller"]){
+dojo._hasResource["dojox.grid.compat._grid.scroller"]=true;
+dojo.provide("dojox.grid.compat._grid.scroller");
+dojo.declare("dojox.grid.scroller.base",null,{constructor:function(){
+this.pageHeights=[];
+this.stack=[];
+},rowCount:0,defaultRowHeight:10,keepRows:100,contentNode:null,scrollboxNode:null,defaultPageHeight:0,keepPages:10,pageCount:0,windowHeight:0,firstVisibleRow:0,lastVisibleRow:0,page:0,pageTop:0,init:function(_1,_2,_3){
+switch(arguments.length){
+case 3:
+this.rowsPerPage=_3;
+case 2:
+this.keepRows=_2;
+case 1:
+this.rowCount=_1;
+}
+this.defaultPageHeight=this.defaultRowHeight*this.rowsPerPage;
+this.pageCount=Math.ceil(this.rowCount/this.rowsPerPage);
+this.setKeepInfo(this.keepRows);
+this.invalidate();
+if(this.scrollboxNode){
+this.scrollboxNode.scrollTop=0;
+this.scroll(0);
+this.scrollboxNode.onscroll=dojo.hitch(this,"onscroll");
+}
+},setKeepInfo:function(_4){
+this.keepRows=_4;
+this.keepPages=!this.keepRows?this.keepRows:Math.max(Math.ceil(this.keepRows/this.rowsPerPage),2);
+},invalidate:function(){
+this.invalidateNodes();
+this.pageHeights=[];
+this.height=(this.pageCount?(this.pageCount-1)*this.defaultPageHeight+this.calcLastPageHeight():0);
+this.resize();
+},updateRowCount:function(_5){
+this.invalidateNodes();
+this.rowCount=_5;
+var _6=this.pageCount;
+this.pageCount=Math.ceil(this.rowCount/this.rowsPerPage);
+if(this.pageCount<_6){
+for(var i=_6-1;i>=this.pageCount;i--){
+this.height-=this.getPageHeight(i);
+delete this.pageHeights[i];
+}
+}else{
+if(this.pageCount>_6){
+this.height+=this.defaultPageHeight*(this.pageCount-_6-1)+this.calcLastPageHeight();
+}
+}
+this.resize();
+},pageExists:function(_8){
+},measurePage:function(_9){
+},positionPage:function(_a,_b){
+},repositionPages:function(_c){
+},installPage:function(_d){
+},preparePage:function(_e,_f,_10){
+},renderPage:function(_11){
+},removePage:function(_12){
+},pacify:function(_13){
+},pacifying:false,pacifyTicks:200,setPacifying:function(_14){
+if(this.pacifying!=_14){
+this.pacifying=_14;
+this.pacify(this.pacifying);
+}
+},startPacify:function(){
+this.startPacifyTicks=new Date().getTime();
+},doPacify:function(){
+var _15=(new Date().getTime()-this.startPacifyTicks)>this.pacifyTicks;
+this.setPacifying(true);
+this.startPacify();
+return _15;
+},endPacify:function(){
+this.setPacifying(false);
+},resize:function(){
+if(this.scrollboxNode){
+this.windowHeight=this.scrollboxNode.clientHeight;
+}
+dojox.grid.setStyleHeightPx(this.contentNode,this.height);
+},calcLastPageHeight:function(){
+if(!this.pageCount){
+return 0;
+}
+var _16=this.pageCount-1;
+var _17=((this.rowCount%this.rowsPerPage)||(this.rowsPerPage))*this.defaultRowHeight;
+this.pageHeights[_16]=_17;
+return _17;
+},updateContentHeight:function(_18){
+this.height+=_18;
+this.resize();
+},updatePageHeight:function(_19){
+if(this.pageExists(_19)){
+var oh=this.getPageHeight(_19);
+var h=(this.measurePage(_19))||(oh);
+this.pageHeights[_19]=h;
+if((h)&&(oh!=h)){
+this.updateContentHeight(h-oh);
+this.repositionPages(_19);
+}
+}
+},rowHeightChanged:function(_1c){
+this.updatePageHeight(Math.floor(_1c/this.rowsPerPage));
+},invalidateNodes:function(){
+while(this.stack.length){
+this.destroyPage(this.popPage());
+}
+},createPageNode:function(){
+var p=document.createElement("div");
+p.style.position="absolute";
+p.style[dojo._isBodyLtr()?"left":"right"]="0";
+return p;
+},getPageHeight:function(_1e){
+var ph=this.pageHeights[_1e];
+return (ph!==undefined?ph:this.defaultPageHeight);
+},pushPage:function(_20){
+return this.stack.push(_20);
+},popPage:function(){
+return this.stack.shift();
+},findPage:function(_21){
+var i=0,h=0;
+for(var ph=0;i<this.pageCount;i++,h+=ph){
+ph=this.getPageHeight(i);
+if(h+ph>=_21){
+break;
+}
+}
+this.page=i;
+this.pageTop=h;
+},buildPage:function(_25,_26,_27){
+this.preparePage(_25,_26);
+this.positionPage(_25,_27);
+this.installPage(_25);
+this.renderPage(_25);
+this.pushPage(_25);
+},needPage:function(_28,_29){
+var h=this.getPageHeight(_28),oh=h;
+if(!this.pageExists(_28)){
+this.buildPage(_28,this.keepPages&&(this.stack.length>=this.keepPages),_29);
+h=this.measurePage(_28)||h;
+this.pageHeights[_28]=h;
+if(h&&(oh!=h)){
+this.updateContentHeight(h-oh);
+}
+}else{
+this.positionPage(_28,_29);
+}
+return h;
+},onscroll:function(){
+this.scroll(this.scrollboxNode.scrollTop);
+},scroll:function(_2c){
+this.startPacify();
+this.findPage(_2c);
+var h=this.height;
+var b=this.getScrollBottom(_2c);
+for(var p=this.page,y=this.pageTop;(p<this.pageCount)&&((b<0)||(y<b));p++){
+y+=this.needPage(p,y);
+}
+this.firstVisibleRow=this.getFirstVisibleRow(this.page,this.pageTop,_2c);
+this.lastVisibleRow=this.getLastVisibleRow(p-1,y,b);
+if(h!=this.height){
+this.repositionPages(p-1);
+}
+this.endPacify();
+},getScrollBottom:function(_31){
+return (this.windowHeight>=0?_31+this.windowHeight:-1);
+},processNodeEvent:function(e,_33){
+var t=e.target;
+while(t&&(t!=_33)&&t.parentNode&&(t.parentNode.parentNode!=_33)){
+t=t.parentNode;
+}
+if(!t||!t.parentNode||(t.parentNode.parentNode!=_33)){
+return false;
+}
+var _35=t.parentNode;
+e.topRowIndex=_35.pageIndex*this.rowsPerPage;
+e.rowIndex=e.topRowIndex+dojox.grid.indexInParent(t);
+e.rowTarget=t;
+return true;
+},processEvent:function(e){
+return this.processNodeEvent(e,this.contentNode);
+},dummy:0});
+dojo.declare("dojox.grid.scroller",dojox.grid.scroller.base,{constructor:function(){
+this.pageNodes=[];
+},renderRow:function(_37,_38){
+},removeRow:function(_39){
+},getDefaultNodes:function(){
+return this.pageNodes;
+},getDefaultPageNode:function(_3a){
+return this.getDefaultNodes()[_3a];
+},positionPageNode:function(_3b,_3c){
+_3b.style.top=_3c+"px";
+},getPageNodePosition:function(_3d){
+return _3d.offsetTop;
+},repositionPageNodes:function(_3e,_3f){
+var _40=0;
+for(var i=0;i<this.stack.length;i++){
+_40=Math.max(this.stack[i],_40);
+}
+var n=_3f[_3e];
+var y=(n?this.getPageNodePosition(n)+this.getPageHeight(_3e):0);
+for(var p=_3e+1;p<=_40;p++){
+n=_3f[p];
+if(n){
+if(this.getPageNodePosition(n)==y){
+return;
+}
+this.positionPage(p,y);
+}
+y+=this.getPageHeight(p);
+}
+},invalidatePageNode:function(_45,_46){
+var p=_46[_45];
+if(p){
+delete _46[_45];
+this.removePage(_45,p);
+dojox.grid.cleanNode(p);
+p.innerHTML="";
+}
+return p;
+},preparePageNode:function(_48,_49,_4a){
+var p=(_49===null?this.createPageNode():this.invalidatePageNode(_49,_4a));
+p.pageIndex=_48;
+p.id=(this._pageIdPrefix||"")+"page-"+_48;
+_4a[_48]=p;
+},pageExists:function(_4c){
+return Boolean(this.getDefaultPageNode(_4c));
+},measurePage:function(_4d){
+var p=this.getDefaultPageNode(_4d);
+var h=p.offsetHeight;
+if(!this._defaultRowHeight){
+if(p){
+this._defaultRowHeight=8;
+var fr=p.firstChild;
+if(fr){
+var _51=dojo.doc.createTextNode("T");
+fr.appendChild(_51);
+this._defaultRowHeight=fr.offsetHeight;
+fr.removeChild(_51);
+}
+}
+}
+return (this.rowsPerPage==h)?(h*this._defaultRowHeight):h;
+},positionPage:function(_52,_53){
+this.positionPageNode(this.getDefaultPageNode(_52),_53);
+},repositionPages:function(_54){
+this.repositionPageNodes(_54,this.getDefaultNodes());
+},preparePage:function(_55,_56){
+this.preparePageNode(_55,(_56?this.popPage():null),this.getDefaultNodes());
+},installPage:function(_57){
+this.contentNode.appendChild(this.getDefaultPageNode(_57));
+},destroyPage:function(_58){
+var p=this.invalidatePageNode(_58,this.getDefaultNodes());
+dojox.grid.removeNode(p);
+},renderPage:function(_5a){
+var _5b=this.pageNodes[_5a];
+for(var i=0,j=_5a*this.rowsPerPage;(i<this.rowsPerPage)&&(j<this.rowCount);i++,j++){
+this.renderRow(j,_5b);
+}
+},removePage:function(_5e){
+for(var i=0,j=_5e*this.rowsPerPage;i<this.rowsPerPage;i++,j++){
+this.removeRow(j);
+}
+},getPageRow:function(_61){
+return _61*this.rowsPerPage;
+},getLastPageRow:function(_62){
+return Math.min(this.rowCount,this.getPageRow(_62+1))-1;
+},getFirstVisibleRowNodes:function(_63,_64,_65,_66){
+var row=this.getPageRow(_63);
+var _68=dojox.grid.divkids(_66[_63]);
+for(var i=0,l=_68.length;i<l&&_64<_65;i++,row++){
+_64+=_68[i].offsetHeight;
+}
+return (row?row-1:row);
+},getFirstVisibleRow:function(_6b,_6c,_6d){
+if(!this.pageExists(_6b)){
+return 0;
+}
+return this.getFirstVisibleRowNodes(_6b,_6c,_6d,this.getDefaultNodes());
+},getLastVisibleRowNodes:function(_6e,_6f,_70,_71){
+var row=this.getLastPageRow(_6e);
+var _73=dojox.grid.divkids(_71[_6e]);
+for(var i=_73.length-1;i>=0&&_6f>_70;i--,row--){
+_6f-=_73[i].offsetHeight;
+}
+return row+1;
+},getLastVisibleRow:function(_75,_76,_77){
+if(!this.pageExists(_75)){
+return 0;
+}
+return this.getLastVisibleRowNodes(_75,_76,_77,this.getDefaultNodes());
+},findTopRowForNodes:function(_78,_79){
+var _7a=dojox.grid.divkids(_79[this.page]);
+for(var i=0,l=_7a.length,t=this.pageTop,h;i<l;i++){
+h=_7a[i].offsetHeight;
+t+=h;
+if(t>=_78){
+this.offset=h-(t-_78);
+return i+this.page*this.rowsPerPage;
+}
+}
+return -1;
+},findScrollTopForNodes:function(_7f,_80){
+var _81=Math.floor(_7f/this.rowsPerPage);
+var t=0;
+for(var i=0;i<_81;i++){
+t+=this.getPageHeight(i);
+}
+this.pageTop=t;
+this.needPage(_81,this.pageTop);
+var _84=dojox.grid.divkids(_80[_81]);
+var r=_7f-this.rowsPerPage*_81;
+for(var i=0,l=_84.length;i<l&&i<r;i++){
+t+=_84[i].offsetHeight;
+}
+return t;
+},findTopRow:function(_87){
+return this.findTopRowForNodes(_87,this.getDefaultNodes());
+},findScrollTop:function(_88){
+return this.findScrollTopForNodes(_88,this.getDefaultNodes());
+},dummy:0});
+dojo.declare("dojox.grid.scroller.columns",dojox.grid.scroller,{constructor:function(_89){
+this.setContentNodes(_89);
+},setContentNodes:function(_8a){
+this.contentNodes=_8a;
+this.colCount=(this.contentNodes?this.contentNodes.length:0);
+this.pageNodes=[];
+for(var i=0;i<this.colCount;i++){
+this.pageNodes[i]=[];
+}
+},getDefaultNodes:function(){
+return this.pageNodes[0]||[];
+},scroll:function(_8c){
+if(this.colCount){
+dojox.grid.scroller.prototype.scroll.call(this,_8c);
+}
+},resize:function(){
+if(this.scrollboxNode){
+this.windowHeight=this.scrollboxNode.clientHeight;
+}
+for(var i=0;i<this.colCount;i++){
+dojox.grid.setStyleHeightPx(this.contentNodes[i],this.height);
+}
+},positionPage:function(_8e,_8f){
+for(var i=0;i<this.colCount;i++){
+this.positionPageNode(this.pageNodes[i][_8e],_8f);
+}
+},preparePage:function(_91,_92){
+var p=(_92?this.popPage():null);
+for(var i=0;i<this.colCount;i++){
+this.preparePageNode(_91,p,this.pageNodes[i]);
+}
+},installPage:function(_95){
+for(var i=0;i<this.colCount;i++){
+this.contentNodes[i].appendChild(this.pageNodes[i][_95]);
+}
+},destroyPage:function(_97){
+for(var i=0;i<this.colCount;i++){
+dojox.grid.removeNode(this.invalidatePageNode(_97,this.pageNodes[i]));
+}
+},renderPage:function(_99){
+var _9a=[];
+for(var i=0;i<this.colCount;i++){
+_9a[i]=this.pageNodes[i][_99];
+}
+for(var i=0,j=_99*this.rowsPerPage;(i<this.rowsPerPage)&&(j<this.rowCount);i++,j++){
+this.renderRow(j,_9a);
+}
+}});
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/scroller.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/selection.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/selection.js?rev=755904&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/selection.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/selection.js Thu Mar 19 10:37:00 2009
@@ -0,0 +1,153 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.grid.compat._grid.selection"]){
+dojo._hasResource["dojox.grid.compat._grid.selection"]=true;
+dojo.provide("dojox.grid.compat._grid.selection");
+dojo.declare("dojox.grid.selection",null,{constructor:function(_1){
+this.grid=_1;
+this.selected=[];
+},multiSelect:true,selected:null,updating:0,selectedIndex:-1,onCanSelect:function(_2){
+return this.grid.onCanSelect(_2);
+},onCanDeselect:function(_3){
+return this.grid.onCanDeselect(_3);
+},onSelected:function(_4){
+return this.grid.onSelected(_4);
+},onDeselected:function(_5){
+return this.grid.onDeselected(_5);
+},onChanging:function(){
+},onChanged:function(){
+return this.grid.onSelectionChanged();
+},isSelected:function(_6){
+return this.selected[_6];
+},getFirstSelected:function(){
+for(var i=0,l=this.selected.length;i<l;i++){
+if(this.selected[i]){
+return i;
+}
+}
+return -1;
+},getNextSelected:function(_9){
+for(var i=_9+1,l=this.selected.length;i<l;i++){
+if(this.selected[i]){
+return i;
+}
+}
+return -1;
+},getSelected:function(){
+var _c=[];
+for(var i=0,l=this.selected.length;i<l;i++){
+if(this.selected[i]){
+_c.push(i);
+}
+}
+return _c;
+},getSelectedCount:function(){
+var c=0;
+for(var i=0;i<this.selected.length;i++){
+if(this.selected[i]){
+c++;
+}
+}
+return c;
+},beginUpdate:function(){
+if(this.updating==0){
+this.onChanging();
+}
+this.updating++;
+},endUpdate:function(){
+this.updating--;
+if(this.updating==0){
+this.onChanged();
+}
+},select:function(_11){
+this.unselectAll(_11);
+this.addToSelection(_11);
+},addToSelection:function(_12){
+_12=Number(_12);
+if(this.selected[_12]){
+this.selectedIndex=_12;
+}else{
+if(this.onCanSelect(_12)!==false){
+this.selectedIndex=_12;
+this.beginUpdate();
+this.selected[_12]=true;
+this.grid.onSelected(_12);
+this.endUpdate();
+}
+}
+},deselect:function(_13){
+_13=Number(_13);
+if(this.selectedIndex==_13){
+this.selectedIndex=-1;
+}
+if(this.selected[_13]){
+if(this.onCanDeselect(_13)===false){
+return;
+}
+this.beginUpdate();
+delete this.selected[_13];
+this.grid.onDeselected(_13);
+this.endUpdate();
+}
+},setSelected:function(_14,_15){
+this[(_15?"addToSelection":"deselect")](_14);
+},toggleSelect:function(_16){
+this.setSelected(_16,!this.selected[_16]);
+},insert:function(_17){
+this.selected.splice(_17,0,false);
+if(this.selectedIndex>=_17){
+this.selectedIndex++;
+}
+},remove:function(_18){
+this.selected.splice(_18,1);
+if(this.selectedIndex>=_18){
+this.selectedIndex--;
+}
+},unselectAll:function(_19){
+for(var i in this.selected){
+if((i!=_19)&&(this.selected[i]===true)){
+this.deselect(i);
+}
+}
+},shiftSelect:function(_1b,_1c){
+var s=(_1b>=0?_1b:_1c),e=_1c;
+if(s>e){
+e=s;
+s=_1c;
+}
+for(var i=s;i<=e;i++){
+this.addToSelection(i);
+}
+},clickSelect:function(_20,_21,_22){
+this.beginUpdate();
+if(!this.multiSelect){
+this.select(_20);
+}else{
+var _23=this.selectedIndex;
+if(!_21){
+this.unselectAll(_20);
+}
+if(_22){
+this.shiftSelect(_23,_20);
+}else{
+if(_21){
+this.toggleSelect(_20);
+}else{
+this.addToSelection(_20);
+}
+}
+}
+this.endUpdate();
+},clickSelectEvent:function(e){
+this.clickSelect(e.rowIndex,dojo.dnd.getCopyKeyState(e),e.shiftKey);
+},clear:function(){
+this.beginUpdate();
+this.unselectAll();
+this.endUpdate();
+}});
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/selection.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/soriaGrid.css
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/soriaGrid.css?rev=755904&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/soriaGrid.css (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/soriaGrid.css Thu Mar 19 10:37:00 2009
@@ -0,0 +1,212 @@
+.soria .dojoxGrid {
+	position: relative;
+	background-color: #e9e9e9;
+	font-size: 0.85em; 
+	-moz-outline-style: none;
+	outline: none;
+	overflow: hidden;
+	height: 0;
+}
+.soria .dojoxGrid table {
+	padding: 0;
+}
+.soria .dojoxGrid td {
+	-moz-outline: none;
+}
+.soria .dojoxGrid-master-header {
+	position: relative;
+}
+.soria .dojoxGrid-master-view  {
+	position: relative;
+}
+.soria .dojoxGrid-view {
+	position: absolute;
+	overflow: hidden;
+}
+.soria .dojoxGrid-header {
+	position: absolute;
+	overflow: hidden;
+}
+.soria .dojoxGrid-header {
+	background-color:  #e9e9e9;
+}
+.soria .dojoxGrid-header table {
+	text-align: center;
+}
+.soria .dojoxGrid-header .dojoxGrid-cell-content {
+	text-align: center;
+}
+.soria .dojoxGrid-header .dojoxGrid-cell { 
+	border: 1px solid transparent;
+	
+	border-color: white #ACA899 #919191 white;
+	background: url(../../../../dijit/themes/soria/images/titleBar.png) #e9e9e9 repeat-x top;
+	padding-bottom: 2px;
+	color: #000 !important;
+}
+.soria .dojoxGrid-header .dojoxGrid-cell-over {
+	background: url(../../../../dijit/themes/soria/images/titleBarActive.png) #e9e9e9 repeat-x top;
+}
+.soria .dojoxGrid-sort-down {
+	background: url(images/grid_sort_down.gif) right no-repeat;
+	padding-left: 0px;
+	margin-left: 0px;
+}
+.soria .dojoxGrid-sort-up {
+	background: url(images/grid_sort_up.gif) right no-repeat;
+	padding-left: 0px;
+	margin-left: 0px;
+}
+.soria .gridArrowButtonChar {
+	display:none !important;
+}
+.dijit_a11y .gridArrowButtonChar {
+	display:inline !important;
+}
+.soria .dojoxGrid-scrollbox {
+	position: relative;
+	overflow: scroll;
+	background-color: #fefefe;
+	width: 100%;
+}
+.soria .dojoxGrid-content {
+	position: relative;
+	overflow: hidden;
+	 -moz-outline-style: none;
+	outline: none;
+}
+.soria .dojoxGrid-rowbar { 
+	border: none;
+	
+	background: url(images/titleBar.png) #e9e9e9 repeat-y right;
+	border-right: 1px solid #cccccc;
+	padding: 0px;
+}
+.soria .dojoxGrid-rowbar-inner {
+	border: none;
+	border-bottom: 1px solid #cccccc;
+}
+.soria .dojoxGrid-rowbar-over {
+	background: url(images/titleBarActive.png) #e9e9e9 repeat-y right;
+}
+.soria .dojoxGrid-rowbar-selected {
+	background-color: #D9E8F9;
+	background-image: none;
+	background: url(../../../../dijit/themes/soria/images/titleBar.png) #dddddd repeat-x top;
+	border-right: 1px solid #cccccc;
+	background-position: center;
+	background-repeat: no-repeat;
+}
+.soria .dojoxGrid-row {
+	position: relative;
+	width: 9000em;
+}
+.soria .dojoxGrid-row {
+	border: none;
+	border-left: none;
+	border-right: none;
+	background-color: white;
+	border-top: none;
+}
+.soria .dojoxGrid-row-over {
+	border-top-color: #cccccc;
+	border-bottom-color: #cccccc;
+}
+.soria .dojoxGrid-row-over .dojoxGrid-cell {
+	background-color: #60a1ea; 
+	color:#fff;
+}
+.soria .dojoxGrid-row-odd {
+	background-color: #f2f5f9;
+	
+}
+.soria .dojoxGrid-row-selected {
+	background-color: #aec7e3;
+}
+.soria .dojoxGrid-row-table {
+	table-layout: fixed;
+	width: 0;
+	border-collapse: collapse;
+}
+.soria .dojoxGrid-invisible {
+	visibility: hidden;
+}		
+.soria .Xdojo-ie .dojoxGrid-invisible {
+	display: none;
+}		
+.soria .dojoxGrid-invisible td, .dojoxGrid-header .dojoxGrid-invisible td {
+	border-top-width: 0;
+	border-bottom-width: 0;
+	padding-top: 0;
+	padding-bottom: 0;
+	height: 0;
+	overflow: hidden;
+}
+.soria .dojoxGrid-cell {
+	border: 1px dotted #D5CDB5;
+	padding: 3px 3px 3px 3px;
+	text-align: left;
+	overflow: hidden;
+}
+.dj_ie6 .soria .dojoxGrid-cell {
+	border: 1px solid white;
+	border-right: 1px solid #D5CDB5;
+}
+.soria .dojoxGrid-cell-focus {
+	border: 1px dotted #a6a6a6;
+}
+.soria .dojoxGrid-cell-over {
+	border: 1px dotted #a6a6a6;
+}
+.soria .dojoxGrid-cell-focus.dojoxGrid-cell-over {
+	border: 1px dotted #595959;
+}
+.soria .dojoxGrid-cell-clip {
+	width: 100%;
+	overflow: hidden;
+	white-space:nowrap;
+	text-overflow: ellipsis;
+}
+.soria .dojoxGrid-row-editing td {
+	
+	background-color: #60a1ea; 
+	
+}
+.soria .dojoxGrid-row-inserting td {
+	background-color: #F4FFF4;
+}
+.soria .dojoxGrid-row-inflight td {
+	background-color: #F2F7B7;
+}
+.soria .dojoxGrid-row-error td {
+	background-color: #F8B8B6;
+}
+.soria .dojoxGrid-input,
+.soria .dojoxGrid-select,
+.soria .dojoxGrid-textarea {
+	margin: 0;
+	padding: 0px;
+	border-style: none;
+	width: 100%;
+	font-size: 100%;
+	font-family: inherit;
+}
+.dojoxGrid-hidden-focus {
+	position: absolute;
+	left: -1000px;
+	top: -1000px;
+	height: 0px, width: 0px;
+}
+.dijit_a11y .dojoxGrid-rowbar-selected { 
+	border-top: 1px solid white;
+	border-bottom: 1px dashed black;
+	border-top: 0;
+	background: none;
+}
+.dijit_a11y .dojoxGrid-rowbar-selected .dojoxGrid-rowbar-inner {
+	border: 0;
+	border-top: 1px solid white;
+}
+.dijit_a11y .dojoxGrid-row-selected {
+	border-bottom: 1px dashed black;
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/soriaGrid.css
------------------------------------------------------------------------------
    svn:mime-type = text/css

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/tundraGrid.css
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/tundraGrid.css?rev=755904&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/tundraGrid.css (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/tundraGrid.css Thu Mar 19 10:37:00 2009
@@ -0,0 +1,215 @@
+.tundra .dojoxGrid {
+	position: relative;
+	background-color: #e9e9e9;
+	font-size: 0.85em; 
+	-moz-outline-style: none;
+	outline: none;
+	overflow: hidden;
+	height: 0;
+}
+.tundra .dojoxGrid table {
+	padding: 0;
+}
+.tundra .dojoxGrid td {
+	-moz-outline: none;
+}
+.tundra .dojoxGrid-master-header {
+	position: relative;
+}
+.tundra .dojoxGrid-master-view  {
+	position: relative;
+}
+.tundra .dojoxGrid-view {
+	position: absolute;
+	overflow: hidden;
+}
+.tundra .dojoxGrid-header {
+	position: absolute;
+	overflow: hidden;
+}
+.tundra .dojoxGrid-header {
+	background-color:  #e9e9e9;
+}
+.tundra .dojoxGrid-header table {
+	text-align: center;
+}
+.tundra .dojoxGrid-header .dojoxGrid-cell-content {
+	text-align: center;
+}
+.tundra .dojoxGrid-header .dojoxGrid-cell { 
+	border: 1px solid transparent;
+	
+	border-color: white #ACA899 #919191 white;
+	background: url(../../../../dijit/themes/tundra/images/tabEnabled.png) #e9e9e9 repeat-x top;
+	padding-bottom: 2px;
+	color: #000 !important;
+}
+.tundra .dojoxGrid-header .dojoxGrid-cell-over {
+	background: url(../../../../dijit/themes/tundra/images/tabHover.png) #e9e9e9 repeat-x top;
+	color: #000 !important;
+}
+.tundra .dojoxGrid-sort-down {
+	background: url(../../../../dijit/themes/tundra/images/smallArrowDown.png) right no-repeat;
+	padding-left: 0px;
+	margin-left: 0px;
+}
+.tundra .dojoxGrid-sort-up {
+	background: url(../../../../dijit/themes/tundra/images/smallArrowUp.png) right no-repeat;
+	padding-left: 0px;
+	margin-left: 0px;
+}
+.tundra .gridArrowButtonChar {
+	display:none !important;
+}
+.dijit_a11y .gridArrowButtonChar {
+	display:inline !important;
+}
+.tundra .dojoxGrid-scrollbox {
+	position: relative;
+	overflow: scroll;
+	background-color: #fefefe;
+	width: 100%;
+}
+.tundra .dojoxGrid-content {
+	position: relative;
+	overflow: hidden;
+	 -moz-outline-style: none;
+	outline: none;
+}
+.tundra .dojoxGrid-rowbar { 
+	border: none;
+	
+	background: url(images/tabEnabled_rotated.png) #e9e9e9 repeat-y right;
+	border-right: 1px solid #cccccc;
+	padding: 0px;
+}
+.tundra .dojoxGrid-rowbar-inner {
+	border: none;
+	border-bottom: 1px solid #cccccc;
+}
+.tundra .dojoxGrid-rowbar-over {
+	background: url(images/tabHover_rotated.png) #e9e9e9 repeat-y right;
+}
+.tundra .dojoxGrid-rowbar-selected {
+	background-color: #D9E8F9;
+	background-image: none;
+	background: url(../../../../dijit/themes/tundra/images/tabDisabled.png) #dddddd repeat-x top;
+	border-right: 1px solid #cccccc;
+	background-position: center;
+	background-repeat: no-repeat;
+}
+.tundra .dojoxGrid-row {
+	position: relative;
+	width: 9000em;
+}
+.tundra .dojoxGrid-row {
+	border: none;
+	border-left: none;
+	border-right: none;
+	background-color: white;
+	border-top: none;
+}
+.tundra .dojoxGrid-row-over {
+	border-top-color: #cccccc;
+	border-bottom-color: #cccccc;
+}
+.tundra .dojoxGrid-row-over .dojoxGrid-cell {
+	background-color: #60a1ea; 
+	color:#fff;
+	
+}
+.tundra .dojoxGrid-row-odd {
+	background-color: #f2f5f9;
+	
+}
+.tundra .dojoxGrid-row-selected {
+	background-color: #aec7e3;
+	
+}
+.tundra .dojoxGrid-row-table {
+	table-layout: fixed;
+	width: 0;
+	border-collapse: collapse;
+}
+.tundra .dojoxGrid-invisible {
+	visibility: hidden;
+}		
+.tundra .Xdojo-ie .dojoxGrid-invisible {
+	display: none;
+}		
+.tundra .dojoxGrid-invisible td, .dojoxGrid-header .dojoxGrid-invisible td {
+	border-top-width: 0;
+	border-bottom-width: 0;
+	padding-top: 0;
+	padding-bottom: 0;
+	height: 0;
+	overflow: hidden;
+}
+.tundra .dojoxGrid-cell {
+	border: 1px dotted #D5CDB5;
+	padding: 3px 3px 3px 3px;
+	text-align: left;
+	overflow: hidden;
+}
+.dj_ie6 .tundra .dojoxGrid-cell {
+	border: 1px solid white;
+	border-right: 1px solid #D5CDB5;
+}
+.tundra .dojoxGrid-cell-focus {
+	border: 1px dotted #a6a6a6;
+}
+.tundra .dojoxGrid-cell-over {
+	border: 1px dotted #a6a6a6;
+}
+.tundra .dojoxGrid-cell-focus.dojoxGrid-cell-over {
+	border: 1px dotted #595959;
+}
+.tundra .dojoxGrid-cell-clip {
+	width: 100%;
+	overflow: hidden;
+	white-space:nowrap;
+	text-overflow: ellipsis;
+}
+.tundra .dojoxGrid-row-editing td {
+	
+	background-color: #60a1ea; 
+	
+}
+.tundra .dojoxGrid-row-inserting td {
+	background-color: #F4FFF4;
+}
+.tundra .dojoxGrid-row-inflight td {
+	background-color: #F2F7B7;
+}
+.tundra .dojoxGrid-row-error td {
+	background-color: #F8B8B6;
+}
+.tundra .dojoxGrid-input,
+.tundra .dojoxGrid-select,
+.tundra .dojoxGrid-textarea {
+	margin: 0;
+	padding: 0px;
+	border-style: none;
+	width: 100%;
+	font-size: 100%;
+	font-family: inherit;
+}
+.dojoxGrid-hidden-focus {
+	position: absolute;
+	left: -1000px;
+	top: -1000px;
+	height: 0px, width: 0px;
+}
+.dijit_a11y .dojoxGrid-rowbar-selected { 
+	border-top: 1px solid white;
+	border-bottom: 1px dashed black;
+	border-top: 0;
+	background: none;
+}
+.dijit_a11y .dojoxGrid-rowbar-selected .dojoxGrid-rowbar-inner {
+	border: 0;
+	border-top: 1px solid white;
+}
+.dijit_a11y .dojoxGrid-row-selected {
+	border-bottom: 1px dashed black;
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/tundraGrid.css
------------------------------------------------------------------------------
    svn:mime-type = text/css

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/view.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/view.js?rev=755904&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/view.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/view.js Thu Mar 19 10:37:00 2009
@@ -0,0 +1,214 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.grid.compat._grid.view"]){
+dojo._hasResource["dojox.grid.compat._grid.view"]=true;
+dojo.provide("dojox.grid.compat._grid.view");
+dojo.require("dijit._Widget");
+dojo.require("dijit._Templated");
+dojo.require("dojox.grid.compat._grid.builder");
+dojo.declare("dojox.GridView",[dijit._Widget,dijit._Templated],{defaultWidth:"18em",viewWidth:"",templateString:"<div class=\"dojoxGrid-view\">\n\t<div class=\"dojoxGrid-header\" dojoAttachPoint=\"headerNode\">\n\t\t<div dojoAttachPoint=\"headerNodeContainer\" style=\"width:9000em\">\n\t\t\t<div dojoAttachPoint=\"headerContentNode\"></div>\n\t\t</div>\n\t</div>\n\t<input type=\"checkbox\" class=\"dojoxGrid-hidden-focus\" dojoAttachPoint=\"hiddenFocusNode\" />\n\t<input type=\"checkbox\" class=\"dojoxGrid-hidden-focus\" />\n\t<div class=\"dojoxGrid-scrollbox\" dojoAttachPoint=\"scrollboxNode\">\n\t\t<div class=\"dojoxGrid-content\" dojoAttachPoint=\"contentNode\" hidefocus=\"hidefocus\"></div>\n\t</div>\n</div>\n",themeable:false,classTag:"dojoxGrid",marginBottom:0,rowPad:2,postMixInProperties:function(){
+this.rowNodes=[];
+},postCreate:function(){
+this.connect(this.scrollboxNode,"onscroll","doscroll");
+dojox.grid.funnelEvents(this.contentNode,this,"doContentEvent",["mouseover","mouseout","click","dblclick","contextmenu","mousedown"]);
+dojox.grid.funnelEvents(this.headerNode,this,"doHeaderEvent",["dblclick","mouseover","mouseout","mousemove","mousedown","click","contextmenu"]);
+this.content=new dojox.grid.contentBuilder(this);
+this.header=new dojox.grid.headerBuilder(this);
+if(!dojo._isBodyLtr()){
+this.headerNodeContainer.style.width="";
+}
+},destroy:function(){
+dojox.grid.removeNode(this.headerNode);
+this.inherited("destroy",arguments);
+},focus:function(){
+if(dojo.isWebKit||dojo.isOpera){
+this.hiddenFocusNode.focus();
+}else{
+this.scrollboxNode.focus();
+}
+},setStructure:function(_1){
+var vs=(this.structure=_1);
+if(vs.width&&!isNaN(vs.width)){
+this.viewWidth=vs.width+"em";
+}else{
+this.viewWidth=vs.width||this.viewWidth;
+}
+this.onBeforeRow=vs.onBeforeRow;
+this.noscroll=vs.noscroll;
+if(this.noscroll){
+this.scrollboxNode.style.overflow="hidden";
+}
+this.testFlexCells();
+this.updateStructure();
+},testFlexCells:function(){
+this.flexCells=false;
+for(var j=0,_4;(_4=this.structure.rows[j]);j++){
+for(var i=0,_6;(_6=_4[i]);i++){
+_6.view=this;
+this.flexCells=this.flexCells||_6.isFlex();
+}
+}
+return this.flexCells;
+},updateStructure:function(){
+this.header.update();
+this.content.update();
+},getScrollbarWidth:function(){
+return (this.noscroll?0:dojox.grid.getScrollbarWidth());
+},getColumnsWidth:function(){
+return this.headerContentNode.firstChild.offsetWidth;
+},getWidth:function(){
+return this.viewWidth||(this.getColumnsWidth()+this.getScrollbarWidth())+"px";
+},getContentWidth:function(){
+return Math.max(0,dojo._getContentBox(this.domNode).w-this.getScrollbarWidth())+"px";
+},render:function(){
+this.scrollboxNode.style.height="";
+this.renderHeader();
+},renderHeader:function(){
+this.headerContentNode.innerHTML=this.header.generateHtml(this._getHeaderContent);
+},_getHeaderContent:function(_7){
+var n=_7.name||_7.grid.getCellName(_7);
+if(_7.index!=_7.grid.getSortIndex()){
+return n;
+}
+return ["<div class=\"",_7.grid.sortInfo>0?"dojoxGrid-sort-down":"dojoxGrid-sort-up","\"><div class=\"gridArrowButtonChar\">",_7.grid.sortInfo>0?"&#9660;":"&#9650;","</div>",n,"</div>"].join("");
+},resize:function(){
+this.adaptHeight();
+this.adaptWidth();
+},hasScrollbar:function(){
+return (this.scrollboxNode.clientHeight!=this.scrollboxNode.offsetHeight);
+},adaptHeight:function(){
+if(!this.grid.autoHeight){
+var h=this.domNode.clientHeight;
+if(!this.hasScrollbar()){
+h-=dojox.grid.getScrollbarWidth();
+}
+dojox.grid.setStyleHeightPx(this.scrollboxNode,h);
+}
+},adaptWidth:function(){
+if(this.flexCells){
+this.contentWidth=this.getContentWidth();
+this.headerContentNode.firstChild.style.width=this.contentWidth;
+}
+var w=this.scrollboxNode.offsetWidth-this.getScrollbarWidth();
+w=Math.max(w,this.getColumnsWidth())+"px";
+with(this.contentNode){
+style.width="";
+offsetWidth;
+style.width=w;
+}
+},setSize:function(w,h){
+with(this.domNode.style){
+if(w){
+width=w;
+}
+height=(h>=0?h+"px":"");
+}
+with(this.headerNode.style){
+if(w){
+width=w;
+}
+}
+},renderRow:function(_d,_e){
+var _f=this.createRowNode(_d);
+this.buildRow(_d,_f,_e);
+this.grid.edit.restore(this,_d);
+return _f;
+},createRowNode:function(_10){
+var _11=document.createElement("div");
+_11.className=this.classTag+"-row";
+_11[dojox.grid.gridViewTag]=this.id;
+_11[dojox.grid.rowIndexTag]=_10;
+this.rowNodes[_10]=_11;
+return _11;
+},buildRow:function(_12,_13){
+this.buildRowContent(_12,_13);
+this.styleRow(_12,_13);
+},buildRowContent:function(_14,_15){
+_15.innerHTML=this.content.generateHtml(_14,_14);
+if(this.flexCells){
+_15.firstChild.style.width=this.contentWidth;
+}
+},rowRemoved:function(_16){
+this.grid.edit.save(this,_16);
+delete this.rowNodes[_16];
+},getRowNode:function(_17){
+return this.rowNodes[_17];
+},getCellNode:function(_18,_19){
+var row=this.getRowNode(_18);
+if(row){
+return this.content.getCellNode(row,_19);
+}
+},styleRow:function(_1b,_1c){
+_1c._style=dojox.grid.getStyleText(_1c);
+this.styleRowNode(_1b,_1c);
+},styleRowNode:function(_1d,_1e){
+if(_1e){
+this.doStyleRowNode(_1d,_1e);
+}
+},doStyleRowNode:function(_1f,_20){
+this.grid.styleRowNode(_1f,_20);
+},updateRow:function(_21,_22,_23){
+var _24=this.getRowNode(_21);
+if(_24){
+_24.style.height="";
+this.buildRow(_21,_24);
+}
+return _24;
+},updateRowStyles:function(_25){
+this.styleRowNode(_25,this.getRowNode(_25));
+},lastTop:0,firstScroll:0,doscroll:function(_26){
+var _27=dojo._isBodyLtr();
+if(this.firstScroll<2){
+if((!_27&&this.firstScroll==1)||(_27&&this.firstScroll==0)){
+var s=dojo.marginBox(this.headerNodeContainer);
+if(dojo.isIE){
+this.headerNodeContainer.style.width=s.w+this.getScrollbarWidth()+"px";
+}else{
+if(dojo.isMoz){
+this.headerNodeContainer.style.width=s.w-this.getScrollbarWidth()+"px";
+if(_27){
+this.scrollboxNode.scrollLeft=this.scrollboxNode.scrollWidth-this.scrollboxNode.clientWidth;
+}else{
+this.scrollboxNode.scrollLeft=this.scrollboxNode.clientWidth-this.scrollboxNode.scrollWidth;
+}
+}
+}
+}
+this.firstScroll++;
+}
+this.headerNode.scrollLeft=this.scrollboxNode.scrollLeft;
+var top=this.scrollboxNode.scrollTop;
+if(top!=this.lastTop){
+this.grid.scrollTo(top);
+}
+},setScrollTop:function(_2a){
+this.lastTop=_2a;
+this.scrollboxNode.scrollTop=_2a;
+return this.scrollboxNode.scrollTop;
+},doContentEvent:function(e){
+if(this.content.decorateEvent(e)){
+this.grid.onContentEvent(e);
+}
+},doHeaderEvent:function(e){
+if(this.header.decorateEvent(e)){
+this.grid.onHeaderEvent(e);
+}
+},dispatchContentEvent:function(e){
+return this.content.dispatchEvent(e);
+},dispatchHeaderEvent:function(e){
+return this.header.dispatchEvent(e);
+},setColWidth:function(_2f,_30){
+this.grid.setCellWidth(_2f,_30+"px");
+},update:function(){
+var _31=this.scrollboxNode.scrollLeft;
+this.content.update();
+this.grid.update();
+this.scrollboxNode.scrollLeft=_31;
+this.headerNode.scrollLeft=_31;
+}});
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/view.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/views.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/views.js?rev=755904&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/views.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/views.js Thu Mar 19 10:37:00 2009
@@ -0,0 +1,190 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.grid.compat._grid.views"]){
+dojo._hasResource["dojox.grid.compat._grid.views"]=true;
+dojo.provide("dojox.grid.compat._grid.views");
+dojo.declare("dojox.grid.views",null,{constructor:function(_1){
+this.grid=_1;
+},defaultWidth:200,views:[],resize:function(){
+this.onEach("resize");
+},render:function(){
+this.onEach("render");
+},addView:function(_2){
+_2.idx=this.views.length;
+this.views.push(_2);
+},destroyViews:function(){
+for(var i=0,v;v=this.views[i];i++){
+v.destroy();
+}
+this.views=[];
+},getContentNodes:function(){
+var _5=[];
+for(var i=0,v;v=this.views[i];i++){
+_5.push(v.contentNode);
+}
+return _5;
+},forEach:function(_8){
+for(var i=0,v;v=this.views[i];i++){
+_8(v,i);
+}
+},onEach:function(_b,_c){
+_c=_c||[];
+for(var i=0,v;v=this.views[i];i++){
+if(_b in v){
+v[_b].apply(v,_c);
+}
+}
+},normalizeHeaderNodeHeight:function(){
+var _f=[];
+for(var i=0,v;(v=this.views[i]);i++){
+if(v.headerContentNode.firstChild){
+_f.push(v.headerContentNode);
+}
+}
+this.normalizeRowNodeHeights(_f);
+},normalizeRowNodeHeights:function(_12){
+var h=0;
+for(var i=0,n,o;(n=_12[i]);i++){
+h=Math.max(h,(n.firstChild.clientHeight)||(n.firstChild.offsetHeight));
+}
+h=(h>=0?h:0);
+var hpx=h+"px";
+for(var i=0,n;(n=_12[i]);i++){
+if(n.firstChild.clientHeight!=h){
+n.firstChild.style.height=hpx;
+}
+}
+if(_12&&_12[0]){
+_12[0].parentNode.offsetHeight;
+}
+},resetHeaderNodeHeight:function(){
+for(var i=0,v,n;(v=this.views[i]);i++){
+n=v.headerContentNode.firstChild;
+if(n){
+n.style.height="";
+}
+}
+},renormalizeRow:function(_1b){
+var _1c=[];
+for(var i=0,v,n;(v=this.views[i])&&(n=v.getRowNode(_1b));i++){
+n.firstChild.style.height="";
+_1c.push(n);
+}
+this.normalizeRowNodeHeights(_1c);
+},getViewWidth:function(_20){
+return this.views[_20].getWidth()||this.defaultWidth;
+},measureHeader:function(){
+this.resetHeaderNodeHeight();
+this.forEach(function(_21){
+_21.headerContentNode.style.height="";
+});
+var h=0;
+this.forEach(function(_23){
+h=Math.max(_23.headerNode.offsetHeight,h);
+});
+return h;
+},measureContent:function(){
+var h=0;
+this.forEach(function(_25){
+h=Math.max(_25.domNode.offsetHeight,h);
+});
+return h;
+},findClient:function(_26){
+var c=this.grid.elasticView||-1;
+if(c<0){
+for(var i=1,v;(v=this.views[i]);i++){
+if(v.viewWidth){
+for(i=1;(v=this.views[i]);i++){
+if(!v.viewWidth){
+c=i;
+break;
+}
+}
+break;
+}
+}
+}
+if(c<0){
+c=Math.floor(this.views.length/2);
+}
+return c;
+},arrange:function(l,w){
+var i,v,vw,len=this.views.length;
+var c=(w<=0?len:this.findClient());
+var _31=function(v,l){
+with(v.domNode.style){
+if(!dojo._isBodyLtr()){
+right=l+"px";
+}else{
+left=l+"px";
+}
+top=0+"px";
+}
+with(v.headerNode.style){
+if(!dojo._isBodyLtr()){
+right=l+"px";
+}else{
+left=l+"px";
+}
+top=0;
+}
+};
+for(i=0;(v=this.views[i])&&(i<c);i++){
+vw=this.getViewWidth(i);
+v.setSize(vw,0);
+_31(v,l);
+vw=v.domNode.offsetWidth;
+l+=vw;
+}
+i++;
+var r=w;
+for(var j=len-1;(v=this.views[j])&&(i<=j);j--){
+vw=this.getViewWidth(j);
+v.setSize(vw,0);
+vw=v.domNode.offsetWidth;
+r-=vw;
+_31(v,r);
+}
+if(c<len){
+v=this.views[c];
+vw=Math.max(1,r-l);
+v.setSize(vw+"px",0);
+_31(v,l);
+}
+return l;
+},renderRow:function(_36,_37){
+var _38=[];
+for(var i=0,v,n,_3c;(v=this.views[i])&&(n=_37[i]);i++){
+_3c=v.renderRow(_36);
+n.appendChild(_3c);
+_38.push(_3c);
+}
+this.normalizeRowNodeHeights(_38);
+},rowRemoved:function(_3d){
+this.onEach("rowRemoved",[_3d]);
+},updateRow:function(_3e,_3f){
+for(var i=0,v;v=this.views[i];i++){
+v.updateRow(_3e,_3f);
+}
+this.renormalizeRow(_3e);
+},updateRowStyles:function(_42){
+this.onEach("updateRowStyles",[_42]);
+},setScrollTop:function(_43){
+var top=_43;
+for(var i=0,v;v=this.views[i];i++){
+top=v.setScrollTop(_43);
+}
+return top;
+},getFirstScrollingView:function(){
+for(var i=0,v;(v=this.views[i]);i++){
+if(v.hasScrollbar()){
+return v;
+}
+}
+}});
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/_grid/views.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/resources/GridView.html
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/resources/GridView.html?rev=755904&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/resources/GridView.html (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/resources/GridView.html Thu Mar 19 10:37:00 2009
@@ -0,0 +1,12 @@
+<div class="dojoxGrid-view">
+	<div class="dojoxGrid-header" dojoAttachPoint="headerNode">
+		<div dojoAttachPoint="headerNodeContainer" style="width:9000em">
+			<div dojoAttachPoint="headerContentNode"></div>
+		</div>
+	</div>
+	<input type="checkbox" class="dojoxGrid-hidden-focus" dojoAttachPoint="hiddenFocusNode" />
+	<input type="checkbox" class="dojoxGrid-hidden-focus" />
+	<div class="dojoxGrid-scrollbox" dojoAttachPoint="scrollboxNode">
+		<div class="dojoxGrid-content" dojoAttachPoint="contentNode" hidefocus="hidefocus"></div>
+	</div>
+</div>
\ No newline at end of file

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/resources/GridView.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/resources/VirtualGrid.html
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/resources/VirtualGrid.html?rev=755904&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/resources/VirtualGrid.html (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/resources/VirtualGrid.html Thu Mar 19 10:37:00 2009
@@ -0,0 +1,5 @@
+<div class="dojoxGrid" hidefocus="hidefocus" role="wairole:grid">
+	<div class="dojoxGrid-master-header" dojoAttachPoint="viewsHeaderNode"></div>
+	<div class="dojoxGrid-master-view" dojoAttachPoint="viewsNode"></div>
+	<span dojoAttachPoint="lastFocusNode" tabindex="0"></span>
+</div>

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/resources/VirtualGrid.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/databaseModel.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/databaseModel.js?rev=755904&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/databaseModel.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/databaseModel.js Thu Mar 19 10:37:00 2009
@@ -0,0 +1,337 @@
+if(!dojo._hasResource["dojox.grid.compat.tests.databaseModel"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojox.grid.compat.tests.databaseModel"] = true;
+dojo.provide("dojox.grid.compat.tests.databaseModel");
+dojo.require("dojox.grid.compat._data.model");
+
+// Provides a sparse array that is also traversable inorder 
+// with basic Array:
+//   - iterating by index is slow for large sparse arrays
+//   - for...in iteration is in order of element creation 
+// maintains a secondary index for interating
+// over sparse elements inorder
+dojo.declare("dojox.grid.Sparse", null, {
+	constructor: function() {
+		this.clear();
+	},
+	clear: function() {
+		this.indices = [];
+		this.values = [];
+	},
+	length: function() {
+		return this.indices.length;
+	},
+	set: function(inIndex, inValue) {
+		for (var i=0,l=this.indices.length; i<l; i++) {
+			if (this.indices[i] >= inIndex) 
+				break;
+		}
+		if (this.indices[i] != inIndex) 
+			this.indices.splice(i, 0, inIndex);
+		this.values[inIndex] = inValue;
+	},
+	get: function(inIndex) {
+		return this.values[inIndex];
+	},
+	remove: function(inIndex) {
+		for (var i=0,l=this.indices.length; i<l; i++) 
+			if (this.indices[i] == inIndex) {
+				this.indices.splice(i, 1);
+				break;
+			}
+		delete this.values[inIndex];
+	},
+	inorder: function(inFor) {
+		for (var i=0,l=this.indices.length, ix; i<l; i++) {
+			ix = this.indices[i];
+			if (inFor(this.values[ix], ix) === false)
+				break;
+		}
+	}
+});
+
+// sample custom model implementation that works with mysql server.
+dojo.declare("dojox.grid.data.DbTable", dojox.grid.data.Dynamic, {
+	delayedInsertCommit: true,
+	constructor: function(inFields, inData, inServer, inDatabase, inTable) {
+		this.server = inServer;
+		this.database = inDatabase;
+		this.table = inTable;
+		this.stateNames = ['inflight', 'inserting', 'removing', 'error'];
+		this.clearStates();
+		this.clearSort();
+	},
+	clearData: function() {
+		this.cache = [ ];
+		this.clearStates();
+		this.inherited(arguments);
+	},
+	clearStates: function() {
+		this.states = {};
+		for (var i=0, s; (s=this.stateNames[i]); i++) {
+			delete this.states[s];
+			this.states[s] = new dojox.grid.Sparse();
+		}
+	},
+	// row state information
+	getState: function(inRowIndex) {
+		for (var i=0, r={}, s; (s=this.stateNames[i]); i++)
+			r[s] = this.states[s].get(inRowIndex);
+		return r;
+	},
+	setState: function(inRowIndex, inState, inValue) {
+		this.states[inState].set(inRowIndex, inValue||true);
+	},
+	clearState: function(inRowIndex, inState) {
+		if (arguments.length == 1) {
+			for (var i=0, s; (s=this.stateNames[i]); i++)
+				this.states[s].remove(inRowIndex);
+		}	else {
+			for (var i=1, l=arguments.length, arg; (i<l) &&((arg=arguments[i])!=undefined); i++)
+				this.states[arg].remove(inRowIndex);
+		}
+	},
+	setStateForIndexes: function(inRowIndexes, inState, inValue) {
+		for (var i=inRowIndexes.length-1, k; (i>=0) && ((k=inRowIndexes[i])!=undefined); i--)
+			this.setState(k, inState, inValue);
+	},
+	clearStateForIndexes: function(inRowIndexes, inState) {
+		for (var i=inRowIndexes.length-1, k; (i>=0) && ((k=inRowIndexes[i])!=undefined); i--)
+			this.clearState(k, inState);
+	},
+	//$ Return boolean stating whether or not an operation is in progress that may change row indexing.
+	isAddRemoving: function() {
+		return Boolean(this.states['inserting'].length() || this.states['removing'].length());
+	},
+	isInflight: function() {
+		return Boolean(this.states['inflight'].length());
+	},
+	//$ Return boolean stating if the model is currently undergoing any type of edit.
+	isEditing: function() {
+		for (var i=0, r={}, s; (s=this.stateNames[i]); i++)
+			if (this.states[s].length())
+				return true;
+	},
+	//$ Return true if ok to modify the given row. Override as needed, using model editing state information.
+	canModify: function(inRowIndex) {
+		return !this.getState(inRowIndex).inflight && !(this.isInflight() && this.isAddRemoving());
+	},
+	// server send / receive
+	getSendParams: function(inParams) {
+		var p = {
+			database: this.database || '',
+			table: this.table || ''
+		}
+		return dojo.mixin(p, inParams || {});
+	},
+	send: function(inAsync, inParams, inCallbacks) {
+		//console.log('send', inParams.command);
+		var p = this.getSendParams(inParams);
+		var d = dojo.xhrPost({
+			url: this.server,
+			content: p,
+			handleAs: 'json-comment-filtered',
+			contentType: "application/x-www-form-urlencoded; charset=utf-8",
+			sync: !inAsync
+		});
+		d.addCallbacks(dojo.hitch(this, "receive", inCallbacks), dojo.hitch(this, "receiveError", inCallbacks));
+		return d;
+	},
+	_callback: function(cb, eb, data) {
+		try{ cb && cb(data); } 
+		catch(e){ eb && eb(data, e); }
+	},
+	receive: function(inCallbacks, inData) {
+		inCallbacks && this._callback(inCallbacks.callback, inCallbacks.errback, inData);
+	},
+	receiveError: function(inCallbacks, inErr) {
+		this._callback(inCallbacks.errback, null, inErr)
+	},
+	encodeRow: function(inParams, inRow, inPrefix) {
+		for (var i=0, l=inRow.length; i < l; i++)
+			inParams['_' + (inPrefix ? inPrefix : '') + i] = (inRow[i] ? inRow[i] : '');
+	},
+	measure: function() {
+		this.send(true, { command: 'info' }, { callback: dojo.hitch(this, this.callbacks.info) });
+	},
+	fetchRowCount: function(inCallbacks) {
+		this.send(true, { command: 'count' }, inCallbacks);
+	},
+	// server commits
+	commitEdit: function(inOldData, inNewData, inRowIndex, inCallbacks) {
+		this.setState(inRowIndex, "inflight", true);
+		var params = {command: 'update'};
+		this.encodeRow(params, inOldData, 'o');
+		this.encodeRow(params, inNewData);
+		this.send(true, params, inCallbacks);
+	},
+	commitInsert: function(inRowIndex, inNewData, inCallbacks) {
+		this.setState(inRowIndex, "inflight", true);
+		var params = {command: 'insert'};
+		this.encodeRow(params, inNewData);
+		this.send(true, params, inCallbacks);
+	},
+	// NOTE: supported only in tables with pk
+	commitDelete: function(inRows, inCallbacks) {
+		var params = { 
+			command: 'delete',
+			count: inRows.length
+		}	
+		var pk = this.getPkIndex();
+		if (pk < 0)
+			return;
+		for (var i=0; i < inRows.length; i++)	{
+			params['_' + i] = inRows[i][pk];
+		}	
+		this.send(true, params, inCallbacks);
+	},
+	getUpdateCallbacks: function(inRowIndex) {
+		return {
+			callback: dojo.hitch(this, this.callbacks.update, inRowIndex), 
+			errback: dojo.hitch(this, this.callbacks.updateError, inRowIndex)
+		};
+	},
+	// primary key from fields
+	getPkIndex: function() {
+		for (var i=0, l=this.fields.count(), f; (i<l) && (f=this.fields.get(i)); i++)
+			if (f.Key = 'PRI')
+				return i;
+		return -1;		
+	},
+	// model implementations
+	update: function(inOldData, inNewData, inRowIndex) {
+		var cbs = this.getUpdateCallbacks(inRowIndex);
+		if (this.getState(inRowIndex).inserting)
+			this.commitInsert(inRowIndex, inNewData, cbs);
+		else
+			this.commitEdit(this.cache[inRowIndex] || inOldData, inNewData, inRowIndex, cbs);
+		// set push data immediately to model	so reflectd while committing
+		this.setRow(inNewData, inRowIndex);
+	},
+	insert: function(inData, inRowIndex) {
+		this.setState(inRowIndex, 'inserting', true);
+		if (!this.delayedInsertCommit)
+			this.commitInsert(inRowIndex, inData, this.getUpdateCallbacks(inRowIndex));
+		return this.inherited(arguments);
+	},
+	remove: function(inRowIndexes) {
+		var rows = [];
+		for (var i=0, r=0, indexes=[]; (r=inRowIndexes[i]) !== undefined; i++)
+			if (!this.getState(r).inserting) {
+				rows.push(this.getRow(r));
+				indexes.push(r);
+				this.setState(r, 'removing');
+			}
+		var cbs = {
+			callback: dojo.hitch(this, this.callbacks.remove, indexes),
+			errback: dojo.hitch(this, this.callbacks.removeError, indexes)
+		};
+		this.commitDelete(rows, cbs);
+		dojox.grid.data.Dynamic.prototype.remove.apply(this, arguments);
+	},
+	cancelModifyRow: function(inRowIndex) {
+		if (this.isDelayedInsert(inRowIndex)) {
+			this.removeInsert(inRowIndex);
+		} else
+			this.finishUpdate(inRowIndex);
+	},	
+	finishUpdate: function(inRowIndex, inData) {
+		this.clearState(inRowIndex);
+		var d = (inData&&inData[0]) || this.cache[inRowIndex];
+		if (d)
+			this.setRow(d, inRowIndex);
+		delete this.cache[inRowIndex];
+	},
+	isDelayedInsert: function(inRowIndex) {
+		return (this.delayedInsertCommit && this.getState(inRowIndex).inserting);
+	},
+	removeInsert: function(inRowIndex) {
+		this.clearState(inRowIndex);
+		dojox.grid.data.Dynamic.prototype.remove.call(this, [inRowIndex]);
+	},
+	// request data 
+	requestRows: function(inRowIndex, inCount)	{
+		var params = { 
+			command: 'select',
+			orderby: this.sortField, 
+			desc: (this.sortDesc ? "true" : ''),
+			offset: inRowIndex, 
+			limit: inCount
+		}
+		this.send(true, params, {callback: dojo.hitch(this, this.callbacks.rows, inRowIndex)});
+	},
+	// sorting
+	canSort: function () { 
+		return true; 
+	},
+	setSort: function(inSortIndex) {
+		this.sortField = this.fields.get(Math.abs(inSortIndex) - 1).name || inSortIndex;
+		this.sortDesc = (inSortIndex < 0);
+	},
+	sort: function(inSortIndex) {
+		this.setSort(inSortIndex);
+		this.clearData();
+	},
+	clearSort: function(){
+		this.sortField = '';
+		this.sortDesc = false;
+	},
+	endModifyRow: function(inRowIndex){
+		var cache = this.cache[inRowIndex];
+		var m = false;
+		if(cache){
+			var data = this.getRow(inRowIndex);
+			if(!dojox.grid.arrayCompare(cache, data)){
+				m = true;
+				this.update(cache, data, inRowIndex);
+			}	
+		}
+		if (!m)
+			this.cancelModifyRow(inRowIndex);
+	},
+	// server callbacks (called with this == model)
+	callbacks: {
+		update: function(inRowIndex, inData) {
+			console.log('received update', arguments);
+			if (inData.error)
+				this.updateError(inData)
+			else
+				this.finishUpdate(inRowIndex, inData);
+		},
+		updateError: function(inRowIndex) {
+			this.clearState(inRowIndex, 'inflight');
+			this.setState(inRowIndex, "error", "update failed: " + inRowIndex);
+			this.rowChange(this.getRow(inRowIndex), inRowIndex);
+		},
+		remove: function(inRowIndexes) {
+			this.clearStateForIndexes(inRowIndexes);
+		},
+		removeError: function(inRowIndexes) {
+			this.clearStateForIndexes(inRowIndexes);
+			alert('Removal error. Please refresh.');
+		},
+		rows: function(inRowIndex, inData) {
+			//this.beginUpdate();
+			for (var i=0, l=inData.length; i<l; i++)
+				this.setRow(inData[i], inRowIndex + i);
+			//this.endUpdate();
+			//this.allChange();
+		},
+		count: function(inRowCount) {
+			this.count = Number(inRowCount);
+			this.clearData();
+		},
+		info: function(inInfo) {
+			this.fields.clear();
+			for (var i=0, c; (c=inInfo.columns[i]); i++) {
+				c.name = c.Field;
+				this.fields.set(i, c);
+			}
+			this.table = inInfo.table;
+			this.database = inInfo.database;
+			this.notify("MetaData", arguments);
+			this.callbacks.count.call(this, inInfo.count);
+		}
+	}
+});
+
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/databaseModel.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/images/closed.gif
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/images/closed.gif?rev=755904&view=auto
==============================================================================
Binary file - no diff available.

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/images/closed.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/images/flatScreen.gif
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/images/flatScreen.gif?rev=755904&view=auto
==============================================================================
Binary file - no diff available.

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/images/flatScreen.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/images/open.gif
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/images/open.gif?rev=755904&view=auto
==============================================================================
Binary file - no diff available.

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/images/open.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/support/books.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/support/books.xml?rev=755904&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/support/books.xml (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/support/books.xml Thu Mar 19 10:37:00 2009
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<books>
+	<book>
+		<isbn>1</isbn>
+		<title>Title of 1</title>
+		<author>Author of 1</author>
+	</book>
+	<book>
+		<isbn>2</isbn>
+		<title>Title of 2</title>
+		<author>Author of 2</author>
+	</book>
+	<book>
+		<isbn>3</isbn>
+		<title>Title of 3</title>
+		<author>Author of 3</author>
+	</book>
+	<book>
+		<isbn>4</isbn>
+		<title>Title of 4</title>
+		<author>Author of 4</author>
+	</book>
+	<book>
+		<isbn>5</isbn>
+		<title>Title of 5</title>
+		<author>Author of 5</author>
+	</book>
+	<book>
+		<isbn>6</isbn>
+		<title>Title of 6</title>
+		<author>Author of 6</author>
+	</book>
+	<book>
+		<isbn>7</isbn>
+		<title>Title of 7</title>
+		<author>Author of 7</author>
+	</book>
+	<book>
+		<isbn>8</isbn>
+		<title>Title of 8</title>
+		<author>Author of 8</author>
+	</book>
+	<book>
+		<isbn>9</isbn>
+		<title>Title of 9</title>
+		<author>Author of 9</author>
+	</book>
+	<book>
+		<isbn>10</isbn>
+		<title>Title of 10</title>
+		<author>Author of 10</author>
+	</book>
+	<book>
+		<isbn>11</isbn>
+		<title>Title of 11</title>
+		<author>Author of 11</author>
+	</book>
+	<book>
+		<isbn>12</isbn>
+		<title>Title of 12</title>
+		<author>Author of 12</author>
+	</book>
+	<book>
+		<isbn>13</isbn>
+		<title>Title of 13</title>
+		<author>Author of 13</author>
+	</book>
+	<book>
+		<isbn>14</isbn>
+		<title>Title of 14</title>
+		<author>Author of 14</author>
+	</book>
+	<book>
+		<isbn>15</isbn>
+		<title>Title of 15</title>
+		<author>Author of 15</author>
+	</book>
+	<book>
+		<isbn>16</isbn>
+		<title>Title of 16</title>
+		<author>Author of 16</author>
+	</book>
+	<book>
+		<isbn>17</isbn>
+		<title>Title of 17</title>
+		<author>Author of 17</author>
+	</book>
+	<book>
+		<isbn>18</isbn>
+		<title>Title of 18</title>
+		<author>Author of 18</author>
+	</book>
+	<book>
+		<isbn>19</isbn>
+		<title>Title of 19</title>
+		<author>Author of 19</author>
+	</book>
+	<book>
+		<isbn>20</isbn>
+		<title>Title of 20</title>
+		<author>Author of 20</author>
+	</book>
+</books>

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/support/books.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/support/data.php
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/support/data.php?rev=755904&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/support/data.php (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/support/data.php Thu Mar 19 10:37:00 2009
@@ -0,0 +1,379 @@
+<?php
+	// db settings
+	$dbserver = 'localhost';
+	$dbuser = 'root';
+	$dbpassword = 'root';
+	
+	error_reporting(E_ALL);
+	
+	/*
+		Simple protocol:
+			- Inputs via POST variables. 
+			- Output is a string that can be evaluated into a JSON
+			  First element of the array contains return status.
+				
+		This simplified tutorial code should not be deployed without a security review.
+	*/
+	
+	@include "json.php";
+	
+	// set up response encoding 
+	header("Content-Type: text/html; charset=utf-8");
+
+	// util
+	function getPostString($inName) {
+		// make sure input strings are 'clean'
+		return mysql_real_escape_string(@$_POST[$inName]);
+	}
+		
+	// used for json encoding
+	$json = new Services_JSON();
+	
+	function echoJson($inData) {
+		global $json;
+		// delay in ms
+		$delay = getPostString('delay');
+		if (!empty($delay))
+			usleep($delay * 1000);
+		echo '/* ' . $json->encode($inData) . ' */';
+	}
+	
+	function error($inMessage) {
+		$inMessage = str_replace('"', '\\"', $inMessage);
+		error_log($inMessage);
+		//echo '/* ({error: true, message: "' . $inMessage . '"}) */';
+		echoJson(array('error' => true, 'message' => $inMessage));
+		exit;
+	}
+
+
+	function getArray($inResult, $inArray="true") {
+		$o = Array();
+		while ($row = ($inArray ? mysql_fetch_row($inResult) : mysql_fetch_object($inResult)))
+			$o[] = $row;
+		return $o;	
+	}
+	
+	// connect to DB
+	mysql_connect($dbserver, $dbuser, $dbpassword);
+
+	// select DB
+	$database = getPostString("database");
+	$database = ($database ? $database : $db);
+	if (!mysql_select_db($database))
+		error('failed to select db: ' . mysql_error());
+
+	// select table
+	$table = getPostString("table");
+	$table = ($table ? $table : $dbtable);
+
+	// cache
+	$colCache = NULL;
+	$pkCache = NULL;
+
+	// set UTF8 output (MySql > 4.0)
+	mysql_query("SET NAMES UTF8");
+	
+	// server, database, table meta data
+	function getDatabases() {
+		$result = mysql_query("SHOW DATABASES");
+		$output = Array();
+		while ($row = mysql_fetch_row($result)) {
+			$r = strtolower($row[0]);
+			if ($r != 'mysql' && $r != 'information_schema')
+				$output[] = $row[0];
+		}	
+		return $output;	
+	}
+	
+	function getTables() {
+		global $database;
+		$result = mysql_query("SHOW TABLES FROM $database");
+		$output = Array();
+		while ($row = mysql_fetch_row($result))
+			$output[] = $row[0];
+		return $output;	
+	}
+	
+	function getColumns() {
+		global $table, $colCache;
+		if (!$colCache) {
+			$result = mysql_query("SHOW COLUMNS FROM `$table`");
+			return getArray($result, false);
+			$colCache = getArray($result, false);
+		}
+		return $colCache;	
+	}
+	
+	// returns object: $this->name, $this->index
+	function getPk() {
+		global $pkCache;
+		if (!$pkCache) {
+			$k = '';
+			$columns = getColumns();
+			for ($i=0; $i < count($columns); $i++) {
+				$c = $columns[$i];
+				if ($c->Key == 'PRI') {
+					$k = $c->Field;
+					break;
+				}	
+			}
+			$pkCache->index = $i;
+			$pkCache->name = $k;
+		}	
+		return $pkCache;
+	}
+	
+	function getTableInfo() {
+		global $table, $database;
+		$c = getColumns();
+		$r = rowcount();
+		return array("count" => $r, "columns" => $c, "database" => $database, "table" => $table);
+	}
+	
+	function getOldPostPkValue() {
+		$pk = getPk();
+		return getPostString('_o' . $pk->index);
+	}
+	
+	function getNewPostPkValue() {
+		$pk = getPk();
+		return getPostString('_' . $pk->index);
+	}
+	
+	function getPostColumns() {
+		$columns = getColumns();
+		for ($i=0, $a=array(), $p; (($p=getPostString("_".$i)) != ''); $i++) {
+			$r = new stdClass();
+			$r->name = $columns[$i]->Field;
+			$r->value = $p;
+			$a[] = $r;
+		}	
+		return $a;
+	}
+	
+	function getOrderBy() {
+		$ob = getPostString("orderby");
+		if (is_numeric($ob)) {
+			$columns = getColumns();
+			$ob = $columns[intval($ob)-1]->Field;
+		}
+		return $ob;
+	}
+	
+	function getWhere() {
+		$w = getPostString("where");
+		return ($w ? " WHERE $w" : "");
+	}
+	
+	// basic operations
+	function rowcount()	{
+		global $table;
+		$query = "SELECT COUNT(*) FROM `$table`" . getWhere();
+		$result = mysql_query($query);
+		if (!$result)
+			error("failed to perform query: $query. " . mysql_error());
+		if ($row = mysql_fetch_row($result))
+			return $row[0];
+		else
+			return 0;
+	}
+	
+	function select($inQuery = '') {
+		global $table;
+		// built limit clause
+		$lim = (int)getPostString("limit");
+		$off = (int)getPostString("offset");
+		$limit = ($lim || $off ? " LIMIT $off, $lim" : "");
+		// build order by clause
+		$desc = (boolean)getPostString("desc");
+		$ob = getOrderBy();
+		$orderby = ($ob ? " ORDER BY `" . $ob . "`" . ($desc ? " DESC" : "") : "");
+		// build query
+		$query = ($inQuery ? $inQuery : "SELECT * FROM `$table`" . getWhere() . $orderby . $limit);
+		// execute query
+		if (!$result = mysql_query($query))
+			error("failed to perform query: $query. " . mysql_error());
+		// fetch each result row 
+		return getArray($result);
+	}
+
+	function reflectRow() {
+		global $table;
+		$pk = getPk();
+		$key = getNewPostPkValue();			
+		$where = "`$pk->name`=\"$key\"";
+		return select("SELECT * FROM `$table` WHERE $where LIMIT 1");
+	}
+	
+	function update() {
+		// build set clause
+		for ($i=0, $set = array(), $cols = getPostColumns(), $v; ($v=$cols[$i]); $i++)
+			$set[] = "`$v->name` = '$v->value'";
+		$set = implode(', ', $set);
+		// our table
+		global $table;
+		// build query
+		$pk = getPk();
+		$pkValue = getOldPostPkValue();
+		$query = "UPDATE `$table` SET $set WHERE `$pk->name` = '$pkValue' LIMIT 1";
+		// execute query
+		if (!mysql_query($query))
+			error("failed to perform query: [$query]. " .
+					"MySql says: [" . mysql_error() ."]");
+		else {
+			return reflectRow();
+		}	
+	}
+	
+	function insert() {
+		global $table;
+		// build values clause
+		for ($i=0, $values = array(), $cols = getPostColumns(), $v; ($v=$cols[$i]); $i++)
+			$values[] = $v->value;
+		$values = '"' . implode('", "', $values) . '"';			
+		// build query
+		$query = "INSERT INTO `$table` VALUES($values)";
+		// execute query
+		if (!mysql_query($query))
+			error("failed to perform query: [$query]. " .
+					"MySql says: [" . mysql_error() ."]");
+		else {
+			return reflectRow();
+		}
+	}
+	
+	function delete() {
+		global $table;
+		// build query
+		$n = getPostString("count");
+		$pk = getPk();
+		for ($i = 0, $deleted=array(); $i < $n; $i++) {
+			$key = getPostString("_$i");
+			array_push($deleted, $key);
+			$query = "DELETE FROM `$table` WHERE `$pk->name`=\"$key\" LIMIT 1";
+			// execute query
+			if (!mysql_query($query) || mysql_affected_rows() != 1)
+				error("failed to perform query: [$query]. " .
+					"Affected rows: " . mysql_affected_rows() .". " . 
+					"MySql says: [" . mysql_error() ."]");
+		}	
+		return $deleted;			
+	}
+	
+	// find (full text search)
+	function findData($inFindCol, $inFind, $inOrderBy, $inFullText) {
+		global $table;
+		$where = ($inFullText ? "WHERE MATCH(`$inFindCol`) AGAINST ('$inFind')" : "WHERE $inFindCol LIKE '$inFind'");
+		$query = "SELECT * FROM $table $where $inOrderBy";
+		$result = mysql_query($query);
+		// return rows
+		return getArray($result);
+	}
+	
+	// binary search through sorted data, supports start point ($inFindFrom) and direction ($inFindForward)
+	function findRow($inData, $inFindFrom=-1, $inFindForward) {
+		$b = -1;
+		$l = count($inData);
+		if (!$inData)
+			return $b;
+		if (!$inFindFrom==-1 || $l < 2)
+			$b = 0;
+		else {
+			// binary search
+			$t = $l-1;
+			$b = 0;
+			while ($b <= $t) {
+				$p = floor(($b+$t)/2);
+				$d = $inData[$p][0];
+				if ($d < $inFindFrom)
+					$b = $p + 1;
+				else if ($d > $inFindFrom)
+					$t = $p - 1;
+				else {
+					$b = $p;
+					break;
+				}	
+			}	
+			if ($inFindFrom == $inData[$b][0]) {
+				// add or subtract 1
+				$b = ($inFindForward ? ($b+1 > $l-1 ? 0 : $b+1) : ($b-1 < 0 ? $l-1 : $b-1) );
+			}	
+			else if (!$inFindForward)
+				// subtract 1
+				$b = ($b-1 < 0 ? $l-1 : $b-1);
+		}	
+		return $inData[$b][0];
+	}
+	
+	function buildFindWhere($inFindData, $inKey, $inCol) {
+		$o = Array();
+		foreach($inFindData as $row)
+			$o[] = $inCol . "='" . $row[$inKey] . "'";
+		return (count($o) ? ' WHERE ' . implode(' OR ', $o) : '');
+	}
+		
+	function find($inFindCol, $inFind='', $inOb='', $inFindFrom=0, $inFindForward=true, $inFullText=true) {
+		global $table;
+		// build order by clause
+		$desc = (boolean)getPostString("desc");
+		if (!$inOb)
+			$inOb = getOrderBy();
+		if ($inOb)
+			$inOb = "`" . $inOb . "`"	;
+		$orderby = ($inOb ? " ORDER BY $inOb " . ($desc ? " DESC" : "") : "");
+		// update inputs from post
+		if (!$inFind)
+			$inFind = getPostString('findText');
+		if (!$inFindCol)
+			$inFindCol = getPostString('findCol');	
+		if (empty($inFindFrom))
+			$inFindFrom = getPostString('findFrom');
+		$ff = getPostString('findForward');
+		if ($ff)
+			$inFindForward = (strtolower($ff) == 'true' ? true : false);
+		$ft = getPostString('findFullText');
+		if ($ft)
+			$inFullText = (strtolower($ft) == 'true' ? true : false);	
+		
+		// get find data
+		$f = findData($inFindCol, $inFind, $orderby,  $inFullText);
+		$pk = getPk();
+
+		// execute query
+		$where = buildFindWhere($f, $pk->index, 'f');
+		$query = "SELECT Row, f FROM (SELECT @row := @row + 1 AS Row, $pk->name as f FROM `$table` $orderby) AS tempTable $where";
+		mysql_query('SET @row = -1;');
+		if (!$result = mysql_query($query))
+			error("failed to perform query: $query. " . mysql_error());
+		
+		// return row number 
+		return findRow(getArray($result), $inFindFrom, $inFindForward);
+	}
+	
+	// our command list
+	$cmds = array( 
+		"count" => "rowcount", 
+		"select" => "select",
+		"update" => "update",
+		"insert" => "insert",
+		"delete" => "delete",
+		"find" => "find",
+		"databases" => "getDatabases",
+		"tables" => "getTables",
+		"columns" => "getColumns",
+		"info" => "getTableInfo"
+	);
+		
+	// process input params
+	$cmd = @$_POST["command"];
+	
+	//$cmd="select";
+	
+	// dispatch command
+	$func = @$cmds[$cmd];
+	if (function_exists($func)) 
+		echoJson(call_user_func($func));
+	else
+		error("bad command");
+?>

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/support/geography.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/support/geography.xml?rev=755904&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/support/geography.xml (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/support/geography.xml Thu Mar 19 10:37:00 2009
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<opml version="1.0">
+	<head>
+		<title>geography.opml</title>
+		<dateCreated>2006-11-10</dateCreated>
+		<dateModified>2006-11-13</dateModified>
+		<ownerName>Magellan, Ferdinand</ownerName>
+	</head>
+	<body>
+		<outline text="Africa" type="continent">
+			<outline text="Egypt" type="country"/>
+			<outline text="Kenya" type="country">
+				<outline text="Nairobi" type="city"/>
+				<outline text="Mombasa" type="city"/>
+			</outline>
+			<outline text="Sudan" type="country">
+				<outline text="Khartoum" type="city"/>
+			</outline>
+		</outline>
+		<outline text="Asia" type="continent">
+			<outline text="China" type="country"/>
+			<outline text="India" type="country"/>
+			<outline text="Russia" type="country"/>
+			<outline text="Mongolia" type="country"/>
+		</outline>
+		<outline text="Australia" type="continent" population="21 million">
+			<outline text="Australia" type="country" population="21 million"/>
+		</outline>
+		<outline text="Europe" type="continent">
+			<outline text="Germany" type="country"/>
+			<outline text="France" type="country"/>
+			<outline text="Spain" type="country"/>
+			<outline text="Italy" type="country"/>
+		</outline>
+		<outline text="North America" type="continent">
+			<outline text="Mexico" type="country" population="108 million" area="1,972,550 sq km">
+				<outline text="Mexico City" type="city" population="19 million" timezone="-6 UTC"/>
+				<outline text="Guadalajara" type="city" population="4 million" timezone="-6 UTC"/>
+			</outline>
+			<outline text="Canada" type="country" population="33 million" area="9,984,670 sq km">
+				<outline text="Ottawa" type="city" population="0.9 million" timezone="-5 UTC"/>
+				<outline text="Toronto" type="city" population="2.5 million" timezone="-5 UTC"/>
+			</outline>
+			<outline text="United States of America" type="country"/>
+		</outline>
+		<outline text="South America" type="continent">
+			<outline text="Brazil" type="country" population="186 million"/>
+			<outline text="Argentina" type="country" population="40 million"/>
+		</outline>
+	</body>
+</opml>

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/grid/compat/tests/support/geography.xml
------------------------------------------------------------------------------
    svn:eol-style = native