Skip to content

Commit

Permalink
Merge branch 'master' into 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
yurychika committed Jun 27, 2014
2 parents b7cce71 + 8b03a00 commit bdea919
Show file tree
Hide file tree
Showing 30 changed files with 622 additions and 85 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*.pydevproject
.project
.metadata
*.txt
bin/
tmp/
node_modules/
Expand Down
2 changes: 1 addition & 1 deletion Grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ define([
// - revision: Number: The Git rev from which dojo was pulled
major: 1,
minor: 3,
patch: 2,
patch: 3,
flag: "",
toString: function(){
return this.major + "." + this.minor + "." + this.patch + this.flag; // String
Expand Down
6 changes: 3 additions & 3 deletions core/model/cache/Sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ define([
indexToId: function(index, parentId){
this._init();
var items = this._struct[this.model.isId(parentId) ? parentId : this.layerId()];
return typeof index == 'number' && index >= 0 ? items && items[index + 1] : undefined;
return typeof index === 'number' && index >= 0 ? items && items[index + 1] : undefined;
},

idToIndex: function(id){
Expand Down Expand Up @@ -277,7 +277,7 @@ define([
array.forEach(s.getAttributes(item), function(attr){
obj[attr] = s.getValue(item, attr);
});
return obj;
return obj;
}
return item;
},
Expand All @@ -288,7 +288,7 @@ define([
cellData;

cellData = col.formatter ? col.formatter(rawData, rowId) : rawData[col.field || colId];
return (t.columns[colId] && t.columns[colId].encode === true)? entities.encode(cellData) : cellData;
return (t.columns[colId] && t.columns[colId].encode === true && typeof cellData === 'string')? entities.encode(cellData) : cellData;
},

_formatRow: function(rowData, rowId){
Expand Down
8 changes: 4 additions & 4 deletions modules/Body.js
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ define([
}
n.innerHTML = '';
en.innerHTML = emptyInfo;
en.style.zIndex = '';
en.style.zIndex = 1;
t.onEmpty();
t.model.free();
}
Expand Down Expand Up @@ -809,9 +809,9 @@ define([

var cellContent = t._buildCellContent(col, rowId, cell, visualIndex, isPadding, cellData),
testNode = domConstruct.create('div', {innerHTML: cellContent}),
testNodeContent = (testNode.innerText || testNode.textContent).trim?
(testNode.innerText || testNode.textContent).trim() :
(testNode.innerText || testNode.textContent).replace(/\s/g, ''),
testNodeContent = (testNode.innerText !== undefined && testNode.innerText !== null) ?
testNode.innerText : testNode.textContent;
testNodeContent = testNodeContent.trim ? testNodeContent.trim() : testNodeContent.replace(/\s/g, ''),
isEmpty = testNodeContent === ' ' || !testNodeContent;

testNode = '';
Expand Down
2 changes: 1 addition & 1 deletion modules/CellWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ define([
var t = this,
dn = t.domNode;
t.connect(dn, 'onmousedown', function(e){
if(e.target != dn && !t.cell.column.allowEventBubble){
if(e.target !== dn && !t.cell.column.allowEventBubble){
e.cancelBubble = true;
}
});
Expand Down
7 changes: 5 additions & 2 deletions modules/ColumnLock.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,13 @@ define([
this._updateScroller();//used for column dnd to sync hscroller.
},

_updateBody: function(){
_updateBody: function( aopFucMap ){
// summary:
// Update the body for column lock
array.forEach(this.grid.bodyNode.childNodes, this._lockColumns, this);
if ( !aopFucMap || aopFucMap['_updateBody'] !== false ){
array.forEach(this.grid.bodyNode.childNodes, this._lockColumns, this);
}

},

_updateScroller: function(){
Expand Down
11 changes: 6 additions & 5 deletions modules/Dod.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@ define([
"dojo/_base/lang",
"dojo/_base/Deferred",
"dojo/_base/array",
"../core/_Module",
"dojo/_base/declare",
"dojo/_base/fx",
"dojo/fx",
"dojo/keys",
'dojo/_base/event',
'dojo/_base/sniff',
"../core/_Module",
'../support/query',
'dijit/a11y',
'dijit/registry',
'dojo/_base/event',
'dojo/_base/sniff'
'dijit/registry'
], function(kernel, domConstruct, domStyle, domClass, domGeometry, lang,
Deferred, array, _Module, declare, baseFx, fx, keys, query, a11y, registry, event, has){
Deferred, array, declare, baseFx, fx, keys, event, has,
_Module, query, a11y, registry){
// kernel.experimental('gridx/modules/Dod');

/*=====
Expand Down
6 changes: 5 additions & 1 deletion modules/Edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,11 @@ define([
if(cw && cw.btns){
domClass.add(cw.btns, 'gridxEditFocus');
}
g.body.onRender();
//
// Defect 12439, when combine the AlwaysEditing and ColumnLock
// The _updateBody contians many rows to call _lockColumn, which is very slow
//
g.body.onRender( { '_updateBody': false } );
}
},

Expand Down
2 changes: 1 addition & 1 deletion modules/ExpandableColumn.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ define([
}
}, this);

this.connect(this.expandBar, 'onclick', function(evt){
this.connect(this.expandoBar, 'onclick', function(evt){
if(domClass.contains(evt.target, 'gridxColumnExpando')){
var colId = evt.target.parentNode.getAttribute('data-column-id');
this.expand(colId);
Expand Down
3 changes: 2 additions & 1 deletion modules/IndirectSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ define([
}
domClass.add(headerCellNode, 'gridxHeaderCellFocus');
headerCellNode.focus();
g.focus.stopEvent(evt);
return true;
},
blur = function(){
Expand All @@ -249,7 +250,7 @@ define([
focusNode: rowHeader.headerNode,
doFocus: focus,
doBlur: blur,
onFocus: focus,
// onFocus: focus,
onBlur: blur
});
},
Expand Down
9 changes: 7 additions & 2 deletions modules/IndirectSelectColumn.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ define([
isUnselectable && !selected && !partial ? dijitClass + 'Disabled' : '',
'" aria-checked="', selected ? 'true' : partial ? 'mixed' : 'false',
'"><span class="gridxIndirectSelectionCheckBoxInner">',
selected ? '&#10003;' : partial ? '&#9646;' : '&#9744;',
this._isSingle()? (selected? '&#x25C9;' : '&#x25CC;'):
(selected ? '&#10003;' : partial ? '&#9646;' : '&#9744;'),
'</span></span>'
].join('');
},
Expand Down Expand Up @@ -188,7 +189,11 @@ define([
domClass.toggle(node, dijitClass + 'PartialDisabled', partial && isUnselectable);
domClass.toggle(node, dijitClass + 'Disabled', !selected && !partial && isUnselectable);
node.setAttribute('aria-checked', selected ? 'true' : partial ? 'mixed' : 'false');
node.firstChild.innerHTML = selected ? '&#10003;' : partial ? '&#9646;' : '&#9744;';
if(this._isSingle()){
node.firstChild.innerHTML = selected ? '&#x25C9' : '&#x25CC';
}else{
node.firstChild.innerHTML = selected ? '&#10003;' : partial ? '&#9646;' : '&#9744;';
}
}
},

Expand Down
2 changes: 1 addition & 1 deletion modules/Tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ define([
// by setting the "expandLevel" parameter in column definition. If "nested" is false, the expandos will
// appear in the first column with truthy "expandLevel" parameter. If "nested" is true, the expando
// of any 1st level row will be shown in the column with "expandLevel" equal to 1, and the expando of
// any 2nd level row will be shown in the column width "expandLevel" equal to 2, and so on.
// any 2nd level row will be shown in the column with "expandLevel" equal to 2, and so on.
//
// The expansion/collapsing of a row can also be controlled by keyboard when the focus is on the cell
// with the expando. CTRL+RIGHT_ARROW to expand and CTRL+LEFT_ARROW to collapse. If in RTL mode, the ARROW
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dijit": "https://github.com/dojo/dijit/zipball/1.9.1",
"dojox": "https://github.com/dojo/dojox/zipball/1.9.1"
},
"version": "1.3.2",
"version": "1.3.3",
"maintainers":[
{
"name": "Xiao Wen Zhu(Oliver)",
Expand Down
3 changes: 3 additions & 0 deletions resources/Dod.less
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
.gridxRowOver & {
visibility: visible;
}
.gridxTouch & {
visibility: visible;
}
.gridxDodShown & {
.icon(dodExpandoOpen);
}
Expand Down
2 changes: 1 addition & 1 deletion resources/Gridx.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion resources/claro/Gridx.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion resources/claro/basic.less
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
}

.gridxHeaderRowInner {
background-image: data-uri('../images/claro-grid-header-onepixel.bmp');
background-image: data-uri('../images/claro-grid-header-onepixel.gif');
background-position: right;
background-repeat: repeat-y;
border-right: 1px solid #FFFFFF;
Expand Down
Binary file removed resources/images/claro-grid-header-onepixel.bmp
Binary file not shown.
Binary file added resources/images/claro-grid-header-onepixel.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion resources/slantedHeader.less
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@

.gridxColumnExpandoBar {
overflow: hidden;
background-image: data-uri('images/claro-grid-header-onepixel.bmp');
background-image: data-uri('images/claro-grid-header-onepixel.gif');
background-position: right;
background-repeat: repeat-y;
border-right: 1px solid #FFFFFF;
Expand Down
Loading

0 comments on commit bdea919

Please sign in to comment.