View | Details | Raw Unified | Return to bug 19755
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt (-134 / +133 lines)
Lines 2-147 Link Here
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
[% USE Price %]
3
[% USE Price %]
4
[% USE currency = format('%.2f') -%]
4
[% USE currency = format('%.2f') -%]
5
[% SET footerjs = 1 %]
5
[% INCLUDE 'doc-head-open.inc' %]
6
[% INCLUDE 'doc-head-open.inc' %]
6
<title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( date ) %]
7
<title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( date ) %]
7
            Receipt summary for [% name %] [% IF ( invoice ) %]invoice [% invoice %][% END %] on [% datereceived | $KohaDates %][% ELSE %]Receive orders from [% name %][% END %]</title>
8
            Receipt summary for [% name %] [% IF ( invoice ) %]invoice [% invoice %][% END %] on [% datereceived | $KohaDates %][% ELSE %]Receive orders from [% name %][% END %]</title>
8
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
9
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
9
[% INCLUDE 'doc-head-close.inc' %]
10
[% INCLUDE 'doc-head-close.inc' %]
10
[% INCLUDE 'datatables.inc' %]
11
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter.js"></script>
12
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.cookie.min.js"></script>
13
<style type="text/css">#dataPreview { width : 80%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }</style>
14
<script type="text/javascript">
15
//<![CDATA[
16
17
    dt_overwrite_html_sorting_localeCompare();
18
19
    var sticky_filters = [% sticky_filters %];
20
21
    $(document).ready(function(){
22
      if ( $("#pendingt").length ) {
23
        var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, {
24
            "bStateSave": true,
25
            "iCookieDuration": 60*60*24*1000, // 1000 days
26
            "iDisplayLength": 10,
27
            "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
28
            "aoColumnDefs": [
29
                { "aTargets": [ 4, 9, 10 ], "bSortable": false, "bSearchable": false },
30
            ],
31
            "aoColumns": [
32
                { "sType": "html" },
33
                { "sType": "html" },
34
                { "sType": "num-html" },
35
                { "sType": "anti-the" },
36
                null,
37
                null,
38
                null,
39
                null,
40
                null,
41
                null,
42
                null,
43
            ],
44
            'bAutoWidth': false,
45
            "sPaginationType": "four_button"
46
        } )
47
        ).columnFilter({
48
            sPlaceHolder: "head:after",
49
            aoColumns: [
50
                { type: "text" },
51
                { type: "text" },
52
                { type: "text" },
53
                { type: "text" },
54
                null,
55
                { type: "text" },
56
                { type: "text" },
57
                { type: "text" },
58
                { type: "text" },
59
                null,
60
                null
61
            ]
62
        });
63
      }
64
65
      if ( $("#receivedt").length ) {
66
        var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
67
            "bStateSave": true,
68
            "iCookieDuration": 60*60*24*1000, // 1000 days
69
            "iDisplayLength": 10,
70
            "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
71
            "aoColumnDefs": [
72
                { "aTargets": [ 5, -1 ], "bSortable": false, "bSearchable": false },
73
            ],
74
            "aoColumns": [
75
                { "sType": "html" },
76
                { "sType": "html" },
77
                { "sType": "html" },
78
                { "sType": "num-html" },
79
                { "sType": "anti-the" },
80
                null,
81
                null,
82
                null,
83
                null,
84
                null,
85
                null,
86
                null
87
            ],
88
            "sPaginationType": "four_button"
89
        } ) );
90
      }
91
92
      // Keep filters from finishreceive.pl to parcel.pl
93
      $.cookie("filter_parcel_summary", $("#summaryfilter").val());
94
      $.cookie("filter_parcel_basketname", $("#basketfilter").val());
95
      $.cookie("filter_parcel_orderno", $("#orderfilter").val());
96
      $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
97
      $.cookie("filter_parcel_ean", $("#eanfilter").val());
98
99
      $("#filterform").on('submit', function(){
100
        $.cookie("filter_parcel_summary", $("#summaryfilter").val());
101
        $.cookie("filter_parcel_basketname", $("#basketfilter").val());
102
        $.cookie("filter_parcel_orderno", $("#orderfilter").val());
103
        $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
104
        $.cookie("filter_parcel_ean", $("#eanfilter").val());
105
      });
106
107
        $(".previewData").on("click", function(e){
108
            e.preventDefault();
109
            var ltitle = $(this).text();
110
            var page = $(this).attr("href");
111
            $("#dataPreviewLabel").text(ltitle);
112
            $("#dataPreview .modal-body").load(page + " div");
113
            $('#dataPreview').modal({show:true});
114
        });
115
        $("#dataPreview").on("hidden", function(){
116
            $("#dataPreviewLabel").html("");
117
            $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
118
        });
119
120
    });
121
122
     // Case-insensitive version of jquery's contains function
123
     jQuery.extend(jQuery.expr[':'], {
124
	    icontains : "jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0"
125
     });
126
127
     // Contains exactly function
128
     jQuery.extend(jQuery.expr[':'], {
129
          containsExactly: "$(a).text() == m[3]"
130
     });
131
132
//]]>
133
</script>
134
<script type="text/javascript">
135
//<![CDATA[
136
            function transfer_order_popup(ordernumber) {
137
                var url = "/cgi-bin/koha/acqui/transferorder.pl?"
138
                    + "ordernumber=" + ordernumber
139
                window.open(url, 'TransferOrder');
140
            }
141
142
//]]>
143
</script>
144
</head>
11
</head>
12
145
<body id="acq_parcel" class="acq">
13
<body id="acq_parcel" class="acq">
146
[% INCLUDE 'header.inc' %]
14
[% INCLUDE 'header.inc' %]
147
[% INCLUDE 'acquisitions-search.inc' %]
15
[% INCLUDE 'acquisitions-search.inc' %]
Lines 546-549 Link Here
546
[% INCLUDE 'acquisitions-menu.inc' %]
414
[% INCLUDE 'acquisitions-menu.inc' %]
547
</div>
415
</div>
548
</div>
416
</div>
417
418
[% MACRO jsinclude BLOCK %]
419
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script>
420
    [% INCLUDE 'datatables.inc' %]
421
    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter.js"></script>
422
    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.cookie.min.js"></script>
423
    <style type="text/css">#dataPreview { width : 80%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }</style>
424
    <script type="text/javascript">
425
426
        dt_overwrite_html_sorting_localeCompare();
427
        var sticky_filters = [% sticky_filters %];
428
429
        $(document).ready(function(){
430
            if ( $("#pendingt").length ) {
431
                var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, {
432
                    "bStateSave": true,
433
                    "iCookieDuration": 60*60*24*1000, // 1000 days
434
                    "iDisplayLength": 10,
435
                    "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
436
                    "aoColumnDefs": [
437
                        { "aTargets": [ 4, 9, 10 ], "bSortable": false, "bSearchable": false },
438
                    ],
439
                    "aoColumns": [
440
                        { "sType": "html" },
441
                        { "sType": "html" },
442
                        { "sType": "num-html" },
443
                        { "sType": "anti-the" },
444
                        null,
445
                        null,
446
                        null,
447
                        null,
448
                        null,
449
                        null,
450
                        null,
451
                    ],
452
                    'bAutoWidth': false,
453
                    "sPaginationType": "four_button"
454
                })
455
                ).columnFilter({
456
                    sPlaceHolder: "head:after",
457
                    aoColumns: [
458
                        { type: "text" },
459
                        { type: "text" },
460
                        { type: "text" },
461
                        { type: "text" },
462
                        null,
463
                        { type: "text" },
464
                        { type: "text" },
465
                        { type: "text" },
466
                        { type: "text" },
467
                        null,
468
                        null
469
                    ]
470
                });
471
            }
472
473
            if ( $("#receivedt").length ) {
474
                var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
475
                    "bStateSave": true,
476
                    "iCookieDuration": 60*60*24*1000, // 1000 days
477
                    "iDisplayLength": 10,
478
                    "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
479
                    "aoColumnDefs": [
480
                        { "aTargets": [ 5, -1 ], "bSortable": false, "bSearchable": false },
481
                    ],
482
                    "aoColumns": [
483
                        { "sType": "html" },
484
                        { "sType": "html" },
485
                        { "sType": "html" },
486
                        { "sType": "num-html" },
487
                        { "sType": "anti-the" },
488
                        null,
489
                        null,
490
                        null,
491
                        null,
492
                        null,
493
                        null,
494
                        null
495
                    ],
496
                    "sPaginationType": "four_button"
497
                }));
498
            }
499
500
            // Keep filters from finishreceive.pl to parcel.pl
501
            $.cookie("filter_parcel_summary", $("#summaryfilter").val());
502
            $.cookie("filter_parcel_basketname", $("#basketfilter").val());
503
            $.cookie("filter_parcel_orderno", $("#orderfilter").val());
504
            $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
505
            $.cookie("filter_parcel_ean", $("#eanfilter").val());
506
507
            $("#filterform").on('submit', function(){
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
515
            $(".previewData").on("click", function(e){
516
                e.preventDefault();
517
                var ltitle = $(this).text();
518
                var page = $(this).attr("href");
519
                $("#dataPreviewLabel").text(ltitle);
520
                $("#dataPreview .modal-body").load(page + " div");
521
                $('#dataPreview').modal({show:true});
522
            });
523
            $("#dataPreview").on("hidden", function(){
524
                $("#dataPreviewLabel").html("");
525
                $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
526
            });
527
528
        });
529
530
        // Case-insensitive version of jquery's contains function
531
        jQuery.extend(jQuery.expr[':'], {
532
            icontains : "jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0"
533
        });
534
535
         // Contains exactly function
536
        jQuery.extend(jQuery.expr[':'], {
537
            containsExactly: "$(a).text() == m[3]"
538
        });
539
540
        function transfer_order_popup(ordernumber) {
541
            var url = "/cgi-bin/koha/acqui/transferorder.pl?"
542
                + "ordernumber=" + ordernumber
543
                window.open(url, 'TransferOrder');
544
        }
545
    </script>
546
[% END %]
547
549
[% INCLUDE 'intranet-bottom.inc' %]
548
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt (-28 / +33 lines)
Lines 1-37 Link Here
1
[% USE KohaDates %]
1
[% USE KohaDates %]
2
[% SET footerjs = 1 %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Acquisitions &rsaquo; Receive shipment from vendor [% name %]</title>
4
<title>Koha &rsaquo; Acquisitions &rsaquo; Receive shipment from vendor [% name %]</title>
4
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
5
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
5
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'calendar.inc' %]
7
[% INCLUDE 'datatables.inc' %]
8
<script type="text/javascript">
9
//<![CDATA[
10
 $(document).ready(function() {
11
    var parcelst = $("#parcelst").dataTable($.extend(true, {}, dataTablesDefaults, {
12
        "aoColumnDefs": [
13
          { "sType": "title-string", "aTargets" : [ "title-string" ] }
14
        ],
15
        'bPaginate': false,
16
    } ) );
17
18
    //keep a copy of all budgets before removing the inactives
19
    var budgetId = $("#shipmentcost_budgetid");
20
    var disabledBudgetsCopy = budgetId.html();
21
    $('.b_inactive').remove();
22
23
    $('#showallfunds').click(function() {
24
        if ($(this).is(":checked")) {
25
            budgetId.html(disabledBudgetsCopy); //Puts back all the funds
26
        }
27
        else {
28
            $('.b_inactive').remove();
29
        }
30
    });
31
 });
32
 //]]>
33
</script>
34
</head>
7
</head>
8
35
<body id="acq_parcels" class="acq">
9
<body id="acq_parcels" class="acq">
36
[% INCLUDE 'header.inc' %]
10
[% INCLUDE 'header.inc' %]
37
[% INCLUDE 'acquisitions-search.inc' %]
11
[% INCLUDE 'acquisitions-search.inc' %]
Lines 225-228 Link Here
225
</form>[% END %]
199
</form>[% END %]
226
</div>
200
</div>
227
</div>
201
</div>
202
203
[% MACRO jsinclude BLOCK %]
204
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script>
205
    [% INCLUDE 'calendar.inc' %]
206
    [% INCLUDE 'datatables.inc' %]
207
    <script type="text/javascript">
208
        $(document).ready(function() {
209
            var parcelst = $("#parcelst").dataTable($.extend(true, {}, dataTablesDefaults, {
210
                "aoColumnDefs": [
211
                  { "sType": "title-string", "aTargets" : [ "title-string" ] }
212
                ],
213
                'bPaginate': false,
214
            }));
215
216
            //keep a copy of all budgets before removing the inactives
217
            var budgetId = $("#shipmentcost_budgetid");
218
            var disabledBudgetsCopy = budgetId.html();
219
            $('.b_inactive').remove();
220
221
            $('#showallfunds').click(function() {
222
                if ($(this).is(":checked")) {
223
                    budgetId.html(disabledBudgetsCopy); //Puts back all the funds
224
                }
225
                else {
226
                    $('.b_inactive').remove();
227
                }
228
            });
229
        });
230
    </script>
231
[% END %]
232
228
[% INCLUDE 'intranet-bottom.inc' %]
233
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt (-14 / +19 lines)
Lines 1-24 Link Here
1
[% USE KohaDates %]
1
[% USE KohaDates %]
2
[% USE ItemTypes %]
2
[% USE ItemTypes %]
3
[% SET footerjs = 1 %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Koha &rsaquo; Acquisitions &rsaquo; Spent</title>
5
<title>Koha &rsaquo; Acquisitions &rsaquo; Spent</title>
5
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
6
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
6
[% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'datatables.inc' %]
8
<script type="text/javascript">
9
//<![CDATA[
10
 $(document).ready(function() {
11
    $("#spent").dataTable($.extend(true, {}, dataTablesDefaults, {
12
        "aoColumnDefs": [
13
            { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
14
            { "sType": "title-string", "aTargets" : [ "title-string" ] }
15
        ],
16
        "sPaginationType": "four_button"
17
    } ) );
18
 });
19
 //]]>
20
</script>
21
</head>
8
</head>
9
22
<body id="acq_spent" class="acq">
10
<body id="acq_spent" class="acq">
23
[% INCLUDE 'header.inc' %]
11
[% INCLUDE 'header.inc' %]
24
[% INCLUDE 'acquisitions-search.inc' %]
12
[% INCLUDE 'acquisitions-search.inc' %]
Lines 114-117 Link Here
114
[% INCLUDE 'acquisitions-menu.inc' %]
102
[% INCLUDE 'acquisitions-menu.inc' %]
115
</div>
103
</div>
116
</div>
104
</div>
105
106
[% MACRO jsinclude BLOCK %]
107
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script>
108
    [% INCLUDE 'datatables.inc' %]
109
    <script type="text/javascript">
110
        $(document).ready(function() {
111
            $("#spent").dataTable($.extend(true, {}, dataTablesDefaults, {
112
                "aoColumnDefs": [
113
                    { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
114
                    { "sType": "title-string", "aTargets" : [ "title-string" ] }
115
                ],
116
                "sPaginationType": "four_button"
117
            } ) );
118
        });
119
    </script>
120
[% END %]
121
117
[% INCLUDE 'intranet-bottom.inc' %]
122
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt (-75 / +79 lines)
Lines 85-170 Link Here
85
    [% END %]
85
    [% END %]
86
[% END %]
86
[% END %]
87
87
88
[% SET footerjs = 1 %]
88
[% INCLUDE 'doc-head-open.inc' %]
89
[% INCLUDE 'doc-head-open.inc' %]
89
<title>Koha &rsaquo; Vendor [% name %]</title>
90
<title>Koha &rsaquo; Vendor [% name %]</title>
90
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
91
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
91
[% INCLUDE 'doc-head-close.inc' %]
92
[% INCLUDE 'doc-head-close.inc' %]
92
[% INCLUDE 'datatables.inc' %]
93
94
<script type="text/javascript">
95
//<![CDATA[
96
function confirm_deletion() {
97
    if (confirm(_("Confirm deletion of this vendor ?"))) {
98
        window.location="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]&op=delete";
99
    }
100
}
101
102
function add_contact() {
103
    var new_contact = $('#contact-template').clone();
104
    var timestamp = new Date().getTime();
105
    $(new_contact).removeAttr('id');
106
    $('input, textarea', new_contact).each(function () {
107
        $(this).attr('id', $(this).attr('id') + '_' + timestamp);
108
    });
109
    $('label', new_contact).each(function () {
110
        $(this).attr('for', $(this).attr('for') + '_' + timestamp);
111
    });
112
    $(new_contact).insertBefore(this);
113
    if ($('.supplier-contact').length === 2) { // First contact
114
        $.each(['.contact_acqprimary', '.contact_serialsprimary', '.contact_orderacquisition', '.contact_claimacquisition', '.contact_claimissues'], function (idx, checkbox) {
115
            $(checkbox, new_contact).click();
116
        });
117
    }
118
    $('input[name="contact_name"]', new_contact).focus();
119
    return false;
120
}
121
122
function delete_contact(ev) {
123
    $(this).parents('.supplier-contact').remove();
124
    ev.preventDefault();
125
}
126
127
 $(document).ready(function() {
128
    var contractst = $("#contractst").dataTable($.extend(true, {}, dataTablesDefaults, {
129
        "aoColumnDefs": [
130
          { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
131
          { "sType": "title-string", "aTargets" : [ "title-string" ] }
132
        ],
133
        'sDom': 't'
134
    } ) );
135
    $('body').on('click', '.delete-contact', null, delete_contact);
136
    $('#add-contact').click(add_contact);
137
    $('body').on('click', '.contact_acqprimary', null, function () {
138
        if ($(this).is(':checked')) {
139
            $('.contact_acqprimary').filter(':checked').not(this).prop('checked', false);
140
            $('.contact_acqprimary_hidden').each(function () {
141
                $(this).val('0');
142
            });
143
        }
144
        $(this).next('.contact_acqprimary_hidden').val('1');
145
    });
146
    $('body').on('click', '.contact_serialsprimary', null, function () {
147
        if ($(this).is(':checked')) {
148
            $('.contact_serialsprimary').filter(':checked').not(this).prop('checked', false);
149
            $('.contact_serialsprimary_hidden').each(function () {
150
                $(this).val('0');
151
            });
152
        }
153
        $(this).next('.contact_serialsprimary_hidden').val($(this).is(':checked') ? '1' : '0');
154
    });
155
    $('body').on('click', '.contact_orderacquisition', null, function () {
156
        $(this).next('.contact_orderacquisition_hidden').val($(this).is(':checked') ? '1' : '0');
157
    });
158
    $('body').on('click', '.contact_claimacquisition', null, function () {
159
        $(this).next('.contact_claimacquisition_hidden').val($(this).is(':checked') ? '1' : '0');
160
    });
161
    $('body').on('click', '.contact_claimissues', null, function () {
162
        $(this).next('.contact_claimissues_hidden').val($(this).is(':checked') ? '1' : '0');
163
    });
164
 });
165
//]]>
166
</script>
167
</head>
93
</head>
94
168
<body id="acq_supplier" class="acq">
95
<body id="acq_supplier" class="acq">
169
[% INCLUDE 'header.inc' %]
96
[% INCLUDE 'header.inc' %]
170
[% INCLUDE 'acquisitions-search.inc' %]
97
[% INCLUDE 'acquisitions-search.inc' %]
Lines 422-425 function delete_contact(ev) { Link Here
422
[% INCLUDE 'vendor-menu.inc' %]
349
[% INCLUDE 'vendor-menu.inc' %]
423
</div>
350
</div>
424
</div>
351
</div>
352
353
[% MACRO jsinclude BLOCK %]
354
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script>
355
    [% INCLUDE 'datatables.inc' %]
356
    <script type="text/javascript">
357
        function confirm_deletion() {
358
            if (confirm(_("Confirm deletion of this vendor ?"))) {
359
                window.location="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]&op=delete";
360
            }
361
        }
362
363
        function add_contact() {
364
            var new_contact = $('#contact-template').clone();
365
            var timestamp = new Date().getTime();
366
            $(new_contact).removeAttr('id');
367
            $('input, textarea', new_contact).each(function () {
368
                $(this).attr('id', $(this).attr('id') + '_' + timestamp);
369
            });
370
            $('label', new_contact).each(function () {
371
                $(this).attr('for', $(this).attr('for') + '_' + timestamp);
372
            });
373
            $(new_contact).insertBefore(this);
374
            if ($('.supplier-contact').length === 2) { // First contact
375
                $.each(['.contact_acqprimary', '.contact_serialsprimary', '.contact_orderacquisition', '.contact_claimacquisition', '.contact_claimissues'], function (idx, checkbox) {
376
                    $(checkbox, new_contact).click();
377
                });
378
            }
379
            $('input[name="contact_name"]', new_contact).focus();
380
            return false;
381
        }
382
383
        function delete_contact(ev) {
384
            $(this).parents('.supplier-contact').remove();
385
            ev.preventDefault();
386
        }
387
388
         $(document).ready(function() {
389
            var contractst = $("#contractst").dataTable($.extend(true, {}, dataTablesDefaults, {
390
                "aoColumnDefs": [
391
                    { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
392
                    { "sType": "title-string", "aTargets" : [ "title-string" ] }
393
                ],
394
                'sDom': 't'
395
            } ) );
396
            $('body').on('click', '.delete-contact', null, delete_contact);
397
            $('#add-contact').click(add_contact);
398
            $('body').on('click', '.contact_acqprimary', null, function () {
399
                if ($(this).is(':checked')) {
400
                    $('.contact_acqprimary').filter(':checked').not(this).prop('checked', false);
401
                    $('.contact_acqprimary_hidden').each(function () {
402
                        $(this).val('0');
403
                    });
404
                }
405
                $(this).next('.contact_acqprimary_hidden').val('1');
406
            });
407
            $('body').on('click', '.contact_serialsprimary', null, function () {
408
                if ($(this).is(':checked')) {
409
                    $('.contact_serialsprimary').filter(':checked').not(this).prop('checked', false);
410
                    $('.contact_serialsprimary_hidden').each(function () {
411
                        $(this).val('0');
412
                    });
413
                }
414
                $(this).next('.contact_serialsprimary_hidden').val($(this).is(':checked') ? '1' : '0');
415
            });
416
            $('body').on('click', '.contact_orderacquisition', null, function () {
417
                $(this).next('.contact_orderacquisition_hidden').val($(this).is(':checked') ? '1' : '0');
418
            });
419
            $('body').on('click', '.contact_claimacquisition', null, function () {
420
                $(this).next('.contact_claimacquisition_hidden').val($(this).is(':checked') ? '1' : '0');
421
            });
422
            $('body').on('click', '.contact_claimissues', null, function () {
423
                $(this).next('.contact_claimissues_hidden').val($(this).is(':checked') ? '1' : '0');
424
            });
425
        });
426
    </script>
427
[% END %]
428
425
[% INCLUDE 'intranet-bottom.inc' %]
429
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt (-24 / +23 lines)
Lines 1-3 Link Here
1
[% SET footerjs = 1 %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Acquisitions &rsaquo; Transfer order</title>
3
<title>Koha &rsaquo; Acquisitions &rsaquo; Transfer order</title>
3
[%- USE KohaDates -%]
4
[%- USE KohaDates -%]
Lines 5-33 Link Here
5
    <style type="text/css">
6
    <style type="text/css">
6
    #custom-doc { width:44.46em;*width:43.39em;min-width:578px; margin:auto; text-align:left; }
7
    #custom-doc { width:44.46em;*width:43.39em;min-width:578px; margin:auto; text-align:left; }
7
    </style>
8
    </style>
8
[% IF transferred %]
9
    <script type="text/javascript">
10
    //<![CDATA[
11
        opener.location.reload();
12
        window.close();
13
    //]]>
14
    </script>
15
[% END %]
16
17
[% IF ( bookselleridfrom ) %]
18
    <script type="text/javascript">
19
    //<![CDATA[
20
        $(document).ready(function(){
21
            $(".confirm_transfer").on("click",function(){
22
                return confirm( _("Transfer order to this basket?") );
23
            });
24
        });
25
    //]]>
26
    </script>
27
[% END %]
28
29
30
</head>
9
</head>
10
31
<body id="acq_transferorder" class="acq">
11
<body id="acq_transferorder" class="acq">
32
<div id="custom-doc" class="yui-t7">
12
<div id="custom-doc" class="yui-t7">
33
   <div id="bd">
13
   <div id="bd">
Lines 149-153 Link Here
149
129
150
</div>
130
</div>
151
</div>
131
</div>
152
</body>
132
153
</html>
133
[% MACRO jsinclude BLOCK %]
134
    [% IF transferred %]
135
        <script type="text/javascript">
136
            opener.location.reload();
137
            window.close();
138
        </script>
139
    [% END %]
140
141
    [% IF ( bookselleridfrom ) %]
142
        <script type="text/javascript">
143
            $(document).ready(function(){
144
                $(".confirm_transfer").on("click",function(){
145
                    return confirm( _("Transfer order to this basket?") );
146
                });
147
            });
148
        </script>
149
    [% END %]
150
[% END %]
151
152
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt (-20 / +25 lines)
Lines 1-29 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% SET footerjs = 1 %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( booksellername ) %]Orders with uncertain prices for vendor [% booksellername %][% ELSE %]Orders with uncertain prices[% END %]</title>
4
<title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( booksellername ) %]Orders with uncertain prices for vendor [% booksellername %][% ELSE %]Orders with uncertain prices[% END %]</title>
4
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
5
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
5
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'datatables.inc' %]
7
<script type="text/javascript">
8
//<![CDATA[
9
 $(document).ready(function() {
10
    var uncertainpricet = $("#uncertainpricet").dataTable($.extend(true, {}, dataTablesDefaults, {
11
        "aoColumnDefs": [
12
            { "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
13
        ],
14
        "sPaginationType": "four_button"
15
    } ) );
16
    $(".check_uncertain").on("change",function(){
17
        var form = document.getElementById("uncertainprices");
18
        var ordernumber = $(this).data("ordernumber");
19
        uncheckbox( form, ordernumber );
20
    });
21
 });
22
var MSG_INVALIDPRICE = _("ERROR: Price is not a valid number, please check the price and try again!");
23
 //]]>
24
</script>
25
<script type="text/javascript" src="[% interface %]/[% theme %]/js/acq.js"></script>
26
</head>
7
</head>
8
27
<body id="acq_uncertainprice" class="acq">
9
<body id="acq_uncertainprice" class="acq">
28
[% INCLUDE 'header.inc' %]
10
[% INCLUDE 'header.inc' %]
29
[% INCLUDE 'acquisitions-search.inc' %]
11
[% INCLUDE 'acquisitions-search.inc' %]
Lines 154-157 var MSG_INVALIDPRICE = _("ERROR: Price is not a valid number, please check the p Link Here
154
[% INCLUDE 'vendor-menu.inc' %]
136
[% INCLUDE 'vendor-menu.inc' %]
155
</div>
137
</div>
156
</div>
138
</div>
139
140
[% MACRO jsinclude BLOCK %]
141
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script>
142
    [% INCLUDE 'datatables.inc' %]
143
    <script type="text/javascript">
144
        $(document).ready(function() {
145
            var uncertainpricet = $("#uncertainpricet").dataTable($.extend(true, {}, dataTablesDefaults, {
146
                "aoColumnDefs": [
147
                    { "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
148
                ],
149
                "sPaginationType": "four_button"
150
            }));
151
            $(".check_uncertain").on("change",function(){
152
                var form = document.getElementById("uncertainprices");
153
                var ordernumber = $(this).data("ordernumber");
154
                uncheckbox( form, ordernumber );
155
            });
156
        });
157
        var MSG_INVALIDPRICE = _("ERROR: Price is not a valid number, please check the price and try again!");
158
    </script>
159
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acq.js"></script>
160
[% END %]
161
157
[% INCLUDE 'intranet-bottom.inc' %]
162
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt (-41 / +38 lines)
Lines 1-45 Link Here
1
[% SET footerjs = 1 %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( opsearch ) %]Order from external source[% ELSE %]Order from external source &rsaquo; Search results[% END %]</title>
3
<title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( opsearch ) %]Order from external source[% ELSE %]Order from external source &rsaquo; Search results[% END %]</title>
3
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
4
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'datatables.inc' %]
6
7
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
8
<script type="text/javascript">
9
//<![CDATA[
10
    $(document).ready(function(){
11
12
    var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
13
        "aoColumnDefs": [
14
            { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
15
            { "aTargets": [ 1 ], "sType": "nsb-nse" },
16
        ],
17
        "aaSorting": [[ 1, "asc" ]],
18
        "bPaginate": false
19
    } ) );
20
        /* Inline edit/delete links */
21
        $("td").click(function(event){
22
            var $tgt = $(event.target);
23
            var row = $(this).parent();
24
            $(".linktools").hide();
25
            $("tr").removeClass("selected");
26
            row.addClass("selected");
27
            if($tgt.is("a")||$tgt.is(":nth-child(6)")||$tgt.is(":nth-child(7)")){
28
                //Don't show inline links for cells containing links of their own.
29
            } else {
30
                var position = $(this).offset();
31
                var top = position.top+5;
32
                var left = position.left+5;
33
                $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left);
34
            }
35
        });
36
37
});
38
39
//]]>
40
</script>
41
[% INCLUDE 'z3950_search.inc' %]
42
<script type="text/javascript" src="[% interface %]/[% theme %]/js/z3950_search.js"></script>
43
<style type="text/css">
6
<style type="text/css">
44
.linktools { background-color:#FFF;border-top:1px solid #DDD; border-left: 1px solid #DDD; border-right: 1px solid #666; border-bottom:1px solid #666;display: none; white-space: nowrap;}
7
.linktools { background-color:#FFF;border-top:1px solid #DDD; border-left: 1px solid #DDD; border-right: 1px solid #666; border-bottom:1px solid #666;display: none; white-space: nowrap;}
45
.linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;}
8
.linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;}
Lines 47-52 Link Here
47
tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : transparent !important; } #dataPreview { width : 80%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }
10
tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : transparent !important; } #dataPreview { width : 80%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }
48
</style>
11
</style>
49
</head>
12
</head>
13
50
<body id="acq_z3950_search" class="acq">
14
<body id="acq_z3950_search" class="acq">
51
[% INCLUDE 'header.inc' %]
15
[% INCLUDE 'header.inc' %]
52
[% INCLUDE 'acquisitions-search.inc' %]
16
[% INCLUDE 'acquisitions-search.inc' %]
Lines 222-227 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
222
</div>
186
</div>
223
[% IF ( numberpending ) %]<h3 align="center">Still [% numberpending %] servers to search</h3>[% END %]
187
[% IF ( numberpending ) %]<h3 align="center">Still [% numberpending %] servers to search</h3>[% END %]
224
188
225
</body>
189
[% MACRO jsinclude BLOCK %]
226
</html>
190
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script>
191
    [% INCLUDE 'datatables.inc' %]
192
    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
193
    <script type="text/javascript">
194
        $(document).ready(function(){
195
            var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
196
                "aoColumnDefs": [
197
                    { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
198
                    { "aTargets": [ 1 ], "sType": "nsb-nse" },
199
                ],
200
                "aaSorting": [[ 1, "asc" ]],
201
                "bPaginate": false
202
            }));
203
            /* Inline edit/delete links */
204
            $("td").click(function(event){
205
                var $tgt = $(event.target);
206
                var row = $(this).parent();
207
                $(".linktools").hide();
208
                $("tr").removeClass("selected");
209
                row.addClass("selected");
210
                if($tgt.is("a")||$tgt.is(":nth-child(6)")||$tgt.is(":nth-child(7)")){
211
                    //Don't show inline links for cells containing links of their own.
212
                } else {
213
                    var position = $(this).offset();
214
                    var top = position.top+5;
215
                    var left = position.left+5;
216
                    $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left);
217
                }
218
            });
219
        });
220
    </script>
221
    [% INCLUDE 'z3950_search.inc' %]
222
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/z3950_search.js"></script>
223
[% END %]
227
224
228
- 
225
[% INCLUDE 'intranet-bottom.inc' %]

Return to bug 19755