~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-23 15:19:40 UTC
  • mfrom: (14565.1.4 sort_buttons_907376_fix)
  • Revision ID: launchpad@pqm.canonical.com-20111223151940-gsspingmyxtarvb4
[r=wgrant][bug=907376] Added a check to the history event to check
 for valid data passed to the event before updating sort button ui.

Show diffs side-by-side

added added

removed removed

Lines of Context:
694
694
            var model = navigator.get('model');
695
695
            model.get('history').after(
696
696
                'change', function(e) {
697
 
                     Y.lp.buglisting_utils.update_sort_button_visibility(
698
 
                         orderby, e.newVal);
699
 
                });
 
697
                    // Only update the sort buttons if we've got a valid batch
 
698
                    // key.
 
699
                    if (Y.Object.hasKey(e.newVal, 'batch_key')) {
 
700
                        Y.lp.buglisting_utils.update_sort_button_visibility(
 
701
                            orderby,
 
702
                            e.newVal
 
703
                        );
 
704
                    }
 
705
                 }
 
706
            );
700
707
            var config_node = orderby.get('config_node');
701
708
            var list_util = new Y.lp.buglisting_utils.BugListingConfigUtil({
702
709
                srcNode: config_node,