~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/templates/bugtask-tasks-and-nominations-table-row.pt

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-07-20 12:25:27 UTC
  • mfrom: (13474.1.1 fix-bugtask-expander)
  • Revision ID: launchpad@pqm.canonical.com-20110720122527-b1ejfgxd56iex7ez
[r=wgrant][bug=813456] Fix JS for bug task expanders with per-series
 tasks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
180
180
          // Set-up the expander on the bug task summary row.
181
181
          var icon_node = Y.one('tr#${row_id} a.bugtask-expander');
182
182
          var row_node = Y.one('tr#${form_row_id}');
183
 
          var content_node = row_node.one('td form');
184
 
          var expander = new Y.lp.app.widgets.expander.Expander(
185
 
            icon_node, row_node, { animate_node: content_node });
186
 
          expander.setUp();
 
183
          if (Y.Lang.isValue(row_node)) {
 
184
            // When no row is present, this is bug task on a project with
 
185
            // multiple per-series tasks, so we do not need to set
 
186
            // the expander for the descriptive parent project task.
 
187
            var content_node = row_node.one('td form');
 
188
            var expander = new Y.lp.app.widgets.expander.Expander(
 
189
              icon_node, row_node, { animate_node: content_node });
 
190
            expander.setUp();
 
191
          }
187
192
        });
188
193
    });
189
194
  "/>