diff options
author | Dan McGee <dan@archlinux.org> | 2010-09-30 13:15:20 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-09-30 13:15:20 -0500 |
commit | 3682fb285b9f131a56aed2c6cab8d303c6aae5ae (patch) | |
tree | 217509085054951d4fdcdb6d9f5c0b5099412e5b /templates/todolists/view.html | |
parent | 0eac9698c6bdebdf5056a97b7c979b526d54ec15 (diff) |
Move most inline JS into script filerelease_2010-09-30
We're getting to the point where we are starting to have a good chunk of JS
scattered about. Centralize a lot of it for maintenance and performance
purposes.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates/todolists/view.html')
-rw-r--r-- | templates/todolists/view.html | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/templates/todolists/view.html b/templates/todolists/view.html index 504c8cbb..0792d096 100644 --- a/templates/todolists/view.html +++ b/templates/todolists/view.html @@ -53,31 +53,10 @@ </div> {% load cdn %}{% jquery %} <script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script> +<script type="text/javascript" src="/media/archweb.js"></script> <script type="text/javascript"> - $(function() { - $('a[href*=todo/flag]').click(function() { - var link = this; - - $.getJSON(link.href, function(data) { - if (data.complete) { - $(link).text('Complete').addClass('complete').removeClass('incomplete'); - } else { - $(link).text('Incomplete').addClass('incomplete').removeClass('complete'); - } - }); - - return false; - }); - }); -$.tablesorter.addParser({ - id: 'todostatus', - is: function(s) { return false; }, - format: function(s) { - return s.match(/incomplete/) ? 1 : 0; - }, - type: 'numeric' -}); $(document).ready(function() { + $('a[href*=todo/flag]').click(todolist_flag); $(".results").tablesorter({ widgets: ['zebra'], sortList: [[0,0], [1,0]], |