~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/app/javascript/lp.js

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-07-14 15:43:38 UTC
  • mfrom: (13302.6.40 replace-expanders-2)
  • Revision ID: launchpad@pqm.canonical.com-20110714154338-3figmpb0g53ioey7
[r=adeuring][bug=807434] Migrate a few remaining expanders to the new
        generic Expander widget.

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
    });
86
86
}
87
87
 
88
 
function toggleExpandableTableRow(element_id) {
89
 
    var row = document.getElementById(element_id);
90
 
    var view_icon = document.getElementById(element_id + "-arrow");
91
 
    if (row.style.display == "table-row") {
92
 
      row.style.display = "none";
93
 
      view_icon.setAttribute("src", "/@@/treeCollapsed");
94
 
    } else {
95
 
      row.style.display = "table-row";
96
 
      view_icon.setAttribute("src", "/@@/treeExpanded");
97
 
    }
98
 
    return false;
99
 
}
100
 
 
101
 
function toggleExpandableTableRows(class_name) {
102
 
    var view_icon = document.getElementById(class_name + "-arrow");
103
 
    var all_page_tags = document.getElementsByTagName("*");
104
 
    for (i = 0; i < all_page_tags.length; i++) {
105
 
        row = all_page_tags[i];
106
 
        if (row.className == class_name) {
107
 
            if (row.style.display == "table-row") {
108
 
              row.style.display = "none";
109
 
              view_icon.setAttribute("src", "/@@/treeCollapsed");
110
 
            } else {
111
 
              row.style.display = "table-row";
112
 
              view_icon.setAttribute("src", "/@@/treeExpanded");
113
 
            }
114
 
        }
115
 
    }
116
 
    return false;
117
 
}
118
 
 
119
88
// Enable or disable the beta.launchpad.net redirect
120
89
function setBetaRedirect(enable) {
121
90
    var expire = new Date();