Index: trunk/extensions/EducationProgram/resources/ep.pager.js |
— | — | @@ -72,23 +72,23 @@ |
73 | 73 | 'for': 'epsummaryinput' |
74 | 74 | } ).msg( 'ep-pager-summary-message-' + args.type ).append( ' ' ); |
75 | 75 | |
76 | | - summaryInput = $( '<input>' ).attr( { |
| 76 | + $summaryInput = $( '<input>' ).attr( { |
77 | 77 | 'type': 'text', |
78 | 78 | 'size': 60, |
79 | 79 | 'maxlength': 250, |
80 | 80 | 'id': 'epsummaryinput' |
81 | 81 | } ); |
82 | 82 | |
83 | | - $dialog.append( '<br /><br />', summaryLabel, summaryInput ); |
| 83 | + $dialog.append( '<br /><br />', summaryLabel, $summaryInput ); |
84 | 84 | |
85 | | - summaryInput.keypress( function( event ) { |
| 85 | + $summaryInput.keypress( function( event ) { |
86 | 86 | if ( event.which == '13' ) { |
87 | 87 | event.preventDefault(); |
88 | 88 | onConfirm(); |
89 | 89 | } |
90 | 90 | } ); |
91 | 91 | |
92 | | - summaryInput.focus(); |
| 92 | + $summaryInput.focus(); |
93 | 93 | |
94 | 94 | return deferred.promise(); |
95 | 95 | }; |
— | — | @@ -103,14 +103,13 @@ |
104 | 104 | args = { |
105 | 105 | 'type': $this.attr( 'data-type' ), |
106 | 106 | 'ids': [ $this.attr( 'data-id' ) ], |
107 | | - 'names': [ $this.attr( 'data-name' ) ], |
108 | | - 'comment': $summaryInput |
| 107 | + 'names': [ $this.attr( 'data-name' ) ] |
109 | 108 | }; |
110 | 109 | |
111 | 110 | showConfirmDialog( |
112 | 111 | args, |
113 | 112 | function() { |
114 | | - ep.api.remove( args ).done( function() { |
| 113 | + ep.api.remove( args, { 'comment': $summaryInput.val() } ).done( function() { |
115 | 114 | $dialog.dialog( 'close' ); |
116 | 115 | |
117 | 116 | var $tr = $this.closest( 'tr' ); |
— | — | @@ -159,13 +158,13 @@ |
160 | 159 | 'type': $( this ).attr( 'data-type' ), |
161 | 160 | 'ids': ids, |
162 | 161 | 'names': names, |
163 | | - 'comment': $summaryInput |
| 162 | + 'comment': $summaryInput.val() |
164 | 163 | }; |
165 | 164 | |
166 | 165 | showConfirmDialog( |
167 | 166 | args, |
168 | 167 | function() { |
169 | | - ep.api.remove( args ).done( function() { |
| 168 | + ep.api.remove( args, { 'comment': $summaryInput.val() } ).done( function() { |
170 | 169 | $dialog.dialog( 'close' ); |
171 | 170 | |
172 | 171 | if ( $table.find( 'tr' ).length - ids.length > 1 ) { |