~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/templates/bugtask-macros-tableview.pt

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-12-15 21:16:41 UTC
  • mfrom: (14487.4.4 bug-901016)
  • Revision ID: launchpad@pqm.canonical.com-20111215211641-vybbmw9yfaof2ck2
[r=jcsackett][bug=901016] reorder the buglisting sort buttons to
        match the order of the displayed data;
        always show the 'sort by title' button in bug listings

Show diffs side-by-side

added added

removed removed

Lines of Context:
672
672
                sort_order = 'desc';
673
673
            }
674
674
            var unknown_sort_key = true;
675
 
            /*xxxxxxxxxxxxxxx
676
 
            for (var i = 0; i < sort_keys.length; i++) {
677
 
                if (sort_keys[i][0] === active_sort_key) {
678
 
                    unknown_sort_key = false;
679
 
                    break;
680
 
                }
681
 
            }
682
 
            */
683
675
            Y.each(sort_keys, function(sort_key) {
684
676
                if (sort_key[0] === active_sort_key) {
685
677
                    unknown_sort_key = false;
716
708
            });
717
709
            var field_visibility =
718
710
                navigator.get('model').get_field_visibility();
 
711
            orderby.always_display = ['title'];
719
712
            // The advanced search page contains sort options that have
720
713
            // no related data fields we can display. If a user has selected
721
714
            // such a sort order, this sort option should always be visible.
722
715
            if (field_visibility['show_' + active_sort_key] === undefined) {
723
 
                orderby.always_display = active_sort_key;
 
716
                orderby.always_display.push(active_sort_key);
724
717
            }
725
718
            Y.lp.buglisting_utils.update_sort_button_visibility(
726
719
                 orderby, field_visibility);