Bug 20329: Text input fields are wider than the fieldset class they are inside of
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / parcel.tt
1 [% USE Asset %]
2 [% USE Koha %]
3 [% USE KohaDates %]
4 [% USE Price %]
5 [% USE currency = format('%.2f') -%]
6 [% SET footerjs = 1 %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( date ) %]
9             Receipt summary for [% name %] [% IF ( invoice ) %]invoice [% invoice %][% END %] on [% datereceived | $KohaDates %][% ELSE %]Receive orders from [% name %][% END %]</title>
10 [% Asset.css("css/datatables.css") %]
11 [% INCLUDE 'doc-head-close.inc' %]
12 </head>
13
14 <body id="acq_parcel" class="acq">
15 [% INCLUDE 'header.inc' %]
16 [% INCLUDE 'acquisitions-search.inc' %]
17
18 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo;
19     [% IF datereceived %]
20         Receipt summary for <i>[% name %]</i>
21         [% IF ( invoice ) %]
22             <i>[ [% invoice |html %] ]</i>
23         [% END %]
24         on <i>[% datereceived | $KohaDates %]</i>
25     [% ELSE %]
26         Receive orders from [% name %]
27     [% END %]
28 </div>
29
30 <div id="doc3" class="yui-t2">
31
32    <div id="bd">
33         <div id="yui-main">
34         <div class="yui-b">
35         [% IF ( receive_error ) %]
36         <div class="dialog alert">
37         <h3>Error adding items:</h3>
38         <ul>
39         [% FOREACH error_loo IN error_loop %]
40                 <li>[% error_loo.error_param %][% IF ( error_loo.error_duplicate_barcode ) %]Duplicate Barcode[% END %] <!-- todo: other error conditions come here. --></li>
41         [% END %]
42         </ul>
43         </div>
44         [% END %]
45     <h1>
46         [% IF datereceived %]
47             Receipt summary for <i>[% name %]</i> [% IF ( invoice ) %] <i> [ [% invoice |html %] ] </i>[% END %] on <i>[% datereceived | $KohaDates %]</i>
48         [% ELSE %]
49             Receive orders from [% name %]
50         [% END %]
51     </h1>
52
53     [% IF ( success_delorder ) %]
54     <div class="dialog message">The order has been successfully canceled.</div>
55     [% ELSE %]
56         [% IF ( error_delitem ) %]
57             <div class="dialog alert">The order has been canceled, although one or more items could not have been deleted.</div>
58         [% END %]
59         [% IF ( error_delbiblio ) %]
60             <div class="dialog alert">The order has been canceled, although the record has not been deleted.</div>
61         [% END %]
62     [% END %]
63
64     [% IF (error_cancelling_receipt) %]
65       <div class="dialog error">
66       Cannot cancel receipt. Possible reasons :
67       <ul>
68         <li>
69           The order line you trying to cancel was created from a partial receipt
70           of another order line which is already received. Try to cancel this
71           one first and retry.
72         </li>
73         <li>
74           The order line you trying to cancel was created from a partial receipt
75           of another order line which has been deleted. Cancellation is not
76           possible.
77         </li>
78       </ul>
79       </div>
80     [% END %]
81
82     [% IF error_invoice_not_known %]
83         <div class="dialog error">
84             The invoice referenced by this invoiceid does not exist.
85         </div>
86     [% END %]
87
88 [% UNLESS no_orders_to_display %]
89 <div id="acqui_receive_summary">
90 <p><strong>Invoice number:</strong> [% invoice |html %] <strong>Received by:</strong> [% loggedinusername %] <strong>On:</strong> [% datereceived | $KohaDates %]</p>
91 </div>
92 [% UNLESS (invoiceclosedate) %]
93   <div id="acqui_receive_search">
94     <h3>Pending orders</h3>
95
96     [% IF ( loop_orders ) %]
97       <table id="pendingt">
98         <thead>
99           <tr>
100             <th>Basket search</th>
101             <th>Basket group search</th>
102             <th>Order line search</th>
103             <th>Summary search</th>
104             <th>&nbsp;</th>
105             <th>Quantity search</th>
106             <th>Unit cost search</th>
107             <th>Order cost search</th>
108             <th>Fund search</th>
109             <th>&nbsp;</th>
110             <th>&nbsp;</th>
111           </tr>
112           <tr>
113             <th>Basket</th>
114             <th>Basket group</th>
115             <th>Order line</th>
116             <th>Summary</th>
117             <th>View record</th>
118             <th>Quantity</th>
119             <th>Unit cost</th>
120             <th>Order cost</th>
121             <th>Fund</th>
122             <th>&nbsp;</th>
123             <th>&nbsp;</th>
124           </tr>
125         </thead>
126         <tbody class="filterclass">
127         [% FOREACH loop_order IN loop_orders %]
128             <tr>
129                 <td class="basketfilterclass">[% loop_order.basketname %] (<a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% loop_order.basketno %]">[% loop_order.basketno %]</a>)</td>
130                 <td>
131                   [% IF loop_order.basketgroupid %]
132                     [% loop_order.basketgroupname %] (<a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% loop_order.booksellerid %]">[% loop_order.basketgroupid %]</a>)
133                   [% ELSE %]
134                     No basket group
135                   [% END %]
136                 </td>
137                 <td class="orderfilterclass"><a href="neworderempty.pl?ordernumber=[% loop_order.ordernumber %]&amp;booksellerid=[% loop_order.booksellerid %]">[% loop_order.ordernumber %]</a></td>
138                 <td class="summaryfilterclass">
139                   <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loop_order.biblionumber %]">[% loop_order.title |html %]</a>
140                 [% IF ( loop_order.author ) %] by [% loop_order.author %][% END %]
141                 [% IF ( loop_order.isbn ) %] &ndash; [% loop_order.isbn %][% END %]
142                 [% IF ( loop_order.publishercode ) %]
143                     <br />Publisher: [% loop_order.publishercode %]
144                     [%- IF    ( loop_order.publicationyear > 0) -%], [% loop_order.publicationyear %]
145                     [%- ELSIF ( loop_order.copyrightdate   > 0) -%] [% loop_order.copyrightdate %]
146                     [% END %]
147                 [% END %]
148                 [% IF ( loop_order.suggestionid ) %]
149                     <br/>
150                     Suggested by: [% loop_order.surnamesuggestedby %][% IF ( loop_order.firstnamesuggestedby ) %], [% loop_order.firstnamesuggestedby %] [% END %]
151                     (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% loop_order.suggestionid %]&amp;op=show">suggestion #[% loop_order.suggestionid %]</a>)
152                 [% END %]
153                 <br />
154                 [% IF ( loop_order.order_internalnote ) %]
155                     <p class="ordernote"><strong>Internal note: </strong>[% loop_order.order_internalnote|html %] [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% loop_order.ordernumber %]&amp;referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid %]&type=internal">Change internal note</a>]</p>
156                 [% ELSE %]
157                     [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% loop_order.ordernumber %]&amp;referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid %]&type=internal">Add internal note</a>]
158                 [% END %]
159                 [% IF ( loop_order.order_vendornote ) %]
160                     <p class="ordernote"><strong>Vendor note: </strong>[% loop_order.order_vendornote|html %]</p>
161                 [% ELSE %]
162                     [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% loop_order.ordernumber %]&amp;referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid %]&type=vendor">Add vendor note</a>]
163                 [% END %]
164                 </td>
165                 <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% loop_order.biblionumber %]" class="previewData">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;id=[% loop_order.biblionumber %]" class="previewData">Card</a></td>
166                 <td>[% loop_order.quantity %]</td>
167                 <td>[% loop_order.ecost | $Price %]</td>
168                 <td>[% loop_order.total | $Price %]</td>
169                 <td>[% loop_order.budget_name %]</td>
170                                 <td>
171                               <a href="orderreceive.pl?ordernumber=[% loop_order.ordernumber %]&amp;invoiceid=[% invoiceid %]">Receive</a>
172                     <br />
173                     <a href="#" onclick="transfer_order_popup([% loop_order.ordernumber %]); return false;">Transfer</a>
174                                 </td>
175                                 <td>
176                         [% IF ( loop_order.left_holds_on_order ) %]
177                         <span class="button" title="Can't cancel order, ([% loop_order.holds_on_order %]) holds are linked with this order cancel holds first">Can't cancel order</span><br>
178                         [% ELSE %]
179                         <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% loop_order.ordernumber %]&biblionumber=[% loop_order.biblionumber %]&referrer=[% "/cgi-bin/koha/acqui/parcel.pl?invoiceid=$invoiceid" | uri %]">Cancel order</a><br />
180                         [% END %]
181                         [% IF ( loop_order.can_del_bib ) %]
182                         <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% loop_order.ordernumber %]&biblionumber=[% loop_order.biblionumber %]&del_biblio=1&referrer=[% "/cgi-bin/koha/acqui/parcel.pl?invoiceid=$invoiceid" | uri %]">Cancel order and catalog record</a><br />
183                         [% ELSE %]
184                         <span class="button" title="Can't delete catalog record, see constraints below">Can't cancel order and delete catalog record</span><br>
185                         [% END %]
186                         [% IF ( loop_order.left_item ) %]
187                         <b title="Can't delete catalog record, because of [% loop_order.items %] existing item(s)" >[% loop_order.items %] item(s) left</b><br>
188                         [% END %]
189                         [% IF ( loop_order.left_biblio ) %]
190                         <b title="Can't delete catalog record, delete other orders linked to it first">[% loop_order.biblios %] order(s) left</b><br>
191                         [% END %]
192                         [% IF ( loop_order.left_subscription ) %]
193                         <b title="Can't delete catalog record, delete subscriptions first">[% loop_order.subscriptions %] subscription(s) left</b><br>
194                         [% END %]
195                         [% IF ( loop_order.left_holds ) %]
196                         <b title="Can't delete catalog record or order, cancel holds first">[% loop_order.holds %] hold(s) left</b>
197                         [% END %]
198                     </td>
199                 </tr>
200         [% END %]
201         </tbody>
202       </table>
203     [% ELSE %]There are no pending orders.[% END %]
204   </div>
205 [% ELSE %]
206     <p>
207         Invoice is closed, so you can't receive orders anymore.
208         <a href="/cgi-bin/koha/acqui/invoice.pl?op=reopen&invoiceid=[% invoiceid %]&referer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid %]">Reopen it</a>.
209     </p>
210 [% END %]
211
212 <div id="acqui_receive_receivelist">
213     <h3>Already received</h3>
214
215    [% IF ( loop_received ) %]
216    <form action="/cgi-bin/koha/acqui/parcel.pl" method="get" name="orderform">
217     <table id="receivedt">
218       <thead>
219         <tr>
220           <th>Basket</th>
221           <th>Basket group</th>
222           <th>Order line</th>
223           <th title="Item holds / Total holds">Holds</th>
224           <th>Summary</th>
225           <th>View record</th>
226           <th>Quantity</th>
227           <th>Fund</th>
228           <th>Est cost</th>
229           <th>Actual cost</th>
230           <th>TOTAL</th>
231           <th></th>
232         </tr>
233       </thead>
234     <tfoot>
235         [% FOREACH key IN subtotal_for_funds.keys.sort %]
236             <tr>
237                 [% IF invoiceincgst %]
238                     <td colspan="6" class="total">(Tax inc.)</td>
239                 [% ELSE %]
240                     <td colspan="6" class="total">(Tax exc.)</td>
241                 [% END %]
242                 <td colspan="2"><i>Subtotal for</i> [% key %]</td>
243                 <td>[% subtotal_for_funds.$key.ecost | $Price %]</td>
244                 <td>[% subtotal_for_funds.$key.unitprice | $Price  %]</td>
245                 <td>&nbsp;</td>
246                 <td>&nbsp;</td>
247             </tr>
248         [% END %]
249         <tr>
250             <th colspan="10" class="total">Total tax exc.</th>
251             <th>[% total_tax_excluded | $Price %]</th>
252             <th></th>
253         </tr>
254         [% FOREACH book_foot IN book_foot_loop %]
255             <tr>
256                 <th colspan="10">Total (GST [% book_foot.tax_rate * 100 %]%)</th>
257                 <th>[% book_foot.tax_value | $Price %]</th>
258                 <th></th>
259             </tr>
260         [% END %]
261         <tr>
262             <th colspan="10" class="total">Total tax inc.</th>
263             <th>[% total_tax_included | $Price %]</th>
264             <th></th>
265         </tr>
266     </tfoot>
267     <tbody class="filterclass">
268         [% FOREACH order IN loop_received %]
269             <tr>
270                 <td>[% order.basketname %] (<a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% order.basketno %]">[% order.basketno %]</a>)</td>
271                 <td>
272                   [% IF order.basketgroupid %]
273                     [% order.basketgroupname %] (<a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% order.booksellerid %]">[% order.basketgroupid %]</a>)
274                   [% ELSE %]
275                     No basket group
276                   [% END %]
277                 </td>
278                 <td>
279                   <a href="neworderempty.pl?ordernumber=[% order.ordernumber %]&amp;booksellerid=[% booksellerid %]">[% order.ordernumber %]</a>
280                   [% IF (order.parent_ordernumber && (order.parent_ordernumber != order.ordernumber)) %]
281                     (<a href="neworderempty.pl?ordernumber=[% order.parent_ordernumber %]&amp;booksellerid=[% booksellerid %]" title="Original order line">[% order.parent_ordernumber %]</a>)
282                   [% END %]
283                 </td>
284                 <td>
285                   [% IF order.total_holds > 0 %]
286                     [% IF order.item_holds > 0 %]
287                       <span class="error"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% order.biblionumber %]">[% order.item_holds %]</a></span>
288                     [% ELSE %]
289                       0
290                     [% END %]
291                     /
292                     <span class="error"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% order.biblionumber %]">[% order.total_holds %]</a></span>
293                   [% ELSE %]
294                     0
295                   [% END %]
296                 </td>
297                 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber %]">[% order.title |html %]</a>
298                 [% IF ( order.author ) %] / [% order.author %][% END %]
299                 [% IF ( order.isbn ) %] - [% order.isbn %][% END %]
300                 [% IF ( order.publishercode ) %]
301                     <br />Publisher: [% order.publishercode %]
302                     [%- IF    ( order.publicationyear > 0) -%], [% order.publicationyear %]
303                     [%- ELSIF ( order.copyrightdate   > 0) -%] [% order.copyrightdate %]
304                     [% END %]
305                 [% END %]
306                 [% IF ( order.suggestionid ) %]
307                     <br/>
308                     Suggested by: [% order.surnamesuggestedby %][% IF ( order.firstnamesuggestedby ) %], [% order.firstnamesuggestedby %] [% END %]
309                     (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% order.suggestionid %]&amp;op=show">suggestion #[% order.suggestionid %]</a>)
310                 [% END %]
311                 </td>
312                 <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% order.biblionumber %]" class="previewData">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;id=[% order.biblionumber %]" class="previewData">Card</a></td>
313                 <td>[% order.quantityreceived %]</td>
314                 <td>[% order.budget.budget_name %]</td>
315                 <td>[% order.ecost | $Price %]</td>
316                 <td>[% order.unitprice | $Price %]</td>
317                 <td>[% order.total | $Price %]</td>
318                 <td>
319                     [% IF loop_receive.cannot_cancel or ( order.basket.effective_create_items == "receiving" and loop_receive.holds > 0 ) %]
320                       [% IF loop_receive.cannot_cancel %]
321                         [% span_title = BLOCK %]
322                             Cannot cancel receipt of this order line because it
323                             was created from a partial receipt of order line no.
324                             [% order.parent_ordernumber %], which is
325                             already received. Try cancelling this one first and
326                             retry.
327                         [% END %]
328                       [% ELSE %]
329                         [%# FIXME Here we block the cancellation if holds exist. Actually it could be possible if items will be exist after the deletion %]
330                         [%# Some additional checks should be added in the pl file %]
331                         [% span_title = BLOCK %]
332                           Cannot cancel receipt of this order line because at least one reservation exists on the records.
333                         [% END %]
334                       [% END %]
335                       <span title="[% span_title | collapse %]">
336                           Can't cancel receipt
337                       </span>
338                     [% ELSE %]
339                         <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]&op=cancelreceipt&ordernumber=[% order.ordernumber %]">Cancel receipt</a>
340                     [% END %]
341                 </td>
342             </tr>
343             [% END %]
344         </tbody>
345     </table>
346     </form>
347
348         [% ELSE %]There are no received orders.[% END %]
349 </div>
350
351 <div id="dataPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
352     <div class="modal-dialog">
353     <div class="modal-content">
354     <div class="modal-header">
355         <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
356         <h3 id="dataPreviewLabel">MARC preview</h3>
357     </div>
358     <div class="modal-body">
359         <div id="loading"> <img src="[% interface %]/[% theme %]/img/spinner-small.gif" alt="" /> Loading </div>
360     </div>
361     <div class="modal-footer">
362         <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
363     </div>
364     </div>
365     </div>
366 </div>
367
368 [% IF (invoiceclosedate) %]
369     <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoiceid %]">View invoice</a>
370 [% ELSE %]
371     <form action="/cgi-bin/koha/acqui/invoice.pl" method="get">
372         <input type="hidden" name="invoiceid" value="[% invoiceid %]" />
373         <fieldset class="action">
374             <input type="submit" value="Finish receiving" />
375         </fieldset>
376     </form>
377 [% END %]
378
379 [% END %]
380
381 </div>
382 </div>
383
384
385 <div class="yui-b">
386 <form action="/cgi-bin/koha/acqui/parcel.pl" id="filterform" method="post">
387   <fieldset class="brief">
388     <h4>Filter</h4>
389     <ol>
390       <li>
391         <label for="summaryfilter">ISBN, author or title :</label>
392         <input type="text" name="summaryfilter" id="summaryfilter" value="[% summaryfilter %]"/>
393       </li>
394       <li>
395         <label for="basketfilter">Basket :</label>
396         <input type="text" name="basketfilter" id="basketfilter" value="[% basketfilter %]"/>
397       </li>
398       <li>
399           <label for="basketgroupnamefilter">Basket group name :</label>
400           <input type="text" name="basketgroupnamefilter" id="basketgroupnamefilter" value="[% basketgroupnamefilter %]" />
401       </li>
402       <li>
403         <label for="orderfilter">Order line :</label>
404         <input type="text" name="orderfilter" id="orderfilter" value="[% orderfilter %]"/>
405       </li>
406       [% IF (UNIMARC) %]
407         <li>
408           <label for="eanfilter">EAN :</label>
409           <input type="text" name="eanfilter" id="eanfilter" value="[% eanfilter %]"/>
410         </li>
411       [% END %]
412     </ol>
413     <fieldset class="action">
414       <input type="hidden" value="search" name="op" />
415       <input type="hidden" value="[% invoiceid %]" name="invoiceid" />
416       <input type="submit" value="Filter" />
417       <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]">Clear</a>
418     </fieldset>
419   </fieldset>
420 </form>
421 [% INCLUDE 'acquisitions-menu.inc' %]
422 </div>
423 </div>
424
425 [% MACRO jsinclude BLOCK %]
426     [% Asset.js("js/acquisitions-menu.js") %]
427     [% INCLUDE 'datatables.inc' %]
428     [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") %]
429     [% Asset.js("lib/jquery/plugins/jquery.cookie.min.js") %]
430     <style type="text/css">#dataPreview { width : 80%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }</style>
431     <script type="text/javascript">
432
433         dt_overwrite_html_sorting_localeCompare();
434         var sticky_filters = [% sticky_filters %];
435
436         $(document).ready(function(){
437             if ( $("#pendingt").length ) {
438                 var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, {
439                     "bStateSave": true,
440                     "iCookieDuration": 60*60*24*1000, // 1000 days
441                     "iDisplayLength": 10,
442                     "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
443                     "aoColumnDefs": [
444                         { "aTargets": [ 4, 9, 10 ], "bSortable": false, "bSearchable": false },
445                     ],
446                     "aoColumns": [
447                         { "sType": "html" },
448                         { "sType": "html" },
449                         { "sType": "num-html" },
450                         { "sType": "anti-the" },
451                         null,
452                         null,
453                         null,
454                         null,
455                         null,
456                         null,
457                         null,
458                     ],
459                     'bAutoWidth': false,
460                     "sPaginationType": "four_button"
461                 })
462                 ).columnFilter({
463                     sPlaceHolder: "head:after",
464                     aoColumns: [
465                         { type: "text" },
466                         { type: "text" },
467                         { type: "text" },
468                         { type: "text" },
469                         null,
470                         { type: "text" },
471                         { type: "text" },
472                         { type: "text" },
473                         { type: "text" },
474                         null,
475                         null
476                     ]
477                 });
478             }
479
480             if ( $("#receivedt").length ) {
481                 var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
482                     "bStateSave": true,
483                     "iCookieDuration": 60*60*24*1000, // 1000 days
484                     "iDisplayLength": 10,
485                     "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
486                     "aoColumnDefs": [
487                         { "aTargets": [ 5, -1 ], "bSortable": false, "bSearchable": false },
488                     ],
489                     "aoColumns": [
490                         { "sType": "html" },
491                         { "sType": "html" },
492                         { "sType": "html" },
493                         { "sType": "num-html" },
494                         { "sType": "anti-the" },
495                         null,
496                         null,
497                         null,
498                         null,
499                         null,
500                         null,
501                         null
502                     ],
503                     "sPaginationType": "four_button"
504                 }));
505             }
506
507             // Keep filters from finishreceive.pl to parcel.pl
508             $.cookie("filter_parcel_summary", $("#summaryfilter").val());
509             $.cookie("filter_parcel_basketname", $("#basketfilter").val());
510             $.cookie("filter_parcel_orderno", $("#orderfilter").val());
511             $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
512             $.cookie("filter_parcel_ean", $("#eanfilter").val());
513
514             $("#filterform").on('submit', function(){
515                 $.cookie("filter_parcel_summary", $("#summaryfilter").val());
516                 $.cookie("filter_parcel_basketname", $("#basketfilter").val());
517                 $.cookie("filter_parcel_orderno", $("#orderfilter").val());
518                 $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
519                 $.cookie("filter_parcel_ean", $("#eanfilter").val());
520             });
521
522             $(".previewData").on("click", function(e){
523                 e.preventDefault();
524                 var ltitle = $(this).text();
525                 var page = $(this).attr("href");
526                 $("#dataPreviewLabel").text(ltitle);
527                 $("#dataPreview .modal-body").load(page + " div");
528                 $('#dataPreview').modal({show:true});
529             });
530             $("#dataPreview").on("hidden", function(){
531                 $("#dataPreviewLabel").html("");
532                 $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
533             });
534
535         });
536
537         // Case-insensitive version of jquery's contains function
538         jQuery.extend(jQuery.expr[':'], {
539             icontains : "jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0"
540         });
541
542          // Contains exactly function
543         jQuery.extend(jQuery.expr[':'], {
544             containsExactly: "$(a).text() == m[3]"
545         });
546
547         function transfer_order_popup(ordernumber) {
548             var url = "/cgi-bin/koha/acqui/transferorder.pl?"
549                 + "ordernumber=" + ordernumber
550                 window.open(url, 'TransferOrder');
551         }
552     </script>
553 [% END %]
554
555 [% INCLUDE 'intranet-bottom.inc' %]