File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 10
10
( function ( $ ) {
11
11
12
12
$ . widget ( "ui.editor" , {
13
+ options : {
14
+ editor : null ,
15
+ editorOptions : null ,
16
+
17
+ // callbacks
18
+ cancel : null ,
19
+ submit : null
20
+ } ,
13
21
_create : function ( ) {
14
22
this . inner = this . element . wrapInner ( "<div class='editor-wrapper'></div>" ) . children ( ) ;
15
23
this . _bind ( {
Original file line number Diff line number Diff line change @@ -16,26 +16,21 @@ $.widget( "ui.gridEditor", {
16
16
editorOptions : function ( cell , grid ) {
17
17
return grid . options . columns [ cell [ 0 ] . cellIndex ] . editorOptions ;
18
18
} ,
19
- done : $ . noop
19
+ items : "td"
20
20
} ,
21
21
_create : function ( ) {
22
22
var grid = this . element . data ( "grid" ) ;
23
23
this . _bind ( {
24
24
dblclick : function ( event ) {
25
- var that = this ;
26
25
var target = $ ( event . target ) . closest ( this . options . items ) ;
27
26
if ( target . length && ! target . data ( "editor" ) ) {
28
27
target . editor ( {
29
28
editor : this . options . editor ( target , grid ) ,
30
29
editorOptions : this . options . editorOptions ( target , grid ) ,
31
- cancel : function ( event , ui ) {
32
- that . _trigger ( "done" , event , ui ) ;
33
- } ,
34
30
submit : function ( event , ui ) {
35
31
var object = target . closest ( "tr" ) . data ( "grid-item" ) ,
36
32
property = grid . options . columns [ target [ 0 ] . cellIndex ] . property ;
37
33
$ . observable ( object ) . property ( property , ui . value ) ;
38
- that . _trigger ( "done" , event , ui ) ;
39
34
}
40
35
} ) . editor ( "start" ) ;
41
36
}
You can’t perform that action at this time.
0 commit comments