diff options
| author | Tristan Zur <tzur@web.web.ccwn.org> | 2014-03-27 22:27:47 +0100 |
|---|---|---|
| committer | Tristan Zur <tzur@web.web.ccwn.org> | 2014-03-27 22:27:47 +0100 |
| commit | b62676ca5d3d6f6ba3f019ea3f99722e165a98d8 (patch) | |
| tree | 86722cb80f07d4569f90088eeaea2fc2f6e2ef94 /js/dojo-1.6/dojox/grid/_RowManager.xd.js | |
Diffstat (limited to 'js/dojo-1.6/dojox/grid/_RowManager.xd.js')
| -rw-r--r-- | js/dojo-1.6/dojox/grid/_RowManager.xd.js | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/js/dojo-1.6/dojox/grid/_RowManager.xd.js b/js/dojo-1.6/dojox/grid/_RowManager.xd.js new file mode 100644 index 0000000..15e74a3 --- /dev/null +++ b/js/dojo-1.6/dojox/grid/_RowManager.xd.js @@ -0,0 +1,75 @@ +/*
+ Copyright (c) 2004-2011, 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
+*/
+
+
+dojo._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dojox.grid._RowManager"]],
+defineResource: function(dojo, dijit, dojox){if(!dojo._hasResource["dojox.grid._RowManager"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojox.grid._RowManager"] = true;
+dojo.provide("dojox.grid._RowManager");
+
+(function(){
+ var setStyleText = function(inNode, inStyleText){
+ if(inNode.style.cssText == undefined){
+ inNode.setAttribute("style", inStyleText);
+ }else{
+ inNode.style.cssText = inStyleText;
+ }
+ };
+
+ dojo.declare("dojox.grid._RowManager", null, {
+ // Stores information about grid rows. Owned by grid and used internally.
+ constructor: function(inGrid){
+ this.grid = inGrid;
+ },
+ linesToEms: 2,
+ overRow: -2,
+ // styles
+ prepareStylingRow: function(inRowIndex, inRowNode){
+ return {
+ index: inRowIndex,
+ node: inRowNode,
+ odd: Boolean(inRowIndex&1),
+ selected: !!this.grid.selection.isSelected(inRowIndex),
+ over: this.isOver(inRowIndex),
+ customStyles: "",
+ customClasses: "dojoxGridRow"
+ };
+ },
+ styleRowNode: function(inRowIndex, inRowNode){
+ var row = this.prepareStylingRow(inRowIndex, inRowNode);
+ this.grid.onStyleRow(row);
+ this.applyStyles(row);
+ },
+ applyStyles: function(inRow){
+ var i = inRow;
+
+ i.node.className = i.customClasses;
+ var h = i.node.style.height;
+ setStyleText(i.node, i.customStyles + ';' + (i.node._style||''));
+ i.node.style.height = h;
+ },
+ updateStyles: function(inRowIndex){
+ this.grid.updateRowStyles(inRowIndex);
+ },
+ // states and events
+ setOverRow: function(inRowIndex){
+ var last = this.overRow;
+ this.overRow = inRowIndex;
+ if((last!=this.overRow)&&(dojo.isString(last) || last >= 0)){
+ this.updateStyles(last);
+ }
+ this.updateStyles(this.overRow);
+ },
+ isOver: function(inRowIndex){
+ return (this.overRow == inRowIndex && !dojo.hasClass(this.grid.domNode, "dojoxGridColumnResizing"));
+ }
+ });
+})();
+
+}
+
+}};});
|
