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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc (-10 lines)
Lines 63-75 Link Here
63
63
64
    [% END %]
64
    [% END %]
65
</div>
65
</div>
66
67
<script type="text/javascript">
68
var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this report? This cannot be undone.");
69
70
$(document).ready(function(){
71
    $(".delete").on("click",function(){
72
        return confirmDelete(MSG_CONFIRM_DELETE);
73
    });
74
});
75
</script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt (-34 / +38 lines)
Lines 1-41 Link Here
1
[% SET footerjs = 1 %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Reports [% IF ( do_it ) %]&rsaquo; Acquisitions statistics &rsaquo; Results[% ELSE %]&rsaquo; Acquisitions statistics[% END %]</title>
3
<title>Koha &rsaquo; Reports [% IF ( do_it ) %]&rsaquo; Acquisitions statistics &rsaquo; Results[% ELSE %]&rsaquo; Acquisitions statistics[% END %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'calendar.inc' %]
5
<script type="text/javascript">
6
//<![CDATA[
7
        $(document).ready(function() {
8
        // http://jqueryui.com/demos/datepicker/#date-range
9
        var dates = $( "#from, #to" ).datepicker({
10
            changeMonth: true,
11
            numberOfMonths: 1,
12
            onSelect: function( selectedDate ) {
13
                var option = this.id == "from" ? "minDate" : "maxDate",
14
                    instance = $( this ).data( "datepicker" );
15
                    date = $.datepicker.parseDate(
16
                        instance.settings.dateFormat ||
17
                        $.datepicker._defaults.dateFormat,
18
                        selectedDate, instance.settings );
19
                dates.not( this ).datepicker( "option", option, date );
20
            }
21
        });
22
        var datesRO = $( "#fromRO, #toRO" ).datepicker({
23
            changeMonth: true,
24
            numberOfMonths: 1,
25
            onSelect: function( selectedDate ) {
26
                var option = this.id == "fromRO" ? "minDate" : "maxDate",
27
                    instance = $( this ).data( "datepicker" );
28
                    date = $.datepicker.parseDate(
29
                        instance.settings.dateFormat ||
30
                        $.datepicker._defaults.dateFormat,
31
                        selectedDate, instance.settings );
32
                datesRO.not( this ).datepicker( "option", option, date );
33
            }
34
        });
35
        });
36
//]]>
37
</script>
38
</head>
5
</head>
6
39
<body id="rep_acquisitions_stats" class="rep">
7
<body id="rep_acquisitions_stats" class="rep">
40
[% INCLUDE 'header.inc' %]
8
[% INCLUDE 'header.inc' %]
41
[% INCLUDE 'cat-search.inc' %]
9
[% INCLUDE 'cat-search.inc' %]
Lines 338-341 Link Here
338
[% INCLUDE 'reports-menu.inc' %]
306
[% INCLUDE 'reports-menu.inc' %]
339
</div>
307
</div>
340
</div>
308
</div>
309
310
[% MACRO jsinclude BLOCK %]
311
    [% INCLUDE 'calendar.inc' %]
312
    <script type="text/javascript">
313
        $(document).ready(function() {
314
            // http://jqueryui.com/demos/datepicker/#date-range
315
            var dates = $( "#from, #to" ).datepicker({
316
                changeMonth: true,
317
                numberOfMonths: 1,
318
                onSelect: function( selectedDate ) {
319
                    var option = this.id == "from" ? "minDate" : "maxDate",
320
                        instance = $( this ).data( "datepicker" );
321
                        date = $.datepicker.parseDate(
322
                            instance.settings.dateFormat ||
323
                            $.datepicker._defaults.dateFormat,
324
                            selectedDate, instance.settings );
325
                    dates.not( this ).datepicker( "option", option, date );
326
                }
327
            });
328
            var datesRO = $( "#fromRO, #toRO" ).datepicker({
329
                changeMonth: true,
330
                numberOfMonths: 1,
331
                onSelect: function( selectedDate ) {
332
                    var option = this.id == "fromRO" ? "minDate" : "maxDate",
333
                        instance = $( this ).data( "datepicker" );
334
                        date = $.datepicker.parseDate(
335
                            instance.settings.dateFormat ||
336
                            $.datepicker._defaults.dateFormat,
337
                            selectedDate, instance.settings );
338
                    datesRO.not( this ).datepicker( "option", option, date );
339
                }
340
            });
341
        });
342
    </script>
343
[% END %]
344
341
[% INCLUDE 'intranet-bottom.inc' %]
345
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/bor_issues_top.tt (-41 / +38 lines)
Lines 1-44 Link Here
1
[% USE Branches %]
1
[% USE Branches %]
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
[% USE ItemTypes %]
3
[% USE ItemTypes %]
4
[% SET footerjs = 1 %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
<title>Koha &rsaquo; Reports &rsaquo; Patrons with the most checkouts</title>
6
<title>Koha &rsaquo; Reports &rsaquo; Patrons with the most checkouts</title>
6
[% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'calendar.inc' %]
8
<script type="text/javascript">
9
//<![CDATA[
10
        $(document).ready(function() {
11
        // http://jqueryui.com/demos/datepicker/#date-range
12
        var dates = $( "#from, #to" ).datepicker({
13
            changeMonth: true,
14
            numberOfMonths: 1,
15
            onSelect: function( selectedDate ) {
16
                var option = this.id == "from" ? "minDate" : "maxDate",
17
                    instance = $( this ).data( "datepicker" );
18
                    date = $.datepicker.parseDate(
19
                        instance.settings.dateFormat ||
20
                        $.datepicker._defaults.dateFormat,
21
                        selectedDate, instance.settings );
22
                dates.not( this ).datepicker( "option", option, date );
23
            }
24
        });
25
        var datesRO = $( "#fromRO, #toRO" ).datepicker({
26
            changeMonth: true,
27
            numberOfMonths: 1,
28
            onSelect: function( selectedDate ) {
29
                var option = this.id == "fromRO" ? "minDate" : "maxDate",
30
                    instance = $( this ).data( "datepicker" );
31
                    date = $.datepicker.parseDate(
32
                        instance.settings.dateFormat ||
33
                        $.datepicker._defaults.dateFormat,
34
                        selectedDate, instance.settings );
35
                datesRO.not( this ).datepicker( "option", option, date );
36
            }
37
        });
38
        });
39
//]]>
40
</script>
41
</head>
8
</head>
9
42
<body id="rep_bor_issues_top" class="rep">
10
<body id="rep_bor_issues_top" class="rep">
43
[% INCLUDE 'header.inc' %]
11
[% INCLUDE 'header.inc' %]
44
[% INCLUDE 'cat-search.inc' %]
12
[% INCLUDE 'cat-search.inc' %]
Lines 52-64 Link Here
52
	<div class="yui-b">
20
	<div class="yui-b">
53
21
54
[% IF ( do_it ) %]
22
[% IF ( do_it ) %]
55
<script language="JavaScript" type="text/javascript">
56
function Dopop(link) {
57
	newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
58
}
59
</script>
60
61
62
	[% FOREACH mainloo IN mainloop %]
23
	[% FOREACH mainloo IN mainloop %]
63
        <h1>Patrons with the most checkouts</h1>
24
        <h1>Patrons with the most checkouts</h1>
64
		[% IF ( mainloo.loopfilter ) %]
25
		[% IF ( mainloo.loopfilter ) %]
Lines 227-230 function Dopop(link) { Link Here
227
[% INCLUDE 'reports-menu.inc' %]
188
[% INCLUDE 'reports-menu.inc' %]
228
</div>
189
</div>
229
</div>
190
</div>
191
192
[% MACRO jsinclude BLOCK %]
193
    [% INCLUDE 'calendar.inc' %]
194
    <script type="text/javascript">
195
        $(document).ready(function() {
196
            // http://jqueryui.com/demos/datepicker/#date-range
197
            var dates = $( "#from, #to" ).datepicker({
198
                changeMonth: true,
199
                numberOfMonths: 1,
200
                onSelect: function( selectedDate ) {
201
                    var option = this.id == "from" ? "minDate" : "maxDate",
202
                        instance = $( this ).data( "datepicker" );
203
                        date = $.datepicker.parseDate(
204
                            instance.settings.dateFormat ||
205
                            $.datepicker._defaults.dateFormat,
206
                            selectedDate, instance.settings );
207
                    dates.not( this ).datepicker( "option", option, date );
208
                }
209
            });
210
            var datesRO = $( "#fromRO, #toRO" ).datepicker({
211
                changeMonth: true,
212
                numberOfMonths: 1,
213
                onSelect: function( selectedDate ) {
214
                    var option = this.id == "fromRO" ? "minDate" : "maxDate",
215
                        instance = $( this ).data( "datepicker" );
216
                        date = $.datepicker.parseDate(
217
                            instance.settings.dateFormat ||
218
                            $.datepicker._defaults.dateFormat,
219
                            selectedDate, instance.settings );
220
                    datesRO.not( this ).datepicker( "option", option, date );
221
                }
222
            });
223
        });
224
    </script>
225
[% END %]
226
230
[% INCLUDE 'intranet-bottom.inc' %]
227
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_out.tt (-8 / +12 lines)
Lines 1-15 Link Here
1
[% SET footerjs = 1 %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Reports &rsaquo; Patrons with no checkouts</title>
3
<title>Koha &rsaquo; Reports &rsaquo; Patrons with no checkouts</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'calendar.inc' %]
5
<script type="text/javascript">
6
//<![CDATA[
7
$(document).ready(function(){
8
    $("#to").datepicker({ maxDate: "-1D" });
9
});
10
//]]>
11
</script>
12
</head>
5
</head>
6
13
<body id="rep_borrowers_out" class="rep">
7
<body id="rep_borrowers_out" class="rep">
14
[% INCLUDE 'header.inc' %]
8
[% INCLUDE 'header.inc' %]
15
[% INCLUDE 'cat-search.inc' %]
9
[% INCLUDE 'cat-search.inc' %]
Lines 130-133 $(document).ready(function(){ Link Here
130
[% INCLUDE 'reports-menu.inc' %]
124
[% INCLUDE 'reports-menu.inc' %]
131
</div>
125
</div>
132
</div>
126
</div>
127
128
[% MACRO jsinclude BLOCK %]
129
    [% INCLUDE 'calendar.inc' %]
130
    <script type="text/javascript">
131
        $(document).ready(function(){
132
            $("#to").datepicker({ maxDate: "-1D" });
133
        });
134
    </script>
135
[% END %]
136
133
[% INCLUDE 'intranet-bottom.inc' %]
137
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt (-1 / +7 lines)
Lines 1-13 Link Here
1
[% USE Branches %]
1
[% USE Branches %]
2
[% SET footerjs = 1 %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Reports [% IF ( do_it ) %]&rsaquo; Patrons statistics &rsaquo; Results[% ELSE %]&rsaquo; Patrons statistics[% END %]</title>
4
<title>Koha &rsaquo; Reports [% IF ( do_it ) %]&rsaquo; Patrons statistics &rsaquo; Results[% ELSE %]&rsaquo; Patrons statistics[% END %]</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'calendar.inc' %]
6
<style type="text/css">
6
<style type="text/css">
7
	.sql {display:none;}
7
	.sql {display:none;}
8
	.debug {display:none;}
8
	.debug {display:none;}
9
</style>
9
</style>
10
</head>
10
</head>
11
11
<body id="rep_borrowers_stats" class="rep">
12
<body id="rep_borrowers_stats" class="rep">
12
[% INCLUDE 'header.inc' %]
13
[% INCLUDE 'header.inc' %]
13
[% INCLUDE 'cat-search.inc' %]
14
[% INCLUDE 'cat-search.inc' %]
Lines 293-296 Link Here
293
[% INCLUDE 'reports-menu.inc' %]
294
[% INCLUDE 'reports-menu.inc' %]
294
</div>
295
</div>
295
</div>
296
</div>
297
298
[% MACRO jsinclude BLOCK %]
299
    [% INCLUDE 'calendar.inc' %]
300
[% END %]
301
296
[% INCLUDE 'intranet-bottom.inc' %]
302
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt (-52 / +53 lines)
Lines 1-63 Link Here
1
[% USE KohaDates %]
1
[% USE KohaDates %]
2
[% USE Price %]
2
[% USE Price %]
3
[% USE ItemTypes %]
3
[% USE ItemTypes %]
4
[% SET footerjs = 1 %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
<title>Koha &rsaquo; Reports [% IF ( do_it ) %]&rsaquo; Cash register statistics &rsaquo; Results[% ELSE %]&rsaquo; Cash register statistics[% END %]</title>
6
<title>Koha &rsaquo; Reports [% IF ( do_it ) %]&rsaquo; Cash register statistics &rsaquo; Results[% ELSE %]&rsaquo; Cash register statistics[% END %]</title>
6
[% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'doc-head-close.inc' %]
7
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
8
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
8
[% INCLUDE 'datatables.inc' %]
9
<script type="text/javascript" id="js">
10
 $(document).ready(function() {
11
    $("#tbl_cash_register_stats").dataTable($.extend(true, {}, dataTablesDefaults, {
12
        "iDisplayLength": 50,
13
        "sPaginationType": "full_numbers"
14
    }));
15
 });
16
</script>
17
[% INCLUDE 'calendar.inc' %]
18
<script type="text/javascript">
19
//<![CDATA[
20
actTotal = "";
21
22
23
$(document).ready(function() {
24
    // http://jqueryui.com/demos/datepicker/#date-range
25
    var dates = $( "#filter_date_begin, #filter_date_end" ).datepicker({
26
        changeMonth: true,
27
        numberOfMonths: 1,
28
        onSelect: function( selectedDate ) {
29
            var option = this.id == "filter_date_begin" ? "minDate" : "maxDate",
30
                instance = $( this ).data( "datepicker" );
31
                date = $.datepicker.parseDate(
32
                    instance.settings.dateFormat ||
33
                    $.datepicker._defaults.dateFormat,
34
                    selectedDate, instance.settings );
35
            dates.not( this ).datepicker( "option", option, date );
36
        }
37
    });
38
39
    $('#frmCashRegister').submit(function() {
40
        var isFormValid = true;
41
        var alertString= _("Form not submitted because of the following problem(s)")+"\n";
42
43
        alertString +="-------------------------------------------------------------------\n\n";
44
45
        if ( !$('#from').val() || !$('#to').val()){
46
            isFormValid = false;
47
            alertString += "\n- " + _("Dates cannot be empty");
48
        }
49
50
        if (!isFormValid) {
51
           alert(alertString);
52
           return false;
53
        }
54
    });
55
});
56
57
//]]>
58
</script>
59
60
</head>
9
</head>
10
61
<body id="cash_register_stats" class="rep">
11
<body id="cash_register_stats" class="rep">
62
[% INCLUDE 'header.inc' %]
12
[% INCLUDE 'header.inc' %]
63
[% INCLUDE 'cat-search.inc' %]
13
[% INCLUDE 'cat-search.inc' %]
Lines 300-303 $(document).ready(function() { Link Here
300
[% INCLUDE 'reports-menu.inc' %]
250
[% INCLUDE 'reports-menu.inc' %]
301
</div>
251
</div>
302
</div>
252
</div>
253
254
[% MACRO jsinclude BLOCK %]
255
    [% INCLUDE 'datatables.inc' %]
256
    <script type="text/javascript" id="js">
257
        $(document).ready(function() {
258
            $("#tbl_cash_register_stats").dataTable($.extend(true, {}, dataTablesDefaults, {
259
                "iDisplayLength": 50,
260
                "sPaginationType": "full_numbers"
261
            }));
262
        });
263
    </script>
264
    [% INCLUDE 'calendar.inc' %]
265
    <script type="text/javascript">
266
        actTotal = "";
267
268
        $(document).ready(function() {
269
            // http://jqueryui.com/demos/datepicker/#date-range
270
            var dates = $( "#filter_date_begin, #filter_date_end" ).datepicker({
271
                changeMonth: true,
272
                numberOfMonths: 1,
273
                onSelect: function( selectedDate ) {
274
                    var option = this.id == "filter_date_begin" ? "minDate" : "maxDate",
275
                        instance = $( this ).data( "datepicker" );
276
                        date = $.datepicker.parseDate(
277
                            instance.settings.dateFormat ||
278
                            $.datepicker._defaults.dateFormat,
279
                            selectedDate, instance.settings );
280
                    dates.not( this ).datepicker( "option", option, date );
281
                }
282
            });
283
284
            $('#frmCashRegister').submit(function() {
285
                var isFormValid = true;
286
                var alertString= _("Form not submitted because of the following problem(s)")+"\n";
287
288
                alertString +="-------------------------------------------------------------------\n\n";
289
290
                if ( !$('#from').val() || !$('#to').val()){
291
                    isFormValid = false;
292
                    alertString += "\n- " + _("Dates cannot be empty");
293
                }
294
295
                if (!isFormValid) {
296
                   alert(alertString);
297
                   return false;
298
                }
299
            });
300
        });
301
    </script>
302
[% END %]
303
303
[% INCLUDE 'intranet-bottom.inc' %]
304
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt (-37 / +44 lines)
Lines 1-45 Link Here
1
[% USE Branches %]
1
[% USE Branches %]
2
[% SET footerjs = 1 %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Reports &rsaquo; Most-circulated items[% IF ( do_it ) %] &rsaquo; Results[% END %]</title>
4
<title>Koha &rsaquo; Reports &rsaquo; Most-circulated items[% IF ( do_it ) %] &rsaquo; Results[% END %]</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'calendar.inc' %]
6
<script type="text/javascript">
7
//<![CDATA[
8
[% IF ( do_it ) %]function Dopop(link) {
9
	newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
10
}[% ELSE %]
11
    $(document).ready(function() {
12
        // http://jqueryui.com/demos/datepicker/#date-range
13
        var dates = $( "#from, #to" ).datepicker({
14
            changeMonth: true,
15
            numberOfMonths: 1,
16
            onSelect: function( selectedDate ) {
17
                var option = this.id == "from" ? "minDate" : "maxDate",
18
                    instance = $( this ).data( "datepicker" );
19
                    date = $.datepicker.parseDate(
20
                        instance.settings.dateFormat ||
21
                        $.datepicker._defaults.dateFormat,
22
                        selectedDate, instance.settings );
23
                dates.not( this ).datepicker( "option", option, date );
24
            }
25
        });
26
        var datesRO = $( "#fromRO, #toRO" ).datepicker({
27
            changeMonth: true,
28
            numberOfMonths: 1,
29
            onSelect: function( selectedDate ) {
30
                var option = this.id == "fromRO" ? "minDate" : "maxDate",
31
                    instance = $( this ).data( "datepicker" );
32
                    date = $.datepicker.parseDate(
33
                        instance.settings.dateFormat ||
34
                        $.datepicker._defaults.dateFormat,
35
                        selectedDate, instance.settings );
36
                datesRO.not( this ).datepicker( "option", option, date );
37
            }
38
        });
39
    });[% END %]
40
//]]>
41
</script>
42
</head>
6
</head>
7
43
<body id="rep_cat_issues_top" class="rep">
8
<body id="rep_cat_issues_top" class="rep">
44
[% INCLUDE 'header.inc' %]
9
[% INCLUDE 'header.inc' %]
45
[% INCLUDE 'cat-search.inc' %]
10
[% INCLUDE 'cat-search.inc' %]
Lines 222-225 Link Here
222
[% INCLUDE 'reports-menu.inc' %]
187
[% INCLUDE 'reports-menu.inc' %]
223
</div>
188
</div>
224
</div>
189
</div>
190
191
[% MACRO jsinclude BLOCK %]
192
    [% INCLUDE 'calendar.inc' %]
193
    <script type="text/javascript">
194
        [% IF ( do_it ) %]
195
            function Dopop(link) {
196
                newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
197
            }
198
        [% ELSE %]
199
            $(document).ready(function() {
200
                // http://jqueryui.com/demos/datepicker/#date-range
201
                var dates = $( "#from, #to" ).datepicker({
202
                    changeMonth: true,
203
                    numberOfMonths: 1,
204
                    onSelect: function( selectedDate ) {
205
                        var option = this.id == "from" ? "minDate" : "maxDate",
206
                            instance = $( this ).data( "datepicker" );
207
                            date = $.datepicker.parseDate(
208
                                instance.settings.dateFormat ||
209
                                $.datepicker._defaults.dateFormat,
210
                                selectedDate, instance.settings );
211
                        dates.not( this ).datepicker( "option", option, date );
212
                    }
213
                });
214
                var datesRO = $( "#fromRO, #toRO" ).datepicker({
215
                    changeMonth: true,
216
                    numberOfMonths: 1,
217
                    onSelect: function( selectedDate ) {
218
                        var option = this.id == "fromRO" ? "minDate" : "maxDate",
219
                            instance = $( this ).data( "datepicker" );
220
                            date = $.datepicker.parseDate(
221
                                instance.settings.dateFormat ||
222
                                $.datepicker._defaults.dateFormat,
223
                                selectedDate, instance.settings );
224
                        datesRO.not( this ).datepicker( "option", option, date );
225
                    }
226
                });
227
            });
228
        [% END %]
229
    </script>
230
[% END %]
231
225
[% INCLUDE 'intranet-bottom.inc' %]
232
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt (-37 / +41 lines)
Lines 1-45 Link Here
1
[% USE Branches %]
1
[% USE Branches %]
2
[% SET footerjs = 1 %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Reports [% IF ( do_it ) %]&rsaquo; Catalog statistics &rsaquo; Results[% ELSE %]&rsaquo; Catalog statistics[% END %]</title>
4
<title>Koha &rsaquo; Reports [% IF ( do_it ) %]&rsaquo; Catalog statistics &rsaquo; Results[% ELSE %]&rsaquo; Catalog statistics[% END %]</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'calendar.inc' %]
6
<script type="text/javascript">
7
//<![CDATA[
8
    function changeRemovedDateTrStatus() {
9
        var Cellvalue = $("input[name='Cellvalue']:checked").val();
10
        if(Cellvalue == "deleteditems") {
11
            $("#removeddatetr").show();
12
            $("input[value='deleteditems.timestamp']").prop('disabled', false);
13
            $("#deldateFrom").prop('disabled', false);
14
            $("#deldateTo").prop('disabled', false);
15
        } else {
16
            $("#removeddatetr").hide();
17
            $("input[value='deleteditems.timestamp']").prop('disabled', true).prop('checked', false);
18
            $("#deldateFrom").prop('disabled', true).val('');
19
            $("#deldateTo").prop('disabled', true).val('');
20
        }
21
    }
22
23
    $(document).ready(function() {
24
        $('#acqdateFrom, #deldateFrom')
25
          .datepicker('option', 'onSelect', function(selectedDate) {
26
            var id = $(this).attr('id').replace('From', 'To');
27
            $('#' + id).datepicker('option', 'minDate', selectedDate);
28
          });
29
        $('#acqdateTo, #deldateTo')
30
          .datepicker('option', 'onSelect', function(selectedDate) {
31
            var id = $(this).attr('id').replace('To', 'From');
32
            $('#' + id).datepicker('option', 'maxDate', selectedDate);
33
          });
34
35
        $("input[name='Cellvalue']").change(function() {
36
            changeRemovedDateTrStatus();
37
        });
38
        changeRemovedDateTrStatus();
39
    });
40
//]]>
41
</script>
42
</head>
6
</head>
7
43
<body id="rep_catalogue_stats" class="rep">
8
<body id="rep_catalogue_stats" class="rep">
44
[% INCLUDE 'header.inc' %]
9
[% INCLUDE 'header.inc' %]
45
[% INCLUDE 'cat-search.inc' %]
10
[% INCLUDE 'cat-search.inc' %]
Lines 332-335 Link Here
332
[% INCLUDE 'reports-menu.inc' %]
297
[% INCLUDE 'reports-menu.inc' %]
333
</div>
298
</div>
334
</div>
299
</div>
300
301
[% MACRO jsinclude BLOCK %]
302
    [% INCLUDE 'calendar.inc' %]
303
    <script type="text/javascript">
304
        function changeRemovedDateTrStatus() {
305
            var Cellvalue = $("input[name='Cellvalue']:checked").val();
306
            if(Cellvalue == "deleteditems") {
307
                $("#removeddatetr").show();
308
                $("input[value='deleteditems.timestamp']").prop('disabled', false);
309
                $("#deldateFrom").prop('disabled', false);
310
                $("#deldateTo").prop('disabled', false);
311
            } else {
312
                $("#removeddatetr").hide();
313
                $("input[value='deleteditems.timestamp']").prop('disabled', true).prop('checked', false);
314
                $("#deldateFrom").prop('disabled', true).val('');
315
                $("#deldateTo").prop('disabled', true).val('');
316
            }
317
        }
318
319
        $(document).ready(function() {
320
            $('#acqdateFrom, #deldateFrom')
321
              .datepicker('option', 'onSelect', function(selectedDate) {
322
                var id = $(this).attr('id').replace('From', 'To');
323
                $('#' + id).datepicker('option', 'minDate', selectedDate);
324
              });
325
            $('#acqdateTo, #deldateTo')
326
              .datepicker('option', 'onSelect', function(selectedDate) {
327
                var id = $(this).attr('id').replace('To', 'From');
328
                $('#' + id).datepicker('option', 'maxDate', selectedDate);
329
              });
330
331
            $("input[name='Cellvalue']").change(function() {
332
                changeRemovedDateTrStatus();
333
            });
334
            changeRemovedDateTrStatus();
335
        });
336
    </script>
337
[% END %]
338
335
[% INCLUDE 'intranet-bottom.inc' %]
339
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt (-18 / +24 lines)
Lines 1-26 Link Here
1
[% SET footerjs = 1 %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Reports &rsaquo; Guided reports &rsaquo; Dictionary</title>
3
<title>Koha &rsaquo; Reports &rsaquo; Guided reports &rsaquo; Dictionary</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'calendar.inc' %]
5
<style type="text/css">fieldset.rows table { clear: none; margin: 0;}</style>
5
<style type="text/css">fieldset.rows table { clear: none; margin: 0;}</style>
6
<script type="text/javascript">
7
    var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this dictionary definition? This cannot be undone.");
8
9
    $(document).ready(function() {
10
        $("#delete").on("click",function(){
11
            return confirmDelete(MSG_CONFIRM_DELETE);
12
        });
13
14
        $("#date_range").change(function(){
15
            $("input#from").parents('li').show();
16
        });
17
        $("#all_dates").change(function(){
18
            $("input#from").parents('li').hide();
19
        });
20
        $("#all_dates").click().change();
21
    });
22
</script>
23
</head>
6
</head>
7
24
<body id="rep_dictionary" class="rep">
8
<body id="rep_dictionary" class="rep">
25
[% INCLUDE 'header.inc' %]
9
[% INCLUDE 'header.inc' %]
26
[% INCLUDE 'circ-search.inc' %]
10
[% INCLUDE 'circ-search.inc' %]
Lines 284-287 Link Here
284
[% INCLUDE 'guided-reports-view.inc' %]
268
[% INCLUDE 'guided-reports-view.inc' %]
285
</div>
269
</div>
286
</div>
270
</div>
271
272
[% MACRO jsinclude BLOCK %]
273
    [% INCLUDE 'calendar.inc' %]
274
    <script type="text/javascript">
275
        var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this dictionary definition? This cannot be undone.");
276
277
        $(document).ready(function() {
278
            $("#delete").on("click",function(){
279
                return confirmDelete(MSG_CONFIRM_DELETE);
280
            });
281
282
            $("#date_range").change(function(){
283
                $("input#from").parents('li').show();
284
            });
285
            $("#all_dates").change(function(){
286
                $("input#from").parents('li').hide();
287
            });
288
            $("#all_dates").click().change();
289
        });
290
    </script>
291
[% END %]
292
287
[% INCLUDE 'intranet-bottom.inc' %]
293
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-247 / +249 lines)
Lines 1-6 Link Here
1
[% USE KohaDates %]
1
[% USE KohaDates %]
2
[% USE Koha %]
2
[% USE Koha %]
3
3
[% SET footerjs = 1 %]
4
[%- BLOCK area_name -%]
4
[%- BLOCK area_name -%]
5
    [%- SWITCH area -%]
5
    [%- SWITCH area -%]
6
        [%- CASE 'CIRC' -%]Circulation
6
        [%- CASE 'CIRC' -%]Circulation
Lines 29-35 Link Here
29
[%- END -%]</title>
29
[%- END -%]</title>
30
30
31
[% INCLUDE 'doc-head-close.inc' %]
31
[% INCLUDE 'doc-head-close.inc' %]
32
[% INCLUDE 'calendar.inc' %]
33
<style type="text/css">
32
<style type="text/css">
34
    #sql { width: 90%; height: 9em;}
33
    #sql { width: 90%; height: 9em;}
35
    #update_sql .modal-dialog { width: 80%; }
34
    #update_sql .modal-dialog { width: 80%; }
Lines 40-273 Link Here
40
    .show_sql { font-family: monospace; }
39
    .show_sql { font-family: monospace; }
41
</style>
40
</style>
42
[% IF ( saved1 ) %]
41
[% IF ( saved1 ) %]
43
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
42
    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
44
<script type="text/javascript" src="[% interface %]/lib/jsdiff/jsdiff.min.js"></script>
45
[% INCLUDE 'datatables.inc' %]
46
[% END %]
47
48
<script type="text/javascript">
49
//<![CDATA[
50
var group_subgroups = {};
51
[% FOREACH group IN groups_with_subgroups %]
52
    var gid = "[% group.id %]"
53
    group_subgroups[gid] = new Array();
54
    [% FOREACH subgroup IN group.subgroups %]
55
        var sgid = "[% subgroup.id %]";
56
        var sgname = "[% subgroup.name %]";
57
        group_subgroups[gid].push([sgid, sgname]);
58
    [% END %]
59
[% END %]
60
61
function load_group_subgroups () {
62
    var group = $("#group_select").val();
63
    var sg = $("#subgroup");
64
    $(sg).find('option[value!=""]').each(function() {
65
        $(this).remove();
66
    });
67
    $(sg).hide();
68
    if (group) {
69
        var select = $(sg).find('select')[0];
70
        $.each( group_subgroups[group], function(index, value) {
71
            $('<option value="' + value[0] + '">' + value[1] + '</option>').appendTo(select);
72
        } );
73
        $("#subgroup, #subgroup *").show();
74
    }
75
}
76
77
$(document).ready(function(){
78
    $('#limit').change(function() {
79
        $('#limitselect').submit();
80
    });
81
82
$(".goback").on("click",function(e){
83
    e.preventDefault();
84
    window.history.back();
85
});
86
87
$("#addColumn").on("click",function(){
88
    addColumn();
89
});
90
91
$("#delColumn").on("click",function(){
92
    delColumn();
93
});
94
95
[% IF (saved1) %]
96
    var rtable = $("#table_reports").dataTable($.extend(true, {}, dataTablesDefaults, {
97
        'iDisplayLength': [% Koha.Preference('NumSavedReports') %],
98
        'bAutoWidth': false,
99
        'sPaginationType': 'four_button',
100
        'aaSorting': [[ 1, "asc" ]],
101
        'aoColumnDefs': [
102
            { 'bSortable': false, 'bSearchable':false, 'aTargets': [0, -1] },
103
            { 'bSearchable': false, 'aTargets': [3] },
104
            { "aTargets": [ 1, 2 ], "sType": "natural"  },
105
            { "sType": "title-string", "aTargets" : [ "title-string" ] }
106
        ],
107
        'oLanguage': {
108
            'sZeroRecords': _("No matching reports found")
109
        }
110
    }));
111
112
    var rtabs = $("#tabs").tabs();
113
    rtabs.on("tabsactivate", function(e, ui) {
114
        $("#subgroup_filter option").each(function() {
115
            if($(this).val().length > 0) {
116
                $(this).remove();
117
            }
118
        });
119
        rtable.fnFilter('', 4);
120
        rtable.fnFilter('', 5);
121
        rtable.fnSetColumnVis(4, true);
122
        rtable.fnSetColumnVis(5, true);
123
124
        var g_id = $(ui.newTab).children().attr('id');
125
        var g_name = $(ui.newTab).text();
126
        if ( g_name == _("All") ) {
127
            g_id = "";
128
            g_name = "";
129
        }
130
131
        if (g_id && g_id.length > 0) {
132
            rtable.fnFilter('^' + g_name + '$', 4, true, true, true, false);
133
            rtable.fnSetColumnVis(4, false);
134
            for(var i in group_subgroups[g_id]) {
135
                $("#subgroup_filter").append(
136
                    '<option value="' + group_subgroups[g_id][i][0] + '">'
137
                    + group_subgroups[g_id][i][1] + '</option>'
138
                );
139
            }
140
            $("#subgroup_filter_block").show();
141
        } else {
142
            $("#subgroup_filter_block").hide();
143
        }
144
    });
145
    $("#subgroup_filter_block").hide();
146
147
    $("#subgroup_filter").change(function() {
148
        var selected = $(this).find('option:selected');
149
        var sg_id = $(selected).val();
150
        var sg_name = $(selected).text();
151
        if (sg_id.length > 0) {
152
            rtable.fnFilter('^' + sg_name + '$', 5, true, true, true, false);
153
            rtable.fnSetColumnVis(5, false);
154
        } else {
155
            rtable.fnFilter('', 5);
156
            rtable.fnSetColumnVis(5, true);
157
        }
158
    });
159
160
    $("#reports_form").submit(function(){
161
        var checkedItems = $("input[name=ids]:checked");
162
        if ($(checkedItems).size() == 0) {
163
            alert(_("You must select one or more reports to delete"));
164
            return false;
165
        }
166
        $(checkedItems).parents('tr').addClass("warn");
167
        if( confirm(_("Are you sure you want to delete the selected reports?")) ) {
168
            return true;
169
        } else {
170
            $(checkedItems).parents('tr').removeClass("warn");
171
            return false;
172
        }
173
    });
174
175
    $("body").on("click", ".update_sql", function(e){
176
        e.preventDefault();
177
        var ltitle = $(this).text();
178
        var report_id = $(this).data("report_id");
179
        var page = $(this).attr("href");
180
        $("#update_sql .modal-body").load(page + " div", function(){
181
            var diff1 = $("#col1 .show_sql").text();
182
            var diff2 = $("#col2 .show_sql").text();
183
            var diffs = diffString( escape(diff1), escape(diff2) );
184
            $("#col1 .show_sql,#col2 .show_sql").html(diffs);
185
        });
186
        $('#update_sql').modal('show');
187
        $("#update_sql_button").attr("href", "/cgi-bin/koha/reports/guided_reports.pl?phase=Use saved&op=convert&report_id=" + report_id);
188
    });
189
190
    $("#update_sql").on("hidden.bs.modal", function(){
191
        $("#update_sql_label").html("");
192
        $("#update_sql .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
193
    });
194
[% END %]
43
[% END %]
195
196
[% IF ( showsql ) %]
197
    $("#sql").focus(function() {
198
        $(this).select();
199
    });
200
[% END %]
201
202
    $(".toggle_sql").click(function(){
203
        $("#sql_output").toggle();
204
        $("#toggle_sql_hid").toggle();
205
        $("#toggle_sql_vis").toggle();
206
    });
207
208
    $("#table_reports").delegate(".confirmdelete", 'click', function(){
209
        $(this).parents('tr').attr("class","warn");
210
        if(confirm(_("Are you sure you want to delete this saved report?"))){
211
            return true;
212
        } else {
213
            $(this).parents('tr').attr("class","");
214
            return false;
215
        }
216
    });
217
218
[% IF (create || editsql || save) %]
219
    $("#select_group").change(function() {
220
        if($(this).prop('checked')) {
221
            $("#group_input").prop('disabled', true);
222
            $("#groupdesc_input").prop('disabled', true);
223
            $("#group_select").prop('disabled', false);
224
            if ($("#group_select").val().length > 0) {
225
                $("#select_subgroup").prop('checked', true);
226
                $("#select_subgroup").change();
227
                $("#subgroup, #subgroup *").show();
228
            } else {
229
                $("#subgroup").hide();
230
            }
231
        }
232
    });
233
    $("#create_group").change(function() {
234
        if($(this).prop('checked')) {
235
            $("#group_input").prop('disabled', false);
236
            $("#groupdesc_input").prop('disabled', false);
237
            $("#group_select").prop('disabled', true);
238
            $("#create_subgroup").prop('checked', true).change();
239
            $("#subgroup_select").hide();
240
            $("#subgroup input[type='radio']").hide();
241
            $("#subgroup label[for]").hide();
242
            $("#subgroup_input").show();
243
            $("#subgroupdesc_input").show();
244
            $("#subgroup").show();
245
        }
246
    });
247
    $("#select_subgroup").change(function() {
248
        if($(this).prop('checked')) {
249
            $("#subgroup_select").prop('disabled', false);
250
            $("#subgroup_input").prop('disabled', true);
251
            $("#subgroupdesc_input").prop('disabled', true);
252
        }
253
    });
254
    $("#create_subgroup").change(function() {
255
        if($(this).prop('checked')) {
256
            $("#subgroup_input").prop('disabled', false);
257
            $("#subgroupdesc_input").prop('disabled', false);
258
            $("#subgroup_select").prop('disabled', true);
259
        }
260
    });
261
    $("#select_group").change();
262
    $("#select_subgroup").change();
263
    $("#group_select").on("change",function(){
264
        load_group_subgroups();
265
    });
266
[% END %]
267
});
268
//]]>
269
</script>
270
</head>
44
</head>
45
271
<body id="rep_guided_reports_start" class="rep">
46
<body id="rep_guided_reports_start" class="rep">
272
[% INCLUDE 'header.inc' %]
47
[% INCLUDE 'header.inc' %]
273
[% INCLUDE 'circ-search.inc' %]
48
[% INCLUDE 'circ-search.inc' %]
Lines 1138-1163 Sub report:<select name="subreport"> Link Here
1138
[% INCLUDE 'guided-reports-view.inc' %]
913
[% INCLUDE 'guided-reports-view.inc' %]
1139
</div>
914
</div>
1140
</div>
915
</div>
1141
<script type="text/javascript">
1142
//<![CDATA[
1143
function addColumn() {
1144
    $("#availableColumns option:selected").clone().appendTo("#selectedColumns").attr("selected", "selected");
1145
}
1146
function delColumn() {
1147
    $("#selectedColumns option:selected").remove();
1148
}
1149
$("#column_submit").submit(function() {
1150
    if ($("#selectedColumns option").size() < 1) {
1151
        alert(_("No columns selected!"));
1152
        return false;
1153
    }
1154
    $("#selectedColumns option").attr("selected", "selected");  // Select everything still in #selectedColumns
1155
    return true;
1156
});
1157
//]]>
1158
</script>
1159
[% INCLUDE 'intranet-bottom.inc' %]
1160
916
917
[% MACRO jsinclude BLOCK %]
918
    [% INCLUDE 'calendar.inc' %]
919
    [% IF ( saved1 ) %]
920
        [% INCLUDE 'datatables.inc' %]
921
    [% END %]
922
    <script type="text/javascript">
923
        var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this report? This cannot be undone.");
924
        var group_subgroups = {};
925
        [% FOREACH group IN groups_with_subgroups %]
926
            var gid = "[% group.id %]"
927
            group_subgroups[gid] = new Array();
928
            [% FOREACH subgroup IN group.subgroups %]
929
                var sgid = "[% subgroup.id %]";
930
                var sgname = "[% subgroup.name %]";
931
                group_subgroups[gid].push([sgid, sgname]);
932
            [% END %]
933
        [% END %]
934
935
        function load_group_subgroups () {
936
            var group = $("#group_select").val();
937
            var sg = $("#subgroup");
938
            $(sg).find('option[value!=""]').each(function() {
939
                $(this).remove();
940
            });
941
            $(sg).hide();
942
            if (group) {
943
                var select = $(sg).find('select')[0];
944
                $.each( group_subgroups[group], function(index, value) {
945
                    $('<option value="' + value[0] + '">' + value[1] + '</option>').appendTo(select);
946
                } );
947
                $("#subgroup, #subgroup *").show();
948
            }
949
        }
950
951
        $(document).ready(function(){
952
            $('#limit').change(function() {
953
                $('#limitselect').submit();
954
            });
955
956
            $(".goback").on("click",function(e){
957
                e.preventDefault();
958
                window.history.back();
959
            });
960
961
            $("#addColumn").on("click",function(){
962
                addColumn();
963
            });
964
965
            $("#delColumn").on("click",function(){
966
                delColumn();
967
            });
968
969
            [% IF (saved1) %]
970
                var rtable = $("#table_reports").dataTable($.extend(true, {}, dataTablesDefaults, {
971
                    'iDisplayLength': [% Koha.Preference('NumSavedReports') %],
972
                    'bAutoWidth': false,
973
                    'sPaginationType': 'four_button',
974
                    'aaSorting': [[ 1, "asc" ]],
975
                    'aoColumnDefs': [
976
                        { 'bSortable': false, 'bSearchable':false, 'aTargets': [0, -1] },
977
                        { 'bSearchable': false, 'aTargets': [3] },
978
                        { "aTargets": [ 1, 2 ], "sType": "natural"  },
979
                        { "sType": "title-string", "aTargets" : [ "title-string" ] }
980
                    ],
981
                    'oLanguage': {
982
                        'sZeroRecords': _("No matching reports found")
983
                    }
984
                }));
985
986
                var rtabs = $("#tabs").tabs();
987
                rtabs.on("tabsactivate", function(e, ui) {
988
                    $("#subgroup_filter option").each(function() {
989
                        if($(this).val().length > 0) {
990
                            $(this).remove();
991
                        }
992
                    });
993
                    rtable.fnFilter('', 4);
994
                    rtable.fnFilter('', 5);
995
                    rtable.fnSetColumnVis(4, true);
996
                    rtable.fnSetColumnVis(5, true);
997
998
                    var g_id = $(ui.newTab).children().attr('id');
999
                    var g_name = $(ui.newTab).text();
1000
                    if ( g_name == _("All") ) {
1001
                        g_id = "";
1002
                        g_name = "";
1003
                    }
1004
1005
                    if (g_id && g_id.length > 0) {
1006
                        rtable.fnFilter('^' + g_name + '$', 4, true, true, true, false);
1007
                        rtable.fnSetColumnVis(4, false);
1008
                        for(var i in group_subgroups[g_id]) {
1009
                            $("#subgroup_filter").append(
1010
                                '<option value="' + group_subgroups[g_id][i][0] + '">'
1011
                                + group_subgroups[g_id][i][1] + '</option>'
1012
                            );
1013
                        }
1014
                        $("#subgroup_filter_block").show();
1015
                    } else {
1016
                        $("#subgroup_filter_block").hide();
1017
                    }
1018
                });
1019
                $("#subgroup_filter_block").hide();
1020
1021
                $("#subgroup_filter").change(function() {
1022
                    var selected = $(this).find('option:selected');
1023
                    var sg_id = $(selected).val();
1024
                    var sg_name = $(selected).text();
1025
                    if (sg_id.length > 0) {
1026
                        rtable.fnFilter('^' + sg_name + '$', 5, true, true, true, false);
1027
                        rtable.fnSetColumnVis(5, false);
1028
                    } else {
1029
                        rtable.fnFilter('', 5);
1030
                        rtable.fnSetColumnVis(5, true);
1031
                    }
1032
                });
1033
1034
                $("#reports_form").submit(function(){
1035
                    var checkedItems = $("input[name=ids]:checked");
1036
                    if ($(checkedItems).size() == 0) {
1037
                        alert(_("You must select one or more reports to delete"));
1038
                        return false;
1039
                    }
1040
                    $(checkedItems).parents('tr').addClass("warn");
1041
                    if( confirm(_("Are you sure you want to delete the selected reports?")) ) {
1042
                        return true;
1043
                    } else {
1044
                        $(checkedItems).parents('tr').removeClass("warn");
1045
                        return false;
1046
                    }
1047
                });
1048
1049
                $("body").on("click", ".update_sql", function(e){
1050
                    e.preventDefault();
1051
                    var ltitle = $(this).text();
1052
                    var report_id = $(this).data("report_id");
1053
                    var page = $(this).attr("href");
1054
                    $("#update_sql .modal-body").load(page + " div", function(){
1055
                        var diff1 = $("#col1 .show_sql").text();
1056
                        var diff2 = $("#col2 .show_sql").text();
1057
                        var diffs = diffString( escape(diff1), escape(diff2) );
1058
                        $("#col1 .show_sql,#col2 .show_sql").html(diffs);
1059
                    });
1060
                    $('#update_sql').modal('show');
1061
                    $("#update_sql_button").attr("href", "/cgi-bin/koha/reports/guided_reports.pl?phase=Use saved&op=convert&report_id=" + report_id);
1062
                });
1063
1064
                $("#update_sql").on("hidden.bs.modal", function(){
1065
                    $("#update_sql_label").html("");
1066
                    $("#update_sql .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
1067
                });
1068
            [% END %]
1069
1070
            [% IF ( showsql ) %]
1071
                $("#sql").focus(function() {
1072
                    $(this).select();
1073
                });
1074
            [% END %]
1075
1076
                $(".toggle_sql").click(function(){
1077
                    $("#sql_output").toggle();
1078
                    $("#toggle_sql_hid").toggle();
1079
                    $("#toggle_sql_vis").toggle();
1080
                });
1081
1082
                $("#table_reports").delegate(".confirmdelete", 'click', function(){
1083
                    $(this).parents('tr').attr("class","warn");
1084
                    if(confirm(_("Are you sure you want to delete this saved report?"))){
1085
                        return true;
1086
                    } else {
1087
                        $(this).parents('tr').attr("class","");
1088
                        return false;
1089
                    }
1090
                });
1091
1092
            [% IF (create || editsql || save) %]
1093
                $("#select_group").change(function() {
1094
                    if($(this).prop('checked')) {
1095
                        $("#group_input").prop('disabled', true);
1096
                        $("#groupdesc_input").prop('disabled', true);
1097
                        $("#group_select").prop('disabled', false);
1098
                        if ($("#group_select").val().length > 0) {
1099
                            $("#select_subgroup").prop('checked', true);
1100
                            $("#select_subgroup").change();
1101
                            $("#subgroup, #subgroup *").show();
1102
                        } else {
1103
                            $("#subgroup").hide();
1104
                        }
1105
                    }
1106
                });
1107
                $("#create_group").change(function() {
1108
                    if($(this).prop('checked')) {
1109
                        $("#group_input").prop('disabled', false);
1110
                        $("#groupdesc_input").prop('disabled', false);
1111
                        $("#group_select").prop('disabled', true);
1112
                        $("#create_subgroup").prop('checked', true).change();
1113
                        $("#subgroup_select").hide();
1114
                        $("#subgroup input[type='radio']").hide();
1115
                        $("#subgroup label[for]").hide();
1116
                        $("#subgroup_input").show();
1117
                        $("#subgroupdesc_input").show();
1118
                        $("#subgroup").show();
1119
                    }
1120
                });
1121
                $("#select_subgroup").change(function() {
1122
                    if($(this).prop('checked')) {
1123
                        $("#subgroup_select").prop('disabled', false);
1124
                        $("#subgroup_input").prop('disabled', true);
1125
                        $("#subgroupdesc_input").prop('disabled', true);
1126
                    }
1127
                });
1128
                $("#create_subgroup").change(function() {
1129
                    if($(this).prop('checked')) {
1130
                        $("#subgroup_input").prop('disabled', false);
1131
                        $("#subgroupdesc_input").prop('disabled', false);
1132
                        $("#subgroup_select").prop('disabled', true);
1133
                    }
1134
                });
1135
                $("#select_group").change();
1136
                $("#select_subgroup").change();
1137
                $("#group_select").on("change",function(){
1138
                    load_group_subgroups();
1139
                });
1140
            [% END %]
1141
            $(".delete").on("click",function(){
1142
                return confirmDelete(MSG_CONFIRM_DELETE);
1143
            });
1144
        });
1145
        function addColumn() {
1146
            $("#availableColumns option:selected").clone().appendTo("#selectedColumns").attr("selected", "selected");
1147
        }
1148
        function delColumn() {
1149
            $("#selectedColumns option:selected").remove();
1150
        }
1151
        $("#column_submit").submit(function() {
1152
            if ($("#selectedColumns option").size() < 1) {
1153
                alert(_("No columns selected!"));
1154
                return false;
1155
            }
1156
            $("#selectedColumns option").attr("selected", "selected");  // Select everything still in #selectedColumns
1157
            return true;
1158
        });
1159
    </script>
1160
[% END %]
1161
1162
[% INCLUDE 'intranet-bottom.inc' %]
1161
1163
1162
[% BLOCK group_and_subgroup_selection %]
1164
[% BLOCK group_and_subgroup_selection %]
1163
    <li id="group">
1165
    <li id="group">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_avg_stats.tt (-34 / +38 lines)
Lines 1-42 Link Here
1
[% USE Branches %]
1
[% USE Branches %]
2
[% SET footerjs = 1 %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Reports &rsaquo; Average loan time</title>
4
<title>Koha &rsaquo; Reports &rsaquo; Average loan time</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'calendar.inc' %]
6
<script type="text/javascript">
7
//<![CDATA[
8
        $(document).ready(function() {
9
        // http://jqueryui.com/demos/datepicker/#date-range
10
        var dates = $( "#from, #to" ).datepicker({
11
            changeMonth: true,
12
            numberOfMonths: 1,
13
            onSelect: function( selectedDate ) {
14
                var option = this.id == "from" ? "minDate" : "maxDate",
15
                    instance = $( this ).data( "datepicker" );
16
                    date = $.datepicker.parseDate(
17
                        instance.settings.dateFormat ||
18
                        $.datepicker._defaults.dateFormat,
19
                        selectedDate, instance.settings );
20
                dates.not( this ).datepicker( "option", option, date );
21
            }
22
        });
23
        var datesRO = $( "#fromRO, #toRO" ).datepicker({
24
            changeMonth: true,
25
            numberOfMonths: 1,
26
            onSelect: function( selectedDate ) {
27
                var option = this.id == "fromRO" ? "minDate" : "maxDate",
28
                    instance = $( this ).data( "datepicker" );
29
                    date = $.datepicker.parseDate(
30
                        instance.settings.dateFormat ||
31
                        $.datepicker._defaults.dateFormat,
32
                        selectedDate, instance.settings );
33
                datesRO.not( this ).datepicker( "option", option, date );
34
            }
35
        });
36
        });
37
//]]>
38
</script>
39
</head>
6
</head>
7
40
<body id="rep_issues_avg_stats" class="rep">
8
<body id="rep_issues_avg_stats" class="rep">
41
[% INCLUDE 'header.inc' %]
9
[% INCLUDE 'header.inc' %]
42
[% INCLUDE 'cat-search.inc' %]
10
[% INCLUDE 'cat-search.inc' %]
Lines 261-264 Link Here
261
[% INCLUDE 'reports-menu.inc' %]
229
[% INCLUDE 'reports-menu.inc' %]
262
</div>
230
</div>
263
</div>
231
</div>
232
233
[% MACRO jsinclude BLOCK %]
234
    [% INCLUDE 'calendar.inc' %]
235
    <script type="text/javascript">
236
        $(document).ready(function() {
237
            // http://jqueryui.com/demos/datepicker/#date-range
238
            var dates = $( "#from, #to" ).datepicker({
239
                changeMonth: true,
240
                numberOfMonths: 1,
241
                onSelect: function( selectedDate ) {
242
                    var option = this.id == "from" ? "minDate" : "maxDate",
243
                        instance = $( this ).data( "datepicker" );
244
                        date = $.datepicker.parseDate(
245
                            instance.settings.dateFormat ||
246
                            $.datepicker._defaults.dateFormat,
247
                            selectedDate, instance.settings );
248
                    dates.not( this ).datepicker( "option", option, date );
249
                }
250
            });
251
            var datesRO = $( "#fromRO, #toRO" ).datepicker({
252
                changeMonth: true,
253
                numberOfMonths: 1,
254
                onSelect: function( selectedDate ) {
255
                    var option = this.id == "fromRO" ? "minDate" : "maxDate",
256
                        instance = $( this ).data( "datepicker" );
257
                        date = $.datepicker.parseDate(
258
                            instance.settings.dateFormat ||
259
                            $.datepicker._defaults.dateFormat,
260
                            selectedDate, instance.settings );
261
                    datesRO.not( this ).datepicker( "option", option, date );
262
                }
263
            });
264
        });
265
    </script>
266
[% END %]
267
264
[% INCLUDE 'intranet-bottom.inc' %]
268
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt (-1 / +7 lines)
Lines 1-12 Link Here
1
[% USE Branches %]
1
[% USE Branches %]
2
[% SET footerjs = 1 %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Reports &rsaquo; Circulation statistics [% IF ( do_it ) %]&rsaquo; Results[% END %]</title>
4
<title>Koha &rsaquo; Reports &rsaquo; Circulation statistics [% IF ( do_it ) %]&rsaquo; Results[% END %]</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'calendar.inc' %]
6
<style type="text/css">
6
<style type="text/css">
7
	.sql {display:none;}
7
	.sql {display:none;}
8
</style>
8
</style>
9
</head>
9
</head>
10
10
<body id="rep_issues_stats" class="rep">
11
<body id="rep_issues_stats" class="rep">
11
[% INCLUDE 'header.inc' %]
12
[% INCLUDE 'header.inc' %]
12
[% INCLUDE 'cat-search.inc' %]
13
[% INCLUDE 'cat-search.inc' %]
Lines 371-374 Link Here
371
[% INCLUDE 'reports-menu.inc' %]
372
[% INCLUDE 'reports-menu.inc' %]
372
</div>
373
</div>
373
</div>
374
</div>
375
376
[% MACRO jsinclude BLOCK %]
377
    [% INCLUDE 'calendar.inc' %]
378
[% END %]
379
374
[% INCLUDE 'intranet-bottom.inc' %]
380
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt (-21 / +24 lines)
Lines 2-37 Link Here
2
[% USE Branches %]
2
[% USE Branches %]
3
[% USE ColumnsSettings %]
3
[% USE ColumnsSettings %]
4
[% USE KohaDates %]
4
[% USE KohaDates %]
5
[% SET footerjs = 1 %]
5
[% INCLUDE 'doc-head-open.inc' %]
6
[% INCLUDE 'doc-head-open.inc' %]
6
<title>Koha &rsaquo; Reports &rsaquo; Lost items</title>
7
<title>Koha &rsaquo; Reports &rsaquo; Lost items</title>
7
[% INCLUDE 'doc-head-close.inc' %]
8
[% INCLUDE 'doc-head-close.inc' %]
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 'datatables.inc' %]
10
[% INCLUDE 'columns_settings.inc' %]
11
<script type='text/javascript'>
12
//<![CDATA[
13
    $(document).ready(function() {
14
        var columns_settings = [% ColumnsSettings.GetColumns( 'reports', 'lostitems', 'lostitems-table', 'json' ) %];
15
        var lostitems_table = KohaTable("#lostitems-table", {
16
            "dom": 'B<"clearfix">t',
17
            "aaSorting": [],
18
            "aoColumnDefs": [
19
                { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
20
                { "sType": "title-string", "aTargets" : [ "title-string" ] }
21
            ],
22
            "bPaginate": false,
23
        }, columns_settings);
24
25
    });
26
//]]>
27
</script>
28
29
</head>
10
</head>
11
30
<body id="rep_itemslost" class="rep">
12
<body id="rep_itemslost" class="rep">
31
[% INCLUDE 'header.inc' %]
13
[% INCLUDE 'header.inc' %]
32
[% INCLUDE 'cat-search.inc' %]
14
[% INCLUDE 'cat-search.inc' %]
33
15
34
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>[% IF ( get_items ) %] &rsaquo; <a href="/cgi-bin/koha/reports/itemslost.pl">Lost Items</a> &rsaquo; Results[% ELSE %] &rsaquo; Lost items[% END %]</div>
16
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>[% IF ( get_items ) %] &rsaquo; <a href="/cgi-bin/koha/reports/itemslost.pl">Lost items</a> &rsaquo; Results[% ELSE %] &rsaquo; Lost items[% END %]</div>
35
17
36
<div id="doc3" class="yui-t2">
18
<div id="doc3" class="yui-t2">
37
   
19
   
Lines 135-138 Link Here
135
[% INCLUDE 'reports-menu.inc' %]
117
[% INCLUDE 'reports-menu.inc' %]
136
</div>
118
</div>
137
</div>
119
</div>
120
121
[% MACRO jsinclude BLOCK %]
122
    [% INCLUDE 'datatables.inc' %]
123
    [% INCLUDE 'columns_settings.inc' %]
124
    <script type='text/javascript'>
125
        $(document).ready(function() {
126
            var columns_settings = [% ColumnsSettings.GetColumns( 'reports', 'lostitems', 'lostitems-table', 'json' ) %];
127
            var lostitems_table = KohaTable("#lostitems-table", {
128
                "dom": 'B<"clearfix">t',
129
                "aaSorting": [],
130
                "aoColumnDefs": [
131
                    { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
132
                    { "sType": "title-string", "aTargets" : [ "title-string" ] }
133
                ],
134
                "bPaginate": false,
135
            }, columns_settings);
136
137
        });
138
    </script>
139
[% END %]
140
138
[% INCLUDE 'intranet-bottom.inc' %]
141
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemtypes.tt (-12 / +18 lines)
Lines 1-28 Link Here
1
[% USE Branches %]
1
[% USE Branches %]
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; Reports &rsaquo; Catalog by item types</title>
5
<title>Koha &rsaquo; Reports &rsaquo; Catalog by item types</title>
5
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
6
[% IF ( do_it ) %]
7
[% IF ( do_it ) %]
7
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
8
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
8
[% INCLUDE 'datatables.inc' %]
9
<script type="text/javascript">
10
//<![CDATA[
11
$(document).ready(function(){
12
    $("#itemtypest").dataTable($.extend(true, {}, dataTablesDefaults, {
13
        "sDom": 't',
14
        "bPaginate": false
15
    }));
16
});
17
//]]>
18
</script>
19
[% END %]
9
[% END %]
20
</head>
10
</head>
11
21
<body id="rep_itemtypes" class="rep">
12
<body id="rep_itemtypes" class="rep">
22
[% INCLUDE 'header.inc' %]
13
[% INCLUDE 'header.inc' %]
23
[% INCLUDE 'cat-search.inc' %]
14
[% INCLUDE 'cat-search.inc' %]
24
15
25
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>[% IF ( do_it ) %] &rsaquo; <a href="/cgi-bin/koha/reports/manager.pl?report_name=itemtypes">Catalog by Item Type</a> &rsaquo; Results[% ELSE %] &rsaquo; Catalog by item type[% END %]</div>
16
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>[% IF ( do_it ) %] &rsaquo; <a href="/cgi-bin/koha/reports/manager.pl?report_name=itemtypes">Catalog by item type</a> &rsaquo; Results[% ELSE %] &rsaquo; Catalog by item type[% END %]</div>
26
17
27
<div id="doc3" class="yui-t2">
18
<div id="doc3" class="yui-t2">
28
   
19
   
Lines 84-87 $(document).ready(function(){ Link Here
84
[% INCLUDE 'reports-menu.inc' %]
75
[% INCLUDE 'reports-menu.inc' %]
85
</div>
76
</div>
86
</div>
77
</div>
78
79
[% MACRO jsinclude BLOCK %]
80
    [% IF ( do_it ) %]
81
        [% INCLUDE 'datatables.inc' %]
82
        <script type="text/javascript">
83
            $(document).ready(function(){
84
                $("#itemtypest").dataTable($.extend(true, {}, dataTablesDefaults, {
85
                    "sDom": 't',
86
                    "bPaginate": false
87
                }));
88
            });
89
        </script>
90
    [% END %]
91
[% END %]
92
87
[% INCLUDE 'intranet-bottom.inc' %]
93
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt (-17 / +23 lines)
Lines 1-4 Link Here
1
[% USE Price %]
1
[% USE Price %]
2
[% SET footerjs = 1 %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Reports &rsaquo; Orders by fund</title>
4
<title>Koha &rsaquo; Reports &rsaquo; Orders by fund</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
Lines 8-30 Link Here
8
[% INCLUDE 'cat-search.inc' %]
9
[% INCLUDE 'cat-search.inc' %]
9
10
10
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
11
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
11
[% INCLUDE 'datatables.inc' %]
12
<script type="text/javascript">
13
    $(document).ready( function () {
14
        $('#funds').DataTable($.extend(true, {}, dataTablesDefaults,{"sPaginationType": "full_numbers"}));
15
16
        showallbudgets = $('#budgetfilter').html();
17
        $('#budgetfilter .b_inactive').remove();
18
19
        $('#showbudgets').click(function(){
20
            if ($(this).is(":checked")) {
21
                $('#budgetfilter').html(showallbudgets);
22
            } else {
23
                $('#budgetfilter .b_inactive').remove();
24
            }
25
        });
26
    } );
27
</script>
28
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>[% IF ( get_orders ) %] &rsaquo; <a href="/cgi-bin/koha/reports/orders_by_fund.pl">Orders by fund</a> &rsaquo; Results[% ELSE %] &rsaquo; Orders by fund[% END %]</div>
12
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>[% IF ( get_orders ) %] &rsaquo; <a href="/cgi-bin/koha/reports/orders_by_fund.pl">Orders by fund</a> &rsaquo; Results[% ELSE %] &rsaquo; Orders by fund[% END %]</div>
29
13
30
<div id="doc3" class="yui-t2">
14
<div id="doc3" class="yui-t2">
Lines 159-162 Link Here
159
[% INCLUDE 'reports-menu.inc' %]
143
[% INCLUDE 'reports-menu.inc' %]
160
</div>
144
</div>
161
</div>
145
</div>
146
147
[% MACRO jsinclude BLOCK %]
148
    [% INCLUDE 'datatables.inc' %]
149
    <script type="text/javascript">
150
        $(document).ready( function () {
151
            $('#funds').DataTable($.extend(true, {}, dataTablesDefaults,{"sPaginationType": "full_numbers"}));
152
153
            showallbudgets = $('#budgetfilter').html();
154
            $('#budgetfilter .b_inactive').remove();
155
156
            $('#showbudgets').click(function(){
157
                if ($(this).is(":checked")) {
158
                    $('#budgetfilter').html(showallbudgets);
159
                } else {
160
                    $('#budgetfilter .b_inactive').remove();
161
                }
162
            });
163
        } );
164
    </script>
165
166
[% END %]
167
162
[% INCLUDE 'intranet-bottom.inc' %]
168
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reserves_stats.tt (-78 / +82 lines)
Lines 1-84 Link Here
1
[% USE Branches %]
1
[% USE Branches %]
2
[% SET footerjs = 1 %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Reports &rsaquo; Holds statistics [% IF ( do_it ) %]&rsaquo; Results[% END %]</title>
4
<title>Koha &rsaquo; Reports &rsaquo; Holds statistics [% IF ( do_it ) %]&rsaquo; Results[% END %]</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'calendar.inc' %]
6
<script type="text/javascript">
7
//<![CDATA[
8
        $(document).ready(function() {
9
            // http://jqueryui.com/demos/datepicker/#date-range
10
            var dates = $( "#filter_reservedate_begin, #filter_reservedate_end" ).datepicker({
11
                changeMonth: true,
12
                numberOfMonths: 1,
13
                onSelect: function( selectedDate ) {
14
                    var option = this.id == "filter_reservedate_begin" ? "minDate" : "maxDate",
15
                        instance = $( this ).data( "datepicker" );
16
                        date = $.datepicker.parseDate(
17
                            instance.settings.dateFormat ||
18
                            $.datepicker._defaults.dateFormat,
19
                            selectedDate, instance.settings );
20
                    dates.not( this ).datepicker( "option", option, date );
21
                }
22
            });
23
            var datesND = $( "#filter_notificationdate_begin, #filter_notificationdate_end" ).datepicker({
24
                changeMonth: true,
25
                numberOfMonths: 1,
26
                onSelect: function( selectedDate ) {
27
                    var option = this.id == "filter_notificationdate_begin" ? "minDate" : "maxDate",
28
                        instance = $( this ).data( "datepicker" );
29
                        date = $.datepicker.parseDate(
30
                            instance.settings.dateFormat ||
31
                            $.datepicker._defaults.dateFormat,
32
                            selectedDate, instance.settings );
33
                    datesND.not( this ).datepicker( "option", option, date );
34
                }
35
            });
36
            var datesRD = $( "#filter_reminderdate_begin, #filter_reminderdate_end" ).datepicker({
37
                changeMonth: true,
38
                numberOfMonths: 1,
39
                onSelect: function( selectedDate ) {
40
                    var option = this.id == "filter_reminderdate_begin" ? "minDate" : "maxDate",
41
                        instance = $( this ).data( "datepicker" );
42
                        date = $.datepicker.parseDate(
43
                            instance.settings.dateFormat ||
44
                            $.datepicker._defaults.dateFormat,
45
                            selectedDate, instance.settings );
46
                    datesRD.not( this ).datepicker( "option", option, date );
47
                }
48
            });
49
            var datesWD = $( "#filter_waitingdate_begin, #filter_waitingdate_end" ).datepicker({
50
                changeMonth: true,
51
                numberOfMonths: 1,
52
                onSelect: function( selectedDate ) {
53
                    var option = this.id == "filter_waitingdate_begin" ? "minDate" : "maxDate",
54
                        instance = $( this ).data( "datepicker" );
55
                        date = $.datepicker.parseDate(
56
                            instance.settings.dateFormat ||
57
                            $.datepicker._defaults.dateFormat,
58
                            selectedDate, instance.settings );
59
                    datesWD.not( this ).datepicker( "option", option, date );
60
                }
61
            });
62
            var datesCD = $( "#filter_cancellationdate_begin, #filter_cancellationdate_end" ).datepicker({
63
                changeMonth: true,
64
                numberOfMonths: 1,
65
                onSelect: function( selectedDate ) {
66
                    var option = this.id == "filter_cancellationdate_begin" ? "minDate" : "maxDate",
67
                        instance = $( this ).data( "datepicker" );
68
                        date = $.datepicker.parseDate(
69
                            instance.settings.dateFormat ||
70
                            $.datepicker._defaults.dateFormat,
71
                            selectedDate, instance.settings );
72
                    datesCD.not( this ).datepicker( "option", option, date );
73
                }
74
            });
75
        });
76
//]]>
77
</script>
78
<style type="text/css">
6
<style type="text/css">
79
	.sql {display:none;}
7
	.sql {display:none;}
80
</style>
8
</style>
81
</head>
9
</head>
10
82
<body id="rep_reserve_stats" class="rep">
11
<body id="rep_reserve_stats" class="rep">
83
[% INCLUDE 'header.inc' %]
12
[% INCLUDE 'header.inc' %]
84
[% INCLUDE 'cat-search.inc' %]
13
[% INCLUDE 'cat-search.inc' %]
Lines 166-172 Link Here
166
				</td>
95
				</td>
167
             </tr>
96
             </tr>
168
             <tr>
97
             <tr>
169
                <td>Hold Date</td>
98
                <td>Hold date</td>
170
                <td><input type="radio" name="Line" value="reservedate" /></td>
99
                <td><input type="radio" name="Line" value="reservedate" /></td>
171
                <td><input type="radio" name="Column" value="reservedate" /></td>
100
                <td><input type="radio" name="Column" value="reservedate" /></td>
172
                <td><label for="filter_reservedate_begin">From</label> <input type="text"  size="10" id="filter_reservedate_begin" name="filter_reservedate_begin" />
101
                <td><label for="filter_reservedate_begin">From</label> <input type="text"  size="10" id="filter_reservedate_begin" name="filter_reservedate_begin" />
Lines 174-180 Link Here
174
                    </td>
103
                    </td>
175
                </tr>
104
                </tr>
176
            <tr>
105
            <tr>
177
                <td>Notification Date</td>
106
                <td>Notification date</td>
178
                <td><input type="radio" name="Line" value="notificationdate" /></td>
107
                <td><input type="radio" name="Line" value="notificationdate" /></td>
179
                <td><input type="radio" name="Column" value="notificationdate" /></td>
108
                <td><input type="radio" name="Column" value="notificationdate" /></td>
180
                <td><label for="filter_notificationdate_begin">From</label> <input type="text"  size="10" id="filter_notificationdate_begin" name="filter_notificationdate_begin" />
109
                <td><label for="filter_notificationdate_begin">From</label> <input type="text"  size="10" id="filter_notificationdate_begin" name="filter_notificationdate_begin" />
Lines 182-188 Link Here
182
                    </td>
111
                    </td>
183
             </tr>
112
             </tr>
184
            <tr>
113
            <tr>
185
                <td>Reminder Date</td>
114
                <td>Reminder date</td>
186
                <td><input type="radio" name="Line" value="reminderdate" /></td>
115
                <td><input type="radio" name="Line" value="reminderdate" /></td>
187
                <td><input type="radio" name="Column" value="reminderdate" /></td>
116
                <td><input type="radio" name="Column" value="reminderdate" /></td>
188
                <td><label for="filter_reminderdate_begin">From</label> <input type="text"  size="10" id="filter_reminderdate_begin" name="Filter" />
117
                <td><label for="filter_reminderdate_begin">From</label> <input type="text"  size="10" id="filter_reminderdate_begin" name="Filter" />
Lines 190-196 Link Here
190
                    </td>
119
                    </td>
191
             </tr>
120
             </tr>
192
            <tr>
121
            <tr>
193
                <td>Waiting Date</td>
122
                <td>Waiting date</td>
194
                <td><input type="radio" name="Line" value="waitingdate" /></td>
123
                <td><input type="radio" name="Line" value="waitingdate" /></td>
195
                <td><input type="radio" name="Column" value="waitingdate" /></td>
124
                <td><input type="radio" name="Column" value="waitingdate" /></td>
196
                <td><label for="filter_waitingdate_begin">From</label> <input type="text"  size="10" id="filter_waitingdate_begin" name="filter_waitingdate_begin" />
125
                <td><label for="filter_waitingdate_begin">From</label> <input type="text"  size="10" id="filter_waitingdate_begin" name="filter_waitingdate_begin" />
Lines 198-204 Link Here
198
                    </td>
127
                    </td>
199
             </tr>
128
             </tr>
200
			 <tr>
129
			 <tr>
201
                <td>Cancellation Date</td>
130
                <td>Cancellation date</td>
202
                <td><input type="radio" name="Line" value="cancellationdate" /></td>
131
                <td><input type="radio" name="Line" value="cancellationdate" /></td>
203
                <td><input type="radio" name="Column" value="cancellationdate" /></td>
132
                <td><input type="radio" name="Column" value="cancellationdate" /></td>
204
                <td><label for="filter_cancellationdate_begin">From</label> <input type="text"  size="10" id="filter_cancellationdate_begin" name="filter_cancellationdate_begin" />
133
                <td><label for="filter_cancellationdate_begin">From</label> <input type="text"  size="10" id="filter_cancellationdate_begin" name="filter_cancellationdate_begin" />
Lines 363-366 Link Here
363
[% INCLUDE 'reports-menu.inc' %]
292
[% INCLUDE 'reports-menu.inc' %]
364
</div>
293
</div>
365
</div>
294
</div>
295
296
[% MACRO jsinclude BLOCK %]
297
    [% INCLUDE 'calendar.inc' %]
298
    <script type="text/javascript">
299
        $(document).ready(function() {
300
            // http://jqueryui.com/demos/datepicker/#date-range
301
            var dates = $( "#filter_reservedate_begin, #filter_reservedate_end" ).datepicker({
302
                changeMonth: true,
303
                numberOfMonths: 1,
304
                onSelect: function( selectedDate ) {
305
                    var option = this.id == "filter_reservedate_begin" ? "minDate" : "maxDate",
306
                        instance = $( this ).data( "datepicker" );
307
                        date = $.datepicker.parseDate(
308
                            instance.settings.dateFormat ||
309
                            $.datepicker._defaults.dateFormat,
310
                            selectedDate, instance.settings );
311
                    dates.not( this ).datepicker( "option", option, date );
312
                }
313
            });
314
            var datesND = $( "#filter_notificationdate_begin, #filter_notificationdate_end" ).datepicker({
315
                changeMonth: true,
316
                numberOfMonths: 1,
317
                onSelect: function( selectedDate ) {
318
                    var option = this.id == "filter_notificationdate_begin" ? "minDate" : "maxDate",
319
                        instance = $( this ).data( "datepicker" );
320
                        date = $.datepicker.parseDate(
321
                            instance.settings.dateFormat ||
322
                            $.datepicker._defaults.dateFormat,
323
                            selectedDate, instance.settings );
324
                    datesND.not( this ).datepicker( "option", option, date );
325
                }
326
            });
327
            var datesRD = $( "#filter_reminderdate_begin, #filter_reminderdate_end" ).datepicker({
328
                changeMonth: true,
329
                numberOfMonths: 1,
330
                onSelect: function( selectedDate ) {
331
                    var option = this.id == "filter_reminderdate_begin" ? "minDate" : "maxDate",
332
                        instance = $( this ).data( "datepicker" );
333
                        date = $.datepicker.parseDate(
334
                            instance.settings.dateFormat ||
335
                            $.datepicker._defaults.dateFormat,
336
                            selectedDate, instance.settings );
337
                    datesRD.not( this ).datepicker( "option", option, date );
338
                }
339
            });
340
            var datesWD = $( "#filter_waitingdate_begin, #filter_waitingdate_end" ).datepicker({
341
                changeMonth: true,
342
                numberOfMonths: 1,
343
                onSelect: function( selectedDate ) {
344
                    var option = this.id == "filter_waitingdate_begin" ? "minDate" : "maxDate",
345
                        instance = $( this ).data( "datepicker" );
346
                        date = $.datepicker.parseDate(
347
                            instance.settings.dateFormat ||
348
                            $.datepicker._defaults.dateFormat,
349
                            selectedDate, instance.settings );
350
                    datesWD.not( this ).datepicker( "option", option, date );
351
                }
352
            });
353
            var datesCD = $( "#filter_cancellationdate_begin, #filter_cancellationdate_end" ).datepicker({
354
                changeMonth: true,
355
                numberOfMonths: 1,
356
                onSelect: function( selectedDate ) {
357
                    var option = this.id == "filter_cancellationdate_begin" ? "minDate" : "maxDate",
358
                        instance = $( this ).data( "datepicker" );
359
                        date = $.datepicker.parseDate(
360
                            instance.settings.dateFormat ||
361
                            $.datepicker._defaults.dateFormat,
362
                            selectedDate, instance.settings );
363
                    datesCD.not( this ).datepicker( "option", option, date );
364
                }
365
            });
366
        });
367
    </script>
368
[% END %]
369
366
[% INCLUDE 'intranet-bottom.inc' %]
370
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/serials_stats.tt (-14 / +18 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; Reports &rsaquo; Serials subscriptions stats</title>
5
<title>Koha &rsaquo; Reports &rsaquo; Serials subscriptions stats</title>
5
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
Lines 7-27 Link Here
7
	.sql {display: none;}
8
	.sql {display: none;}
8
</style>
9
</style>
9
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
10
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
10
[% INCLUDE 'datatables.inc' %]
11
<script type="text/javascript">
12
	//<![CDATA[
13
		$(document).ready(function() {
14
            $("#resulttable").dataTable($.extend(true, {}, dataTablesDefaults, {
15
                "sDom": 't',
16
                "bPaginate": false,
17
                "aoColumns": [
18
                    null,{ "sType": "anti-the" },null,null,null,{ "sType": "title-string" },{ "sType": "title-string" },null
19
                ],
20
            }));
21
    	});
22
	//]]>
23
</script>
24
</head>
11
</head>
12
25
<body id="rep_serials_stats" class="rep">
13
<body id="rep_serials_stats" class="rep">
26
[% INCLUDE 'header.inc' %]
14
[% INCLUDE 'header.inc' %]
27
[% INCLUDE 'cat-search.inc' %]
15
[% INCLUDE 'cat-search.inc' %]
Lines 146-149 Link Here
146
[% INCLUDE 'reports-menu.inc' %]
134
[% INCLUDE 'reports-menu.inc' %]
147
</div>
135
</div>
148
</div>
136
</div>
137
138
[% MACRO jsinclude BLOCK %]
139
[% INCLUDE 'datatables.inc' %]
140
    <script type="text/javascript">
141
        $(document).ready(function() {
142
            $("#resulttable").dataTable($.extend(true, {}, dataTablesDefaults, {
143
                "sDom": 't',
144
                "bPaginate": false,
145
                "aoColumns": [
146
                    null,{ "sType": "anti-the" },null,null,null,{ "sType": "title-string" },{ "sType": "title-string" },null
147
                ],
148
            }));
149
        });
150
    </script>
151
[% END %]
152
149
[% INCLUDE 'intranet-bottom.inc' %]
153
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reviews/reviewswaiting.tt (-1 / +6 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; Tools &rsaquo; Comments &rsaquo; [% IF ( status ) %] Approved comments[% ELSE %] Comments awaiting moderation[% END %]</title>
3
<title>Koha &rsaquo; Tools &rsaquo; Comments &rsaquo; [% IF ( status ) %] Approved comments[% ELSE %] Comments awaiting moderation[% END %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
Lines 72-75 Link Here
72
[% INCLUDE 'tools-menu.inc' %]
73
[% INCLUDE 'tools-menu.inc' %]
73
</div>
74
</div>
74
</div>
75
</div>
76
77
[% MACRO jsinclude BLOCK %]
78
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu.js"></script>
79
[% END %]
80
75
[% INCLUDE 'intranet-bottom.inc' %]
81
[% INCLUDE 'intranet-bottom.inc' %]
76
- 

Return to bug 19663