There are several places in the label creator templates where where an "onclick" attribute is used. These should be rewritten so that JS functionality can be separate from the markup.
Created attachment 51739 [details] [review] Bug 16576 - Remove the use of "onclick" from label templates This patch updates several label creator templates to remove the use of "onclick" in favor of defining click events in JavaScript. Also changed: - Replaced the non-existant element <icon> with <i> - Removed the use of <center> and 'align="center"'; - In the item search results template: - The pagination bars have been updated to match those in use elsewhere. - The use of the checkboxes jQuery plugin has been replaced with straight jQuery for simplicity's sake. - Output of table headers has been modified so that translatable strings are in the template instead of having English strings passed from the script. - Moved the 'Add checked' and 'Done' buttons into a floating toolbar. To test, apply the patch and go to Tools -> Label creator. - Choose New -> Label batch - Click 'Add items' - Perform a search for items. - Confirm that 'select all' and 'clear all' links work. - Confirm that clicking an individual 'Add' button works. - Select multiple items and click the 'Add checked' button. Confirm that the selected items were added to your batch. - Click 'Add items' again to save the selected items to your batch. - Test that the 'Delete' and 'Export' buttons next to any item work correctly. - Choose Manage -> Label batches - Test that the 'Delete' button works correctly. - Select one or more batches and test that the 'Export selected' button works correctly.
Created attachment 51901 [details] [review] Bug 16576 - Remove the use of "onclick" from label templates This patch updates several label creator templates to remove the use of "onclick" in favor of defining click events in JavaScript. Also changed: - Replaced the non-existant element <icon> with <i> - Removed the use of <center> and 'align="center"'; - In the item search results template: - The pagination bars have been updated to match those in use elsewhere. - The use of the checkboxes jQuery plugin has been replaced with straight jQuery for simplicity's sake. - Output of table headers has been modified so that translatable strings are in the template instead of having English strings passed from the script. - Moved the 'Add checked' and 'Done' buttons into a floating toolbar. To test, apply the patch and go to Tools -> Label creator. - Choose New -> Label batch - Click 'Add items' - Perform a search for items. - Confirm that 'select all' and 'clear all' links work. - Confirm that clicking an individual 'Add' button works. - Select multiple items and click the 'Add checked' button. Confirm that the selected items were added to your batch. - Click 'Add items' again to save the selected items to your batch. - Test that the 'Delete' and 'Export' buttons next to any item work correctly. - Choose Manage -> Label batches - Test that the 'Delete' button works correctly. - Select one or more batches and test that the 'Export selected' button works correctly. Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch>
Owen, Have a look at the pagination on labels/label-item-search.pl, your patch breaks it.
Created attachment 53390 [details] [review] Bug 16576 [Revised] Remove the use of "onclick" from label templates This patch updates several label creator templates to remove the use of "onclick" in favor of defining click events in JavaScript. Also changed: - Replaced the non-existant element <icon> with <i> - Removed the use of <center> and 'align="center"'; - In the item search results template: - The use of the checkboxes jQuery plugin has been replaced with straight jQuery for simplicity's sake. - Output of table headers has been modified so that translatable strings are in the template instead of having English strings passed from the script. - Moved the 'Add checked' and 'Done' buttons into a floating toolbar. To test, apply the patch and go to Tools -> Label creator. - Choose New -> Label batch - Click 'Add items' - Perform a search for items. - Confirm that 'select all' and 'clear all' links work. - Confirm that clicking an individual 'Add' button works. - Select multiple items and click the 'Add checked' button. Confirm that the selected items were added to your batch. - Click 'Add items' again to save the selected items to your batch. - Test that the 'Delete' and 'Export' buttons next to any item work correctly. - Choose Manage -> Label batches - Test that the 'Delete' button works correctly. - Select one or more batches and test that the 'Export selected' button works correctly. Revision: Removed changes to pagination in the item search results template since it didn't work.
Created attachment 53447 [details] [review] [SIGNED-OFF]Bug 16576 [Revised] Remove the use of "onclick" from label templates This patch updates several label creator templates to remove the use of "onclick" in favor of defining click events in JavaScript. Also changed: - Replaced the non-existant element <icon> with <i> - Removed the use of <center> and 'align="center"'; - In the item search results template: - The use of the checkboxes jQuery plugin has been replaced with straight jQuery for simplicity's sake. - Output of table headers has been modified so that translatable strings are in the template instead of having English strings passed from the script. - Moved the 'Add checked' and 'Done' buttons into a floating toolbar. To test, apply the patch and go to Tools -> Label creator. - Choose New -> Label batch - Click 'Add items' - Perform a search for items. - Confirm that 'select all' and 'clear all' links work. - Confirm that clicking an individual 'Add' button works. - Select multiple items and click the 'Add checked' button. Confirm that the selected items were added to your batch. - Click 'Add items' again to save the selected items to your batch. - Test that the 'Delete' and 'Export' buttons next to any item work correctly. - Choose Manage -> Label batches - Test that the 'Delete' button works correctly. - Select one or more batches and test that the 'Export selected' button works correctly. Revision: Removed changes to pagination in the item search results template since it didn't work. Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Created attachment 53680 [details] [review] Bug 16576 [Revised] Remove the use of "onclick" from label templates This patch updates several label creator templates to remove the use of "onclick" in favor of defining click events in JavaScript. Also changed: - Replaced the non-existant element <icon> with <i> - Removed the use of <center> and 'align="center"'; - In the item search results template: - The use of the checkboxes jQuery plugin has been replaced with straight jQuery for simplicity's sake. - Output of table headers has been modified so that translatable strings are in the template instead of having English strings passed from the script. - Moved the 'Add checked' and 'Done' buttons into a floating toolbar. To test, apply the patch and go to Tools -> Label creator. - Choose New -> Label batch - Click 'Add items' - Perform a search for items. - Confirm that 'select all' and 'clear all' links work. - Confirm that clicking an individual 'Add' button works. - Select multiple items and click the 'Add checked' button. Confirm that the selected items were added to your batch. - Click 'Add items' again to save the selected items to your batch. - Test that the 'Delete' and 'Export' buttons next to any item work correctly. - Choose Manage -> Label batches - Test that the 'Delete' button works correctly. - Select one or more batches and test that the 'Export selected' button works correctly. Revision: Removed changes to pagination in the item search results template since it didn't work. Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 16.11, thanks Owen!
Pushed in 16.05. Will be in 16.05.04.