Skip to content

Commit

Permalink
Table enhanced
Browse files Browse the repository at this point in the history
  • Loading branch information
rickyleung committed Oct 22, 2015
1 parent 03960b9 commit e1c5ebd
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
8 changes: 6 additions & 2 deletions dist/jquery.bizui.js
Original file line number Diff line number Diff line change
Expand Up @@ -13010,7 +13010,7 @@ define('dep/jquery.editabletable',['require'],function(require) {
var text = $.trim(editor.val()),
evt = $.Event('change'),
originalContent;
if (active.text() === text || editor.hasClass('error')) {
if (!active || active.text() === text || editor.hasClass('error')) {
return true;
}
originalContent = active.html();
Expand Down Expand Up @@ -13204,7 +13204,11 @@ define('ui/Table',['require','dep/jquery.resizableColumns','dep/jquery.editablet

//调整列宽
if (options.resizable) {
this.$main.find('table').resizableColumns();
this.$main.find('table').resizableColumns({
start: function() {
$('.biz-table-editor').blur();
}
});
}

//排序
Expand Down
2 changes: 1 addition & 1 deletion dist/jquery.bizui.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/dep/jquery.editabletable.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ define(function(require) {
var text = $.trim(editor.val()),
evt = $.Event('change'),
originalContent;
if (active.text() === text || editor.hasClass('error')) {
if (!active || active.text() === text || editor.hasClass('error')) {
return true;
}
originalContent = active.html();
Expand Down
6 changes: 5 additions & 1 deletion src/ui/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ define(function(require) {

//调整列宽
if (options.resizable) {
this.$main.find('table').resizableColumns();
this.$main.find('table').resizableColumns({
start: function() {
$('.biz-table-editor').blur();
}
});
}

//排序
Expand Down

0 comments on commit e1c5ebd

Please sign in to comment.