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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tt (-17 / +21 lines)
Lines 1-24 Link Here
1
[% SET footerjs = 1 %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Serials &rsaquo; Select vendor</title>
3
<title>Koha &rsaquo; Serials &rsaquo; Select vendor</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
4
<script type="text/javascript">
5
6
function GetIt(aqbooksellerid,name)
7
{
8
  opener.document.f.aqbooksellerid.value = aqbooksellerid;
9
  opener.document.f.aqbooksellername.value = name;
10
  window.close();
11
}
12
$(document).ready(function(){
13
    $(".select_vendor").on("click",function(e){
14
        e.preventDefault();
15
        var vendorname = $(this).data("vendorname");
16
        var vendorid = $(this).data("vendorid");
17
        GetIt( vendorid, vendorname );
18
    });
19
});
20
</script>
21
</head>
5
</head>
6
22
<body id="ser_acqui-search-result" class="ser">
7
<body id="ser_acqui-search-result" class="ser">
23
8
24
<div id="doc" class="yui-t7">
9
<div id="doc" class="yui-t7">
Lines 55-58 $(document).ready(function(){ Link Here
55
40
56
</div>
41
</div>
57
42
43
[% MACRO jsinclude BLOCK %]
44
  <script type="text/javascript">
45
    function GetIt(aqbooksellerid,name){
46
      opener.document.f.aqbooksellerid.value = aqbooksellerid;
47
      opener.document.f.aqbooksellername.value = name;
48
      window.close();
49
    }
50
51
    $(document).ready(function(){
52
        $(".select_vendor").on("click",function(e){
53
            e.preventDefault();
54
            var vendorname = $(this).data("vendorname");
55
            var vendorid = $(this).data("vendorid");
56
            GetIt( vendorid, vendorname );
57
        });
58
    });
59
  </script>
60
[% END %]
61
58
[% INCLUDE 'intranet-bottom.inc' %]
62
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search.tt (-10 / +1 lines)
Lines 1-17 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Serials &rsaquo; Search for vendor</title>
2
<title>Koha &rsaquo; Serials &rsaquo; Search for vendor</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
<script type="text/javascript">
5
//<![CDATA[
6
function GetIt(aqbooksellerid,name)
7
{
8
  opener.document.f.aqbooksellerid.value = aqbooksellerid;
9
  opener.document.f.aqbooksellername.value = name;
10
  window.close();
11
}
12
//]]>
13
</script>
14
</head>
4
</head>
5
15
<body id="ser_acqui-search" class="ser">
6
<body id="ser_acqui-search" class="ser">
16
7
17
<div id="doc" class="yui-t7">
8
<div id="doc" class="yui-t7">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/add_fields.tt (-32 / +35 lines)
Lines 1-4 Link Here
1
[% USE AuthorisedValues %]
1
[% USE AuthorisedValues %]
2
[% SET footerjs = 1 %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Serials &rsaquo; Manage new fields for subscriptions
4
<title>Koha &rsaquo; Serials &rsaquo; Manage new fields for subscriptions
4
  [% IF op == "list" %] &rsaquo; List of fields
5
  [% IF op == "list" %] &rsaquo; List of fields
Lines 10-47 Link Here
10
</title>
11
</title>
11
[% INCLUDE 'doc-head-close.inc' %]
12
[% INCLUDE 'doc-head-close.inc' %]
12
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
13
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
13
[% INCLUDE "datatables.inc" %]
14
<script type="text/javascript">
15
//<![CDATA[
16
  $(document).ready(function(){
17
18
    $("#fieldst").dataTable($.extend(true, {}, dataTablesDefaults, {
19
        'bAutoWidth': false,
20
        'sDom': 't<"bottom pager"ilpf>',
21
        'sPaginationType': 'four_button',
22
        'aLengthMenu': [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
23
        'iDisplayLength': 20,
24
        'aaSorting': [[ 0, "asc" ]],
25
        "aoColumnDefs": [
26
            { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
27
        ]
28
    }));
29
30
    $(".confirmdelete").click(function(){
31
      return confirm(_("Are you sure you want to delete this field?"));
32
    });
33
34
    $("#add_field").on('submit', function(){
35
        if ( $("#marcfield").val().length > 0
36
            && $("select[name='authorised_value_category']" ).val().length > 0 ) {
37
            alert("You cannot select an authorised value category and a marcfield");
38
            return false;
39
        }
40
        return true;
41
    });
42
  });
43
//]]>
44
</script>
45
</head>
14
</head>
46
15
47
<body id="ser_add_fields" class="ser">
16
<body id="ser_add_fields" class="ser">
Lines 172-175 Link Here
172
[% INCLUDE 'serials-menu.inc' %]
141
[% INCLUDE 'serials-menu.inc' %]
173
</div>
142
</div>
174
</div>
143
</div>
144
145
[% MACRO jsinclude BLOCK %]
146
    [% INCLUDE "datatables.inc" %]
147
    <script type="text/javascript">
148
        $(document).ready(function(){
149
150
            $("#fieldst").dataTable($.extend(true, {}, dataTablesDefaults, {
151
                'bAutoWidth': false,
152
                'sDom': 't<"bottom pager"ilpf>',
153
                'sPaginationType': 'four_button',
154
                'aLengthMenu': [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
155
                'iDisplayLength': 20,
156
                'aaSorting': [[ 0, "asc" ]],
157
                "aoColumnDefs": [
158
                    { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
159
                ]
160
            }));
161
162
            $(".confirmdelete").click(function(){
163
                return confirm(_("Are you sure you want to delete this field?"));
164
            });
165
166
            $("#add_field").on('submit', function(){
167
                if ( $("#marcfield").val().length > 0
168
                    && $("select[name='authorised_value_category']" ).val().length > 0 ) {
169
                    alert("You cannot select an authorised value category and a marcfield");
170
                    return false;
171
                }
172
                return true;
173
            });
174
        });
175
    </script>
176
[% END %]
177
175
[% INCLUDE 'intranet-bottom.inc' %]
178
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt (-17 / +19 lines)
Lines 1-26 Link Here
1
[% USE Branches %]
1
[% USE Branches %]
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
[% SET footerjs = 1 %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Koha &rsaquo; Serials &rsaquo; Check expiration</title>
5
<title>Koha &rsaquo; Serials &rsaquo; Check expiration</title>
5
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'calendar.inc' %]
7
<script type="text/javascript" language="JavaScript">
8
// <![CDATA[
9
    $(document).ready(function(){
10
        $(".renew_subscription").on("click",function(e){
11
            e.preventDefault();
12
            var subscriptionid = $(this).data("subscriptionid");
13
            popup( subscriptionid );
14
        });
15
    });
16
	function popup(subscriptionid) {
17
	   newin=window.open("subscription-renew.pl?mode=popup&subscriptionid="+subscriptionid,'popup','width=590,height=440,toolbar=false,scrollbars=yes,resize=yes');
18
	}
19
20
     // ]]>
21
</script>
22
<!-- End of additions -->
23
</head>
7
</head>
8
24
<body id="ser_checkexpiration" class="ser">
9
<body id="ser_checkexpiration" class="ser">
25
[% INCLUDE 'header.inc' %]
10
[% INCLUDE 'header.inc' %]
26
[% INCLUDE 'serials-search.inc' %]
11
[% INCLUDE 'serials-search.inc' %]
Lines 128-131 Link Here
128
[% INCLUDE 'serials-menu.inc' %]
113
[% INCLUDE 'serials-menu.inc' %]
129
</div>
114
</div>
130
</div>
115
</div>
116
117
[% MACRO jsinclude BLOCK %]
118
    [% INCLUDE 'calendar.inc' %]
119
    <script type="text/javascript" language="JavaScript">
120
        $(document).ready(function(){
121
            $(".renew_subscription").on("click",function(e){
122
                e.preventDefault();
123
                var subscriptionid = $(this).data("subscriptionid");
124
                popup( subscriptionid );
125
            });
126
        });
127
        function popup(subscriptionid) {
128
           newin=window.open("subscription-renew.pl?mode=popup&subscriptionid="+subscriptionid,'popup','width=590,height=440,toolbar=false,scrollbars=yes,resize=yes');
129
        }
130
    </script>
131
[% END %]
132
131
[% INCLUDE 'intranet-bottom.inc' %]
133
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt (-121 / +121 lines)
Lines 1-130 Link Here
1
[% USE AuthorisedValues %]
1
[% USE Branches %]
2
[% USE Branches %]
2
3
[% SET footerjs = 1 %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
4
[% USE AuthorisedValues %]
5
    <title>Koha &rsaquo; Serials &rsaquo; Claims</title>
5
    <title>Koha &rsaquo; Serials &rsaquo; Claims</title>
6
    [% INCLUDE 'doc-head-close.inc' %]
6
    [% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'calendar.inc' %]
8
<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" />
9
[% INCLUDE 'datatables.inc' %]
10
<script type="text/javascript">
11
//<![CDATA[
12
    var sTable;
13
	 $(document).ready(function() {
14
         sTable = $("#claimst").dataTable($.extend(true, {}, dataTablesDefaults, {
15
            "sDom": 't',
16
                "aoColumnDefs": [
17
                    { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
18
                    { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] },
19
                    { 'sType': "title-string", 'aTargets' : [ 'title-string'] }
20
                ],
21
            "bPaginate": false
22
        }));
23
        sTable.fnAddFilters("filter", "200");
24
	    $('#supplierid').change(function() {
25
    	    $('#claims').submit();
26
	    });
27
28
	    // Checkboxes : Select All / None
29
	    $("span.checkall").html("<input type=\"checkbox\" name=\"CheckAll\"> "+_("Check All")+"</input>");
30
31
        $("#CheckAll").click(function() {
32
            $("#claimst tr:visible :checkbox").prop('checked', $("#CheckAll").is(':checked'));
33
        });
34
35
        // Generates a dynamic link for exporting the selections data as CSV
36
	    $("#ExportSelected").click(function() {
37
               // We need to use "input[name=serialid]:checked" instead of "input:checked". Otherwise, the "check all" box will pass the value of "on" as a serialid, which produces a SQL error.
38
             var selected = $("input[name=serialid]:checked");
39
40
        if (selected.length == 0) {
41
            alert(_("Please select at least one item to export."));
42
            return false;
43
        }
44
45
        // Building the url from currently checked boxes
46
        var url = '/cgi-bin/koha/serials/lateissues-export.pl?supplierid=&amp;op=claims';
47
        for (var i = 0; i < selected.length; i++) {
48
            url += '&amp;serialid=' + selected[i].value;
49
        }
50
        url += '&amp;csv_profile=' + $("#csv_profile_for_export option:selected").val();
51
        // And redirecting to the CSV page
52
        location.href = url;
53
        return false;
54
        });
55
        $("#filterByDate").on("click",function(e){
56
            e.preventDefault();
57
            filterByDate();
58
        });
59
        $("#clearfilter").on("click",function(e){
60
            e.preventDefault();
61
            $("#from,#to").val("");
62
            $("table#claimst tbody tr").show();
63
        });
64
        $("#claims_form").on("submit",function(){
65
             return checkForm();
66
        });
67
        $("#filter_claims_form").on("submit",function(){
68
            return false;
69
        });
70
	 });
71
72
	// Checks if the form can be sent (at least one checkbox must be checked)
73
	function checkForm() {
74
	    if ($("input:checked").length == 0) {
75
        alert(_("Please select at least one issue."));
76
		return false;
77
	    }
78
	}
79
80
	// Filter by date
81
	function filterByDate() {
82
        var beginDate = Date_from_syspref($("#from").val()).getTime();
83
        var endDate   = Date_from_syspref($("#to").val()).getTime();
84
	    
85
	    // Checks if the beginning date is valid
86
	    if (!parseInt(beginDate)) {
87
		alert(_("The beginning date is missing or invalid."));
88
		return false;
89
	    }
90
91
	    // Checks if the ending date is valid
92
	    if (!parseInt(endDate)) {
93
		alert(_("The ending date is missing or invalid."));
94
		return false;
95
	    }
96
97
	    // Checks if beginning date is before ending date
98
	    if (beginDate > endDate) {
99
		// If not, we swap them
100
		var tmpDate = endDate;
101
		endDate = beginDate;
102
		beginDate = tmpDate;
103
	    }
104
	   
105
	    // We hide everything
106
	    $("table#claimst tbody tr").hide();
107
108
	    // For each date in the table
109
	    $(".planneddate").each(function() {
110
111
		// We make a JS Date Object, according to the locale
112
		var pdate = Date_from_syspref($(this).text()).getTime();
113
114
		// And checks if the date is between the beginning and ending dates
115
		if (pdate > beginDate && 
116
		    pdate < endDate) {
117
			// If so, we can show the row
118
			$(this).parent().show();
119
		    }
120
121
	    });
122
	}
123
124
125
//]]>
126
</script>
127
</head>
8
</head>
9
128
<body id="ser_claims" class="ser">
10
<body id="ser_claims" class="ser">
129
    [% INCLUDE 'header.inc' %]
11
    [% INCLUDE 'header.inc' %]
130
    [% INCLUDE 'serials-search.inc' %]
12
    [% INCLUDE 'serials-search.inc' %]
Lines 321-324 Link Here
321
[% INCLUDE 'serials-menu.inc' %]
203
[% INCLUDE 'serials-menu.inc' %]
322
</div>
204
</div>
323
</div>
205
</div>
206
207
[% MACRO jsinclude BLOCK %]
208
    [% INCLUDE 'calendar.inc' %]
209
    [% INCLUDE 'datatables.inc' %]
210
    <script type="text/javascript">
211
        var sTable;
212
        $(document).ready(function() {
213
            sTable = $("#claimst").dataTable($.extend(true, {}, dataTablesDefaults, {
214
                "sDom": 't',
215
                    "aoColumnDefs": [
216
                        { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
217
                        { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] },
218
                        { 'sType': "title-string", 'aTargets' : [ 'title-string'] }
219
                    ],
220
                "bPaginate": false
221
            }));
222
            sTable.fnAddFilters("filter", "200");
223
            $('#supplierid').change(function() {
224
                $('#claims').submit();
225
            });
226
227
            // Checkboxes : Select All / None
228
            $("span.checkall").html("<input type=\"checkbox\" name=\"CheckAll\"> "+_("Check All")+"</input>");
229
230
            $("#CheckAll").click(function() {
231
                $("#claimst tr:visible :checkbox").prop('checked', $("#CheckAll").is(':checked'));
232
            });
233
234
            // Generates a dynamic link for exporting the selections data as CSV
235
            $("#ExportSelected").click(function() {
236
                // We need to use "input[name=serialid]:checked" instead of "input:checked". Otherwise, the "check all" box will pass the value of "on" as a serialid, which produces a SQL error.
237
                var selected = $("input[name=serialid]:checked");
238
239
            if (selected.length == 0) {
240
                alert(_("Please select at least one item to export."));
241
                return false;
242
            }
243
244
            // Building the url from currently checked boxes
245
            var url = '/cgi-bin/koha/serials/lateissues-export.pl?supplierid=&amp;op=claims';
246
            for (var i = 0; i < selected.length; i++) {
247
                url += '&amp;serialid=' + selected[i].value;
248
            }
249
            url += '&amp;csv_profile=' + $("#csv_profile_for_export option:selected").val();
250
            // And redirecting to the CSV page
251
            location.href = url;
252
            return false;
253
            });
254
            $("#filterByDate").on("click",function(e){
255
                e.preventDefault();
256
                filterByDate();
257
            });
258
            $("#clearfilter").on("click",function(e){
259
                e.preventDefault();
260
                $("#from,#to").val("");
261
                $("table#claimst tbody tr").show();
262
            });
263
            $("#claims_form").on("submit",function(){
264
                return checkForm();
265
            });
266
            $("#filter_claims_form").on("submit",function(){
267
                return false;
268
            });
269
         });
270
271
        // Checks if the form can be sent (at least one checkbox must be checked)
272
        function checkForm() {
273
            if ($("input:checked").length == 0) {
274
            alert(_("Please select at least one issue."));
275
            return false;
276
            }
277
        }
278
279
        // Filter by date
280
        function filterByDate() {
281
            var beginDate = Date_from_syspref($("#from").val()).getTime();
282
            var endDate   = Date_from_syspref($("#to").val()).getTime();
283
284
            // Checks if the beginning date is valid
285
            if (!parseInt(beginDate)) {
286
                alert(_("The beginning date is missing or invalid."));
287
                return false;
288
            }
289
290
            // Checks if the ending date is valid
291
            if (!parseInt(endDate)) {
292
                alert(_("The ending date is missing or invalid."));
293
                return false;
294
            }
295
296
            // Checks if beginning date is before ending date
297
            if (beginDate > endDate) {
298
                // If not, we swap them
299
                var tmpDate = endDate;
300
                endDate = beginDate;
301
                beginDate = tmpDate;
302
            }
303
304
            // We hide everything
305
            $("table#claimst tbody tr").hide();
306
307
            // For each date in the table
308
            $(".planneddate").each(function() {
309
310
            // We make a JS Date Object, according to the locale
311
            var pdate = Date_from_syspref($(this).text()).getTime();
312
313
            // And checks if the date is between the beginning and ending dates
314
            if (pdate > beginDate &&
315
                pdate < endDate) {
316
                // If so, we can show the row
317
                $(this).parent().show();
318
                }
319
            });
320
        }
321
    </script>
322
[% END %]
323
324
[% INCLUDE 'intranet-bottom.inc' %]
324
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/result.tt (-18 / +20 lines)
Lines 1-24 Link Here
1
[% SET footerjs = 1 %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Serials &rsaquo; Search results</title>
3
<title>Koha &rsaquo; Serials &rsaquo; Search results</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
4
<script type="text/javascript">
5
//<![CDATA[
6
    $(document).ready(function(){
7
        $(".select_title").on("click",function(e){
8
            e.preventDefault();
9
            var biblionumber = $(this).data("biblionumber");
10
            GetIt( biblionumber, $(this) );
11
        });
12
    });
13
    function GetIt(bibno,title) {
14
        title = title.parents('tr').find('.title').text();
15
        opener.document.f.biblionumber.value = bibno;
16
        opener.document.f.title.value = title;
17
        window.close();
18
    }
19
//]]>
20
</script>
21
</head>
5
</head>
6
22
<body id="ser_result" class="ser">
7
<body id="ser_result" class="ser">
23
8
24
<div id="doc" class="yui-t7">
9
<div id="doc" class="yui-t7">
Lines 79-82 Link Here
79
64
80
</div>
65
</div>
81
66
67
[% MACRO jsinclude BLOCK %]
68
    <script type="text/javascript">
69
        $(document).ready(function(){
70
            $(".select_title").on("click",function(e){
71
                e.preventDefault();
72
                var biblionumber = $(this).data("biblionumber");
73
                GetIt( biblionumber, $(this) );
74
            });
75
        });
76
        function GetIt(bibno,title) {
77
            title = title.parents('tr').find('.title').text();
78
            opener.document.f.biblionumber.value = bibno;
79
            opener.document.f.title.value = title;
80
            window.close();
81
        }
82
    </script>
83
[% END %]
84
82
[% INCLUDE 'intranet-bottom.inc' %]
85
[% INCLUDE 'intranet-bottom.inc' %]
83
- 

Return to bug 19758