File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -178,20 +178,6 @@ if (typeof $ !== 'undefined' && typeof $.tablesorter !== 'undefined') {
178178 } ;
179179} ) ( jQuery ) ;
180180
181- /* todolists/view.html */
182- function todolist_flag ( ) {
183- // TODO: fix usage of this
184- var link = this ;
185- $ . getJSON ( link . href , function ( data ) {
186- $ ( link ) . text ( data . status ) . removeClass (
187- 'complete inprogress incomplete' ) . addClass (
188- data . css_class . toLowerCase ( ) ) ;
189- /* let tablesorter know the cell value has changed */
190- $ ( '.results' ) . trigger ( 'updateCell' , [ $ ( link ) . closest ( 'td' ) [ 0 ] , false , null ] ) ;
191- } ) ;
192- return false ;
193- }
194-
195181function filter_pkgs_list ( filter_ele , tbody_ele ) {
196182 /* start with all rows, and then remove ones we shouldn't show */
197183 var rows = $ ( tbody_ele ) . children ( ) ,
Original file line number Diff line number Diff line change @@ -133,6 +133,20 @@ <h3>Filter Todo List Packages</h3>
133133 } ) ;
134134} ) ;
135135$ ( document ) . ready ( function ( ) {
136+ function todolist_flag ( ) {
137+ // TODO: fix usage of this
138+ var link = this ;
139+ $ . getJSON ( link . href , function ( data ) {
140+ $ ( link ) . text ( data . status ) . removeClass (
141+ 'complete inprogress incomplete' ) . addClass (
142+ data . css_class . toLowerCase ( ) ) ;
143+ /* let tablesorter know the cell value has changed */
144+ $ ( '.results' ) . trigger ( 'updateCell' , [ $ ( link ) . closest ( 'td' ) [ 0 ] , false , null ] ) ;
145+ } ) ;
146+
147+ return false ;
148+ }
149+
136150 $ ( 'a.status-link' ) . click ( todolist_flag ) ;
137151 var filter_func = function ( ) {
138152 filter_pkgs_list ( '#todolist_filter' , '#dev-todo-pkglist tbody' ) ;
You can’t perform that action at this time.
0 commit comments