Commit 12515667 authored by wangjinjing's avatar wangjinjing

init

parents
Pipeline #502 failed with stages

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

var createError = require('http-errors');
var express = require('express');
var path = require('path');
var cookieParser = require('cookie-parser');
var logger = require('morgan');
var session = require('express-session');
var restRouter = require('./routes/restRouter');
var loginRouter = require('./routes/loginRouter');
var businessRouter = require('./routes/businessRouter');
var pageRouter = require('./routes/pageRouter');
var editRouter=require('./routes/editRouter');
var model=require('./util/model');
require('./util/string');
var app = express();
//模板引擎
var ejs=require('ejs');
app.set('views', path.join(__dirname, 'views/'));
app.engine('html',ejs.__express);
app.set('view engine', 'html');
app.use(logger('dev'));
app.use(express.json());
app.use(express.urlencoded({
extended: false
}));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));
// 使用 session 中间件
app.use(session({
secret: 'secret', // 对session id 相关的cookie 进行签名
resave: true,
saveUninitialized: false, // 是否保存未初始化的会话
cookie: {
maxAge: 1000 * 60 * 60*8, // 设置 session 的有效时间,单位毫秒
},
name:require('./application.json').session_name
}));
//拦截器对登录人进行操作进行拦截
app.use(function (req, res, next) {
console.log(req.session.user);
var url = req.originalUrl;
if (url == "/login" || url == "/logout" || url == "/validateuser") { //登录不拦截
next();
} else { //开始拦截
if (req.session.user) {
next();
} else if (req.headers["x-requested-with"] == "XMLHttpRequest") { //ajax的请求返回json提醒
res.json({
resultStatus: model.resultStatus.expired
});
} else { //非ajax的请求调转登录页
// res.redirect('/login');
res.redirect('/login');
}
}
});
//restful服务
app.use('/rest', restRouter);
app.use('/edit', editRouter);
app.use('/pagedetail', pageRouter);
app.use('/', loginRouter);
app.use('/business', businessRouter);
app.use('/localx', require("./routes/localRouter"));
app.use('/export', require("./routes/exportRouter"));
// 错误捕获
app.use(function (err,x, req, res, next) {
// res.json({
// resultStatus: model.resultStatus.error(err)
// });
res.json(err);
});
module.exports = app;
This diff is collapsed.
{
"oracle": {
"user": "XWSQ",
"password": "XWSQ",
"connectString": "170.2.229.213/helowin"
},
"port":"4085",
"session_name":"xwsq.connect.sid",
"artemis":{
"appkey":"20481782",
"appsecret":"69v2kEzZw4y4RBHtmLpv"
},
"order":{
"1":["zjhm", "type", "cjlb", "cjdj", "cjzh", "jhr", "jtzz", "jhrlxdh", "bz"],
"3":["zjhm", "type", "sqfzr", "mj","fj","bz"],
"7":["zjhm", "type", "jsxm", "ylrgx", "jsjzdz", "jslxfs", "sfnrzfgmfw", "jzdz", "hjdz"],
"4":["zjhm", "type", "zywtjmd", "fzr","fzrdh"],
"10":["zjhm", "type", "jrtype", "xjyzt", "bddh", "gzdw", "tyzjh"]
}
}
#!/usr/bin/env node
/**
* Module dependencies.
*/
var app = require('../app');
var debug = require('debug')('xbsq:server');
var http = require('http');
var portfromJSON = require('../application.json').port;
/**
* Get port from environment and store in Express.
*/
var port = normalizePort(process.env.PORT || portfromJSON);
app.set('port', port);
/**
* Create HTTP server.
*/
var server = http.createServer(app);
/**
* Listen on provided port, on all network interfaces.
*/
server.listen(port);
server.on('error', onError);
server.on('listening', onListening);
/**
* Normalize a port into a number, string, or false.
*/
function normalizePort(val) {
var port = parseInt(val, 10);
if (isNaN(port)) {
// named pipe
return val;
}
if (port >= 0) {
// port number
return port;
}
return false;
}
/**
* Event listener for HTTP server "error" event.
*/
function onError(error) {
if (error.syscall !== 'listen') {
throw error;
}
var bind = typeof port === 'string'
? 'Pipe ' + port
: 'Port ' + port;
// handle specific listen errors with friendly messages
switch (error.code) {
case 'EACCES':
console.error(bind + ' requires elevated privileges');
process.exit(1);
break;
case 'EADDRINUSE':
console.error(bind + ' is already in use');
process.exit(1);
break;
default:
throw error;
}
}
/**
* Event listener for HTTP server "listening" event.
*/
function onListening() {
var addr = server.address();
var bind = typeof addr === 'string'
? 'pipe ' + addr
: 'port ' + addr.port;
debug('Listening on ' + bind);
}
This diff is collapsed.
{
"oracle": {
"user": "xbsq",
"password": "xbsq",
"connectString": "192.168.168.215/orcl"
},
"port":"4082",
"session_name":"xbsq.connect.sid",
"artemis":{
"appkey":"20481782",
"appsecret":"69v2kEzZw4y4RBHtmLpv"
}
}
\ No newline at end of file
{
"oracle": {
"user": "xw_shq",
"password": "xw_shq",
"connectString": "132.1.11.148/ORCL.LOCAL"
},
"port":"4082",
"session_name":"xwsq.connect.sid",
"artemis":{
"appkey":"20481782",
"appsecret":"69v2kEzZw4y4RBHtmLpv",
"server":"http://192.168.20.211:4085"
}
}
\ No newline at end of file
This diff is collapsed.
{
"name": "xbsq",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www"
},
"dependencies": {
"async": "^2.6.1",
"co": "^4.6.0",
"cookie-parser": "~1.4.3",
"debug": "~2.6.9",
"ejs": "^2.6.1",
"excel-export": "^0.5.1",
"express": "~4.16.0",
"express-session": "^1.15.6",
"http-errors": "~1.6.2",
"httpx": "^2.1.4",
"jade": "~1.11.0",
"jshint": "^2.9.6",
"log4js": "^3.0.6",
"morgan": "~1.9.0",
"oracle": "^0.4.1",
"oracledb": "^2.3.0",
"request": "^2.88.0",
"shapefile": "^0.6.6"
}
}
This diff is collapsed.
JSAPI build date: Tue Dec 12 01:27:04 PST 2017
\ No newline at end of file
arcgis-js-api.git
origin/master
07f275dcad3242cf90341458916dc3ead0e7e396
\ No newline at end of file
//>>built
define("dgrid/CellSelection","dojo/_base/declare dojo/aspect dojo/on dojo/has ./Selection put-selector/put".split(" "),function(p,r,t,u,q,m){return p("dgrid.CellSelection",q,{selectionDelegate:".dgrid-cell",_selectionTargetType:"cells",_select:function(a,f,b){var d,e;"undefined"===typeof b&&(b=!0);if("object"!=typeof a||!("element"in a))a=this.cell(a);else if(!a.row){if(b&&"object"===typeof b)for(e in b)this._select(this.cell(a.id,e),null,b[e]);else for(e in this.columns)this._select(this.cell(a.id,
e),null,b);return}if(this.allowSelect(a)){var h=a.row.id,c=this.selection[h];if(a.column){var g=c&&c[a.column.id];null===b&&(b=!g);var k=a.element,c=c||{};c[a.column.id]=b;this.selection[h]=c;var n=!1;for(d in c)if(!0===c[d]){n=!0;break}n||delete this.selection[h];k&&(b?m(k,".dgrid-selected"+(this.addUiClasses?".ui-state-active":"")):m(k,"!dgrid-selected!ui-state-active"));b!=g&&k&&this._selectionEventQueues[(b?"":"de")+"select"].push(a);if(f)if(f.element||(f=this.cell(f)),f&&f.row){g=f.element;d=
a.element;h=this._determineSelectionDirection(d,g);h||(g=(f=this.cell(document.getElementById(f.row.element.id),g.columnId))&&f.element,h=this._determineSelectionDirection(d,g));d=a.column.id;var g=f.column.id,l,c=[];for(e in this.columns)if(l&&c.push(e),e==d&&(d=c)||e==g&&(g=c)){c.push(e);if(l||d==c&&e==g)break;l=!0}e=a.row.element;g=f.row.element;do{for(d=0;d<c.length;d++)a=this.cell(e,c[d]),this._select(a,null,b);if(e==g)break}while(e=a.row.element[h])}else this._lastSelected=k,console.warn("The selection range has been reset because the beginning of the selection is no longer in the DOM. If you are using OnDemandList, you may wish to increase farOffRemoval to avoid this, but note that keeping more nodes in the DOM may impact performance.")}else for(d in this.columns)this._select(this.cell(h,
d),null,b)}},_determineSelectionDirection:function(){var a=this.inherited(arguments);return"down"===a?"nextSibling":"up"===a?"previousSibling":a},isSelected:function(a,f){if("undefined"===typeof a||null===a)return!1;a.element||(a=this.cell(a,f));var b=a.row.id;return b in this.selection?!!this.selection[b][a.column.id]:this.allSelected&&(!a.row.data||this.allowSelect(a))},clearSelection:function(a){a=!1;this.inherited(arguments)}})});
\ No newline at end of file
//>>built
define("dgrid/ColumnSet","dojo/_base/kernel dojo/_base/declare dojo/_base/lang dojo/_base/Deferred dojo/on dojo/aspect dojo/query dojo/has ./util/misc put-selector/put xstyle/has-class ./Grid dojo/_base/sniff xstyle/css!./css/columnset.css".split(" "),function(y,z,A,B,n,p,k,g,q,l,C,F){function x(a,b){function c(){k(".dgrid-column-set",b).forEach(function(c){c.scrollLeft=d[c.getAttribute("data-dgrid-column-set-id")]})}var d=a._columnSetScrollLefts;8>g("ie")||g("quirks")?setTimeout(c,1):c()}g.add("event-mousewheel",
function(a,b,c){return"onmousewheel"in c});g.add("event-wheel",function(a,b,c){return"onwheel"in c});C("safari","ie-7");var D=g("event-mousewheel")||g("event-wheel")?function(a){return function(b,c){return n(b,g("event-mousewheel")?"mousewheel":"wheel",function(d){var e=d.target;1!==e.nodeType&&(e=e.parentNode);for(;!k.matches(e,".dgrid-column-set[data-dgrid-column-set-id]",b);)if(e===b||!(e=e.parentNode))return;(d=d.deltaX||-d.wheelDeltaX/3)&&c.call(null,a,e,d)})}}:function(a){return function(b,
c){return n(b,".dgrid-column-set[data-dgrid-column-set-id]:MozMousePixelScroll",function(b){1===b.axis&&c.call(null,a,this,b.detail)})}};return z("dgrid.ColumnSet",null,{postCreate:function(){var a=this;this.inherited(arguments);this.on(D(this),function(b,c,a){c=c.getAttribute("data-dgrid-column-set-id");b=b._columnSetScrollers[c];a=b.scrollLeft+a;b.scrollLeft=0>a?0:a});this.on(".dgrid-column-set:dgrid-cellfocusin",function(b){a._onColumnSetCellFocus(b,this)})},columnSets:[],createRowCells:function(a,
b,c,d){for(var e=l("table.dgrid-row-table"),g=l(e,"tbody tr"),f=0,h=this.columnSets.length;f<h;f++){var E=l(g,a+".dgrid-column-set-cell.dgrid-column-set-"+f+" div.dgrid-column-set[data-dgrid-column-set-id\x3d"+f+"]"),m;if((m=c||this.subRows)&&m.length){for(var k=[],n=f+"-",r=0,p=m.length;r<p;r++){var t=m[r],u=[];u.className=t.className;for(var v=0,q=t.length;v<q;v++){var w=t[v];null!=w.id&&0===w.id.indexOf(n)&&u.push(w)}k.push(u)}m=k}else m=void 0;E.appendChild(this.inherited(arguments,[a,b,m||this.columnSets[f],
d]))}return e},renderArray:function(){var a=this,b=this.inherited(arguments);B.when(b,function(c){for(var b=0;b<c.length;b++)x(a,c[b])});return b},insertRow:function(){var a=this.inherited(arguments);x(this,a);return a},renderHeader:function(){function a(){d._positionScrollers()}this.inherited(arguments);var b=this.columnSets,c=this._columnSetScrollers;this._columnSetScrollerContents={};this._columnSetScrollLefts={};var d=this,e;if(c)for(e in c)l(c[e],"!");else p.after(this,"resize",a,!0),p.after(this,
"styleColumn",a,!0),this._columnSetScrollerNode=l(this.footerNode,"+div.dgrid-column-set-scroller-container");c=this._columnSetScrollers={};e=0;for(c=b.length;e<c;e++)this._putScroller(b[e],e);this._positionScrollers()},styleColumnSet:function(a,b){var c=this.addCssRule("#"+q.escapeCssIdentifier(this.domNode.id)+" .dgrid-column-set-"+q.escapeCssIdentifier(a,"-"),b);this._positionScrollers();return c},_destroyColumns:function(){var a=this.columnSets.length,b,c,d,e,g,f,h,k;for(b=0;b<a;b++)for(f=this.columnSets[b],
c=0,e=f.length;c<e;c++)for(h=f[c],d=0,g=h.length;d<g;d++)k=h[d],"function"===typeof k.destroy&&k.destroy();this.inherited(arguments)},configStructure:function(){this.columns={};this.subRows=[];for(var a=0,b=this.columnSets.length;a<b;a++)for(var c=this.columnSets[a],d=0;d<c.length;d++)c[d]=this._configColumns(a+"-"+d+"-",c[d]);this.inherited(arguments)},_positionScrollers:function(){var a=this.domNode,b=this._columnSetScrollers,c=this._columnSetScrollerContents,d=this.columnSets,e=0,l=0,f,h;f=0;for(d=
d.length;f<d;f++)h=k('.dgrid-column-set[data-dgrid-column-set-id\x3d"'+f+'"]',a)[0],e=h.offsetWidth,h=h.firstChild.offsetWidth,c[f].style.width=h+"px",b[f].style.width=e+"px",9>g("ie")&&(b[f].style.overflowX=h>e?"scroll":"auto"),h>e&&l++;this._columnSetScrollerNode.style.bottom=this.showFooter?this.footerNode.offsetHeight+"px":"0";this.bodyNode.style.bottom=l?g("dom-scrollbar-height")+(g("ie")?1:0)+"px":"0"},_putScroller:function(a,b){var c=this._columnSetScrollers[b]=l(this._columnSetScrollerNode,
"span"+(9>g("ie")||g("ff")?".dgrid-scrollbar-height":"")+".dgrid-column-set-scroller.dgrid-column-set-scroller-"+b+"[data-dgrid-column-set-id\x3d"+b+"]");this._columnSetScrollerContents[b]=l(c,"div.dgrid-column-set-scroller-content");n(c,"scroll",A.hitch(this,"_onColumnSetScroll"))},_onColumnSetScroll:function(a){var b=a.target.scrollLeft;a=a.target.getAttribute("data-dgrid-column-set-id");var c;this._columnSetScrollLefts[a]!=b&&(k('.dgrid-column-set[data-dgrid-column-set-id\x3d"'+a+'"],.dgrid-column-set-scroller[data-dgrid-column-set-id\x3d"'+
a+'"]',this.domNode).forEach(function(a,e){a.scrollLeft=b;e||(c=a.scrollLeft)}),this._columnSetScrollLefts[a]=c)},_setColumnSets:function(a){this._destroyColumns();this.columnSets=a;this._updateColumns()},setColumnSets:function(a){y.deprecated("setColumnSets(...)",'use set("columnSets", ...) instead',"dgrid 0.4");this.set("columnSets",a)},_scrollColumnSet:function(a,b){var c=a.tagName?a.getAttribute("data-dgrid-column-set-id"):a;this._columnSetScrollers[c].scrollLeft=0>b?0:b},_onColumnSetCellFocus:function(a,
b){var c=a.target,d=b.getAttribute("data-dgrid-column-set-id"),d=this._columnSetScrollers[d];(c.offsetLeft-d.scrollLeft+c.offsetWidth>b.offsetWidth||d.scrollLeft>c.offsetLeft)&&this._scrollColumnSet(b,c.offsetLeft)}})});
\ No newline at end of file
//>>built
define("dgrid/Grid","dojo/_base/kernel dojo/_base/declare dojo/on dojo/has put-selector/put ./List ./util/misc dojo/_base/sniff".split(" "),function(x,h,y,m,g,B,r){function p(a,b){b&&b.nodeType&&a.appendChild(b)}function z(a,b,c,e){if(this.formatter){e=this.formatter;var d=this.grid.formatterScope;c.innerHTML="string"===typeof e&&d?d[e](b,a):this.formatter(b,a)}else null!=b&&c.appendChild(document.createTextNode(b))}var A=8>m("ie")&&!m("quirks");h=h("dgrid.Grid",B,{columns:null,cellNavigation:!0,
tabableHeader:!0,showHeader:!0,column:function(a){return"object"!=typeof a?this.columns[a]:this.cell(a).column},listType:"grid",cell:function(a,b){if(a.column&&a.element)return a;a.target&&a.target.nodeType&&(a=a.target);var c;if(a.nodeType){do{if(this._rowIdToObject[a.id])break;var e=a.columnId;if(e){b=e;c=a;break}a=a.parentNode}while(a&&a!=this.domNode)}if(!c&&"undefined"!=typeof b){var d=this.row(a);if(e=d&&d.element)for(var e=e.getElementsByTagName("td"),f=0;f<e.length;f++)if(e[f].columnId==b){c=
e[f];break}}if(null!=a)return{row:d||this.row(a),column:b&&this.column(b),element:c}},createRowCells:function(a,b,c,e){var d=g("table.dgrid-row-table[role\x3dpresentation]"),f=9>m("ie")||m("quirks")?g(d,"tbody"):d,w,u,h,v,p,t,l,n,k,q;c=c||this.subRows;u=0;for(h=c.length;u<h;u++)for(t=c[u],w=g(f,"tr"),t.className&&g(w,"."+t.className),v=0,p=t.length;v<p;v++){l=t[v];n=l.id;k=l.field?".field-"+r.escapeCssIdentifier(l.field,"-"):"";(q="function"===typeof l.className?l.className(e):l.className)&&(k+="."+
q);k=g(a+(".dgrid-cell.dgrid-cell-padding"+(n?".dgrid-column-"+r.escapeCssIdentifier(n,"-"):"")+k.replace(/ +/g,"."))+"[role\x3d"+("th"===a?"columnheader":"gridcell")+"]");k.columnId=n;A?(n=g(k,"!dgrid-cell-padding div.dgrid-cell-padding"),k.contents=n):n=k;if(q=l.colSpan)k.colSpan=q;if(q=l.rowSpan)k.rowSpan=q;b(n,l);w.appendChild(k)}return d},left:function(a,b){a.element||(a=this.cell(a));return this.cell(this._move(a,-(b||1),"dgrid-cell"))},right:function(a,b){a.element||(a=this.cell(a));return this.cell(this._move(a,
b||1,"dgrid-cell"))},renderRow:function(a,b){var c=this.createRowCells("td",function(e,d){var c=a;d.get?c=d.get(a):"field"in d&&"_item"!=d.field&&(c=c[d.field]);d.renderCell?p(e,d.renderCell(a,c,e,b)):z.call(d,a,c,e,b)},b&&b.subRows,a);return g("div[role\x3drow]\x3e",c)},renderHeader:function(){var a=this,b=this.headerNode,c=b.childNodes.length;for(b.setAttribute("role","row");c--;)g(b.childNodes[c],"!");c=this.createRowCells("th",function(a,b){var c=b.headerNode=a;A&&(a=a.parentNode);var d=b.field;
d&&(a.field=d);b.renderHeaderCell?p(c,b.renderHeaderCell(c)):("label"in b||b.field)&&c.appendChild(document.createTextNode("label"in b?b.label:b.field));!1!==b.sortable&&d&&"_item"!=d&&(a.sortable=!0,a.className+=" dgrid-sortable")},this.subRows&&this.subRows.headerRows);this._rowIdToObject[c.id=this.id+"-header"]=this.columns;b.appendChild(c);this._sortListener&&this._sortListener.remove();this._sortListener=y(c,"click,keydown",function(c){if("click"==c.type||32==c.keyCode||!m("opera")&&13==c.keyCode){var d=
c.target,e,g,h;do if(d.sortable){h=[{attribute:e=d.field||d.columnId,descending:(g=a._sort[0])&&g.attribute==e&&!g.descending}];e={bubbles:!0,cancelable:!0,grid:a,parentType:c.type,sort:h};y.emit(c.target,"dgrid-sort",e)&&(a._sortNode=d,a.set("sort",h));break}while((d=d.parentNode)&&d!=b)}})},resize:function(){var a=this.headerNode.firstChild,b=this.contentNode,c;this.inherited(arguments);if(!m("ie")||7<m("ie")&&!m("quirks"))b.style.width="",b&&a&&(c=a.offsetWidth)!=b.offsetWidth&&(b.style.width=
c+"px")},destroy:function(){this._destroyColumns();this._sortListener&&this._sortListener.remove();this.inherited(arguments)},_setSort:function(a,b){this.inherited(arguments);this.updateSortArrow(this._sort)},_findSortArrowParent:function(a){var b=this.columns,c;for(c in b){var e=b[c];if(e.field==a)return e.headerNode}},updateSortArrow:function(a,b){this._lastSortedArrow&&(g(this._lastSortedArrow,"\x3c!dgrid-sort-up!dgrid-sort-down"),g(this._lastSortedArrow,"!"),delete this._lastSortedArrow);b&&(this._sort=
a);if(a[0]){var c=a[0].attribute,e=a[0].descending,c=this._sortNode||this._findSortArrowParent(c),d;delete this._sortNode;c&&(c=c.contents||c,d=this._lastSortedArrow=g("div.dgrid-sort-arrow.ui-icon[role\x3dpresentation]"),d.innerHTML="\x26nbsp;",c.insertBefore(d,c.firstChild),g(c,e?".dgrid-sort-down":".dgrid-sort-up"),this.resize())}},styleColumn:function(a,b){return this.addCssRule("#"+r.escapeCssIdentifier(this.domNode.id)+" .dgrid-column-"+r.escapeCssIdentifier(a,"-"),b)},_configColumns:function(a,
b){var c=[],e=b instanceof Array;r.each(b,function(d,f){"string"==typeof d&&(b[f]=d={label:d});e||d.field||(d.field=f);f=d.id=d.id||(isNaN(f)?f:a+f);this._configColumn&&(this._configColumn(d,f,b,a),f=d.id);e&&(this.columns[f]=d);d.grid=this;"function"===typeof d.init&&d.init();c.push(d)},this);return e?b:c},_destroyColumns:function(){var a=this.subRows,b=a&&a.length,c,e,d,f;this.cleanup();for(c=0;c<b;c++)for(e=0,f=a[c].length;e<f;e++)d=a[c][e],"function"===typeof d.destroy&&d.destroy()},configStructure:function(){var a=
this.subRows,b=this._columns=this.columns;this.columns=!b||b instanceof Array?{}:b;if(a)for(b=0;b<a.length;b++)a[b]=this._configColumns(b+"-",a[b]);else this.subRows=[this._configColumns("",b)]},_getColumns:function(){return this._columns||this.columns},_setColumns:function(a){this._destroyColumns();this.subRows=null;this.columns=a;this._updateColumns()},_setSubRows:function(a){this._destroyColumns();this.subRows=a;this._updateColumns()},setColumns:function(a){x.deprecated("setColumns(...)",'use set("columns", ...) instead',
"dgrid 0.4");this.set("columns",a)},setSubRows:function(a){x.deprecated("setSubRows(...)",'use set("subRows", ...) instead',"dgrid 0.4");this.set("subRows",a)},_updateColumns:function(){this.configStructure();this.renderHeader();this.refresh();this._lastCollection&&this.renderArray(this._lastCollection);this._started&&(this._sort&&this._sort.length?this.updateSortArrow(this._sort):this.resize())}});h.appendIfNode=p;h.defaultRenderCell=z;return h});
\ No newline at end of file
//>>built
define("dgrid/GridFromHtml",["./Grid","dojo/_base/declare","put-selector/put"],function(n,p,q){var e=p("dgrid.GridFromHtml",n,{configStructure:function(){if(!this._checkedTrs){this._checkedTrs=!0;for(var b=this.srcNodeRef,c=[],a=b.getElementsByTagName("tr"),d=a.length,r=e.utils.getColumnFromCell,g,f,h,m,k=0;k<d;k++){g=[];c.push(g);f=a[k];h=f.getElementsByTagName("th");m=h.length;for(var l=0;l<m;l++)g.push(r(h[l]))}f&&b.removeChild(f.parentNode);this.subRows=c}return this.inherited(arguments)},create:function(b,
c){var a=document.createElement("div"),d=c.id,e=c.getAttribute("style");d&&(this.id=d);a.className=c.className;e&&a.setAttribute("style",e);c.parentNode.replaceChild(a,c);(b=b||{}).srcNodeRef=c;this.inherited(arguments,[b,a]);q(c,"!")}});e.utils={getBoolFromAttr:function(b,c){var a=b.getAttribute(c);return a&&"false"!==a},getNumFromAttr:function(b,c){var a=b.getAttribute(c),a=a&&Number(a);return isNaN(a)?void 0:a},getPropsFromNode:function(b){var c;b=b.getAttribute("data-dgrid-column");if(!b)return{};
try{c=eval("("+b+")")}catch(a){throw Error("Error in data-dgrid-column {"+b+"}: "+a.toString());}return c},getColumnFromCell:function(b){var c=e.utils.getNumFromAttr,a,d;a=e.utils.getPropsFromNode(b);a.label="label"in a?a.label:b.innerHTML;a.field=a.field||b.className||b.innerHTML;!a.className&&b.className&&(a.className=b.className);!a.rowSpan&&(d=c(b,"rowspan"))&&(a.rowSpan=d);!a.colSpan&&(d=c(b,"colspan"))&&(a.colSpan=d);return a}};return e});
\ No newline at end of file
//>>built
define("dgrid/GridWithColumnSetsFromHtml",["./GridFromHtml","./ColumnSet","dojo/_base/declare"],function(p,q,r){function t(f){function u(c){e+=c;b=v[d];e>=b&&(l[d][a]=g,e-=b,d++,g=[])}var l=[],v=[],h=[],k=f.getElementsByTagName("colgroup"),m=k.length,w=f.getElementsByTagName("tr"),q=w.length,r=p.utils.getNumFromAttr,t=p.utils.getColumnFromCell,e,d,g,n,a,c,b;if(2>m)return!1;for(a=0;a<m;a++)for(b=r(k[a],"span")||1,v[a]=b,l[a]=[],h[a]=[],c=0;c<b;c++)h[a][c]=0;for(a=0;a<q;a++){e=d=0;g=[];n=w[a];k=n.getElementsByTagName("th");
m=k.length;for(c=0;c<m;c++){for(;h[d][e];)h[d][e]--,u(1);b=t(k[c]);g.push(b);h[d][e]=b.rowSpan?b.rowSpan-1:0;u(b.colSpan||1)}g.length&&(l[d][a]=g)}n&&f.removeChild(n.parentNode);return l}return r("dgrid.GridWithColumnSetsFromHtml",[p,q],{configStructure:function(){var f;!this._checkedTrs&&(f=t(this.srcNodeRef))&&(this.columnSets=f,this._checkedTrs=!0);return this.inherited(arguments)}})});
\ No newline at end of file
//>>built
define("dgrid/Keyboard","dojo/_base/declare dojo/aspect dojo/on dojo/_base/lang dojo/has put-selector/put ./util/misc dojo/_base/Deferred dojo/_base/sniff".split(" "),function(u,m,n,q,p,v,x,y){function z(a){a.preventDefault()}var H={checkbox:1,radio:1,button:1},A=/\bdgrid-cell\b/,B=/\bdgrid-row\b/,e=u("dgrid.Keyboard",null,{pageSkip:10,tabIndex:0,keyMap:null,headerKeyMap:null,postMixInProperties:function(){this.inherited(arguments);this.keyMap||(this.keyMap=q.mixin({},e.defaultKeyMap));this.headerKeyMap||
(this.headerKeyMap=q.mixin({},e.defaultHeaderKeyMap))},postCreate:function(){function a(a){var b=a.target;return b.type&&(!H[b.type]||32==a.keyCode)}function c(c){function d(){b._focusedHeaderNode&&(b._focusedHeaderNode.tabIndex=-1);if(b.showHeader){if(e)for(var a=0,c,d=b.headerNode.getElementsByTagName("th");c=d[a];++a){if(w.test(c.className)){b._focusedHeaderNode=g=c;break}}else b._focusedHeaderNode=g=b.headerNode;g&&(g.tabIndex=b.tabIndex)}}var e=b.cellNavigation,w=e?A:B,f=c===b.headerNode,g=c;
f?(d(),m.after(b,"renderHeader",d,!0)):m.after(b,"renderArray",function(a){return y.when(a,function(a){var d=b._focusedNode||g;if(w.test(d.className)&&x.contains(c,d))return a;for(var e=0,f=c.getElementsByTagName("*"),k;k=f[e];++e)if(w.test(k.className)){d=b._focusedNode=k;break}d.tabIndex=b.tabIndex;return a})});b._listeners.push(n(c,"mousedown",function(c){a(c)||b._focusOnNode(c.target,f,c)}));b._listeners.push(n(c,"keydown",function(c){if(!c.metaKey&&!c.altKey){var d=b[f?"headerKeyMap":"keyMap"][c.keyCode];
d&&!a(c)&&d.call(b,c)}}))}this.inherited(arguments);var b=this;this.tabableHeader&&(c(this.headerNode),n(this.headerNode,"dgrid-cellfocusin",function(){b.scrollTo({x:this.scrollLeft})}));c(this.contentNode);this._debouncedEnsureRowScroll=x.debounce(this._ensureRowScroll,this)},removeRow:function(a){if(!this._focusedNode)return this.inherited(arguments);var c=this,b=document.activeElement===this._focusedNode,e=this[this.cellNavigation?"cell":"row"](this._focusedNode),d=e.row||e,h;a=a.element||a;a===
d.element&&((h=this.down(d,!0))&&h.element!==a||(h=this.up(d,!0)),this._removedFocus={active:b,rowId:d.id,columnId:e.column&&e.column.id,siblingId:h&&h.element!==a?h.id:void 0},setTimeout(function(){c._removedFocus&&c._restoreFocus(d.id)},0),this._focusedNode=null);this.inherited(arguments)},insertRow:function(a){var c=this.inherited(arguments);this._removedFocus&&!this._removedFocus.wait&&this._restoreFocus(c);return c},_restoreFocus:function(a){var c=this._removedFocus,b;if((a=(a=a&&this.row(a))&&
a.element&&a.id===c.rowId?a:"undefined"!==typeof c.siblingId&&this.row(c.siblingId))&&a.element){if(!a.element.parentNode.parentNode){c.wait=!0;return}"undefined"!==typeof c.columnId&&(b=this.cell(a,c.columnId))&&b.element&&(a=b);c.active&&0!==a.element.offsetHeight?this._focusOnNode(a,!1,null):(v(a.element,".dgrid-focus"),a.element.tabIndex=this.tabIndex,this._focusedNode=a.element)}delete this._removedFocus},addKeyHandler:function(a,c,b){return m.after(this[b?"headerKeyMap":"keyMap"],a,c,!0)},_ensureRowScroll:function(a){var c=
this.getScrollPosition().y;c>a.offsetTop?this.scrollTo({y:a.offsetTop}):c+this.contentNode.offsetHeight<a.offsetTop+a.offsetHeight&&this.scrollTo({y:a.offsetTop-this.contentNode.offsetHeight+a.offsetHeight})},_focusOnNode:function(a,c,b){var e="_focused"+(c?"Header":"")+"Node",d=this[e],h=this.cellNavigation?"cell":"row",l=this[h](a),f,g,k,m,r;if(a=l&&l.element){if(this.cellNavigation)for(f=a.getElementsByTagName("input"),r=0,k=f.length;r<k;r++)if(g=f[r],(-1!=g.tabIndex||"_dgridLastValue"in g)&&!g.disabled){8>
p("ie")&&(g.style.position="relative");g.focus();8>p("ie")&&(g.style.position="");m=!0;break}null!==b&&(b=q.mixin({grid:this},b),b.type&&(b.parentType=b.type),b.bubbles||(b.bubbles=!0));d&&(v(d,"!dgrid-focus[!tabIndex]"),8>p("ie")&&(d.style.position=""),b&&(b[h]=this[h](d),n.emit(d,"dgrid-cellfocusout",b)));d=this[e]=a;b&&(b[h]=l);e=this.cellNavigation?A:B;!m&&e.test(a.className)&&(8>p("ie")&&(a.style.position="relative"),a.tabIndex=this.tabIndex,a.focus());v(a,".dgrid-focus");b&&n.emit(d,"dgrid-cellfocusin",
b);this.cellNavigation&&(this.columnSets||1<this.subRows.length)&&!c&&this._debouncedEnsureRowScroll(l.row.element)}},focusHeader:function(a){this._focusOnNode(a||this._focusedHeaderNode,!0)},focus:function(a){(a=a||this._focusedNode)?this._focusOnNode(a,!1):this.contentNode.focus()}}),t=e.moveFocusVertical=function(a,c){var b=this.cellNavigation,e=this[b?"cell":"row"](a),e=b&&e.column.id,d=this.down(this._focusedNode,c,!0);b&&(d=this.cell(d,e));this._focusOnNode(d,!1,a);a.preventDefault()};u=e.moveFocusUp=
function(a){t.call(this,a,-1)};var I=e.moveFocusDown=function(a){t.call(this,a,1)},J=e.moveFocusPageUp=function(a){t.call(this,a,-this.pageSkip)},K=e.moveFocusPageDown=function(a){t.call(this,a,this.pageSkip)},C=e.moveFocusHorizontal=function(a,c){if(this.cellNavigation){var b=!this.row(a);this._focusOnNode(this.right(this["_focused"+(b?"Header":"")+"Node"],c),b,a);a.preventDefault()}},D=e.moveFocusLeft=function(a){C.call(this,a,-1)},E=e.moveFocusRight=function(a){C.call(this,a,1)},F=e.moveHeaderFocusEnd=
function(a,c){var b;this.cellNavigation&&(b=this.headerNode.getElementsByTagName("th"),this._focusOnNode(b[c?0:b.length-1],!0,a));a.preventDefault()},L=e.moveHeaderFocusHome=function(a){F.call(this,a,!0)},G=e.moveFocusEnd=function(a,c){var b=this,e=this.cellNavigation,d=this.contentNode,h=d.scrollTop+(c?0:d.scrollHeight),d=d[c?"firstChild":"lastChild"],l=-1<d.className.indexOf("dgrid-preload"),f=l?d[(c?"next":"previous")+"Sibling"]:d,g=f.offsetTop+(c?0:f.offsetHeight),k;if(l){for(;f&&0>f.className.indexOf("dgrid-row");)f=
f[(c?"next":"previous")+"Sibling"];if(!f)return}!l||1>d.offsetHeight?(e&&(f=this.cell(f,this.cell(a).column.id)),this._focusOnNode(f,!1,a)):(p("dom-addeventlistener")||(a=q.mixin({},a)),k=m.after(this,"renderArray",function(d){k.remove();return y.when(d,function(d){d=d[c?0:d.length-1];e&&(d=b.cell(d,b.cell(a).column.id));b._focusOnNode(d,!1,a)})}));h===g&&a.preventDefault()},M=e.moveFocusHome=function(a){G.call(this,a,!0)};e.defaultKeyMap={32:z,33:J,34:K,35:G,36:M,37:D,38:u,39:E,40:I};e.defaultHeaderKeyMap=
{32:z,35:F,36:L,37:D,39:E};return e});
\ No newline at end of file
This diff is collapsed.
//>>built
define("dgrid/OnDemandGrid",["dojo/_base/declare","./Grid","./OnDemandList"],function(a,b,c){return a("dgrid.OnDemandGrid",[b,c],{})});
\ No newline at end of file
//>>built
define("dgrid/OnDemandList","./List ./_StoreMixin dojo/_base/declare dojo/_base/lang dojo/_base/Deferred dojo/dom dojo/on ./util/misc put-selector/put".split(" "),function(H,I,J,E,u,K,v,w,q){return J("dgrid.OnDemandList",[H,I],{minRowsPerPage:25,maxRowsPerPage:250,maxEmptySpace:Infinity,bufferRows:10,farOffRemoval:2E3,queryRowsOverlap:0,pagingMethod:"debounce",pagingDelay:w.defaultDelay,keepScrollPosition:!1,rowHeight:22,postCreate:function(){this.inherited(arguments);var c=this;v(this.bodyNode,"scroll",
w[this.pagingMethod](function(f){c._processScroll(f)},null,this.pagingDelay))},destroy:function(){this.inherited(arguments);this._refreshTimeout&&clearTimeout(this._refreshTimeout)},renderQuery:function(c,f){function h(a){q(t,"!");if(a)throw d._refreshDeferred&&(d._refreshDeferred.reject(a),delete d._refreshDeferred),a;}var d=this,a=f&&f.container||this.contentNode,g={query:c,count:0,options:f},m,e=this.preload,b,z={node:q(a,"div.dgrid-preload",{rowIndex:0}),count:0,query:c,next:g,options:f};z.node.style.height=
"0";g.node=m=q(a,"div.dgrid-preload");g.previous=z;m.rowIndex=this.minRowsPerPage;e?((g.next=e.next)&&m.offsetTop>=e.node.offsetTop?g.previous=e:(g.next=e,g.previous=e.previous),g.previous.next=g,g.next.previous=g):this.preload=g;var t=q(m,"-div.dgrid-loading");q(t,"div.dgrid-below").innerHTML=this.loadingMessage;f=E.mixin(this.get("queryOptions"),f,{start:0,count:this.minRowsPerPage},"level"in c?{queryLevel:c.level}:null);this._trackError(function(){return b=c(f)});if("undefined"===typeof b)h();
else return u.when(d.renderArray(b,m,f),function(a){return u.when("undefined"===typeof b.total?b.length:b.total,function(c){var h=a.length,e=m.parentNode,p=d.noDataNode;q(t,"!");"queryLevel"in f||(d._total=c);0===c&&e&&(p&&(q(p,"!"),delete d.noDataNode),d.noDataNode=p=q("div.dgrid-no-data"),e.insertBefore(p,d._getFirstRowSibling(e)),p.innerHTML=d.noDataMessage);for(p=e=0;p<h;p++)e+=d._calcRowHeight(a[p]);h&&e&&(d.rowHeight=e/h);e=d.rowHeight*d.bufferRows;e>d.farOffRemoval&&(d.farOffRemoval=e);c-=
h;g.count=c;m.rowIndex=h;c?m.style.height=Math.min(c*d.rowHeight,d.maxEmptySpace)+"px":(m.style.display="none",f.count++);d._previousScrollPosition&&(d.scrollTo(d._previousScrollPosition),delete d._previousScrollPosition);d._processScroll();d._refreshDeferred&&(d._refreshDeferred.resolve(b),delete d._refreshDeferred);return a},h)},h),b},refresh:function(c){var f=this,h=c&&c.keepScrollPosition,d;"undefined"===typeof h&&(h=this.keepScrollPosition);h&&(this._previousScrollPosition=this.getScrollPosition());
this.inherited(arguments);if(this.store)return h=this._refreshDeferred=new u,d=f.renderQuery(function(a){return f.store.query(f.query,a)}),"undefined"===typeof d&&h.reject(),h.then(function(a){f._refreshTimeout=setTimeout(function(){v.emit(f.domNode,"dgrid-refresh-complete",{bubbles:!0,cancelable:!1,grid:f,results:a});f._refreshTimeout=null},0);delete f._refreshDeferred;return a},function(a){delete f._refreshDeferred;throw a;})},resize:function(){this.inherited(arguments);this._processScroll()},_getFirstRowSibling:function(c){return c.lastChild},
_calcRowHeight:function(c){var f=c.nextSibling;return f&&!/\bdgrid-preload\b/.test(f.className)?f.offsetTop-c.offsetTop:c.offsetHeight},lastScrollTop:0,_processScroll:function(c){function f(b,c,d,e){var f=a.farOffRemoval,g=b.node;if(c>2*f){for(var k,l=g[d],m=0,C=0,n=[];k=l;){var p=a._calcRowHeight(k);if(m+p+f>c||0>l.className.indexOf("dgrid-row")&&0>l.className.indexOf("dgrid-loading"))break;l=k[d];m+=p;C+=k.count||1;a.removeRow(k,!0);n.push(k)}b.count+=C;e?(g.rowIndex-=C,h(b)):g.style.height=g.offsetHeight+
m+"px";var r=q("div",n);setTimeout(function(){q(r,"!")},1)}}function h(b,c){b.node.style.height=Math.min(b.count*a.rowHeight,c?Infinity:a.maxEmptySpace)+"px"}function d(a,b){do a=b?a.next:a.previous;while(a&&!a.node.offsetWidth);return a}var a=this,g=a.bodyNode;c=c&&c.scrollTop||this.getScrollPosition().y;var g=g.offsetHeight+c,m,e,b=a.preload,z=a.lastScrollTop,t=a.bufferRows*a.rowHeight,v=t-a.rowHeight,w,F,B,p=!0;for(a.lastScrollTop=c;b&&!b.node.offsetWidth;)b=b.previous;for(;b&&b!=m;){m=a.preload;
a.preload=b;e=b.node;var k=e.offsetTop;if(g+1+v<k)b=d(b,p=!1);else if(c-1-v>k+e.offsetHeight)b=d(b,p=!0);else{var l=((e.rowIndex?c-t:g)-k)/a.rowHeight,k=(g-c+2*t)/a.rowHeight,k=k+Math.min(Math.abs(Math.max(Math.min((c-z)*a.rowHeight,a.maxRowsPerPage/2),a.maxRowsPerPage/-2)),10);0==e.rowIndex&&(l-=k);l=Math.max(l,0);10>l&&0<l&&k+l<a.maxRowsPerPage&&(k+=Math.max(0,l),l=0);k=Math.min(Math.max(k,a.minRowsPerPage),a.maxRowsPerPage,b.count);if(0==k)b=d(b,p);else{var k=Math.ceil(k),l=Math.min(Math.floor(l),
b.count-k),n=E.mixin(a.get("queryOptions"),b.options);b.count-=k;var r=e,A,x=a.queryRowsOverlap,D=(0<e.rowIndex||e.offsetTop>c)&&b;if(D){var y=b.previous;y&&(f(y,c-(y.node.offsetTop+y.node.offsetHeight),"nextSibling"),0<l&&y.node==e.previousSibling?(l=Math.min(b.count,l),b.previous.count+=l,h(b.previous,!0),e.rowIndex+=l,x=0):k+=l,b.count-=l);n.start=e.rowIndex-x;n.count=Math.min(k+x,a.maxRowsPerPage);e.rowIndex=n.start+n.count}else b.next&&(f(b.next,b.next.node.offsetTop-g,"previousSibling",!0),
r=e.nextSibling,r==b.next.node?(b.next.count+=b.count-l,b.next.node.rowIndex=l+k,h(b.next),b.count=l,x=0):A=!0),n.start=b.count,n.count=Math.min(k+x,a.maxRowsPerPage);A&&r&&r.offsetWidth&&(A=r.offsetTop);h(b);"level"in b.query&&(n.queryLevel=b.query.level);if("queryLevel"in n||!(n.start>a._total||0>n.count)){e=q(r,"-div.dgrid-loading[style\x3dheight:"+k*a.rowHeight+"px]");q(e,"div.dgrid-"+(D?"below":"above")).innerHTML=a.loadingMessage;e.count=k;var G=b.query(n);if(void 0===a._trackError(function(){return G})){q(e,
"!");return}(function(b,c,d,e){B=u.when(a.renderArray(e,b,n),function(f){F=e;r=b.nextSibling;q(b,"!");if(d&&r&&r.offsetWidth){var g=a.getScrollPosition();a.scrollTo({x:g.x,y:g.y+r.offsetTop-d,preserveMomentum:!0})}u.when(e.total||e.length,function(b){"queryLevel"in n||(a._total=b);c&&(c.count=b-c.node.rowIndex,0===c.count&&n.count++,h(c))});a._processScroll();return f},function(a){q(b,"!");throw a;})}).call(this,e,D,A,G);b=b.previous}}}}B&&(w=this._refreshDeferred)&&(delete this._refreshDeferred,
u.when(B,function(){w.resolve(F)}))},removeRow:function(c,f){if(c){var h=c.previousSibling,d=c.nextSibling,a;if(a=h)a=h.observerIndex,a=null!=a?a:h.previousObserverIndex;h=a;if(a=d)a=d.observerIndex,a=null!=a?a:d.nextObserverIndex;d=c.observerIndex;c.observerIndex=void 0;f&&(c.nextObserverIndex=a,c.previousObserverIndex=h);if(this.cleanEmptyObservers&&-1<d&&d!==h&&d!==a&&(h=this.observers,a=h[d])){if(!f)for(var g=a.rows,m=0;m<g.length;m++)if(g[m]!=c&&K.isDescendant(g[m],this.domNode))return this.inherited(arguments);
a.cancel();this._numObservers--;h[d]=0}}this.inherited(arguments)}})});
\ No newline at end of file
//>>built
define("dgrid/Selection","dojo/_base/kernel dojo/_base/declare dojo/_base/Deferred dojo/on dojo/has dojo/aspect ./List dojo/has!touch?./util/touch put-selector/put dojo/query dojo/_base/sniff".split(" "),function(w,x,y,g,e,k,h,p,q){function r(a,b){for(var c=a.unselectable=b?"on":"",d=a.getElementsByTagName("*"),f=d.length;--f;)"INPUT"!==d[f].tagName&&"TEXTAREA"!==d[f].tagName&&(d[f].unselectable=c)}function t(a,b){var c=a.bodyNode,d=b?"text":21>e("ff")?"-moz-none":"none";l&&"msUserSelect"!==l?c.style[l]=
d:e("dom-selectstart")?b||a._selectstartHandle?b&&a._selectstartHandle&&(a._selectstartHandle.remove(),delete a._selectstartHandle):a._selectstartHandle=g(c,"selectstart",function(a){var b=a.target&&a.target.tagName;"INPUT"!==b&&"TEXTAREA"!==b&&a.preventDefault()}):(r(c,!b),b||a._unselectableHandle)?b&&a._unselectableHandle&&(a._unselectableHandle.remove(),delete a._unselectableHandle):a._unselectableHandle=k.after(a,"renderRow",function(a){r(a,!0);return a})}e.add("dom-comparedocumentposition",function(a,
b,c){return!!c.compareDocumentPosition});e.add("pointer",function(a){return"PointerEvent"in a?"pointer":"MSPointerEvent"in a?"MSPointer":!1});e.add("css-user-select",function(a,b,c){a=c.style;b=["Khtml","O","ms","Moz","Webkit"];c=b.length;var d="userSelect";do if("undefined"!==typeof a[d])return d;while(c--&&(d=b[c]+"UserSelect"));return!1});e.add("dom-selectstart","undefined"!==typeof document.onselectstart);var m=e("mac")?"metaKey":"ctrlKey",l=e("css-user-select"),u=(h=e("pointer"))&&"MS"===h.slice(0,
2),v=h?h+(u?"Down":"down"):"mousedown",n=h?h+(u?"Up":"up"):"mouseup";"WebkitUserSelect"===l&&"undefined"!==typeof document.documentElement.style.msUserSelect&&(l=!1);return x("dgrid.Selection",null,{selectionDelegate:".dgrid-row",selectionEvents:v+","+n+",dgrid-cellfocusin",selectionTouchEvents:e("touch")?p.tap:null,deselectOnRefresh:!0,allowSelectAll:!1,selection:{},selectionMode:"extended",allowTextSelection:void 0,_selectionTargetType:"rows",create:function(){this.selection={};return this.inherited(arguments)},
postCreate:function(){this.inherited(arguments);this._initSelectionEvents();var a=this.selectionMode;this.selectionMode="";this._setSelectionMode(a)},destroy:function(){this.inherited(arguments);this._selectstartHandle&&this._selectstartHandle.remove();this._unselectableHandle&&this._unselectableHandle.remove();this._removeDeselectSignals&&this._removeDeselectSignals()},_setSelectionMode:function(a){a!=this.selectionMode&&(this.clearSelection(),this.selectionMode=a,this._selectionHandlerName="_"+
a+"SelectionHandler",this._setAllowTextSelection(this.allowTextSelection))},setSelectionMode:function(a){w.deprecated("setSelectionMode(...)",'use set("selectionMode", ...) instead',"dgrid 0.4");this.set("selectionMode",a)},_setAllowTextSelection:function(a){"undefined"!==typeof a?t(this,a):t(this,"none"===this.selectionMode);this.allowTextSelection=a},_handleSelect:function(a,b){if(this[this._selectionHandlerName]&&this.allowSelect(this.row(b))&&("dgrid-cellfocusin"!==a.type||"mousedown"!==a.parentType)&&
(a.type!==n||b==this._waitForMouseUp)){this._waitForMouseUp=null;this._selectionTriggerEvent=a;if(!a.keyCode||!a.ctrlKey||32==a.keyCode)if(!a.shiftKey&&a.type===v&&this.isSelected(b))this._waitForMouseUp=b;else this[this._selectionHandlerName](a,b);this._selectionTriggerEvent=null}},_singleSelectionHandler:function(a,b){var c=a.keyCode?a.ctrlKey:a[m];this._lastSelected===b?this.select(b,null,!c||!this.isSelected(b)):(this.clearSelection(),this.select(b),this._lastSelected=b)},_multipleSelectionHandler:function(a,
b){var c=this._lastSelected,d=a.keyCode?a.ctrlKey:a[m],f;a.shiftKey||(f=d?null:!0,c=null);this.select(b,c,f);c||(this._lastSelected=b)},_extendedSelectionHandler:function(a,b){(2===a.button?this.isSelected(b):a.keyCode?a.ctrlKey:a[m])||this.clearSelection(null,!0);this._multipleSelectionHandler(a,b)},_toggleSelectionHandler:function(a,b){this.select(b,null,null)},_initSelectionEvents:function(){var a=this,b=this.contentNode,c=this.selectionDelegate;this._selectionEventQueues={deselect:[],select:[]};
e("touch")&&!e("pointer")&&this.selectionTouchEvents?(g(b,p.selector(c,this.selectionTouchEvents),function(b){a._handleSelect(b,this);a._ignoreMouseSelect=this}),g(b,g.selector(c,this.selectionEvents),function(b){a._ignoreMouseSelect!==this?a._handleSelect(b,this):b.type===n&&(a._ignoreMouseSelect=null)})):g(b,g.selector(c,this.selectionEvents),function(b){a._handleSelect(b,this)});this.addKeyHandler&&this.addKeyHandler(32,function(b){a._handleSelect(b,b.target)});if(this.allowSelectAll)this.on("keydown",
function(b){b[m]&&65==b.keyCode&&!/\bdgrid-input\b/.test(b.target.className)&&(b.preventDefault(),a[a.allSelected?"clearSelection":"selectAll"]())});this._setStore&&k.after(this,"_setStore",function(){a._updateDeselectionAspect()});this._updateDeselectionAspect()},_updateDeselectionAspect:function(){function a(a,c,d){a=c||a&&a[b.idProperty||"id"];if(null!=a&&(c=(a=b.row(a))&&b.selection[a.id]))b[d](a,null,c)}var b=this,c=this.store,d,f;this._removeDeselectSignals&&this._removeDeselectSignals();c&&
c.notify?(d=k.before(c,"notify",function(b,c){b||a(b,c,"deselect")}),f=k.after(c,"notify",function(b,c){a(b,c,"select")},!0),this._removeDeselectSignals=function(){d.remove();f.remove()}):(d=k.before(this,"removeRow",function(a,b){var c;b||(c=this.row(a))&&c.id in this.selection&&this.deselect(c)}),this._removeDeselectSignals=function(){d.remove()})},allowSelect:function(a){return!0},_fireSelectionEvent:function(a){var b=this._selectionEventQueues[a],c=this._selectionTriggerEvent,d;d={bubbles:!0,
grid:this};c&&(d.parentType=c.type);d[this._selectionTargetType]=b;this._selectionEventQueues[a]=[];g.emit(this.contentNode,"dgrid-"+a,d)},_fireSelectionEvents:function(){var a=this._selectionEventQueues,b;for(b in a)a[b].length&&this._fireSelectionEvent(b)},_select:function(a,b,c){var d,f,e;"undefined"===typeof c&&(c=!0);a.element||(a=this.row(a));if(!1===c||this.allowSelect(a))if(d=this.selection,f=!!d[a.id],null===c&&(c=!f),e=a.element,c||this.allSelected?d[a.id]=c:delete this.selection[a.id],
e&&(c?q(e,".dgrid-selected"+(this.addUiClasses?".ui-state-active":"")):q(e,"!dgrid-selected!ui-state-active")),c!==f&&e&&this._selectionEventQueues[(c?"":"de")+"select"].push(a),b)if(b.element||(b=this.row(b)),b){if(b=b.element)for(d=this._determineSelectionDirection(e,b),d||(b=document.getElementById(b.id),d=this._determineSelectionDirection(e,b));a.element!=b&&(a=this[d](a));)this._select(a,null,c)}else this._lastSelected=e,console.warn("The selection range has been reset because the beginning of the selection is no longer in the DOM. If you are using OnDemandList, you may wish to increase farOffRemoval to avoid this, but note that keeping more nodes in the DOM may impact performance.")},
_determineSelectionDirection:e("dom-comparedocumentposition")?function(a,b){var c=b.compareDocumentPosition(a);return c&1?!1:2===c?"down":"up"}:function(a,b){return 1>b.sourceIndex?!1:b.sourceIndex>a.sourceIndex?"down":"up"},select:function(a,b,c){this._select(a,b,c);this._fireSelectionEvents()},deselect:function(a,b){this.select(a,b,!1)},clearSelection:function(a,b){this.allSelected=!1;for(var c in this.selection)a!==c&&this._select(c,null,!1);b||(this._lastSelected=null);this._fireSelectionEvents()},
selectAll:function(){this.allSelected=!0;this.selection={};for(var a in this._rowIdToObject){var b=this.row(this._rowIdToObject[a]);this._select(b.id,null,!0)}this._fireSelectionEvents()},isSelected:function(a){if("undefined"===typeof a||null===a)return!1;a.element||(a=this.row(a));return a.id in this.selection?!!this.selection[a.id]:this.allSelected&&(!a.data||this.allowSelect(a))},refresh:function(){this.deselectOnRefresh&&this.clearSelection();this._lastSelected=null;return this.inherited(arguments)},
renderArray:function(){var a=this,b=this.inherited(arguments);y.when(b,function(b){var c=a.selection,e,g,h;for(e=0;e<b.length;e++)g=a.row(b[e]),(h=g.id in c?c[g.id]:a.allSelected)&&a._select(g,null,h);a._fireSelectionEvents()});return b}})});
\ No newline at end of file
//>>built
define("dgrid/TouchScroll","dojo/_base/declare dojo/on ./util/touch ./util/has-css3 put-selector/put xstyle/css!./css/TouchScroll.css".split(" "),function(E,t,w,q,h){function x(b,a,d,e){var c=b.touchNode,k=n[b.id],f,l;"object"!==typeof a?(l=a,f=d,a=e,e=d=!0):(e="x"in a,d="y"in a,e&&d||(f=b.getScrollPosition()),l=e?a.x:f.x,f=d?a.y:f.y);c.style[g]=m+-l+"px,"+-f+"px"+p;k&&e&&b._scrollbarXNode&&(b._scrollbarXNode.style[g]=m+l*k.parentWidth/k.scrollWidth+"px,0"+p);k&&d&&b._scrollbarYNode&&(b._scrollbarYNode.style[g]=
m+"0,"+f*k.parentHeight/k.scrollHeight+"px"+p);t.emit(b.touchNode.parentNode,"scroll",{scrollLeft:l,scrollTop:f})}function A(b){return n[b.id]?F.exec(window.getComputedStyle(b.touchNode)[g]):y.exec(b.touchNode.style[g])}function G(b){var a=this.widget,a=[this.node,a._scrollbarXNode,a._scrollbarYNode],d=a.length;this.timer&&(clearTimeout(this.timer),this.timer=null);for(this.transitionHandler&&this.transitionHandler.remove();d--;)a[d]&&(a[d].style[r+"Duration"]="0");b&&b.preserveScrollbars||h(this.node.parentNode,
".touchscroll-fadeout");delete this.resetEffects}function H(b){var a=b.widget,d=a.touchNode,e=a.id,c=0,k=0,f;if(w.countCurrentTouches(b,d)===a.touchesToScroll){if(f=A(a))c=+f[1],k=+f[2];if(f=n[e])f.resetEffects&&f.resetEffects({preserveScrollbars:!0}),d.style[g]=m+c+"px,"+k+"px"+p,u[e]=f;b=b.targetTouches[0];f=n[e]={widget:a,node:d,startX:c-b.pageX,startY:k-b.pageY,lastX:c,lastY:k,pageX:b.pageX,pageY:b.pageY,tickFunc:function(){var a=n[e],b,c;a&&((b=y.exec(a.node.style[g]))?(c=+b[1],b=+b[2],a.velX=
c-a.lastX,a.velY=b-a.lastY,a.lastX=c,a.lastY=b):a.lastX=a.lastY=0,a.timer=setTimeout(a.tickFunc,50))}};f.timer=setTimeout(f.tickFunc,50)}}function I(b){var a=b.widget,d=a.id,e=a.touchesToScroll,c=n[d],k,f;if(c&&(k=w.countCurrentTouches(b,a.touchNode))===e){k=b.targetTouches;e=k[0];if(!c.scrollbarsShown&&(u[d]||Math.abs(e.pageX-c.pageX)>a.scrollThreshold||Math.abs(e.pageY-c.pageY)>a.scrollThreshold)){var d=a.touchNode,l=d.parentNode,g=l.offsetWidth-8,m=l.offsetHeight-8,p=c.scrollWidth=d.scrollWidth,
B=c.scrollHeight=d.scrollHeight,q=c.parentWidth=l.offsetWidth,r=c.parentHeight=l.offsetHeight;p>q?(a._scrollbarXNode||(f=h(l,"div.touchscroll-x")),f=a._scrollbarXNode=a._scrollbarXNode||h(f,"div.touchscroll-bar"),f.style.width=g*g/p+"px",f.style.left=d.offsetLeft+"px",h(l,".touchscroll-scrollable-x"),c.scrollableX=!0):h(l,"!touchscroll-scrollable-x");B>r?(a._scrollbarYNode||(f=h(l,"div.touchscroll-y")),f=a._scrollbarYNode=a._scrollbarYNode||h(f,"div.touchscroll-bar"),f.style.height=m*m/B+"px",f.style.top=
d.offsetTop+"px",h(l,".touchscroll-scrollable-y"),c.scrollableY=!0):h(l,"!touchscroll-scrollable-y");h(l,"!touchscroll-fadeout");c.scrollbarsShown=!0;for(f=k.length;f--;)k[f].touchScrolled=!0}c.scrollbarsShown&&(c.scrollableX||c.scrollableY)&&(b.preventDefault(),b=c.scrollableX?c.startX+e.pageX:0,e=c.scrollableY?c.startY+e.pageY:0,f=c.scrollableX?-(c.scrollWidth-c.parentWidth):0,c=c.scrollableY?-(c.scrollHeight-c.parentHeight):0,0<b?b/=2:b<f&&(b=f-(f-b)/2),0<e?e/=2:e<c&&(e=c-(c-e)/2),x(a,-b,-e))}else k>
e&&a.cancelTouchScroll()}function J(b){var a=b.widget,d=a.id;n[d]&&w.countCurrentTouches(b,a.touchNode)==a.touchesToScroll-1&&K(d)}function C(b,a,d){function e(){delete c.transitionHandler;c.resetEffects();delete n[b]}var c=n[b],k=c.widget,f=c.node,l=c.scrollableX?Math.max(Math.min(0,a),-(c.scrollWidth-c.parentWidth)):a,h=c.scrollableY?Math.max(Math.min(0,d),-(c.scrollHeight-c.parentHeight)):d;delete c.timer;l!=a||h!=d?(c.transitionHandler=t.once(f,L,e),f.style[r+"Duration"]=k.bounceDuration+"ms",
f.style[g]=m+l+"px,"+h+"px"+p,l!=a&&c.scrollableX&&(f=c.widget._scrollbarXNode,f.style[r+"Duration"]=k.bounceDuration+"ms",f.style[g]=a>l?m+"0,0"+p:m+(f.parentNode.offsetWidth-f.offsetWidth)+"px,0"+p),h!=d&&c.scrollableY&&(f=c.widget._scrollbarYNode,f.style[r+"Duration"]=k.bounceDuration+"ms",f.style[g]=d>h?m+"0,0"+p:m+"0,"+(f.parentNode.offsetHeight-f.offsetHeight)+"px"+p)):e()}function K(b){var a=n[b],d=u[b],e,c;delete u[b];a.timer&&clearTimeout(a.timer);a.resetEffects=G;(e=y.exec(a.node.style[g]))?
(c=+e[1],e=+e[2]):c=e=0;!a.velX&&!a.velY||(0<=c||c<=-(a.scrollWidth-a.parentWidth))&&(0<=e||e<=-(a.scrollHeight-a.parentHeight))?C(b,c,e):(d&&(d.velX||d.velY)&&(0>=a.velX&&0>=d.velX||0<=a.velX&&0<=d.velX)&&(0>=a.velY&&0>=d.velY||0<=a.velY&&0<=d.velY)&&(a.velX=1.15*(a.velX+d.velX),a.velY=1.15*(a.velY+d.velY)),a.lastX=c,a.lastY=e,a.calcFunc=function(){var a=n[b],c,d,e,g,h,m;if(a)if(c=a.widget,h=c.glideDecel(a.velX),m=c.glideDecel(a.velY),1<=Math.abs(h)||1<=Math.abs(m)){e=a.lastX+h;g=a.lastY+m;if(0<
e||e<-(a.scrollWidth-a.parentWidth))for(d=6;d--;)h=c.glideDecel(h);if(0<g||g<-(a.scrollHeight-a.parentHeight))for(d=6;d--;)m=c.glideDecel(m);x(c,-e,-g);a.lastX=e;a.lastY=g;a.velX=h;a.velY=m;a.timer=setTimeout(a.calcFunc,30)}else C(b,a.lastX,a.lastY)},a.timer=setTimeout(a.calcFunc,30))}var n={},u={},y=/^translate(?:3d)?\((-?\d+)(?:\.\d*)?(?:px)?, (-?\d+)/,F=/^matrix\(1, 0, 0, 1, (-?\d+)(?:\.\d*)?(?:px)?, (-?\d+)/,z=q("css-transitions"),L=q("transitionend"),v=q("css-transforms");q=q("css-transforms3d");
var D,r,g,m,p;q?(m="translate3d(",p=",0)"):v&&(m="translate(",p=")");if(!z||!m)return console.warn("CSS3 features unavailable for touch scroll effects."),function(){};g=q||v;g=!0===g?"transform":g+"Transform";r=!0===z?"transition":z+"Transition";D=!0===v?"":"-"+v.toLowerCase()+"-";return E("dgrid.TouchScroll",null,{touchesToScroll:1,touchNode:null,scrollThreshold:10,bounceDuration:300,postCreate:function(){this._initTouch();this.inherited(arguments)},_initTouch:function(){function b(){e.cancelTouchScroll()}
function a(a){return function(c){c.widget=e;c.cancelTouchScroll=b;a.call(this,c)}}var d=this.touchNode=this.touchNode||this.containerNode,e=this,c;d&&d.parentNode?(c=d.parentNode,c.style.overflow="hidden",d.style[r+"Property"]=D+"transform",d.style[r+"TimingFunction"]="cubic-bezier(0.33, 0.66, 0.66, 1)",this._touchScrollListeners=[t(c,"touchstart",a(H)),t(c,"touchmove",a(I)),t(c,"touchend,touchcancel",a(J))]):console.warn("TouchScroll requires a nested node upon which to operate.")},destroy:function(){for(var b=
this._touchScrollListeners.length;b--;)this._touchScrollListeners[b].remove();delete n[this.id];this.inherited(arguments)},scrollTo:function(b){var a=n[this.id],d=this.touchNode,e=d.parentNode;!b.preserveMomentum&&a&&a.resetEffects&&a.resetEffects();b.x&&(b.x=Math.max(0,Math.min(b.x,d.scrollWidth-e.offsetWidth)));b.y&&(b.y=Math.max(0,Math.min(b.y,d.scrollHeight-e.offsetHeight)));x(this,b)},getScrollPosition:function(){var b=A(this);return b?{x:-b[1],y:-b[2]}:{x:0,y:0}},cancelTouchScroll:function(){var b=
n[this.id];b&&(b.resetEffects?b.resetEffects():(b.timer&&clearTimeout(b.timer),h(b.node.parentNode,".touchscroll-fadeout")),delete n[this.id])},glideDecel:function(b){return.9*b}})});
\ No newline at end of file
//>>built
define("dgrid/_StoreMixin","dojo/_base/kernel dojo/_base/declare dojo/_base/lang dojo/_base/Deferred dojo/on dojo/aspect put-selector/put".split(" "),function(k,p,e,g,q,l,h){function r(a){return a}function n(a){if("object"!==typeof a)a=Error(a);else if("cancel"===a.dojoType)return;a.grid=this;q.emit(this.domNode,"dgrid-error",{grid:this,error:a,cancelable:!0,bubbles:!0})&&console.error(a)}return p("dgrid._StoreMixin",null,{store:null,query:null,queryOptions:null,getBeforePut:!0,noDataMessage:"",loadingMessage:"",
constructor:function(){this.query={};this.queryOptions={};this.dirty={};this._updating={};this._columnsWithSet={};l.before(this,"configStructure",e.hitch(this,function(){this._columnsWithSet={}}))},postCreate:function(){this.inherited(arguments);this.store&&this._updateNotifyHandle(this.store)},destroy:function(){this.inherited(arguments);this._notifyHandle&&this._notifyHandle.remove()},_configColumn:function(a){a.set&&(this._columnsWithSet[a.field]=a);this.inherited(arguments)},_updateNotifyHandle:function(a){this._notifyHandle&&
(this._notifyHandle.remove(),delete this._notifyHandle);a&&"function"===typeof a.notify&&this.shouldObserveStore&&(this._notifyHandle=l.after(a,"notify",e.hitch(this,"_onNotify"),!0),(a=this.get("sort"))&&a.length||console.warn("Observable store detected, but no sort order specified. You may experience quirks when adding/updating items. These can be resolved by setting a sort order on the list or grid."))},_setStore:function(a,b,c){this._updateNotifyHandle(a);this.store=a;this.dirty={};this.set("query",
b,c)},_setQuery:function(a,b){var c=b&&b.sort;this.query=void 0!==a?a:this.query;this.queryOptions=b||this.queryOptions;this._started&&(c?this.set("sort",c):this.refresh())},setStore:function(a,b,c){k.deprecated("setStore(...)",'use set("store", ...) instead',"dgrid 0.4");this.set("store",a,b,c)},setQuery:function(a,b){k.deprecated("setQuery(...)",'use set("query", ...) instead',"dgrid 0.4");this.set("query",a,b)},_getQueryOptions:function(){var a=e.delegate(this.queryOptions,{});if("function"===
typeof this._sort||this._sort.length)a.sort=this._sort;return a},_getQuery:function(){var a=this.query;return"object"==typeof a&&null!=a?e.delegate(a,{}):a},_setSort:function(a,b){this.store&&(this._lastCollection=null);this.inherited(arguments)},_onNotify:function(a,b){this.inherited(arguments);a&&1>this._numObservers&&this.refresh({keepScrollPosition:!0})},refresh:function(){var a=this.inherited(arguments);this.store||(this.noDataNode=h(this.contentNode,"div.dgrid-no-data"),this.noDataNode.innerHTML=
this.noDataMessage);return a},renderArray:function(){var a=this,b=this.inherited(arguments);this.store||g.when(b,function(b){b.length&&a.noDataNode&&h(a.noDataNode,"!")});return b},insertRow:function(a,b,c,t,u){var f=this.store,g=this.dirty,f=f&&f.getIdentity(a),d;f in g&&!(f in this._updating)&&(d=g[f]);d&&(a=e.delegate(a,d));return this.inherited(arguments)},updateDirty:function(a,b,c){var e=this.dirty,g=e[a];g||(g=e[a]={});g[b]=c},setDirty:function(a,b,c){k.deprecated("setDirty(...)","use updateDirty() instead",
"dgrid 0.4");this.updateDirty(a,b,c)},save:function(){function a(a,f){return function(d){var h=b._columnsWithSet,k=b._updating,m,l;if("function"===typeof d.set)d.set(f);else for(m in f)d[m]=f[m];for(m in h)l=h[m].set(d),void 0!==l&&(d[m]=l);k[a]=!0;return g.when(c.put(d),function(){delete e[a];delete k[a]})}}var b=this,c=this.store,e=this.dirty,h=new g,f=h.promise,k=function(a){var d;return b.getBeforePut||!(d=b.row(a).data)?function(){return c.get(a)}:function(){return d}},d;for(d in e)var l=a(d,
e[d]),f=f.then(k(d)).then(l);h.resolve();return f},revert:function(){this.dirty={};this.refresh()},_trackError:function(a){var b;"string"==typeof a&&(a=e.hitch(this,a));try{b=a()}catch(c){n.call(this,c)}return g.when(b,r,e.hitch(this,n))},newRow:function(){var a=this.inherited(arguments);this.noDataNode&&(h(this.noDataNode,"!"),delete this.noDataNode);return a},removeRow:function(a,b){var c={element:a};!b&&this.noDataMessage&&this.up(c).element===a&&this.down(c).element===a&&(this.noDataNode=h(this.contentNode,
"div.dgrid-no-data"),this.noDataNode.innerHTML=this.noDataMessage);return this.inherited(arguments)}})});
\ No newline at end of file
.touchscroll-x, .touchscroll-y {display: none; overflow: hidden; position: absolute; opacity: 0.7;}.touchscroll-fadeout .touchscroll-x, .touchscroll-fadeout .touchscroll-y {opacity: 0; -webkit-transition: opacity 0.3s ease-out 0.1s; -moz-transition: opacity 0.3s ease-out 0.1s; -o-transition: opacity 0.3s ease-out 0.1s; transition: opacity 0.3s ease-out 0.1s;}.touchscroll-bar {background-color: rgba(88,88,88,0.97); border: 1px solid rgba(88,88,88,1); border-radius: 3px; -webkit-box-shadow: 0 0 1px rgba(88,88,88,0.4);}.touchscroll-x {left: 1px; right: 3px; bottom: 1px; height: 5px;}.touchscroll-y {top: 1px; bottom: 3px; right: 1px; width: 5px;}.touchscroll-scrollable-x .touchscroll-x, .touchscroll-scrollable-y .touchscroll-y {display: block;}.touchscroll-bar {-webkit-transition: transform cubic-bezier(0.33, 0.66, 0.66, 1); -moz-transition: transform cubic-bezier(0.33, 0.66, 0.66, 1); -o-transition: transform cubic-bezier(0.33, 0.66, 0.66, 1); transition: transform cubic-bezier(0.33, 0.66, 0.66, 1);}#dgrid-css-TouchScroll-loaded {display: none;}
\ No newline at end of file
.dgrid-column-set {overflow: hidden; width: 100%; position: relative; height: 100%;}.dgrid-column-set-cell {vertical-align: top; height: 100%;}.dgrid-column-set-scroller-container {font-size: 0; position: absolute; bottom: 0;}.dgrid-autoheight .dgrid-column-set-scroller-container {position: relative;}.dgrid-column-set-scroller {display: inline-block; overflow-x: auto; overflow-y: hidden;}.dgrid-column-set-scroller-content {height: 1px;}html.has-mozilla .dgrid-column-set *:focus, html.has-safari .dgrid-column-set *:focus {border: 1px dotted black; outline: 1px dotted black;}html.has-ie-7 .dgrid-column-set {width: auto;}html.has-quirks .dgrid-column-set {width: 100%;}#dgrid-css-columnset-loaded {display: none;}
\ No newline at end of file
.dgrid {position: relative; overflow: hidden; border: 1px solid #ddd; height: 30em; display: block;}.dgrid-header {background-color: #eee;}.dgrid-header-row {position: absolute; right: 17px; left: 0;}.dgrid-header-scroll {position: absolute; top: 0; right: 0;}.dgrid-footer {position: absolute; bottom: 0; width: 100%;}.dgrid-header-hidden,html.has-quirks .dgrid-header-hidden .dgrid-cell {font-size: 0; height: 0 !important; border-top: none !important; border-bottom: none !important; margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important;}.dgrid-footer-hidden {display: none;}.dgrid-sortable {cursor: pointer;}.dgrid-header, .dgrid-header-row, .dgrid-footer {overflow: hidden; background-color: #eee;}.dgrid-row-table {border-collapse: collapse; border: none; table-layout: fixed; empty-cells: show; width: 100%; height: 100%;}.dgrid-cell {padding: 0px; text-align: left; overflow: hidden; vertical-align: top; border: 1px solid #ddd; border-top-style: none; box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; -webkit-box-sizing: border-box;}.dgrid-cell-padding {padding: 3px;}.dgrid-content {position: relative; height: 99%;}.dgrid-scroller {overflow-x: auto; overflow-y: scroll; position: absolute; top: 0px; margin-top: 25px; bottom: 0px; width: 100%;}.dgrid-preload {font-size: 0; line-height: 0;}.dgrid-loading {position: relative; height: 100%;}.dgrid-above {position: absolute; bottom: 0;}.ui-icon {width: 16px; height: 16px; background-image: url('images/ui-icons_222222_256x240.png');}.ui-icon-triangle-1-e {background-position: -32px -16px;}.ui-icon-triangle-1-se {background-position: -48px -16px;}.dgrid-expando-icon {width: 16px; height: 16px;}.dgrid-tree-container {-webkit-transition-duration: 0.3s; -moz-transition-duration: 0.3s; -ms-transition-duration: 0.3s; -o-transition-duration: 0.3s; transition-duration: 0.3s; overflow: hidden;}.dgrid-tree-container.dgrid-tree-resetting {-webkit-transition-duration: 0; -moz-transition-duration: 0; -ms-transition-duration: 0; -o-transition-duration: 0; transition-duration: 0;}.dgrid-sort-arrow {background-position: -64px -16px; display: block; float: right; margin: 0 4px 0 5px; height: 12px;}.dgrid-sort-up .dgrid-sort-arrow {background-position: 0px -16px;}.dgrid-selected {background-color: #bfd6eb;}.dgrid-input {width: 99%;}html.has-mozilla .dgrid *:focus, html.has-opera .dgrid *:focus {outline: 1px dotted;}html.has-ie-6-7.has-no-quirks .dgrid-row-table {width: auto;}html.has-quirks .dgrid-row-table, html.has-ie-6 .dgrid-row-table {height: auto;}html.has-quirks .dgrid-header-scroll,html.has-ie-6 .dgrid-header-scroll {font-size: 0;}html.has-mozilla .dgrid-focus {outline-offset: -1px;}.dgrid-scrollbar-measure {width: 100px; height: 100px; overflow: scroll; position: absolute; top: -9999px;}.dgrid-autoheight {height: auto;}.dgrid-autoheight .dgrid-scroller {position: relative; overflow-y: hidden;}.dgrid-autoheight .dgrid-header-scroll {display: none;}.dgrid-autoheight .dgrid-header {right: 0;}#dgrid-css-dgrid-loaded {display: none;}
\ No newline at end of file
.dgrid-rtl-swap .dgrid-header-row {right: 0; left: 17px;}.dgrid-rtl-swap .dgrid-header-scroll {left: 0px; right: auto;}.dgrid-rtl .dgrid-cell {text-align: right;}.dgrid-rtl .dgrid-sort-arrow {float: left; margin: 0 5px 0 4px;}.dgrid-rtl .ui-icon-triangle-1-e {background-position: -96px -16px;}.dgrid-rtl .ui-icon-triangle-1-se {background-position: -80px -16px;}.dgrid-rtl .dgrid-pagination .dgrid-status {float: right;}.dgrid-rtl .dgrid-pagination .dgrid-page-size {float: right;}.dgrid-rtl .dgrid-pagination .dgrid-navigation {float: left;}.dgrid-rtl.dgrid-autoheight .dgrid-header {left: 0;}.has-ie-6 .dgrid-rtl .dgrid-header-row {left: auto; right: auto;}#dgrid-css-dgrid_rtl-loaded {display: none;}
\ No newline at end of file
.dgrid-hider-toggle {background-position: 0 -192px; background-color: transparent; border: none; cursor: pointer; position: absolute; right: 0; top: 0;}.dgrid-rtl-swap .dgrid-hider-toggle {right: auto; left: 0;}.dgrid-hider-menu {position: absolute; top: 0; right: 17px; width: 184px; background-color: #fff; border: 1px solid black; z-index: 99999; padding: 4px; overflow-x: hidden; overflow-y: auto;}.dgrid-rtl-swap .dgrid-hider-menu {right: auto; left: 17px;}.dgrid-hider-menu-row {position: relative; padding: 2px;}.dgrid-hider-menu-check {position: absolute; top: 2px; left: 2px; padding: 0;}.dgrid-hider-menu-label {display: block; padding-left: 20px;}html.has-quirks .dgrid-hider-menu-check,html.has-ie-6-7 .dgrid-hider-menu-check {top: 0; left: 0;}#dgrid-css-extensions-ColumnHider-loaded {display: none;}
\ No newline at end of file
.dgrid-header .dojoDndTarget .dgrid-cell {display: table-cell;}.dgrid-header .dojoDndItemBefore {border-left: 2px dotted #000 !important;}.dgrid-header .dojoDndItemAfter {border-right: 2px dotted #000 !important;}#dgrid-css-extensions-ColumnReorder-loaded {display: none;}
\ No newline at end of file
.dgrid-column-resizer {position: absolute; width: 2px; background-color: #666; z-index: 1000;}.dgrid-resize-handle {height: 100px; width: 0; position: absolute; right: -4px; top:-4px; cursor: col-resize; z-index: 999; border-left: 5px solid transparent; outline: none;}html.has-ie-6 .dgrid-resize-handle {border-color: pink; filter: chroma(color=pink);}html.has-mozilla .dgrid .dgrid-resize-handle:focus,html.has-opera .dgrid .dgrid-resize-handle:focus {outline: none;}.dgrid-resize-header-container {height:100%;}html.has-touch .dgrid-resize-handle {border-left: 20px solid transparent;}html.has-touch .dgrid-column-resizer {width: 2px;}html.has-no-quirks .dgrid-resize-header-container {position: relative;}html.has-ie-6 .dgrid-resize-header-container {position: static;} .dgrid-header .dgrid-cell-padding {overflow: hidden;}html.has-ie-6 .dgrid-header .dgrid-cell-padding {margin-right: 4px;}html.has-ie-6 .dgrid-header .dgrid-sort-arrow {margin-right: 0;}html.has-quirks .dgrid-header .dgrid-cell-padding, html.has-ie-6 .dgrid-header .dgrid-cell {position:relative;}#dgrid-css-extensions-ColumnResizer-loaded {display: none;}
\ No newline at end of file
.dgrid-spacer-row {height: 0;}.dgrid-spacer-row th {padding-top: 0; padding-bottom: 0; border-top: none; border-bottom: none;}#dgrid-css-extensions-CompoundColumns-loaded {display: none;}
\ No newline at end of file
.dgrid-status {padding: 2px;}.dgrid-pagination .dgrid-status {float: left;}.dgrid-pagination .dgrid-navigation, .dgrid-pagination .dgrid-page-size {float: right;}.dgrid-navigation .dgrid-page-link {cursor: pointer; font-weight: bold; text-decoration: none; color: inherit; padding: 0 4px;}.dgrid-first, .dgrid-last, .dgrid-next, .dgrid-previous {font-size: 130%;}.dgrid-pagination .dgrid-page-disabled,.has-ie-6-7 .dgrid-navigation .dgrid-page-disabled,.has-ie.has-quirks .dgrid-navigation .dgrid-page-disabled {color: #aaa; cursor: default;}.dgrid-page-input {margin-top: 1px; width: 2em; text-align: center;}.dgrid-page-size {margin: 1px 4px 0 4px;}#dgrid-css-extensions-Pagination-loaded {display: none;}
\ No newline at end of file
This folder contains skins based on the Dijit themes (claro, tundra, soria, and nihilo),
as well as a number of other skins (e.g. cactus, sage, slate, squid).
The skins are partially based on generic skin elements from the jquery-ui themeroller CSS
convention. The dgrid component follows this convention.
Any other stylesheet based on the themeroller convention can ostensibly
also be used to skin the dgrid.
\ No newline at end of file
.cactus .dgrid-content {border: none; background: #faffef; color: #000;}.cactus .dgrid-header-row {border-bottom: none;}.cactus .dgrid-header,.cactus .dgrid-footer {color: #fff; background: #333; background: -moz-linear-gradient(top, #4e4e4e 0%, #555555 12%, #636363 25%, #505050 39%, #303030 49%, #000000 50%, #1c1c1c 60%, #292929 76%, #1e1e1e 91%, #141414 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4e4e4e), color-stop(12%,#555555), color-stop(25%,#636363), color-stop(39%,#505050), color-stop(49%,#303030), color-stop(50%,#000000), color-stop(60%,#1c1c1c), color-stop(76%,#292929), color-stop(91%,#1e1e1e), color-stop(100%,#141414)); background: -webkit-linear-gradient(top, #4e4e4e 0%,#555555 12%,#636363 25%,#505050 39%,#303030 49%,#000000 50%,#1c1c1c 60%,#292929 76%,#1e1e1e 91%,#141414 100%); background: -o-linear-gradient(top, #4e4e4e 0%,#555555 12%,#636363 25%,#505050 39%,#303030 49%,#000000 50%,#1c1c1c 60%,#292929 76%,#1e1e1e 91%,#141414 100%); background: -ms-linear-gradient(top, #4e4e4e 0%,#555555 12%,#636363 25%,#505050 39%,#303030 49%,#000000 50%,#1c1c1c 60%,#292929 76%,#1e1e1e 91%,#141414 100%); background: linear-gradient(top, #4e4e4e 0%,#555555 12%,#636363 25%,#505050 39%,#303030 49%,#000000 50%,#1c1c1c 60%,#292929 76%,#1e1e1e 91%,#141414 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4e4e4e', endColorstr='#141414',GradientType=0 );}.cactus .dgrid-header th {padding: 7px 3px; font-weight: bold; color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.9); border-color: #111; text-transform: uppercase;}.cactus .dgrid-cell {border-color: #bbc581; border-top: none; border-right: none; border-left: none;}.cactus .dgrid-row-even {border-top: 1px solid #FFF;}.cactus .dgrid-row-odd {background: #9a6; background-image: -moz-linear-gradient(top, rgba(185,203,127,1) 0%, rgba(143,160,91,1) 100%); background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(185,203,127,1)), color-stop(100%,rgba(143,160,91,1))); background-image: -webkit-linear-gradient(top, rgba(185,203,127,1) 0%,rgba(143,160,91,1) 100%); background-image: -o-linear-gradient(top, rgba(185,203,127,1) 0%,rgba(143,160,91,1) 100%); background-image: -ms-linear-gradient(top, rgba(185,203,127,1) 0%,rgba(143,160,91,1) 100%); background-image: linear-gradient(top, rgba(185,203,127,1) 0%,rgba(143,160,91,1) 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b9cb7f', endColorstr='#8fa05b',GradientType=0 ); text-shadow: 0 1px 0 rgba(255,255,255,.9); border-top: 1px solid #ccd595; color: #FFF; text-shadow: 0 -1px 0 rgba(0,0,0,.3);}.cactus .dgrid-row-odd .dgrid-cell {border-top: 1px solid #e9efbd;}.cactus .dgrid-row:hover,.cactus .dgrid-row:hover .dgrid-cell {background: #555; color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.9); border-color: #555;}.cactus .dgrid-selected,.cactus .dgrid-selected .dgrid-cell {background: #333; color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.9); border-color: #333;}.cactus .dgrid-selected:hover {background: #333; border-color: #333;}.cactus .dgrid-highlight {background: #d6e5a5; filter: none; color: #000; text-shadow: none;}.cactus .dgrid-sort-arrow {background-image: url("../images/ui-icons_ffffff_256x240.png");}.cactus .dgrid-header .dojoDndItemBefore {border-left: 2px dotted #fff !important;}.cactus .dgrid-header .dojoDndItemAfter {border-right: 2px dotted #fff !important;}.has-ie-6-7 .cactus .dgrid-navigation a,.has-ie.has-quirks .cactus .dgrid-navigation a {color: #fff;}
\ No newline at end of file
.claro .dgrid {border: 1px solid #aaa; background: #fff; color: #000;}.claro .dgrid-header {font-weight: bold;}.claro .dgrid-header,.claro .dgrid-footer {background: #ebf0f5; background: -moz-linear-gradient(top, #ebf0f5 0%, #d5e0ea 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ebf0f5), color-stop(100%,#d5e0ea)); background: -webkit-linear-gradient(top, #ebf0f5 0%,#d5e0ea 100%); background: -o-linear-gradient(top, #ebf0f5 0%,#d5e0ea 100%); background: -ms-linear-gradient(top, #ebf0f5 0%,#d5e0ea 100%); background: linear-gradient(top, #ebf0f5 0%,#d5e0ea 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ebf0f5', endColorstr='#d5e0ea',GradientType=0 );}.claro .dgrid-header .dgrid-cell:hover {background: #ebf1f6; background: -moz-linear-gradient(top, #ffffff 0%, #d2e0eb 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#d2e0eb)); background: -webkit-linear-gradient(top, #ffffff 0%,#d2e0eb 100%); background: -o-linear-gradient(top, #ffffff 0%,#d2e0eb 100%); background: -ms-linear-gradient(top, #ffffff 0%,#d2e0eb 100%); background: linear-gradient(top, #ffffff 0%,#d2e0eb 100%);}.claro .dgrid-row {-webkit-transition-duration: 0.2s; -moz-transition-duration: 0.2s; -o-transition-duration: 0.2s; transition-duration: 0.2s; -webkit-transition-property: background-color, border-color; -moz-transition-property: background-color, border-color; -o-transition-property: background-color, border-color; transition-property: background-color, border-color; background: url("images/row_back.png") #fff repeat-x;}.has-ie-6 .claro .dgrid-row {background-image: none;}.claro .dgrid-row:hover {background-color: #e9f2fe;}.claro .dgrid-selected {background-color: #cee6fa;}.claro .dgrid-selected:hover {background-color: #9bc6f2;}.claro .dgrid-highlight {background-color: #ff6;}.claro .dgrid-cell {border-color: #edc;}.claro .dgrid-header .dgrid-cell {border-color: #bbb;}
\ No newline at end of file
.nihilo .dgrid {border-color: #bba;}.nihilo .dgrid-content {background: #fff; color: #000;}.nihilo .dgrid-header {background: #fff; border-bottom-color: #919191;}.nihilo .dgrid-footer {background: #fff; border-top: 1px solid #919191;}.nihilo .dgrid-header .dgrid-cell {border-right-color: #acab99;}.nihilo .dgrid-selected {background-color: #aec7e3;}.nihilo .dgrid-row:hover {background-color: #ffe284;}.nihilo .dgrid-highlight {background-color: #ff6;}.nihilo .dgrid-cell {border-color: #ddc;}.nihilo .dgrid-header .dgrid-cell {border-color: #bba;}
\ No newline at end of file
.sage .dgrid-content {border: none; background: #fff; color: #000; text-shadow: 0 1px 0 rgba(255,255,255,.9);}.sage .dgrid-header-row {border-bottom: none;}.sage .dgrid-header,.sage .dgrid-footer {color: #fff; background: #333; background: -moz-linear-gradient(top, #4e4e4e 0%, #555555 12%, #636363 25%, #505050 39%, #303030 49%, #000000 50%, #1c1c1c 60%, #292929 76%, #1e1e1e 91%, #141414 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4e4e4e), color-stop(12%,#555555), color-stop(25%,#636363), color-stop(39%,#505050), color-stop(49%,#303030), color-stop(50%,#000000), color-stop(60%,#1c1c1c), color-stop(76%,#292929), color-stop(91%,#1e1e1e), color-stop(100%,#141414)); background: -webkit-linear-gradient(top, #4e4e4e 0%,#555555 12%,#636363 25%,#505050 39%,#303030 49%,#000000 50%,#1c1c1c 60%,#292929 76%,#1e1e1e 91%,#141414 100%); background: -o-linear-gradient(top, #4e4e4e 0%,#555555 12%,#636363 25%,#505050 39%,#303030 49%,#000000 50%,#1c1c1c 60%,#292929 76%,#1e1e1e 91%,#141414 100%); background: -ms-linear-gradient(top, #4e4e4e 0%,#555555 12%,#636363 25%,#505050 39%,#303030 49%,#000000 50%,#1c1c1c 60%,#292929 76%,#1e1e1e 91%,#141414 100%); background: linear-gradient(top, #4e4e4e 0%,#555555 12%,#636363 25%,#505050 39%,#303030 49%,#000000 50%,#1c1c1c 60%,#292929 76%,#1e1e1e 91%,#141414 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4e4e4e', endColorstr='#141414',GradientType=0 );}.sage .dgrid-header th {padding: 7px 3px; font-weight: bold; color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.9); border-color: #111; text-transform: uppercase;}.sage .dgrid-cell {border-color: #bbc581; border-top: none; border-right: none; border-left: none;}.sage .dgrid-row-odd {background: #f2f7e8;}.sage .dgrid-row:hover {background: #c5dca6; color: #333; text-shadow: 0 1px 0 rgba(255,255,255,.5);}.sage .dgrid-row {-webkit-transition-duration: 0.1s; -moz-transition-duration: 0.1s; transition-duration: 0.1s; -webkit-transition-property: background-color, border-color; -moz-transition-property: background-color, border-color; transition-property: background-color, border-color;}.sage .dgrid-selected,.sage .dgrid-selected:hover {background: #b3d18b; text-shadow: 0 1px 0 rgba(255,255,255,.6);}.sage .dgrid-highlight {background-color: #d5e8bd;}.sage .dgrid-sort-arrow {background-image: url("../images/ui-icons_ffffff_256x240.png");}.sage .dgrid-header .dojoDndItemBefore {border-left: 2px dotted #fff !important;}.sage .dgrid-header .dojoDndItemAfter {border-right: 2px dotted #fff !important;}.has-ie-6-7 .sage .dgrid-navigation a,.has-ie.has-quirks .sage .dgrid-navigation a {color: #fff;}
\ No newline at end of file
.slate .dgrid-content {background: #fff; color: #000; text-shadow: 0 1px 0 rgba(255,255,255,.9);}.slate .dgrid-header-row {border-bottom: none;}.slate .dgrid-header,.slate .dgrid-footer {color: #fff; background: #333; background: -moz-linear-gradient(top, #4e4e4e 0%, #555555 12%, #636363 25%, #505050 39%, #303030 49%, #000000 50%, #1c1c1c 60%, #292929 76%, #1e1e1e 91%, #141414 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4e4e4e), color-stop(12%,#555555), color-stop(25%,#636363), color-stop(39%,#505050), color-stop(49%,#303030), color-stop(50%,#000000), color-stop(60%,#1c1c1c), color-stop(76%,#292929), color-stop(91%,#1e1e1e), color-stop(100%,#141414)); background: -webkit-linear-gradient(top, #4e4e4e 0%,#555555 12%,#636363 25%,#505050 39%,#303030 49%,#000000 50%,#1c1c1c 60%,#292929 76%,#1e1e1e 91%,#141414 100%); background: -o-linear-gradient(top, #4e4e4e 0%,#555555 12%,#636363 25%,#505050 39%,#303030 49%,#000000 50%,#1c1c1c 60%,#292929 76%,#1e1e1e 91%,#141414 100%); background: -ms-linear-gradient(top, #4e4e4e 0%,#555555 12%,#636363 25%,#505050 39%,#303030 49%,#000000 50%,#1c1c1c 60%,#292929 76%,#1e1e1e 91%,#141414 100%); background: linear-gradient(top, #4e4e4e 0%,#555555 12%,#636363 25%,#505050 39%,#303030 49%,#000000 50%,#1c1c1c 60%,#292929 76%,#1e1e1e 91%,#141414 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4e4e4e', endColorstr='#141414',GradientType=0 );}.slate .dgrid-header th {padding: 7px 3px; font-weight: bold; color: #FFF; text-shadow: 0 -1px 0 rgba(0,0,0,.9); border-color: #111; text-transform: uppercase;}.slate .dgrid-row-odd {background-color: #f7f7f7;}.slate .dgrid-row:hover {background-color: #ddd;}.slate .dgrid-selected,.slate .dgrid-selected:hover {background-color: #555; color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.5);}.slate .dgrid-highlight {background-color: #999;}.slate .dgrid-sort-arrow {background-image: url("../images/ui-icons_ffffff_256x240.png");}.slate .dgrid-header .dojoDndItemBefore {border-left: 2px dotted #fff !important;}.slate .dgrid-header .dojoDndItemAfter {border-right: 2px dotted #fff !important;}.has-ie-6-7 .slate .dgrid-navigation a,.has-ie.has-quirks .slate .dgrid-navigation a {color: #fff;}
\ No newline at end of file
.soria .dgrid {border-color: #bba;}.soria .dgrid-content {background: #fff; color: #000;}.soria .dgrid-header,.soria .dgrid-footer {background: #f2f4fe; background: -moz-linear-gradient(top, #f2f4fe 0%, #d0dff5 50%, #c6d8f0 51%, #c2d5ef 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f2f4fe), color-stop(50%,#d0dff5), color-stop(51%,#c6d8f0), color-stop(100%,#c2d5ef)); background: -webkit-linear-gradient(top, #f2f4fe 0%,#d0dff5 50%,#c6d8f0 51%,#c2d5ef 100%); background: -o-linear-gradient(top, #f2f4fe 0%,#d0dff5 50%,#c6d8f0 51%,#c2d5ef 100%); background: -ms-linear-gradient(top, #f2f4fe 0%,#d0dff5 50%,#c6d8f0 51%,#c2d5ef 100%); background: linear-gradient(top, #f2f4fe 0%,#d0dff5 50%,#c6d8f0 51%,#c2d5ef 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f2f4fe', endColorstr='#c2d5ef',GradientType=0 );}.soria .dgrid-header th:hover {background: #d4deec; background: -moz-linear-gradient(top, #dae2ed 0%, #b2c7e8 49%, #a8c1eb 50%, #9ebaec 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dae2ed), color-stop(49%,#b2c7e8), color-stop(50%,#a8c1eb), color-stop(100%,#9ebaec)); background: -webkit-linear-gradient(top, #dae2ed 0%,#b2c7e8 49%,#a8c1eb 50%,#9ebaec 100%); background: -o-linear-gradient(top, #dae2ed 0%,#b2c7e8 49%,#a8c1eb 50%,#9ebaec 100%); background: -ms-linear-gradient(top, #dae2ed 0%,#b2c7e8 49%,#a8c1eb 50%,#9ebaec 100%); background: linear-gradient(top, #dae2ed 0%,#b2c7e8 49%,#a8c1eb 50%,#9ebaec 100%);}.soria .dgrid-selected {background-color: #aec7e3;}.soria .dgrid-row:hover {background-color: #60a1ea;}.soria .dgrid-highlight {background-color: #ff6;}.soria .dgrid-cell {border-color: #ddc;}.soria .dgrid-header .dgrid-cell {border-color: #bba;}
\ No newline at end of file
.squid .dgrid-content {border: 1px solid #555; background: #000; color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.7);}.squid .ui-icon {background-image: url("../images/ui-icons_ffffff_256x240.png");}.squid .dgrid-header {padding: 0 1px;}.squid .dgrid-header,.squid .dgrid-footer {color: #fff; background: #2d1f14; background: -moz-linear-gradient(top, #140e09 0%, #2d1f14 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#140e09), color-stop(100%,#2d1f14)); background: -webkit-linear-gradient(top, #140e09 0%,#2d1f14 100%); background: -o-linear-gradient(top, #140e09 0%,#2d1f14 100%); background: -ms-linear-gradient(top, #140e09 0%,#2d1f14 100%); background: linear-gradient(top, #140e09 0%,#2d1f14 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#140e09', endColorstr='#2d1f14',GradientType=0 ); color: #fff; font-weight: bold;}.squid .dgrid-header:hover {background: #000; background: -moz-linear-gradient(top, #000000 0%, #2d1f14 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#000000), color-stop(100%,#2d1f14)); background: -webkit-linear-gradient(top, #000000 0%,#2d1f14 100%); background: -o-linear-gradient(top, #000000 0%,#2d1f14 100%); background: -ms-linear-gradient(top, #000000 0%,#2d1f14 100%); background: linear-gradient(top, #000000 0%,#2d1f14 100%);}.squid .dgrid-row {-webkit-transition-duration: 0.2s; -moz-transition-duration: 0.2s; transition-duration: 0.2s; -webkit-transition-property: background-color, border-color; -moz-transition-property: background-color, border-color; transition-property: background-color, border-color; background: url("images/row_back.png") #000 repeat-x;}.squid .dgrid-row:hover {background-color: #444;}.has-ie-6 .squid .dgrid-row {background-image: none;}.squid .dgrid-selected {background-color: #64390d; text-shadow: 0 -1px 0 rgba(0,0,0,.3);}.squid .dgrid-selected:hover {background-color: #8b6b4a;}.squid .dgrid-highlight {background-color: #666;}.squid .dgrid-cell {border-color: #ccc;}.squid .dgrid-header .dojoDndItemBefore {border-left: 2px dotted #fff !important;}.squid .dgrid-header .dojoDndItemAfter {border-right: 2px dotted #fff !important;}.has-ie-6-7 .squid .dgrid-navigation a,.has-ie.has-quirks .squid .dgrid-navigation a {color: #fff;}
\ No newline at end of file
.tundra .dgrid {border-color: #bba;}.tundra .dgrid-content {background: #fff; color: #000;}.tundra .dgrid-header, .tundra .dgrid-footer {background: #e8e8e8; background: -moz-linear-gradient(top, #ffffff 0%, #e8e8e8 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#e8e8e8)); background: -webkit-linear-gradient(top, #ffffff 0%,#e8e8e8 100%); background: -o-linear-gradient(top, #ffffff 0%,#e8e8e8 100%); background: -ms-linear-gradient(top, #ffffff 0%,#e8e8e8 100%); background: linear-gradient(top, #ffffff 0%,#e8e8e8 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e8e8e8',GradientType=0 ); font-weight: bold;}.tundra .dgrid-header th:hover {background: #f6f6f6; background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#eeeeee)); background: -webkit-linear-gradient(top, #ffffff 0%,#eeeeee 100%); background: -o-linear-gradient(top, #ffffff 0%,#eeeeee 100%); background: -ms-linear-gradient(top, #ffffff 0%,#eeeeee 100%); background: linear-gradient(top, #ffffff 0%,#eeeeee 100%);}.tundra .dgrid-selected {background-color: #aec7e3;}.tundra .dgrid-row:hover {background-color: #60a1ea;}.tundra .dgrid-highlight {background-color: #ff6;}.tundra .dgrid-cell {border-color: #ddc;}.tundra .dgrid-header .dgrid-cell {border-color: #bba;}
\ No newline at end of file
# dgrid Documentation
This folder contains the official dgrid documentation. It includes
information on dgrid's core components, as well as information on various
mixins, plugins, and extensions that are available to further expand dgrid's
default functionality.
## Components
* Core Components
* [List](components/core-components/List.md)
* [Grid](components/core-components/Grid.md)
* [GridFromHtml](components/core-components/GridFromHtml.md)
* [OnDemandList and OnDemandGrid](components/core-components/OnDemandList-and-OnDemandGrid.md)
* Mixins
* [Keyboard](components/mixins/Keyboard.md)
* [ColumnSet](components/mixins/ColumnSet.md)
* [Selection](components/mixins/Selection.md)
* [CellSelection](components/mixins/CellSelection.md)
* Column Plugins
* [editor](components/column-plugins/editor.md)
* [tree](components/column-plugins/tree.md)
* [selector](components/column-plugins/selector.md)
* Extensions
* [ColumnReorder](components/extensions/ColumnReorder.md)
* [ColumnResizer](components/extensions/ColumnResizer.md)
* [ColumnHider](components/extensions/ColumnHider.md)
* [CompoundColumns](components/extensions/CompoundColumns.md)
* [Pagination](components/extensions/Pagination.md)
* [DijitRegistry](components/extensions/DijitRegistry.md)
* [DnD](components/extensions/DnD.md)
* Utilities
* [mouse](components/utilities/mouse.md)
* [touch](components/utilities/touch.md)
* [misc](components/utilities/misc.md)
## Usage
* [Working with Events](usage/Working-with-Events.md)
* [Working with Widgets](usage/Working-with-Widgets.md)
* [Styling dgrid](usage/Styling-dgrid.md)
* [Limitations](usage/Limitations.md)
## Migrating from dojox/grid
* [API Comparison](migrating/API-Comparison.md)
* [Usage Comparison](migrating/Usage-Comparison.md)
## Tutorials
Various tutorials are available on [dgrid.io](http://dojofoundation.org/packages/dgrid/#tutorials).
\ No newline at end of file
# editor
The editor plugin provides the ability to render editor controls within cells
for a column. When used in conjunction with a store-backed grid such as an
[OnDemandGrid](../core-components/OnDemandList-and-OnDemandGrid.md#ondemandgrid), edited fields are directly
correlated with the dirty state of the grid; changes can then be saved back to
the store based on edits performed in the grid.
```js
require([
"dojo/_base/declare", "dgrid/OnDemandGrid","dgrid/editor", "dgrid/Keyboard", "dgrid/Selection"
], function(declare, OnDemandGrid, editor, Keyboard, Selection){
var editGrid = new (declare([OnDemandGrid, Keyboard, Selection]))({
store: myStore,
columns: [
editor({
label: "Name",
field: "name",
editor: "text",
editOn: "dblclick"
}),
// ...
]
}, "editGrid");
});
```
For more examples of editor in use, see the various `editor` test pages, as well
as the `GridFromHtml_editors` test page for declarative examples.
## Additional Column Definition Properties
The editor plugin supports the following additional column definition properties.
Property | Description
-------- | -----------
`editor` | The type of component to use for editors in this column; either a string specifying a type of standard HTML input to create, or a Dijit widget constructor to instantiate.
`editOn` | A string containing the event (or multiple events, comma-separated) upon which the editor should activate. If unspecified, editors are always displayed in this column's cells.
`editorArgs` | An object containing input attributes or widget arguments. For HTML inputs, the object will have its key/value pairs applied as node attributes via `put-selector`; for widgets, the object will be passed to the widget constructor.
`canEdit(object, value)` | A function returning a boolean value indicating whether or not the cell for this column should be editable in a particular row. Receives the item for the current row, and the value to be rendered (i.e. the return from the column's `get` function if any, or the value of the `field` specified in the column).
`autoSave` |If `true`, the grid's `save` method will be called as soon as a change is detected in an editor in this column. Defaults to `false`. **Note:** if an error is encountered as a result of a store operation triggered by `autoSave`, a `dgrid-error` event will be emitted.
`dismissOnEnter` | By default, pressing enter will store the current value in the grid's dirty data hash. This can be undesirable particularly for textarea editors; setting this property to `false` will disable the behavior.
For convenience, the `editor` and `editOn` properties may also be specified as
the second and third arguments to the `editor` function. For example, both of
the following would result in an editor which presents a text field when a cell
in the column is double-clicked:
```js
// long version, everything in column def object
editor({
editor: "text",
editOn: "dblclick",
/* rest of column definition here... */
})
// shorthand version, editor and editOn as arguments
editor({ /* rest of column definition here... */ }, "text", "dblclick")
```
## Additional Grid APIs
When the editor plugin is applied to a column in a grid, the grid is augmented with
the following method.
Method | Description
------ | -----------
`edit(cell)` | Activates/focuses the specified cell (which can be a cell object from `grid.cell()`, or a DOM node or event resolvable to one).
## Events
The editor plugin emits a `dgrid-datachange` event whenever an editor field
loses focus after its value is changed. This event includes the following
properties:
* `grid`: The Grid instance in which the edit occurred
* `cell`: The `cell` object to which the edit applied, as reported by the
`grid.cell` method
* `oldValue`: The value before the edit occurred
* `value`: The value after the edit occurred
This event bubbles and is cancelable; if the event is canceled, the modification
will be reverted.
Editors with `editOn` set also emit `dgrid-editor-show` and `dgrid-editor-hide`
events when the editor is shown and hidden, respectively. These events also
include `grid` and `cell` properties and bubble; however, they are not
cancelable. If an editor should not be shown under specific circumstances,
include a `canEdit` function in the column definition.
## Recommendations for the editOn property
If attempting to trigger an editor on focus (to accommodate keyboard and mouse),
it is highly recommended to use dgrid's custom event, `dgrid-cellfocusin`
instead of `focus`, to avoid confusion of events. Note that this requires also
mixing the Keyboard module into the Grid constructor.
If touch input is a concern for activating editors, the easiest solution is to
use the `click` event, which browsers on touch devices tend to normalize to fire
on taps as well. If a different event is desired for desktop browsers, it is
possible to do something like the following:
```js
require(
["dgrid/OnDemandGrid", "dgrid/editor", "dojo/has" /*, ... */],
function(OnDemandGrid, editor, has /*, ... */){
var columns = [
/* ... more columns here ... */
editor({ name: "name", label: "Editable Name" }, "text",
has("touch") ? "click" : "dblclick")
];
/* ... create grid here ... */
}
);
```
There are also a couple of useful simple gesture implementations available in
the `util/touch` module, namely `tap` and `dbltap`.
\ No newline at end of file
# selector
Used in conjunction with the [Selection](../mixins/Selection.md) mixin, the selector plugin dedicates
a column to the purpose of rendering a selector component, providing alternate
means for selecting and deselecting rows in a grid.
```js
require([
"dojo/_base/declare", "dgrid/OnDemandGrid", "dgrid/Selection", "dgrid/selector"
], function(declare, OnDemandGrid, Selection, selector){
var grid = new (declare([OnDemandGrid, Selection]))({
store: myStore,
selectionMode: "single",
columns: {
col1: selector({ label: "Select", selectorType: "radio" }),
col2: "Column 2"
}
}, "grid");
// ...
});
```
## Usage
A selector column can be used to allow selection even in a grid where
`selectionMode` is set to `none`, in which case the controls in the selector
column will be the only means by which a user may select or deselect rows.
## Additional Column Definition Properties
The selector plugin supports the following additional column definition properties.
Property | Description
-------- | -----------
`disabled(item)` | A function which, provided the item for a particular row, should return `true` if the selector control should be disabled for that row. Returning `true` will also prevent the row in question from being directly selected via the [Selection](../mixins/Selection.md) mixin.
`selectorType` | Specifies the type of selector component to use. Defaults to `"checkbox"`, but `"radio"` may also be specified, as a more appropriate choice for grids in single-selection mode.
Alternatively, `selectorType` may be specified as the second argument to the
`selector` function instead of including it within the column definition.
\ No newline at end of file
# tree
The tree plugin enables expansion of rows to display children.
```js
require([
"dojo/_base/declare", "dgrid/OnDemandGrid", "dgrid/tree", "dgrid/Keyboard", "dgrid/Selection"
], function(declare, OnDemandGrid, tree, Keyboard, Selection){
var treeGrid = new (declare([OnDemandGrid, Keyboard, Selection]))({
store: myStore,
columns: [
tree({ label: "Name", field: "name" }),
{ label:"Type", field: "type", sortable: false},
{ label:"Population", field: "population" },
{ label:"Timezone", field: "timezone" }
]
}, "treeGrid");
});
```
## Store Considerations
The tree plugin expects to operate on a store-backed grid, such as an
[OnDemandGrid](../core-components/OnDemandList-and-OnDemandGrid.md#ondemandgrid) or a grid with the [Pagination](../extensions/Pagination.md)
extension mixed in.
The store connected to the grid is expected to provide a `getChildren(object, options)`
method to return the children for a given item. Note that for best results,
`getChildren` should return results with an `observe` function as well
(like `query`), so that changes to children can also be reflected as they occur.
When calling `getChildren`, dgrid will include an `originalQuery` property in
the `options` argument, containing the value from the grid's `query` property.
This allows `getChildren` implementations to perform the same filtering on
child levels if desired.
The following is a simple example of what a `getChildren` implementation could
look like in an extension to `dojo/store/Memory`, where hierarchy is indicated
by a `parent` property on child items:
```js
getChildren: function(parent, options){
// Support persisting the original query via options.originalQuery
// so that child levels will filter the same way as the root level
return this.query(
lang.mixin({}, options && options.originalQuery || null,
{ parent: parent.id }),
options);
}
```
The store may also (optionally) provide a `mayHaveChildren(object)` method which
returns a boolean indicating whether or not the row can be expanded. If this
is not provided, all items will be rendered with expand icons.
## Additional Column Definition Properties
The tree plugin supports the following additional column definition properties.
Property | Description
-------- | -----------
`shouldExpand(row, level, previouslyExpanded)` | Optional function which returns a boolean indicating whether the given row should be expanded when rendered. The default implementation simply returns the value of `previouslyExpanded`, which denotes whether the row in question was previously expanded before being re-rendered.
`renderExpando()` | Optional function which can be overridden to customize the logic for rendering the expando icon beside each tree cell's content.
`collapseOnRefresh` | Boolean indicating whether to collapse all parents (essentially "forgetting" expanded state) whenever the grid is refreshed; the default is `false`.
`enableTransitions` | Boolean indicating whether to perform CSS transitions when expanding/collapsing; the default is `true`. Note that this does not apply to browsers which do not support CSS transitions (e.g. IE < 10).
`indentWidth` | Number of pixels to indent each nested level of children; the default is `9`.
`allowDuplicates` | If this is set to `true`, a single object (and single id) can be used in multiple places in a tree structure. However, enabling this means that `grid.row(id)` will only return top-level objects (since it can't disambiguate other levels). The default is `false`.
## Additional Grid APIs
When the tree plugin is applied to a column in a grid, the grid is augmented with
the following method.
Method | Description
------ | -----------
`expand(row, expand)` | Expands or collapses the row indicated by the given Row object (from `grid.row(target)`) or a `dgrid-row` element. The optional `expand` argument specifies whether the row should be expanded (`true`) or collapsed (`false`); if unspecified, the method toggles the current expanded state of the row. Returns a promise which resolves after data for the children has been retrieved.
\ No newline at end of file
# GridFromHtml
Some developers prefer specifying column layouts in an actual table structure
because it is more convenient or semantically clearer. dgrid supports this via
the GridFromHtml module.
```html
<table id="htmlgrid">
<thead>
<tr>
<th data-dgrid-column="{ field: 'id' }">ID</th>
<th data-dgrid-column="{ field: 'name', formatter: nameFormatter }">Name</th>
</tr>
</thead>
</table>
<script>
require([
"dgrid/GridFromHtml"
/* ... */
], function(GridFromHtml /* , ... */){
var grid = new GridFromHtml({}, "htmlgrid");
grid.renderArray(someData);
});
</script>
```
GridFromHtml can also be used for store-based grids by additionally
mixing in [OnDemandList](OnDemandList-and-OnDemandGrid.md) or [Pagination](../extensions/Pagination.md).
## Usage
When using this module, a `table` element should be specified as the source node
for the grid instance; it then scans for `th` nodes within rows (typically placed
inside the `thead`) to determine columns. Column properties are specified within
the `th`, primarily via the `data-dgrid-column` attribute, which should contain a
JavaScript object. Properties which coincide with standard HTML attributes can
also be specified as such, e.g. `class`, `rowspan`, and `colspan`. The innerHTML
of the `th` is interpreted as the column's `label` by default.
Note that *unlike* `data-dojo-props`, `data-dgrid-column` requires that you
include the surrounding curly braces around the object - this allows
alternatively specifying a column plugin instead of just a straight-up object.
(Note, however, that referencing column plugins requires that they be exposed in
the global scope, perhaps under a namespace.) Examples of creating grids from
HTML can be found in the `GridFromHtml.html` and `complex_columns.html` test
pages.
It is also possible to specify columnsets (for the `ColumnSet` mixin) via
HTML tables by using the `GridWithColumnSetsFromHtml` module. ColumnSets are
expressed in HTML via `colgroup` tags. See the `complex_columns.html` test page
for an example of this as well.
## Dojo 1.7 Note: Using GridFromHtml with the Dojo Parser
Using the parser in Dojo 1.7 with modules designed purely in the AMD format can
be a bit unwieldy, since the parser still expects `data-dojo-type` values to
reference variables accessible from the global context. While existing Dojo 1.x
components currently continue to expose globals, dgrid does not do so by
default, since it is written purely in AMD format. Thus, when intending to parse
over dgrid components, it is necessary to expose the components via a global
namespace first. For example:
```js
require(["dgrid/GridFromHtml", "dojo/parser", ..., "dojo/domReady!"],
function(GridFromHtml, parser, ...) {
window.dgrid = { GridFromHtml: GridFromHtml };
parser.parse();
});
```
This can be seen in practice in some of the test pages, such as
`GridFromHtml.html` and `dijit_layout.html`.
This applies to Dojo 1.7 only; in Dojo 1.8 this becomes easier thanks to
`data-dojo-type` supporting module IDs (see
[Dojo ticket #13778](http://bugs.dojotoolkit.org/ticket/13778)). Additionally,
`data-dojo-mixins` can be used to declaratively compose dgrid instances
including mixins.
\ No newline at end of file
# List
This provides the basic facilities for taking an array of objects and rendering
them as rows of HTML in a scrollable area. This will automatically include touch
scrolling capabilities (via the `TouchScroll` module) on mobile devices.
The List module can be used to render an array of data as follows:
```js
require(["dgrid/List"], function(List){
// attach to a DOM element indicated by its ID
var list = new List({}, "list");
// render some data
list.renderArray(arrayOfData);
});
```
## APIs
The base List class (inherited by all other classes) exposes specific methods
and maintains the various key DOM / property references.
### Constructor
As seen in the example above, the `List` constructor (as well any derivative
dgrid constructors, e.g. `Grid`, `OnDemandGrid`, etc.) can accept 2 properties:
an object containing initial properties to set on the instance, and a DOM node
or string referencing a DOM node's ID (the `srcNodeRef`).
If a `srcNodeRef` is provided, the given DOM node will become the instance's
`domNode`; otherwise the instance will need to be placed into the document manually.
Each dgrid instance's `domNode` is given a unique ID, based on one of the
following criteria:
* If a `srcNodeRef` was provided and has an ID, this ID will be used
* If an `id` was specified in the arguments object, that will be used
* Otherwise, an ID will be automatically generated, in the form `dgrid_<number>`
It is important to note that DOM node IDs are not allowed to contain spaces;
therefore, one should never include spaces in the `id` property.
### Property Summary
Property | Description
-------- | -----------
`domNode` | The top-level DOM node of the component (much like the `domNode` property of Dijit widgets).
`headerNode` | The DOM node representing the header region; mainly applicable to grid components.
`bodyNode` | The DOM node representing the body region (the area which will show rows for each item).
`contentNode` | The DOM node immediately under the `bodyNode`, which may potentially be scrolled to accommodate more content than the component's height will allow to fit.
`footerNode` | A DOM node appearing below the `bodyNode`; initially empty and not displayed by default.
`addUiClasses` | Boolean indicating whether to add `ui-` classes (corresponding to jQuery UI) to nodes within the grid. The default is `true`.
`className` | A class (or classes, space- or period-delimited) to be set on the instance's `domNode` in addition to the defaults; if an existing DOM node is being passed to the constructor, extra classes may alternatively be specified via its `class` attribute or `className` property
`cleanAddedRules` | Whether to clean up CSS rules added via the `addCssRule` method when the instance is destroyed; defaults to `true`.
`cleanEmptyObservers` | Whether to clean up observers for result sets that are or become empty; defaults to `true` but is set to `false` by the `tree` plugin due to special considerations.
`shouldObserveStore` | Whether this instance should observe any observable store it is passed; defaults to `true`.
`showHeader` | Whether to display the header area; normally `false` for lists and `true` for grids. Can be reset later via `set("showHeader", ...)`.
`showFooter` | Whether to display the footer area; `false` by default, but enabled and used by some extensions (e.g. Pagination). Can be reset later via `set("showFooter", ...)`.
`sort` | How to initially sort the grid; may be either a string referencing a field name, or an array of objects with `attribute` and `descending` properties. See also `set("sort", ...)` below.
`useTouchScroll` | Whether to use the `TouchScroll` module if touch support is available on the device, or defer to native capabilities if they exist; `true` by default for backwards compatibility. Setting this to `false` is particularly useful for devices which support both touch and mouse input.
### Method Summary
Method | Description
------ | -------------
`get(property)` | Returns the value of a given property. Supports custom getter implementations via the pattern `_getProperty` (which would map to `get("property")`).
`set(property, value)` | Sets the value of a given property. Supports custom setter implementations via the pattern `_setProperty` (which would map to `set("property", ...)`).
`set(object)` | Alternate means of invoking `set`, equivalent to calling `set(property, value)` for each key/value pair in the provided object.
`row(target)` | This will look up the requested row and return a Row object. The single parameter may be a DOM event, DOM node, or in the case of store-backed components, a data object or its ID. The returned Row object has the following properties: `id` - the data object's id, `data`- the data object represented by the row, `element`- the row's DOM element
`on(event, listener)` | Basic event listener functionality; simply delegates to the top-level DOM element of the List, using standard `dojo/on` behavior.
`up(row[, steps])` | Given a row object (or something that resolves to one via the `row` method), returns a row object representing the row located `steps` rows above (where `steps` defaults to `1`).
`down(row[, steps])` | Same as `up()`, but operating downward.
`renderArray(array, beforeNode, options)` | This can be called to render an array directly into the list. The `beforeNode` parameter can be used to render at a specific point in the list. Note that when using store-backed components, this is called automatically.
`renderRow(item, options)` | This method can be overridden to provide custom rendering logic for rows. (The [Grid](Grid.md) module actually overrides this method.) `item` refers to the record from the array or store for the row.
`removeRow(rowElement, justCleanup)` | This method can be extended/aspected to perform cleanup logic when an individual row is removed.
`set("sort", property, descending)` | This can be called to sort the List by a given property; if `true` is passed for `descending`, the sort will be in descending order. Multiple sort criteria can be specified in the format expected by stores' `queryOptions` (an array of objects with `attribute` and `descending` properties); this is also the format `get("sort")` will return in. The [Grid](Grid.md) and [OnDemandList)(OnDemandList-and-OnDemandGrid.md) modules further extend sort functionality.
`scrollTo(options)` | scrolls to a given point in the grid. Accepts `x` and `y` properties; if one is not given, position along that axis is not modified.
`getScrollPosition()` | returns the current position that the grid is scrolled to, in the form of an object containing `x` and `y` properties.
`addCssRule(selector, css)` | Programmatically adds styles for a given CSS selector by injecting the given rule string into a stylesheet in the document. Returns a handle with a`remove` function, which can be called to later remove the added style rule. Styles added via this method will be removed when the instance is destroyed if `cleanAddedRules` is set to `true`.
\ No newline at end of file
# OnDemandList and OnDemandGrid
## OnDemandList
OnDemandList extends List to provide on-demand lazy loading of data as the user
scrolls through the list. This provides a seamless, intuitive interface for
viewing large sets of data in scalable manner.
```js
require(["dgrid/OnDemandList", "put-selector/put"], function(OnDemandList, put){
var list = new OnDemandList({
store: myStore, // a Dojo object store
renderRow: function(object, options){
// Override renderRow to accommodate store items
return put("div", object.myField);
}
});
});
```
## OnDemandGrid
This module is simply the composition of [Grid](Grid.md) and OnDemandList. For example:
```js
define(["dgrid/OnDemandGrid"], function(OnDemandGrid){
grid = new OnDemandGrid({
store: myStore, // a Dojo object store
columns: [
{label: "Column 1", field: "col1", sortable: false},
{label: "Column 2", field: "col2"},
// ...
]
}, "grid");
// ...
});
```
## Usage
OnDemandList inherits the \_StoreMixin module, which implements a basis for
interacting with a [Dojo object
store](http://dojotoolkit.org/reference-guide/dojo/store.html) for querying of
data. At minimum, this implementation expects a store which supports the `get`,
`getIdentity`, and `query` methods, and whose items include unique identifiers.
OnDemandList requires that a store be specified via the `store` property, and
will call the `query` method on the store to retrieve the data to be rendered.
OnDemandList will call `query` with `start` and `count` options so as to only
retrieve the necessary objects needed to render the visible rows. As the list or
grid is scrolled, more `query` calls will be made to retrieve additional rows,
and previous rows will be pruned from the DOM as they are scrolled well out of
view.
When working with a writable store, for best results, the store should return
query results with an `observe` method, which enables the list to keep its
display up to date with any changes that occur in the store after the items are
rendered. The
[`dojo/store/Observable`](http://dojotoolkit.org/reference-guide/dojo/store/Observable.html)
module can prove useful for adding this functionality.
## APIs
### Property Summary
Property | Description
-------- | -----------
`minRowsPerPage` | The minimum number of items that will be requested at one time while scrolling; default is `25`.
`maxRowsPerPage` | The maximum number of items that will be requested at one time while scrolling; default is `250`.
`maxEmptySpace` | The maximum size (in pixels) of unrendered space below or above the rendered portion of the component; default is `Infinity`, which indicates that the size of unrendered space should approximate the total space which would be occupied by all items in the result set.
`bufferRows` | The number of rows to keep rendered beyond each end of the currently visible area of the component; default is `10`.
`farOffRemoval` | The minimum distance (in pixels) which must exist between the currently visible area and previously-rendered rows before they are removed from the DOM; default is `2000`, but this can be adjusted based on a known maximum height in cases where keeping fewer nodes in the DOM is preferable.
`queryRowsOverlap` | Specifies the number of items to "overlap" between queries, which helps ensure consistency of observed updates to items at page boundaries. The default is `0`.
`pagingMethod` | Specifies the method from the `dgrid/util/misc` module to use for throttling the scroll handler; defaults to `"debounce"` to wait until scrolling stops, but can also be set to `"throttleDelayed"` to load even as scrolling continues.
`pagingDelay` | Specifies the number of milliseconds to debounce or throttle scroll handler calls (and thus also potential store requests); default is `15`.
`keepScrollPosition` | Whether to attempt preserving scroll position by default on all `refresh` operations (including sort); defaults to `false`. This can also be set per-refresh by passing an object with a `keepScrollPosition` property to the `refresh` function.
*Inherited from _StoreMixin*
Property | Description
-------- | -----------
`noDataMessage` | An optional message to be displayed when no results are returned by a query.
`loadingMessage` | An optional message to be displayed in the loading node which appears when a new page of results is requested.
`getBeforePut` | If `true` (the default), any `save` operations will re-fetch the item from the store via a `get` call, before applying changes represented by dirty data.
`query` | An object to be passed when issuing store queries, which may contain filter criteria.
`queryOptions` | An object to be passed along with `query` when issuing store queries. Note that the standard `start`, `count`, and `sort` properties are already managed by OnDemandList itself.
`store` | An instance of a `dojo/store` implementation, from which to fetch data.
### Method Summary
Method | Description
------ | -----------
`refresh(options)` | Clears the grid and re-queries the store for data. If `keepScrollPosition` is `true` on either the instance or the `options` passed to `refresh`, an attempt will be made to preserve the current scroll position. OnDemandList returns a promise from `refresh`, which resolves when items in view finish rendering. The promise resolves with the QueryResults that were rendered.
*Inherited from _StoreMixin*
Method | Description
------ | -----------
`set("query", query[, queryOptions])` | Specifies a new `query` object (and optionally, also `queryOptions`) to be used by the list when issuing queries to the store.
`set("store", store[, query[, queryOptions]])` | Specifies a new store (and optionally, also `query` and `queryOptions`) for the list to reference.
`set("sort", property, descending)` | \_StoreMixin's version of this defers sorting to the store.
`updateDirty(id, field, value)` | Updates an entry in the component's dirty data hash, to be persisted to the store on the next call to `save()`.
`save()` | Instructs the list to relay any dirty data back to the store. Returns a promise which resolves when all necessary put operations have completed successfully (even if the store operates synchronously).
`revert()` | Clears the dirty data hash without updating the store, and refreshes the component.
## Events
### dgrid-refresh-complete
As of dgrid 0.3.5, OnDemandList emits a `dgrid-refresh-complete` event when
results finish rendering as the result of a `refresh` call (also including the
initial render). The event includes the following properties:
* `grid`: The Grid (or List) instance responsible for firing the event
* `results`: The QueryResults returned by the store query
### dgrid-error
If something should go wrong within OnDemandList's logic, \_StoreMixin is
equipped to emit a `dgrid-error` event, including the following properties:
* `grid`: The Grid (or List) instance on which the error occurred
* `error`: The error which occurred
OnDemandList emits a `dgrid-error` event for any error that occurs while
querying the store for data in reaction to scrolling or a `refresh` call.
\ No newline at end of file
# ColumnHider
The ColumnHider extension adds the ability to dynamically hide or show columns
in a grid without the need to fully reset its layout. User interaction is
enabled via a menu accessible from the top right corner of the grid
(represented by a "+" mark); it will open on click, presenting checkboxes for
each column in the grid. These can be checked or unchecked to show or hide
individual columns, respectively.
```js
require([
"dojo/_base/declare", "dgrid/OnDemandGrid", "dgrid/extensions/ColumnHider"
], function(declare, OnDemandGrid, ColumnHider){
var grid = new (declare([OnDemandGrid, ColumnHider]))({
columns: {
col1: {
label: "Column 1",
hidden: true
},
col2: {
label: "Column 2",
unhidable: true
},
col3: "Column 3"
}
}, "grid");
// ...
});
```
**Note:** This extension is only fully supported for cases of simple, single-row
column layouts.
## Additional Column Definition Properties
The ColumnHider extension supports the following additional column definition properties.
Property | Description
-------- | -----------
`hidden` | If `true`, the column in question will be initially hidden, but can be shown by opening the menu and checking its box.
`unhidable` | If `true`, the column in question will not be listed in the menu, denying access to toggle its appearance. This can be particularly useful for a selector column which should always be shown, for example.
## Events
The ColumnHider extension will emit a`dgrid-columnstatechange` event when a
column is hidden or shown via the popup. It includes the following properties:
* `grid`: The Grid instance in which this event occurred
* `column`: The column definition object representing the column that was
hidden or shown
* `hidden`: Boolean representing the new state of the column: `true` if
hidden, `false` if shown
\ No newline at end of file
# ColumnReorder
The ColumnReorder extension adds the ability to reorder the columns of a grid
via drag'n'drop operations on column headers. In the case of more complex grid
structures, note that reordering is only supported between columns within the
same subrow or columnset.
```js
require([
"dojo/_base/declare", "dgrid/OnDemandGrid", "dgrid/extensions/ColumnReorder"
], function(declare, OnDemandGrid, ColumnReorder, declare){
var grid = new (declare([OnDemandGrid, ColumnReorder]))({
columns: {
col1: {
label: "Column1",
reorderable: false
},
col2: "Column 2",
col3: "Column 3"
}
}, "grid");
// ...
});
```
## Additional Column Definition Properties
The ColumnReorder extension supports the following additional column definition properties.
Property | Description
-------- | -----------
`reorderable` | If explicitly set to `false`, the given column's header node will not be treated as a viable DnD item, preventing it from being reordered. **Note:** this is generally only useful for columns at either end of a structure, since if it is surrounded by neighbors which are reorderable, it will not prevent reordering of the surrounding columns.
## Events
The ColumnReorder extension emits a `dgrid-columnreorder` event whenever the
user triggers a column reorder operation. This event includes the following
properties:
* `grid`: The grid instance in which the reorder operation took place
* `subRow`: The specific subrow in which the reorder operation took place,
reflecting the new order
* `column`: The column definition object representing the column which was
reordered
This event bubbles and is cancelable; if canceled, the column structure prior
to the reorder operation will be preserved.
\ No newline at end of file
# ColumnResizer
The ColumnResizer extension can be used to add column resizing functionality (accessible via mouse or touch drag).
```js
require([
"dojo/_base/declare", "dgrid/OnDemandGrid", "dgrid/extensions/ColumnResizer"
], function(declare, OnDemandGrid, ColumnResizer){
var grid = new (declare([OnDemandGrid, ColumnResizer]))({
columns: {
col1: {
label: "Column1",
resizable: false
},
col2: "Column 2",
col3: "Column 3"
}
}, "grid");
// ...
});
```
## APIs
The ColumnResizer extension supports the following additional instance properties.
### Property Summary
Property | Description
-------- | -----------
`adjustLastColumn` | If `true` (the default), adjusts the last column's width to "auto" at times where the browser would otherwise stretch all columns to span the grid.
`minWidth` | Minimum width of each column in the grid, in px; default is `40`.
### Method Summary
Method | Description
------ | -----------
`resizeColumnWidth(columnId, width)` | Resizes the width of the column with id `columnId` to be `width` pixels wide.
## Additional Column Definition Properties
The ColumnResizer extension supports the following additional column definition properties.
Property | Description
-------- | -----------
`resizable` | If `false`, prevents the given column from being resized; default is `true`.
`width` | Optional number specifying an initial width (in pixels) for the column. This is offered as a convenience for dynamically restoring persisted column widths; in most cases, column styling should still be done separately via CSS.
## Events
The ColumnResizer extension will emit a`dgrid-columnresize` event when a column
is resized, which includes the following properties:
* `grid`: The Grid instance in which this event occurred
* `columnId`: The ID of the resized column, which can be used to retrieve the
column from `grid.columns`
* `width`: The new width of the column
* `parentType`: If the event was triggered by user interaction, this property
indicates what type of event originally triggered the event
The `dgrid-columnresize` event is cancelable; if canceled, the prior size of
the column will be preserved.
\ No newline at end of file
# CompoundColumns
The CompoundColumns extension adds the ability to define a column structure
which includes additional spanning header cells above the actual columns in the
grid.
```js
require([
"dojo/_base/declare", "dgrid/OnDemandGrid", "dgrid/extensions/CompoundColumns"
], function(declare, OnDemandGrid, CompoundColumns){
var compoundGrid = new (declare([OnDemandGrid, CompoundColumns]))({
columns:[
{ label: "Full Name", children: [
{ label: "Given", children: [
{ field: "firstname", label: "First" },
{ field: "middlename", label: "Middle", sortable: false }
] },
{ field: "lastname", label: "Last" }
] },
{ field: "age", label: "Age" }
]
}, "compoundGrid");
// ...
});
```
For an example of the CompoundColumns extension in use, see
`dgrid/test/extensions/CompoundColumns.html`.
## Usage
CompoundColumns works by defining any compound header cells first, then defining
the more granular cells via a `children` property of each column definition
object. This can be extended to nest any number of levels.
In the above example, the `columns` array would define a structure which
presents 4 columns (first name, middle name, last name, and age), with an
additional label cell spanning above first and middle name, and yet another
label cell spanning above all 3 name fields combined.
Additionally, the headers on the innermost children can be suppressed by
specifying `showChildHeaders: false` on their immediate parent.
### Mixin Order
`CompoundColumns` contains special considerations for interoperating with a few
other dgrid mixins and extensions. As such, the following should be kept in
mind when using these components together:
* `CompoundColumns` should be mixed in **before** `ColumnSet`,
because it needs to normalize its column structure before `ColumnSet` performs its logic.
* `CompoundColumns` should be mixed in **after** `ColumnResizer` and `ColumnHider`,
because it extends methods defined by these other extensions,
to add considerations specific to its own behavior.
\ No newline at end of file
# DijitRegistry
The DijitRegistry extension adds a couple of considerations for working with
Dijit, particularly useful when a dgrid instance is to live inside of a Dijit
layout widget. Its primary purpose is to add dgrid instances to the Dijit
registry, as well as provide a couple of methods and properties which Dijit
widgets will generally expect to exist.
```js
require([
"dojo/_base/declare", "dgrid/OnDemandGrid", "dgrid/extensions/DijitRegistry"
], function(declare, OnDemandGrid, DijitRegistry){
var grid = new (declare([OnDemandGrid, DijitRegistry]))({
store: myStore,
columns: myColumns
}, "grid");
});
```
## Usage
See [Working with Widgets](../../usage/Working-with-Widgets.md) for more information.
\ No newline at end of file
# CellSelection
The CellSelection mixin extends upon the functionality of the [Selection](Selection.md) mixin
to provide selection at the cell level instead.
```js
require([
"dojo/_base/declare", "dgrid/OnDemandGrid", "dgrid/CellSelection"
], function(declare, OnDemandGrid, CellSelection){
var grid = new (declare([OnDemandGrid, CellSelection]))({
selectionMode: "single",
// ...
});
});
```
## Differences from Selection mixin
* The `selection` object stores a nested hash, where the outer hash is
keyed by item ID and the inner hashes are keyed by column ID.
* The `dgrid-select` and `dgrid-deselect` events still fire, but include a
`cells` property containing an array of cell objects, rather than a `rows`
property.
* Whereas Selection's `select`, `deselect`, and `isSelected` methods look up the
passed argument via List's `row` method, CellSelection looks it up via Grid's
`cell` method.
* The `allowSelect` method is passed a cell object instead of a row object.
\ No newline at end of file
# util/touch
The `util/touch` module defines two simple extension events, `tap` and `dbltap`,
for detecting the respective actions on touch devices. It also defines utility
functions for handling touch events.
```js
require(["dgrid/util/touch"], function(touchUtil){
// Assume we have a Grid instance in the variable `grid`...
grid.on(touchUtil.selector(".dgrid-content .dgrid-row", touchUtil.dbltap), function(event){
var row = grid.row(event);
// Do something with `row` here in reaction to when it is double-tapped
});
});
```
## APIs
In addition to the `tap` and `dbltap` extension events, `util/touch` also
defines the following functions.
### Function Summary
Function | Description
-------- | -----------
`countCurrentTouches(event, node)` | Counts the number of currently active touches which fall within the given node; useful in cases where other handlers may call `stopPropagation`, thus affecting other means of counting touches.
`selector(selector, eventType, children)` | A version of the `selector` function from `dojo/on`, with an additional fix to work around issues experienced on iOS Safari. This is used by `dgrid/Selection` and `dgrid/tree` for touch event handling.
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
//>>built
define("dgrid/extensions/nls/ar/columnHider",{popupLabel:"\u0625\u0638\u0647\u0627\u0631 \u0627\u0644\u0623\u0639\u0645\u062f\u0629 \u0623\u0648 \u0625\u062e\u0641\u0627\u0626\u0647\u0627"});
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment