tie in select-all option in lists interfaces
authorberick <berick@esilibrary.com>
Thu, 7 Apr 2011 16:00:36 +0000 (12:00 -0400)
committerberick <berick@esilibrary.com>
Thu, 7 Apr 2011 16:05:57 +0000 (12:05 -0400)
Open-ILS/web/templates/default/opac/myopac/lists.tt2
Open-ILS/web/templates/default/opac/parts/anon_list.tt2

index f661726..1ec9f23 100644 (file)
                     </div>
                     <div class="clear-both pad-bottom-five"></div>
                 </div>
-                <form action="[% ctx.opac_root %]/myopac/list/update"
-                    method="POST">
+                <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
                 <input type="hidden" name="list" value="[% bbag.id %]" />
                 <table cellpadding='0' cellspacing='0' border='0'>
                     <thead id="acct_list_header">
                         <tr>
                             <td width="1%" style="padding-left: 10px;">
-                                <input type="checkbox" />
+                            <input type="checkbox" onclick="
+                                var inputs=document.getElementsByTagName('input'); 
+                                for (i = 0; i < inputs.length; i++) { 
+                                    if (inputs[i].name == 'del_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %]) 
+                                        inputs[i].checked = this.checked;}"/>
+
                             </td>
                             <td width="49%" style="padding-left: 5px;">[% l('Title') %]</td>
                             <td width="49%">[% l('Author(s)') %]</td>
                             attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
                             PROCESS get_marc_attrs args=attrs %]
                         <tr>
-                            <td class="opac-auto-097b" style="padding-left: 10px;"><input type="checkbox" name="del_item" value="[% item.id %]" /></td>
+                            <td class="opac-auto-097b" style="padding-left: 10px;"><input type="checkbox" name="del_item" value="[% item.id %]" bbag='[% bbag.id %]'/></td>
                             <td class="opac-auto-097b" style="padding-left: 5px;">[% attrs.title %]</td>
                             <td class="opac-auto-097b">[% attrs.author %]</td>
                         </tr>
index 8fb8258..19a7440 100644 (file)
             <table cellpadding='0' cellspacing='0' border='0'>
                 <thead id="acct_list_header_anon">
                     <tr>
-                        <td width="1%" style="padding-left:10px;"><input type="checkbox"/>
+                        <td width="1%" style="padding-left:10px;">
+                            <input type="checkbox" onclick="
+                                var inputs=document.getElementsByTagName('input'); 
+                                for (i = 0; i < inputs.length; i++) { 
+                                    if (inputs[i].name == 'record' && !inputs[i].disabled) inputs[i].checked = this.checked;}"/>
                         </td>
                         <td width="49%" style="padding-left:5px;">[% l('Title') %]</td>
                         <td width="49%" style="padding-left:5px;">[% l('Author(s)') %]</td>