Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // The link ends up always being the very last cabinet
- // in the table, rather than the cabinet listed in each row.
- // What did I do wrong?
- clickableCabinets: function() {
- rows = $$('tr.cabinetSummary');
- for (var i=0; i<rows.length; i++) {
- var room = rows[i].select('.cabinetRoom')[0].textContent;
- var cabinet = rows[i].select('.cabinetName')[0].textContent;
- rows[i].onclick = function() {
- window.location.href = '/room/' + room + '/cabinet/' + cabinet;
- }.bind(rows[i]);
- }
- },
Add Comment
Please, Sign In to add comment