Description of problem: cannot shift 'Select None', 'Select All', and 'Select Default' repeatedly. Version-Release number of selected component (if applicable): Version 0.14.1 beaker-devel How reproducible: always Steps to Reproduce: 1. page: Systems->all, click 'show Search Options'. 2. click 'Toggle Result Columns'. 3. click 'Select All', then click 'Select None'. 4. click 'Select All' again, or click 'Select Default'. Actual results: after step4, no response on web. Expected results: after step4, 'Select All' or 'Select Default' should take effect. Additional info: I must reopen the page, then clicking 'Select Default' would take effect.
(In reply to wangjing from comment #0) > Description of problem: > cannot shift 'Select None', 'Select All', and 'Select Default' repeatedly. > > Version-Release number of selected component (if applicable): > Version 0.14.1 beaker-devel > > How reproducible: > always > > Steps to Reproduce: > 1. page: Systems->all, click 'show Search Options'. > 2. click 'Toggle Result Columns'. > 3. click 'Select All', then click 'Select None'. > 4. click 'Select All' again, or click 'Select Default'. > > Actual results: > after step4, no response on web. > > Expected results: > after step4, 'Select All' or 'Select Default' should take effect. > > Additional info: > I must reopen the page, then clicking 'Select Default' would take effect. I could not reproduce this bug. What version of what browser are you running?
I can reproduce this - Firefox 23.0.1 under KDE in Fedora 19. First time I opened "Toggle Result Columns" the Select None/All/Default links did nothing. Second time (after hitting Ctrl-F5) they worked for during one cycle of clicking None->All->Default->None but then stopped responding.
Poking around in the JS debugger, looking at the final search toggle (System/Vendor) Immediately after loading the page, run this in the console: $("input[name *= 'systemsearch_column_']") Item 29 (the System/Vendor toggle) shows it has no checked attribute listed in "attributes" and the "checked" property is shown as false Then run the same code that clicking Select All runs: $("input[name *= 'systemsearch_column_']").attr('checked', 1); Item 29 now shows a new attribute ("checked") in the attribute list, and the "checked" property is shown as "true". The checkboxes in the web page are all also checked as expected. Now run the equivalent of clicking Select None: $("input[name *= 'systemsearch_column_']").removeAttr('checked'); Item 29 appears to have reverted to the same state it was in when the page was first loaded and all the checkboxes are cleared as expected. However, now try running the Select All code again: $("input[name *= 'systemsearch_column_']").attr('checked', 1); The "checked" attribute once again is added back to the attribute list, but the "checked" property remains "false", and the checkboxes in the web UI remain unchecked. The "checked" property can be forced back to "true" through the JS console and then the web UI checkbox updates as expected. So, any theories on what state might have changed between the first and second attempts to set the attribute to cause the same JS to react differently?
Sounds like it might be a problem of properties vs. attributes, which was changed a bit in jQuery 1.9+ (so this might be a regression from upgrading to jQuery 2): http://api.jquery.com/prop/ It might just be a matter of changing all the .attr('checked', 1) to .prop('checked', true) resp. .removeAttr('checked') to .prop('checked', false).
(In reply to Dan Callaghan from comment #5) > Sounds like it might be a problem of properties vs. attributes, which was > changed a bit in jQuery 1.9+ Actually in jQuery 1.6 but we were upgrading from jQuery 1.5 so the theory stands.
Trying Dan's suggested changes in the JS console result in the checkboxes being set and cleared appropriately, so sounds good to me.
On Gerrit: http://gerrit.beaker-project.org/2296
verified on beaker-devel Version 0.15.0rc2(2013-927)-->pass Steps: 1. page: Systems->all, click 'show Search Options'. 2. click 'Toggle Result Columns'. 3. click 'Select All', then click 'Select None'. 4. click 'Select All' again, or click 'Select Default'. Actual results: same as expected results Expected results: after step4, 'Select All' or 'Select Default' should take effect.
Beaker 0.15 has been released.