Skip to content

Commit 932093a

Browse files
committed
todolists: move todolist_flag to where it is used
1 parent bf9f924 commit 932093a

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

sitestatic/archweb.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff 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-
195181
function 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(),

templates/todolists/view.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff 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');

0 commit comments

Comments
 (0)