[FEATURE] Click the whole row to de-/select a task 82/18082/6
authorThomas Löffler <loeffler@spooner-web.de>
Wed, 6 Feb 2013 21:16:16 +0000 (22:16 +0100)
committerIngo Renner <ingo@typo3.org>
Sat, 16 Feb 2013 23:33:14 +0000 (00:33 +0100)
To select or deselect a task you only need
to click in the row.

Releases: 6.1
Resolves: #45156
Change-Id: I32708cad248314e582d9314a560b7812ba1bdfc2
Reviewed-on: https://review.typo3.org/18082
Reviewed-by: Ingo Renner
Tested-by: Ingo Renner
typo3/sysext/scheduler/res/tx_scheduler_be.js

index 705afe2..b5d5220 100644 (file)
@@ -163,10 +163,26 @@ Ext.onReady(function(){
                                idParts = checkboxes.item(i).id.split('_');
                                Ext.select('#executionstatus_' + idParts[1]).item(0).set({src: TYPO3.settings.scheduler.runningIcon});
                        }
-               }
-       });
+               },
+                       // Add a listener for click on a row to check/uncheck the checkbox
+               '.tx_scheduler_mod1 tr.db_list_normal@click' : function(e, t) {
+                       if (t.tagName == 'SPAN' || t.tagName == 'A') {
+                               return;
+                       }
+
+                       var checkboxes = Ext.select(t.up('tr').select('input.checkboxes'));
+                       if (t.type != 'checkbox') {
+                               if (checkboxes.item(0).dom.checked == true) {
+                                       checkboxes.item(0).dom.checked = false;
+                               } else {
+                                       checkboxes.item(0).dom.checked = true;
+                               }
+                       }
+                       if (Ext.query('input.checkboxes:checked').length == checkboxes.getCount()) {
+                               allCheckedStatus = !allCheckedStatus;
+                       }
+               },
 
-       Ext.addBehaviors({
                        // Add a listener for click on run single task
                '.t3-icon-scheduler-run-task@click' : function(event, element) {
                        var checkbox = Ext.get(element).parent('tr').child('input[type="checkbox"]');