Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/oria/gridx
Browse files Browse the repository at this point in the history
  • Loading branch information
yurychika committed Jan 21, 2014
2 parents 35b6271 + be2f5d1 commit bd5ed8a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
9 changes: 9 additions & 0 deletions modules/ColumnLock.js
Expand Up @@ -56,6 +56,15 @@ define([
required: ['body'],

count: 0,

preload: function(){
var t = this;
if(t.grid.persist){
t.count = t.grid.persist.registerAndLoad('columnLock', function(){
return t.count;
});
}
},

load: function(args, deferStartup){
this.count = this.arg('count');
Expand Down
5 changes: 4 additions & 1 deletion modules/Edit.js
Expand Up @@ -756,7 +756,10 @@ define([
col.needCellWidget = function(cell){
return (!needCellWidget || needCellWidget.apply(col, arguments)) && cell.isEditable();
};
col._userDec = col.decorator;
// avoid infinite recursion
if(col.decorator != t._dummyDecorator){
col._userDec = col.decorator;
}
col.userDecorator = t._getDecorator(col.id);
col.setCellValue = getEditorValueSetter((col.editorArgs && col.editorArgs.toEditor) ||
lang.partial(getTypeData, col));
Expand Down
4 changes: 4 additions & 0 deletions modules/HiddenColumns.js
Expand Up @@ -185,6 +185,10 @@ define([
if(i < len){
changed = 1;
t.grid._columnsById[id] = c;
// restored column should not appear before locked columns
if(index < lockCount){
c.index = index = lockCount;
}
columns.splice(index, 0, c);
for(i = index + 1; i < columns.length; ++i){
columns[i].index = i;
Expand Down
3 changes: 2 additions & 1 deletion modules/Persist.js
Expand Up @@ -154,7 +154,7 @@ define([
enabled: true
};
var get = this.arg('get'),
content = get(this.arg('key'));
content = '_content' in this ? this._content : (this._content = get(this.arg('key')));
return content ? content[name] : null;
},

Expand Down Expand Up @@ -202,6 +202,7 @@ define([
}
}
}
delete t._content;
put(t.arg('key'), contents, t.arg('options'));
},

Expand Down

0 comments on commit bd5ed8a

Please sign in to comment.