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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt (-79 / +81 lines)
Lines 1-90 Link Here
1
[% USE Price %]
1
[% USE Price %]
2
[% USE Branches %]
2
[% USE Branches %]
3
[% SET footerjs = 1 %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Koha &rsaquo; Acquisitions</title>
5
<title>Koha &rsaquo; Acquisitions</title>
5
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
6
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
7
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
7
[% INCLUDE 'datatables.inc' %]
8
<link href="[% interface %]/lib/jquery/plugins/treetable/stylesheets/jquery.treetable.css" rel="stylesheet" type="text/css" />
8
<link href="[% interface %]/lib/jquery/plugins/treetable/stylesheets/jquery.treetable.css" rel="stylesheet" type="text/css" />
9
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/treetable/jquery.treetable.js"></script>
10
11
<script type="text/javascript">
12
//<![CDATA[
13
14
dt_overwrite_html_sorting_localeCompare();
15
16
$(document).ready(function() {
17
18
    var oTable = $("#accounts").dataTable($.extend(true, {}, dataTablesDefaults, {
19
        "fnDrawCallback": function ( oSettings ) {
20
            if ( oSettings.aiDisplay.length == 0 )
21
            {
22
                return;
23
            }
24
25
            var nTrs = $('#accounts tbody tr');
26
            var iColspan = nTrs[0].getElementsByTagName('td').length;
27
            var sLastGroup = "";
28
            for ( var i=0 ; i<nTrs.length ; i++ )
29
            {
30
                var iDisplayIndex = oSettings._iDisplayStart + i;
31
                var sGroup = oSettings.aoData[ oSettings.aiDisplay[iDisplayIndex] ]._aData[1];
32
                if ( sGroup != sLastGroup )
33
                {
34
                    var nGroup = document.createElement( 'tr' );
35
                    var nCell = document.createElement( 'td' );
36
                    nCell.colSpan = iColspan;
37
                    nCell.className = "group";
38
                    nCell.innerHTML = sGroup;
39
                    nGroup.appendChild( nCell );
40
                    nTrs[i].parentNode.insertBefore( nGroup, nTrs[i] );
41
                    sLastGroup = sGroup;
42
                }
43
            }
44
        },
45
        "footerCallback": function ( row, data, start, end, display ) {
46
            var api = this.api(), data;
47
            footer_column_sum( api, [ 6, 7, 8, 9 ] );
48
        },
49
        "aoColumnDefs": [
50
            { "bVisible": false, "aTargets": [ 0, 1 ] },
51
            { "bSortable": false, "aTargets": ["_all"] }
52
        ],
53
        'dom': '<"top pager"ilpf>tr<"bottom pager"ip>',
54
        'bSort': true,
55
        'aaSortingFixed': [[ 1, 'asc' ]],
56
        'bPaginate': false,
57
        "bAutoWidth": false
58
    }));
59
60
    $(oTable).treetable({
61
        expandable: true
62
    });
63
    $(oTable).treetable('expandAll');
64
    $("#expand_all").click(function(e){
65
        e.preventDefault();
66
        $(oTable).treetable('expandAll');
67
    });
68
    $("#collapse_all").click(function(e){
69
        e.preventDefault();
70
        $(oTable).treetable('collapseAll');
71
    });
72
73
    $("#hide_inactive").click(function(e){
74
        e.preventDefault();
75
        oTable.fnFilter( 1, 0 ); // Show only active=1
76
    });
77
    $("#show_inactive").click(function(e){
78
        e.preventDefault();
79
        oTable.fnFilter( '', 0 );
80
    });
81
    $("#hide_inactive").click();
82
83
});
84
//]]>
85
</script>
86
87
</head>
9
</head>
10
88
<body id="acq_acqui-home" class="acq">
11
<body id="acq_acqui-home" class="acq">
89
[% INCLUDE 'header.inc' %]
12
[% INCLUDE 'header.inc' %]
90
[% INCLUDE 'acquisitions-search.inc' %]
13
[% INCLUDE 'acquisitions-search.inc' %]
Lines 243-246 $(document).ready(function() { Link Here
243
[% INCLUDE 'acquisitions-menu.inc' %]
166
[% INCLUDE 'acquisitions-menu.inc' %]
244
</div>
167
</div>
245
</div>
168
</div>
169
170
[% MACRO jsinclude BLOCK %]
171
    [% INCLUDE 'datatables.inc' %]
172
    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/treetable/jquery.treetable.js"></script>
173
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script>
174
    <script type="text/javascript">
175
        dt_overwrite_html_sorting_localeCompare();
176
177
        $(document).ready(function() {
178
179
            var oTable = $("#accounts").dataTable($.extend(true, {}, dataTablesDefaults, {
180
                "fnDrawCallback": function ( oSettings ) {
181
                    if ( oSettings.aiDisplay.length == 0 )
182
                    {
183
                        return;
184
                    }
185
186
                    var nTrs = $('#accounts tbody tr');
187
                    var iColspan = nTrs[0].getElementsByTagName('td').length;
188
                    var sLastGroup = "";
189
                    for ( var i=0 ; i<nTrs.length ; i++ )
190
                    {
191
                        var iDisplayIndex = oSettings._iDisplayStart + i;
192
                        var sGroup = oSettings.aoData[ oSettings.aiDisplay[iDisplayIndex] ]._aData[1];
193
                        if ( sGroup != sLastGroup )
194
                        {
195
                            var nGroup = document.createElement( 'tr' );
196
                            var nCell = document.createElement( 'td' );
197
                            nCell.colSpan = iColspan;
198
                            nCell.className = "group";
199
                            nCell.innerHTML = sGroup;
200
                            nGroup.appendChild( nCell );
201
                            nTrs[i].parentNode.insertBefore( nGroup, nTrs[i] );
202
                            sLastGroup = sGroup;
203
                        }
204
                    }
205
                },
206
                "footerCallback": function ( row, data, start, end, display ) {
207
                    var api = this.api(), data;
208
                    footer_column_sum( api, [ 6, 7, 8, 9 ] );
209
                },
210
                "aoColumnDefs": [
211
                    { "bVisible": false, "aTargets": [ 0, 1 ] },
212
                    { "bSortable": false, "aTargets": ["_all"] }
213
                ],
214
                'dom': '<"top pager"ilpf>tr<"bottom pager"ip>',
215
                'bSort': true,
216
                'aaSortingFixed': [[ 1, 'asc' ]],
217
                'bPaginate': false,
218
                "bAutoWidth": false
219
            }));
220
221
            $(oTable).treetable({
222
                expandable: true
223
            });
224
            $(oTable).treetable('expandAll');
225
            $("#expand_all").click(function(e){
226
                e.preventDefault();
227
                $(oTable).treetable('expandAll');
228
            });
229
            $("#collapse_all").click(function(e){
230
                e.preventDefault();
231
                $(oTable).treetable('collapseAll');
232
            });
233
234
            $("#hide_inactive").click(function(e){
235
                e.preventDefault();
236
                oTable.fnFilter( 1, 0 ); // Show only active=1
237
            });
238
            $("#show_inactive").click(function(e){
239
                e.preventDefault();
240
                oTable.fnFilter( '', 0 );
241
            });
242
            $("#hide_inactive").click();
243
244
        });
245
    </script>
246
[% END %]
247
246
[% INCLUDE 'intranet-bottom.inc' %]
248
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt (-164 / +168 lines)
Lines 1-5 Link Here
1
[% USE KohaDates %]
1
[% USE KohaDates %]
2
[% USE Branches %]
2
[% USE Branches %]
3
[% SET footerjs = 1 %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Koha &rsaquo; Acquisitions &rsaquo; Order staged MARC records
5
<title>Koha &rsaquo; Acquisitions &rsaquo; Order staged MARC records
5
[% IF ( batch_details ) %]
6
[% IF ( batch_details ) %]
Lines 11-179 Link Here
11
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
12
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
12
<style type="text/css">#dataPreview { width : 80%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }</style>
13
<style type="text/css">#dataPreview { width : 80%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }</style>
13
[% INCLUDE 'doc-head-close.inc' %]
14
[% INCLUDE 'doc-head-close.inc' %]
14
[% INCLUDE 'datatables.inc' %]
15
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
16
<script type="text/javascript" src="[% interface %]/[% theme %]/js/acq.js"></script>
17
<script type="text/JavaScript">
18
//<![CDATA[
19
    $(document).ready(function() {
20
        $("#files").dataTable($.extend(true, {}, dataTablesDefaults, {
21
            "aoColumnDefs": [
22
                { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
23
                { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
24
                { "sType": "title-string", "aTargets" : [ "title-string" ] }
25
            ],
26
            "sPaginationType": "four_button",
27
            "aaSorting": []
28
        } ) );
29
30
        // keep copy of the inactive budgets
31
        disabledBudgetsCopy = $("select[name='all_budget_id']").html();
32
        $("select[name='all_budget_id'] .b_inactive").remove();
33
        $("select[name='budget_id'] .b_inactive").remove();
34
35
        $("#showallbudgets").click(function() {
36
            if ($(this).is(":checked")) {
37
                $("select[name='budget_id']").html(disabledBudgetsCopy)
38
            }
39
            else {
40
                $("select[name='budget_id'] .b_inactive").remove();
41
            }
42
        });
43
44
        $("#all_showallbudgets").click(function() {
45
            if ($(this).is(":checked")) {
46
                $("select[name='all_budget_id']").html(disabledBudgetsCopy);
47
            }
48
            else {
49
                $("select[name='all_budget_id'] .b_inactive").remove();
50
            }
51
        });
52
53
        $("select[name='budget_id']").change(function(){
54
            var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
55
            var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
56
            var destination_sort1 = $(this).parents('fieldset').find('li.sort1').find('input[name="sort1"]');
57
            var sort1 = $(destination_sort1).val() || "";
58
            if ( destination_sort1.length < 1 ) {
59
                destination_sort1 = $(this).parents('fieldset').find('li.sort1 > select[name="sort1"]');
60
            }
61
            var destination_sort2 = $(this).parents('fieldset').find('li.sort2').find('input[name="sort2"]');
62
            var sort2 = $(destination_sort2).val() || "";
63
            if ( destination_sort2.length < 1 ) {
64
                destination_sort2 = $(this).parents('fieldset').find('li.sort2').find('select[name="sort2"]');
65
            }
66
            getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1, sort1 );
67
68
            getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 );
69
        } );
70
71
        $("select[name='budget_id']").change();
72
73
        $("select[name='all_budget_id']").change(function(){
74
            var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
75
            var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
76
            var destination_sort1 = $(this).parent().siblings('li').find('input[name="all_sort1"]');
77
            if ( destination_sort1.length < 1 ) {
78
                destination_sort1 = $(this).parent().siblings('li').find('select[name="all_sort1"]');
79
            }
80
            var destination_sort2 = $(this).parent().siblings('li').find('input[name="all_sort2"]');
81
            if ( destination_sort2.length < 1 ) {
82
                destination_sort2 = $(this).parent().siblings('li').find('select[name="all_sort2"]');
83
            }
84
            getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1 );
85
            getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2 );
86
            $(this).parent().siblings('li').find('select[name="sort1"]').attr('name', 'all_sort1');
87
            $(this).parent().siblings('li').find('input[name="sort1"]').attr('name', 'all_sort1');
88
            $(this).parent().siblings('li').find('select[name="sort2"]').attr('name', 'all_sort2');
89
            $(this).parent().siblings('li').find('input[name="sort2"]').attr('name', 'all_sort2');
90
        } );
91
92
        $("select[name='all_budget_id']").change();
93
94
        $("#records_to_import fieldset.rows div").hide();
95
        $('input:checkbox[name="import_record_id"]').change(function(){
96
            var container = $(this).parents("fieldset");
97
            if ( $(this).is(':checked') ) {
98
                $(container).addClass("selected");
99
                $(container).removeClass("unselected");
100
                $(container).find("div").toggle(true);
101
            } else {
102
                $(container).addClass("unselected");
103
                $(container).removeClass("selected");
104
                $(container).find("div").toggle(false);
105
            }
106
        } );
107
108
        $("input:checkbox").prop("checked", false);
109
        $("div.biblio.unselected select").prop('disabled', false);
110
        $("div.biblio.unselected input").prop('disabled', false);
111
112
        $("#checkAll").click(function(){
113
            $("#Aform").checkCheckboxes();
114
            $("input:checkbox[name='import_record_id']").change();
115
            return false;
116
        });
117
        $("#unCheckAll").click(function(){
118
            $("#Aform").unCheckCheckboxes();
119
            $("input:checkbox[name='import_record_id']").change();
120
            return false;
121
        });
122
123
        $("#Aform").on("submit", function(){
124
            if ( $("input:checkbox[name='import_record_id']:checked").length < 1 ) {
125
                alert(_("There is no record selected"));
126
                return false;
127
            }
128
129
            var error = 0;
130
            $("input:checkbox[name='import_record_id']:checked").parents('fieldset').find('input[name="quantity"]').each(function(){
131
                if ( $(this).val().length < 1 || isNaN( $(this).val() ) ) {
132
                    error++;
133
                }
134
            });
135
            if ( error > 0 ) {
136
                alert(error + " " + _("quantity values are not filled in or are not numbers"));
137
                return false;
138
139
            }
140
            var error = 0;
141
            $("select[name='budget_id']").each(function() {
142
                if (!$(this).val()) {
143
                    error++;
144
                }
145
            });
146
            if ( error > 0 ) {
147
                alert(_("Some budgets are not defined in item records"));
148
                return false;
149
            }
150
151
            return disableUnchecked($(this));
152
        });
153
        $('#tabs').tabs();
154
        $(".previewData").on("click", function(e){
155
            e.preventDefault();
156
            var ltitle = $(this).text();
157
            var page = $(this).attr("href");
158
            $("#dataPreviewLabel").text(ltitle);
159
            $("#dataPreview .modal-body").load(page + " div");
160
            $('#dataPreview').modal({show:true});
161
        });
162
        $("#dataPreview").on("hidden", function(){
163
            $("#dataPreviewLabel").html("");
164
            $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
165
        });
166
    });
167
168
    function disableUnchecked(form){
169
        $("fieldset.biblio.unselected").each(function(){
170
            $(this).remove();
171
        });
172
        return 1;
173
    }
174
//]]>
175
</script>
176
</head>
15
</head>
16
177
<body id="acq_addorderiso2709" class="acq">
17
<body id="acq_addorderiso2709" class="acq">
178
[% INCLUDE 'header.inc' %]
18
[% INCLUDE 'header.inc' %]
179
[% INCLUDE 'acquisitions-search.inc' %]
19
[% INCLUDE 'acquisitions-search.inc' %]
Lines 583-587 Link Here
583
       </div>
423
       </div>
584
   </div>
424
   </div>
585
</div>
425
</div>
586
</body>
426
587
</html>
427
[% MACRO jsinclude BLOCK %]
428
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script>
429
[% INCLUDE 'datatables.inc' %]
430
    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
431
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acq.js"></script>
432
    <script type="text/JavaScript">
433
        $(document).ready(function() {
434
            $("#files").dataTable($.extend(true, {}, dataTablesDefaults, {
435
                "aoColumnDefs": [
436
                    { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
437
                    { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
438
                    { "sType": "title-string", "aTargets" : [ "title-string" ] }
439
                ],
440
                "sPaginationType": "four_button",
441
                "aaSorting": []
442
            } ) );
443
444
            // keep copy of the inactive budgets
445
            disabledBudgetsCopy = $("select[name='all_budget_id']").html();
446
            $("select[name='all_budget_id'] .b_inactive").remove();
447
            $("select[name='budget_id'] .b_inactive").remove();
448
449
            $("#showallbudgets").click(function() {
450
                if ($(this).is(":checked")) {
451
                    $("select[name='budget_id']").html(disabledBudgetsCopy)
452
                }
453
                else {
454
                    $("select[name='budget_id'] .b_inactive").remove();
455
                }
456
            });
457
458
            $("#all_showallbudgets").click(function() {
459
                if ($(this).is(":checked")) {
460
                    $("select[name='all_budget_id']").html(disabledBudgetsCopy);
461
                }
462
                else {
463
                    $("select[name='all_budget_id'] .b_inactive").remove();
464
                }
465
            });
466
467
            $("select[name='budget_id']").change(function(){
468
                var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
469
                var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
470
                var destination_sort1 = $(this).parents('fieldset').find('li.sort1').find('input[name="sort1"]');
471
                var sort1 = $(destination_sort1).val() || "";
472
                if ( destination_sort1.length < 1 ) {
473
                    destination_sort1 = $(this).parents('fieldset').find('li.sort1 > select[name="sort1"]');
474
                }
475
                var destination_sort2 = $(this).parents('fieldset').find('li.sort2').find('input[name="sort2"]');
476
                var sort2 = $(destination_sort2).val() || "";
477
                if ( destination_sort2.length < 1 ) {
478
                    destination_sort2 = $(this).parents('fieldset').find('li.sort2').find('select[name="sort2"]');
479
                }
480
                getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1, sort1 );
481
482
                getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 );
483
            } );
484
485
            $("select[name='budget_id']").change();
486
487
            $("select[name='all_budget_id']").change(function(){
488
                var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
489
                var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
490
                var destination_sort1 = $(this).parent().siblings('li').find('input[name="all_sort1"]');
491
                if ( destination_sort1.length < 1 ) {
492
                    destination_sort1 = $(this).parent().siblings('li').find('select[name="all_sort1"]');
493
                }
494
                var destination_sort2 = $(this).parent().siblings('li').find('input[name="all_sort2"]');
495
                if ( destination_sort2.length < 1 ) {
496
                    destination_sort2 = $(this).parent().siblings('li').find('select[name="all_sort2"]');
497
                }
498
                getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1 );
499
                getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2 );
500
                $(this).parent().siblings('li').find('select[name="sort1"]').attr('name', 'all_sort1');
501
                $(this).parent().siblings('li').find('input[name="sort1"]').attr('name', 'all_sort1');
502
                $(this).parent().siblings('li').find('select[name="sort2"]').attr('name', 'all_sort2');
503
                $(this).parent().siblings('li').find('input[name="sort2"]').attr('name', 'all_sort2');
504
            } );
505
506
            $("select[name='all_budget_id']").change();
507
508
            $("#records_to_import fieldset.rows div").hide();
509
            $('input:checkbox[name="import_record_id"]').change(function(){
510
                var container = $(this).parents("fieldset");
511
                if ( $(this).is(':checked') ) {
512
                    $(container).addClass("selected");
513
                    $(container).removeClass("unselected");
514
                    $(container).find("div").toggle(true);
515
                } else {
516
                    $(container).addClass("unselected");
517
                    $(container).removeClass("selected");
518
                    $(container).find("div").toggle(false);
519
                }
520
            } );
521
522
            $("input:checkbox").prop("checked", false);
523
            $("div.biblio.unselected select").prop('disabled', false);
524
            $("div.biblio.unselected input").prop('disabled', false);
525
526
            $("#checkAll").click(function(){
527
                $("#Aform").checkCheckboxes();
528
                $("input:checkbox[name='import_record_id']").change();
529
                return false;
530
            });
531
            $("#unCheckAll").click(function(){
532
                $("#Aform").unCheckCheckboxes();
533
                $("input:checkbox[name='import_record_id']").change();
534
                return false;
535
            });
536
537
            $("#Aform").on("submit", function(){
538
                if ( $("input:checkbox[name='import_record_id']:checked").length < 1 ) {
539
                    alert(_("There is no record selected"));
540
                    return false;
541
                }
542
543
                var error = 0;
544
                $("input:checkbox[name='import_record_id']:checked").parents('fieldset').find('input[name="quantity"]').each(function(){
545
                    if ( $(this).val().length < 1 || isNaN( $(this).val() ) ) {
546
                        error++;
547
                    }
548
                });
549
                if ( error > 0 ) {
550
                    alert(error + " " + _("quantity values are not filled in or are not numbers"));
551
                    return false;
552
553
                }
554
                var error = 0;
555
                $("select[name='budget_id']").each(function() {
556
                    if (!$(this).val()) {
557
                        error++;
558
                    }
559
                });
560
                if ( error > 0 ) {
561
                    alert(_("Some budgets are not defined in item records"));
562
                    return false;
563
                }
564
565
                return disableUnchecked($(this));
566
            });
567
            $('#tabs').tabs();
568
            $(".previewData").on("click", function(e){
569
                e.preventDefault();
570
                var ltitle = $(this).text();
571
                var page = $(this).attr("href");
572
                $("#dataPreviewLabel").text(ltitle);
573
                $("#dataPreview .modal-body").load(page + " div");
574
                $('#dataPreview').modal({show:true});
575
            });
576
            $("#dataPreview").on("hidden", function(){
577
                $("#dataPreviewLabel").html("");
578
                $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
579
            });
580
        });
581
582
        function disableUnchecked(form){
583
            $("fieldset.biblio.unselected").each(function(){
584
                $(this).remove();
585
            });
586
            return 1;
587
        }
588
    </script>
589
[% END %]
590
591
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-165 / +159 lines)
Lines 16-193 Link Here
16
[% USE Branches %]
16
[% USE Branches %]
17
[% USE Price %]
17
[% USE Price %]
18
[% USE AuthorisedValues %]
18
[% USE AuthorisedValues %]
19
19
[% SET footerjs = 1 %]
20
[% INCLUDE 'doc-head-open.inc' %]
20
[% INCLUDE 'doc-head-open.inc' %]
21
<title>Koha &rsaquo; Acquisitions &rsaquo; [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno |html %]) for [% booksellername|html %]</title>
21
<title>Koha &rsaquo; Acquisitions &rsaquo; [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno |html %]) for [% booksellername|html %]</title>
22
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
22
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
23
[% INCLUDE 'doc-head-close.inc' %]
23
[% INCLUDE 'doc-head-close.inc' %]
24
[% INCLUDE 'datatables.inc' %]
25
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
26
<script type="text/javascript">
27
//<![CDATA[
28
    function updateColumnsVisibility(visible) {
29
        if ( visible ) {
30
            $("table .tax_excluded, .tax_included").show();
31
        } else {
32
            [% IF ( listincgst ) %]
33
                $("table .tax_excluded").hide();
34
            [% ELSE %]
35
                $("table .tax_included").hide();
36
            [% END %]
37
        }
38
    }
39
40
    $(document).ready(function() {
41
        if ( $('#toolbar').length ) {$('#toolbar').fixFloat();}
42
        $("#show_all_details").click(function(){
43
            updateColumnsVisibility($(this).is(":checked"));
44
        });
45
46
        $("#show_all_details").prop('checked', false);
47
        updateColumnsVisibility(false);
48
        [% UNLESS ( closedate ) %]
49
            $('#addtoBasket').on('show', function () {
50
               $(this).find(".modal-body").html($(".acqui_basket_add")[0].outerHTML);
51
            });
52
        [% END %]
53
54
        $("body").on("click", ".del_user", function(e){
55
            e.preventDefault();
56
            del_user( $(this).data("borrowernumber") );
57
        });
58
59
        $("#add_user").on("click",function(e){
60
            e.preventDefault();
61
            UserSearchPopup();
62
        });
63
64
        $(".transfer_order").on("click",function(e){
65
            e.preventDefault();
66
            transfer_order_popup( $(this).data("ordernumber"));
67
        });
68
    });
69
//]]>
70
</script>
71
72
[% UNLESS ( closedate ) %]
73
<script type="text/javascript">
74
//<![CDATA[
75
76
            function transfer_order_popup(ordernumber) {
77
                var url = "/cgi-bin/koha/acqui/transferorder.pl?"
78
                    + "ordernumber=" + ordernumber
79
                window.open(url, 'TransferOrder','width=600,height=400,toolbar=false,scrollbars=yes');
80
            }
81
82
            function confirm_ediorder() {
83
                var is_confirmed = confirm(_("Are you sure you want to close this basket and generate an EDIFACT order?"));
84
                if (is_confirmed) {
85
                    window.location = "/cgi-bin/koha/acqui/basket.pl?op=edi_confirm&basketno=[% basketno |html %]";
86
                }
87
            }
88
89
//]]>
90
</script>
91
[% ELSE %]
92
<script type="text/javascript">
93
//<![CDATA[
94
    $(document).ready(function(){
95
        $("#basketgroupid").change(function(){
96
            if($(this).val() == "new"){
97
                location.href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid %]";
98
            }
99
        });
100
    });
101
//]]>
102
</script>
103
[% UNLESS ( grouped ) %]
104
<script type="text/javascript">
105
//<![CDATA[
106
            function confirm_reopen() {
107
                var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %];
108
                var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?"));
109
                if (is_confirmed) {
110
                    window.location = "/cgi-bin/koha/acqui/basket.pl?op=reopen&basketno=[% basketno |html %]";
111
                }
112
            }
113
//]]>
114
</script>
115
[% END %]
116
[% END %]
117
<script type="text/javascript">
118
//<![CDATA[
119
    $(document).ready(function() {
120
        var orderst = $("#orders").dataTable($.extend(true, {}, dataTablesDefaults, {
121
            "sPaginationType": "four_button",
122
            [% IF ( active ) %]
123
                "aoColumnDefs": [
124
                    [% UNLESS ( closedate ) %]
125
                        { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
126
                    [% END %]
127
                    { "sType": "anti-the", "aTargets": [ "anti-the" ] }
128
                ],
129
            [% END %]
130
        } ) );
131
        var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, {
132
            "sPaginationType": "four_button"
133
        } ) );
134
        $("#reopenbutton").on("click",function(e){
135
            e.preventDefault();
136
            confirm_reopen();
137
        });
138
        // Generates a dynamic link for exporting the selections data as CSV
139
        $("#exportbutton, #export-csv-menu a").click(function() {
140
            // Building the url from currently checked boxes
141
            var url = '/cgi-bin/koha/acqui/basket.pl';
142
            url += $('#exportbutton').attr('href');
143
            if($(this).attr("data-value")) {
144
                url += '&amp;csv_profile=' + $(this).attr("data-value");
145
            }
146
            // And redirecting to the CSV page
147
            location.href = url;
148
            return false;
149
        });
150
    });
151
152
    function UserSearchPopup(f) {
153
        window.open(
154
            "/cgi-bin/koha/acqui/add_user_search.pl",
155
            'UserSearchPopup',
156
            'width=840, height=500, scrollbars=yes, toolbar=no,'
157
         );
158
    }
159
160
    function add_user(borrowernumber, borrowername) {
161
        var ids = $("#users_ids").val();
162
        if(ids.length > 0) {
163
            ids = ids.split(':');
164
        } else {
165
            ids = new Array;
166
        }
167
        if (ids.indexOf(borrowernumber) < 0) {
168
            ids.push(borrowernumber);
169
            $("#users_ids").val(ids.join(':'));
170
            var li = '<li id="user_'+borrowernumber+'">'+borrowername
171
            + ' <a href="#" data-borrowernumber="'+borrowernumber+'" class="del_user"><i class="fa fa-trash"></i> '
172
                + _("Delete user") + '</a></li>';
173
            $("#users_names").append(li);
174
            return 0;
175
        }
176
        return -1;
177
    }
178
179
    function del_user(borrowernumber) {
180
      $("#user_"+borrowernumber).remove();
181
      var ids = $("#users_ids").val().split(':');
182
      ids.splice(ids.indexOf(borrowernumber.toString()), 1);
183
      $("#users_ids").val(ids.join(':'));
184
    }
185
//]]>
186
</script>
187
<style type="text/css">
24
<style type="text/css">
188
.sortmsg {font-size: 80%;}
25
    .sortmsg {font-size: 80%;}
189
</style>
26
</style>
190
</head>
27
</head>
28
191
<body id="acq_basket" class="acq">
29
<body id="acq_basket" class="acq">
192
[% INCLUDE 'header.inc' %]
30
[% INCLUDE 'header.inc' %]
193
[% INCLUDE 'acquisitions-search.inc' %]
31
[% INCLUDE 'acquisitions-search.inc' %]
Lines 842-845 Link Here
842
[% INCLUDE 'acquisitions-menu.inc' %]
680
[% INCLUDE 'acquisitions-menu.inc' %]
843
</div>
681
</div>
844
</div>
682
</div>
683
684
[% MACRO jsinclude BLOCK %]
685
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script>
686
[% INCLUDE 'datatables.inc' %]
687
    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
688
    <script type="text/javascript">
689
        function updateColumnsVisibility(visible) {
690
            if ( visible ) {
691
                $("table .tax_excluded, .tax_included").show();
692
            } else {
693
                [% IF ( listincgst ) %]
694
                    $("table .tax_excluded").hide();
695
                [% ELSE %]
696
                    $("table .tax_included").hide();
697
                [% END %]
698
            }
699
        }
700
701
        $(document).ready(function() {
702
            if ( $('#toolbar').length ) {$('#toolbar').fixFloat();}
703
            $("#show_all_details").click(function(){
704
                updateColumnsVisibility($(this).is(":checked"));
705
            });
706
707
            $("#show_all_details").prop('checked', false);
708
            updateColumnsVisibility(false);
709
            [% UNLESS ( closedate ) %]
710
                $('#addtoBasket').on('show', function () {
711
                   $(this).find(".modal-body").html($(".acqui_basket_add")[0].outerHTML);
712
                });
713
            [% END %]
714
715
            $("body").on("click", ".del_user", function(e){
716
                e.preventDefault();
717
                del_user( $(this).data("borrowernumber") );
718
            });
719
720
            $("#add_user").on("click",function(e){
721
                e.preventDefault();
722
                UserSearchPopup();
723
            });
724
725
            $(".transfer_order").on("click",function(e){
726
                e.preventDefault();
727
                transfer_order_popup( $(this).data("ordernumber"));
728
            });
729
        });
730
    </script>
731
732
    [% UNLESS ( closedate ) %]
733
        <script type="text/javascript">
734
            function transfer_order_popup(ordernumber) {
735
                var url = "/cgi-bin/koha/acqui/transferorder.pl?"
736
                    + "ordernumber=" + ordernumber
737
                window.open(url, 'TransferOrder','width=600,height=400,toolbar=false,scrollbars=yes');
738
            }
739
740
            function confirm_ediorder() {
741
                var is_confirmed = confirm(_("Are you sure you want to close this basket and generate an EDIFACT order?"));
742
                if (is_confirmed) {
743
                    window.location = "/cgi-bin/koha/acqui/basket.pl?op=edi_confirm&basketno=[% basketno |html %]";
744
                }
745
            }
746
        </script>
747
    [% ELSE %]
748
        <script type="text/javascript">
749
            $(document).ready(function(){
750
                $("#basketgroupid").change(function(){
751
                    if($(this).val() == "new"){
752
                        location.href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid %]";
753
                    }
754
                });
755
            });
756
        </script>
757
        [% UNLESS ( grouped ) %]
758
            <script type="text/javascript">
759
                function confirm_reopen() {
760
                    var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %];
761
                    var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?"));
762
                    if (is_confirmed) {
763
                        window.location = "/cgi-bin/koha/acqui/basket.pl?op=reopen&basketno=[% basketno |html %]";
764
                    }
765
                }
766
            </script>
767
        [% END %]
768
    [% END %]
769
    <script type="text/javascript">
770
        $(document).ready(function() {
771
            var orderst = $("#orders").dataTable($.extend(true, {}, dataTablesDefaults, {
772
                "sPaginationType": "four_button",
773
                [% IF ( active ) %]
774
                    "aoColumnDefs": [
775
                        [% UNLESS ( closedate ) %]
776
                            { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
777
                        [% END %]
778
                        { "sType": "anti-the", "aTargets": [ "anti-the" ] }
779
                    ],
780
                [% END %]
781
            } ) );
782
            var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, {
783
                "sPaginationType": "four_button"
784
            } ) );
785
            $("#reopenbutton").on("click",function(e){
786
                e.preventDefault();
787
                confirm_reopen();
788
            });
789
            // Generates a dynamic link for exporting the selections data as CSV
790
            $("#exportbutton, #export-csv-menu a").click(function() {
791
                // Building the url from currently checked boxes
792
                var url = '/cgi-bin/koha/acqui/basket.pl';
793
                url += $('#exportbutton').attr('href');
794
                if($(this).attr("data-value")) {
795
                    url += '&amp;csv_profile=' + $(this).attr("data-value");
796
                }
797
                // And redirecting to the CSV page
798
                location.href = url;
799
                return false;
800
            });
801
        });
802
803
        function UserSearchPopup(f) {
804
            window.open(
805
                "/cgi-bin/koha/acqui/add_user_search.pl",
806
                'UserSearchPopup',
807
                'width=840, height=500, scrollbars=yes, toolbar=no,'
808
             );
809
        }
810
811
        function add_user(borrowernumber, borrowername) {
812
            var ids = $("#users_ids").val();
813
            if(ids.length > 0) {
814
                ids = ids.split(':');
815
            } else {
816
                ids = new Array;
817
            }
818
            if (ids.indexOf(borrowernumber) < 0) {
819
                ids.push(borrowernumber);
820
                $("#users_ids").val(ids.join(':'));
821
                var li = '<li id="user_'+borrowernumber+'">'+borrowername
822
                + ' <a href="#" data-borrowernumber="'+borrowernumber+'" class="del_user"><i class="fa fa-trash"></i> '
823
                    + _("Delete user") + '</a></li>';
824
                $("#users_names").append(li);
825
                return 0;
826
            }
827
            return -1;
828
        }
829
830
        function del_user(borrowernumber) {
831
            $("#user_"+borrowernumber).remove();
832
            var ids = $("#users_ids").val().split(':');
833
            ids.splice(ids.indexOf(borrowernumber.toString()), 1);
834
            $("#users_ids").val(ids.join(':'));
835
        }
836
    </script>
837
[% END %]
838
845
[% INCLUDE 'intranet-bottom.inc' %]
839
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketheader.tt (-1 / +7 lines)
Lines 1-5 Link Here
1
[% USE Branches %]
1
[% USE Branches %]
2
[% USE Koha %]
2
[% USE Koha %]
3
[% SET footerjs = 1 %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Koha &rsaquo; Acquisitions &rsaquo;
5
<title>Koha &rsaquo; Acquisitions &rsaquo;
5
[% IF ( add_form ) %]
6
[% IF ( add_form ) %]
Lines 9-16 Link Here
9
[% END %]
10
[% END %]
10
</title>
11
</title>
11
[% INCLUDE 'doc-head-close.inc' %]
12
[% INCLUDE 'doc-head-close.inc' %]
12
<script type="text/javascript" src="[% interface %]/[% theme %]/js/acq.js"></script>
13
</head>
13
</head>
14
14
<body id="acq_basketheader" class="acq">
15
<body id="acq_basketheader" class="acq">
15
[% INCLUDE 'header.inc' %]
16
[% INCLUDE 'header.inc' %]
16
[% INCLUDE 'acquisitions-search.inc' %]
17
[% INCLUDE 'acquisitions-search.inc' %]
Lines 139-142 Link Here
139
</div>
140
</div>
140
</div>
141
</div>
141
142
143
[% MACRO jsinclude BLOCK %]
144
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script>
145
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acq.js"></script>
146
[% END %]
147
142
[% INCLUDE 'intranet-bottom.inc' %]
148
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt (-42 / +46 lines)
Lines 1-4 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; Search for vendor [% supplier %]</title>
4
<title>Koha &rsaquo; Search for vendor [% supplier %]</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
Lines 8-56 Link Here
8
}
9
}
9
</style>
10
</style>
10
<link rel="stylesheet" href="[% interface %]/[% theme %]/css/datatables.css" />
11
<link rel="stylesheet" href="[% interface %]/[% theme %]/css/datatables.css" />
11
[% INCLUDE 'datatables.inc' %]
12
<script type="text/javascript">
13
//<![CDATA[
14
$(document).ready(function() {
15
    $("table.baskets").dataTable($.extend(true, {}, dataTablesDefaults, {
16
        'sDom': 't',
17
        'bPaginate': false,
18
        'bFilter': false,
19
        'bInfo': false,
20
        "aaSorting": [[ 1, "asc" ]],
21
        "aoColumnDefs": [
22
            { "sType": "title-string", "aTargets" : [ "title-string" ] },
23
            { "sType": "title-numeric", "aTargets" : [ "title-numeric" ] },
24
            { 'aTargets': [-1], 'bSortable': false }
25
        ]
26
    }));
27
    $("#supplierlist").change(function() {
28
        var id = $(this).find("option:selected").val();
29
        window.location.href = "#" + id;
30
    });
31
    $(".modal").on("show", function(){
32
        var basket = $(this).data("basketno");
33
        var legend = _("Add order to basket %s").format(basket);
34
        $(this).find("legend").html(legend);
35
    });
36
    $("#show_all_vendors").hide();
37
    $("#show_active_vendors").on('click', function(e){
38
        e.preventDefault();
39
        $(".inactive").hide();
40
        $("#show_active_vendors").hide();
41
        $("#show_all_vendors").show();
42
    });
43
    $("#show_all_vendors").on('click', function(e){
44
        e.preventDefault();
45
        $(".inactive").show();
46
        $("#show_all_vendors").hide();
47
        $("#show_active_vendors").show();
48
    });
49
});
50
//]]>
51
</script>
52
53
</head>
12
</head>
13
54
<body id="acq_booksellers" class="acq">
14
<body id="acq_booksellers" class="acq">
55
[% INCLUDE 'header.inc' %]
15
[% INCLUDE 'header.inc' %]
56
[% INCLUDE 'acquisitions-search.inc' %]
16
[% INCLUDE 'acquisitions-search.inc' %]
Lines 222-225 $(document).ready(function() { Link Here
222
[% INCLUDE 'acquisitions-menu.inc' %]
182
[% INCLUDE 'acquisitions-menu.inc' %]
223
</div>
183
</div>
224
</div>
184
</div>
185
186
[% MACRO jsinclude BLOCK %]
187
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script>
188
    [% INCLUDE 'datatables.inc' %]
189
    <script type="text/javascript">
190
        $(document).ready(function() {
191
            $("table.baskets").dataTable($.extend(true, {}, dataTablesDefaults, {
192
                'sDom': 't',
193
                'bPaginate': false,
194
                'bFilter': false,
195
                'bInfo': false,
196
                "aaSorting": [[ 1, "asc" ]],
197
                "aoColumnDefs": [
198
                    { "sType": "title-string", "aTargets" : [ "title-string" ] },
199
                    { "sType": "title-numeric", "aTargets" : [ "title-numeric" ] },
200
                    { 'aTargets': [-1], 'bSortable': false }
201
                ]
202
            }));
203
            $("#supplierlist").change(function() {
204
                var id = $(this).find("option:selected").val();
205
                window.location.href = "#" + id;
206
            });
207
            $(".modal").on("show", function(){
208
                var basket = $(this).data("basketno");
209
                var legend = _("Add order to basket %s").format(basket);
210
                $(this).find("legend").html(legend);
211
            });
212
            $("#show_all_vendors").hide();
213
            $("#show_active_vendors").on('click', function(e){
214
                e.preventDefault();
215
                $(".inactive").hide();
216
                $("#show_active_vendors").hide();
217
                $("#show_all_vendors").show();
218
            });
219
            $("#show_all_vendors").on('click', function(e){
220
                e.preventDefault();
221
                $(".inactive").show();
222
                $("#show_all_vendors").hide();
223
                $("#show_active_vendors").show();
224
            });
225
        });
226
    </script>
227
[% END %]
228
225
[% INCLUDE 'intranet-bottom.inc' %]
229
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt (-33 / +40 lines)
Lines 1-45 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; EDIFACT messages</title>
4
<title>Koha &rsaquo; Acquisitions &rsaquo; EDIFACT messages</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
$(document).ready(function() {
9
    $('#edi_msgs').dataTable($.extend(true, {}, dataTablesDefaults, {
10
        'aaSorting': [[1, "desc" ]],
11
        'sPaginationType': "four_button",
12
        "aoColumnDefs": [
13
            { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
14
            { "sType": "title-string", "aTargets" : [ "title-string" ] }
15
        ]
16
    }));
17
18
    var EDIModal = $("#EDI_modal");
19
    var EDIModalBody = $("#EDI_modal .modal-body");
20
21
    $(".view_message").on("click", function(e){
22
        e.preventDefault();
23
        var page = $(this).attr("href");
24
        EDIModalBody.load(page + " #edimsg");
25
        EDIModal.modal("show");
26
    });
27
    EDIModal.on("click",".closebtn",function(e){
28
        e.preventDefault();
29
        EDIModal.modal("hide");
30
    });
31
    EDIModal.on("hidden", function(){
32
        EDIModalBody.html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
33
    });
34
    $(".delete_msg").on("click",function(){
35
        return confirm(_("Are you sure you want to delete this message?"));
36
    });
37
});
38
</script>
39
<style type="text/css">
7
<style type="text/css">
40
#EDI_modal { width : 80%; } @media (max-width: 767px) { #EDI_modal { margin: 0; width : auto; } }
8
#EDI_modal { width : 80%; } @media (max-width: 767px) { #EDI_modal { margin: 0; width : auto; } }
41
</style>
9
</style>
42
</head>
10
</head>
11
43
<body id="acq_edifactmsgs" class="acq">
12
<body id="acq_edifactmsgs" class="acq">
44
[% INCLUDE 'header.inc' %]
13
[% INCLUDE 'header.inc' %]
45
[% INCLUDE 'acquisitions-search.inc' %]
14
[% INCLUDE 'acquisitions-search.inc' %]
Lines 139-142 $(document).ready(function() { Link Here
139
[% INCLUDE 'acquisitions-menu.inc' %]
108
[% INCLUDE 'acquisitions-menu.inc' %]
140
</div>
109
</div>
141
</div>
110
</div>
111
112
[% MACRO jsinclude BLOCK %]
113
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script>
114
    [% INCLUDE 'datatables.inc' %]
115
    <script type="text/javascript">
116
        $(document).ready(function() {
117
            $('#edi_msgs').dataTable($.extend(true, {}, dataTablesDefaults, {
118
                'aaSorting': [[1, "desc" ]],
119
                'sPaginationType': "four_button",
120
                "aoColumnDefs": [
121
                    { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
122
                    { "sType": "title-string", "aTargets" : [ "title-string" ] }
123
                ]
124
            }));
125
126
            var EDIModal = $("#EDI_modal");
127
            var EDIModalBody = $("#EDI_modal .modal-body");
128
129
            $(".view_message").on("click", function(e){
130
                e.preventDefault();
131
                var page = $(this).attr("href");
132
                EDIModalBody.load(page + " #edimsg");
133
                EDIModal.modal("show");
134
            });
135
            EDIModal.on("click",".closebtn",function(e){
136
                e.preventDefault();
137
                EDIModal.modal("hide");
138
            });
139
            EDIModal.on("hidden", function(){
140
                EDIModalBody.html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
141
            });
142
            $(".delete_msg").on("click",function(){
143
                return confirm(_("Are you sure you want to delete this message?"));
144
            });
145
        });
146
    </script>
147
[% END %]
148
142
[% INCLUDE 'intranet-bottom.inc' %]
149
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt (-30 / +33 lines)
Lines 1-40 Link Here
1
[% USE KohaDates %]
1
[% USE KohaDates %]
2
[% USE ColumnsSettings %]
2
[% USE ColumnsSettings %]
3
[% SET footerjs = 1 %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( order_loop ) %]Orders search &rsaquo; Search results[% ELSE %]Order search[% END %]</title>
5
<title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( order_loop ) %]Orders search &rsaquo; Search results[% ELSE %]Order search[% END %]</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 'calendar.inc' %]
8
[% INCLUDE 'datatables.inc' %]
9
[% INCLUDE 'columns_settings.inc' %]
10
11
<script type="text/javascript" src="[% interface %]/js/autocomplete/patrons.js"></script>
12
<script type="text/javascript">
13
//<![CDATA[
14
var MSG_REMOVE_PATRON = _("Remove");
15
 $(document).ready(function() {
16
    var columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'histsearch', 'histsearcht', 'json' ) %];
17
    KohaTable("#histsearcht", {
18
        "aoColumnDefs": [
19
            { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
20
            { "sType": "title-string", "aTargets" : [ "title-string" ] }
21
        ],
22
        "sPaginationType": "four_button"
23
    }, columns_settings );
24
25
    [% UNLESS order_loop %]
26
        patron_autocomplete({
27
            patron_container: $("#basket_creators"),
28
            input_autocomplete: $("#find_patron"),
29
            patron_input_name: 'created_by',
30
            field_to_retrieve: 'borrowernumber'
31
        });
32
    [% END %]
33
});
34
35
 //]]>
36
</script>
37
</head>
8
</head>
9
38
<body id="acq_histsearch" class="acq">
10
<body id="acq_histsearch" class="acq">
39
[% INCLUDE 'header.inc' %]
11
[% INCLUDE 'header.inc' %]
40
[% INCLUDE 'acquisitions-search.inc' %]
12
[% INCLUDE 'acquisitions-search.inc' %]
Lines 233-236 var MSG_REMOVE_PATRON = _("Remove"); Link Here
233
[% INCLUDE 'acquisitions-menu.inc' %]
205
[% INCLUDE 'acquisitions-menu.inc' %]
234
</div>
206
</div>
235
</div>
207
</div>
208
209
[% MACRO jsinclude BLOCK %]
210
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script>
211
[% INCLUDE 'calendar.inc' %]
212
    [% INCLUDE 'datatables.inc' %]
213
    [% INCLUDE 'columns_settings.inc' %]
214
    <script type="text/javascript" src="[% interface %]/js/autocomplete/patrons.js"></script>
215
    <script type="text/javascript">
216
        var MSG_REMOVE_PATRON = _("Remove");
217
        $(document).ready(function() {
218
            var columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'histsearch', 'histsearcht', 'json' ) %];
219
            KohaTable("#histsearcht", {
220
                "aoColumnDefs": [
221
                    { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
222
                    { "sType": "title-string", "aTargets" : [ "title-string" ] }
223
                ],
224
                "sPaginationType": "four_button"
225
            }, columns_settings );
226
227
            [% UNLESS order_loop %]
228
                patron_autocomplete({
229
                    patron_container: $("#basket_creators"),
230
                    input_autocomplete: $("#find_patron"),
231
                    patron_input_name: 'created_by',
232
                    field_to_retrieve: 'borrowernumber'
233
                });
234
            [% END %]
235
        });
236
    </script>
237
[% END %]
238
236
[% INCLUDE 'intranet-bottom.inc' %]
239
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt (-21 / +25 lines)
Lines 1-30 Link Here
1
[% USE KohaDates %]
1
[% USE KohaDates %]
2
2
[% SET footerjs = 1 %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Koha &rsaquo; Acquisitions &rsaquo; Invoice &rsaquo; Files</title>
4
<title>Koha &rsaquo; Acquisitions &rsaquo; Invoice &rsaquo; Files</title>
5
<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" />
6
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'datatables.inc' %]
8
<script type="text/javascript">
9
//<![CDATA[
10
    $(document).ready(function() {
11
        $("#invoice_files_details_table").dataTable($.extend(true, {}, dataTablesDefaults, {
12
            "aoColumnDefs": [
13
                { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
14
                { "aTargets": [ "title-string" ], "sType": "title-string" }
15
            ],
16
            bInfo: false,
17
            bPaginate: false,
18
            bFilter: false,
19
            sDom: "t"
20
        }));
21
        $("a.delete_file").click(function(){
22
            return ( confirm( _("Are you sure you want to delete this file ?") ) );
23
        });
24
    });
25
//]]>
26
</script>
27
</head>
7
</head>
8
28
<body id="acq_invoice_files" class="acq">
9
<body id="acq_invoice_files" class="acq">
29
[% INCLUDE 'header.inc' %]
10
[% INCLUDE 'header.inc' %]
30
[% INCLUDE 'acquisitions-search.inc' %]
11
[% INCLUDE 'acquisitions-search.inc' %]
Lines 102-105 Link Here
102
    [% INCLUDE 'acquisitions-menu.inc' %]
83
    [% INCLUDE 'acquisitions-menu.inc' %]
103
  </div>
84
  </div>
104
</div>
85
</div>
86
87
[% MACRO jsinclude BLOCK %]
88
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script>
89
    [% INCLUDE 'datatables.inc' %]
90
    <script type="text/javascript">
91
        $(document).ready(function() {
92
            $("#invoice_files_details_table").dataTable($.extend(true, {}, dataTablesDefaults, {
93
                "aoColumnDefs": [
94
                    { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
95
                    { "aTargets": [ "title-string" ], "sType": "title-string" }
96
                ],
97
                bInfo: false,
98
                bPaginate: false,
99
                bFilter: false,
100
                sDom: "t"
101
            }));
102
            $("a.delete_file").click(function(){
103
                return ( confirm( _("Are you sure you want to delete this file ?") ) );
104
            });
105
        });
106
    </script>
107
[% END %]
108
105
[% INCLUDE 'intranet-bottom.inc' %]
109
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt (-48 / +51 lines)
Lines 1-57 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
[% USE Price %]
3
[% USE Price %]
4
4
[% SET footerjs = 1 %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
6
<title>Koha &rsaquo; Acquisitions &rsaquo; Invoice</title>
6
<title>Koha &rsaquo; Acquisitions &rsaquo; Invoice</title>
7
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
7
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
8
[% INCLUDE 'doc-head-close.inc' %]
8
[% INCLUDE 'doc-head-close.inc' %]
9
[% INCLUDE 'calendar.inc' %]
10
[% INCLUDE 'datatables.inc' %]
11
<script type="text/javascript">
12
//<![CDATA[
13
    function updateColumnsVisibility(visible) {
14
        if ( visible ) {
15
            $("table .tax_excluded, .tax_included").show();
16
        } else {
17
            [% IF ( invoiceincgst ) %]
18
                $("table .tax_excluded").hide();
19
            [% ELSE %]
20
                $("table .tax_included").hide();
21
            [% END %]
22
        }
23
    }
24
25
    $(document).ready(function() {
26
        $("#orderst").dataTable($.extend(true, {}, dataTablesDefaults, {
27
            bInfo: false,
28
            bPaginate: false,
29
            bFilter: false,
30
            sDom: "t",
31
            "aoColumnDefs": [
32
                { "sType": "anti-the", "aTargets": [ "anti-the" ] }
33
            ]
34
        }));
35
[% IF ( (Koha.Preference('AcqEnableFiles')) && files ) %]
36
        $("#invoice_files_table").dataTable($.extend(true, {}, dataTablesDefaults, {
37
            "aoColumnDefs": [
38
                { "aTargets": [ "title-string" ], "sType": "title-string" }
39
            ],
40
            bInfo: false,
41
            bPaginate: false,
42
            bFilter: false,
43
            sDom: "t"
44
        }));
45
[% END %]
46
        $("#show_all_details").click(function(){
47
            updateColumnsVisibility( $(this).is(":checked") );
48
        });
49
50
        $("#show_all_details").prop('checked', false);
51
        updateColumnsVisibility(false);
52
    });
53
//]]>
54
</script>
55
</head>
9
</head>
56
10
57
<body id="acq_invoice" class="acq">
11
<body id="acq_invoice" class="acq">
Lines 254-257 Link Here
254
    [% INCLUDE 'acquisitions-menu.inc' %]
208
    [% INCLUDE 'acquisitions-menu.inc' %]
255
  </div>
209
  </div>
256
</div>
210
</div>
211
212
[% MACRO jsinclude BLOCK %]
213
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script>
214
    [% INCLUDE 'calendar.inc' %]
215
    [% INCLUDE 'datatables.inc' %]
216
    <script type="text/javascript">
217
        function updateColumnsVisibility(visible) {
218
            if ( visible ) {
219
                $("table .tax_excluded, .tax_included").show();
220
            } else {
221
                [% IF ( invoiceincgst ) %]
222
                    $("table .tax_excluded").hide();
223
                [% ELSE %]
224
                    $("table .tax_included").hide();
225
                [% END %]
226
            }
227
        }
228
229
        $(document).ready(function() {
230
            $("#orderst").dataTable($.extend(true, {}, dataTablesDefaults, {
231
                bInfo: false,
232
                bPaginate: false,
233
                bFilter: false,
234
                sDom: "t",
235
                "aoColumnDefs": [
236
                    { "sType": "anti-the", "aTargets": [ "anti-the" ] }
237
                ]
238
            }));
239
            [% IF ( (Koha.Preference('AcqEnableFiles')) && files ) %]
240
                $("#invoice_files_table").dataTable($.extend(true, {}, dataTablesDefaults, {
241
                    "aoColumnDefs": [
242
                        { "aTargets": [ "title-string" ], "sType": "title-string" }
243
                    ],
244
                    bInfo: false,
245
                    bPaginate: false,
246
                    bFilter: false,
247
                    sDom: "t"
248
                }));
249
            [% END %]
250
            $("#show_all_details").click(function(){
251
                updateColumnsVisibility( $(this).is(":checked") );
252
            });
253
254
            $("#show_all_details").prop('checked', false);
255
            updateColumnsVisibility(false);
256
        });
257
258
    </script>
259
[% END %]
260
257
[% INCLUDE 'intranet-bottom.inc' %]
261
[% INCLUDE 'intranet-bottom.inc' %]
258
- 

Return to bug 19753