Created
October 24, 2011 13:04
-
-
Save mackuba/1308970 to your computer and use it in GitHub Desktop.
Kanbanery multi-task-type filter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function() { var list = prompt("Enter list of task types to show, separated by commas (leave empty to show all):"); var wait = $("<p>Please wait…</p>").css({ 'font-size': '20px', 'color': 'white', position: 'absolute', top: '10px', left: '500px', width: '150px' }).appendTo($('body')); setTimeout(function() { if (!list) { $('.task-view').each(function(i, t) { $(t).show() }); } else { $('li.placeholder').each(function(i, pl) { $(pl).view().showRealView() }); var types = _.map(list.split(','), function(el) { return $.trim(el.toLowerCase()) }); $('.task-view').each(function(i, t) { var label = $('.disp-task-type-name', t); var type = $.trim($(label).text().toLowerCase()); if (_.indexOf(types, type) == -1) { $(t).hide(); } else { $(t).show(); } }); } wait.remove(); }, 10);})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment