This is a usability improvement as it widens the target of the click. The 
script for moremember.pl includes code necessary to uncheck its sibling as per 
uncheck_sibling(). If this patch is approved I will look for other instances so 
that <td> interactions will be consistent.
---
 .../prog/en/modules/circ/circulation.tmpl          |    8 ++++++++
 .../prog/en/modules/members/moremember.tmpl        |   12 ++++++++++++
 2 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
index d1ffe56..facf757 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
@@ -6,6 +6,7 @@
 <!-- /TMPL_IF --></title>
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" 
-->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" 
-->/lib/jquery/plugins/jquery.checkboxes.pack.js"></script>
 <script type="text/JavaScript" language="JavaScript">
 //<![CDATA[
 $.tablesorter.addParser({
@@ -39,6 +40,13 @@ $.tablesorter.addParser({
             }
         } ).attr( 'checked', false );
         <!-- /TMPL_IF -->
+               $("td").click(function(e){
+                       if(e.target.tagName.toLowerCase() == 'td'){
+            $(this).find("input:checkbox").each( function() {
+                $(this).attr('checked', !$(this).attr('checked'));
+            });
+                       }
+               });
         });
 //]]>
 </script>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
index fe5f3ad..2f29abd 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
@@ -51,6 +51,18 @@ $(document).ready(function() {
         }
     } ).attr( 'checked', false );
     <!-- /TMPL_IF -->
+       $("td").click(function(e){
+               if(e.target.tagName.toLowerCase() == 'td'){
+           $(this).find("input:checkbox").each( function() {
+               $(this).attr('checked', !$(this).attr('checked'));
+                          if($(this).attr('checked')){
+                               
$(this).parent().siblings().find("input:checkbox").each(function(){
+                      if($(this).attr('checked')){ $(this).attr('checked',''); 
}
+                  });
+                          }
+           });
+               }
+       });
  });
 function uncheck_sibling(me){
 nodename=me.getAttribute("name");
-- 
1.5.5.GIT

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to