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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt (-38 / +40 lines)
Lines 15-20 Link Here
15
	[% END %]
15
	[% END %]
16
</title>
16
</title>
17
[% INCLUDE 'doc-head-close.inc' %]
17
[% INCLUDE 'doc-head-close.inc' %]
18
<style>
19
fieldset.rows label.viewlog {
20
    float: none;
21
    padding-left: 15px;
22
    font-weight: normal;
23
}
24
</style>
18
</head>
25
</head>
19
26
20
<body id="tools_viewlog" class="tools">
27
<body id="tools_viewlog" class="tools">
Lines 101-141 Link Here
101
                            [% UNLESS src == "circ" %]
108
                            [% UNLESS src == "circ" %]
102
                                <li>
109
                                <li>
103
                                    <label for="modules">Modules:</label>
110
                                    <label for="modules">Modules:</label>
104
                                    <select name="modules" id="modules" multiple="multiple">
111
                                    [% UNLESS modules %]
105
                                        [% UNLESS modules %]
112
                                        <label for="moduleALL" class="viewlog">All <input type="checkbox" id="moduleALL" name="modules" value="" checked="checked"></label>
106
                                            <option value="" selected="selected">All</option>
113
                                    [% ELSE %]
114
                                        <label for="moduleALL" class="viewlog">All <input type="checkbox" id="moduleALL" name="modules" value=""></label>
115
                                    [% END %]
116
                                    [% FOREACH modx IN [ 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'HOLDS' 'ILL' 'CIRCULATION' 'LETTER' 'FINES' 'SYSTEMPREFERENCE' 'CRONJOBS', 'REPORTS' ] %]
117
                                        [% IF modules.grep(modx).size %]
118
                                            <label for="module[% modx | html %]" class="viewlog">[% PROCESS translate_log_module module=modx %] <input type="checkbox" id="module[% modx | html %]" name="modules" value="[% modx | html %]" checked="checked"></label>
107
                                        [% ELSE %]
119
                                        [% ELSE %]
108
                                            <option value="">All</option>
120
                                            <label for="module[% modx | html %]" class="viewlog">[% PROCESS translate_log_module module=modx %] <input type="checkbox" id="module[% modx | html %]" name="modules" value="[% modx | html %]"></label>
109
                                        [% END %]
110
                                        [% FOREACH modx IN [ 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'HOLDS' 'ILL' 'CIRCULATION' 'LETTER' 'FINES' 'SYSTEMPREFERENCE' 'CRONJOBS', 'REPORTS' ] %]
111
                                            [% IF modules.grep(modx).size %]
112
                                                <option value="[% modx | html %]" selected="selected">[% PROCESS translate_log_module module=modx %]</option>
113
                                            [% ELSE %]
114
                                                <option value="[% modx | html %]">[% PROCESS translate_log_module module=modx %]</option>
115
                                            [% END %]
116
                                        [% END %]
121
                                        [% END %]
117
                                    </select>
122
                                    [% END %]
118
                                </li>
123
                                </li>
119
                            [% ELSE %]
124
                            [% ELSE %]
120
                                <input type="hidden" name="modules" value="MEMBERS" />
125
                                <input type="hidden" name="modules" value="MEMBERS" />
121
                            [% END %]
126
                            [% END %]
122
                            <li>
127
                            <li>
123
                                <label for="actions">Actions:</label>
128
                                <label for="actions">Actions:</label>
124
                                <select name="actions" id="actions" multiple="multiple">
129
                                [% UNLESS actions %]
125
                                    [% UNLESS actions %]
130
                                    <label for="actionALL" class="viewlog">All <input type="checkbox" id="actionALL" name="actions" value="" checked="checked"></label>
126
                                        <option value="" selected="selected">All</option>
131
                                [% ELSE %]
127
                                    [% ELSE %]
132
                                    <label for="actionALL" class="viewlog">All <input type="checkbox" id="actionALL" name="actions" value=""></label>
128
                                        <option value="">All</option>
133
                                [% END %]
129
                                    [% END %]
130
134
131
                                    [% FOREACH actx IN [ 'ADD' 'DELETE' 'MODIFY' 'ISSUE' 'RETURN' 'RENEW' 'CREATE' 'CANCEL' 'SUSPEND' 'RESUME' 'ADDCIRCMESSAGE' 'DELCIRCMESSAGE' 'STATUS_CHANGE' 'CHANGE PASS' 'Run' ] %]
135
                                [% FOREACH actx IN [ 'ADD' 'DELETE' 'MODIFY' 'ISSUE' 'RETURN' 'RENEW' 'CREATE' 'CANCEL' 'SUSPEND' 'RESUME' 'ADDCIRCMESSAGE' 'DELCIRCMESSAGE' 'STATUS_CHANGE' 'CHANGE PASS' 'Run' ] %]
132
                                        [% IF actions.grep(actx).size %]
136
                                    [% IF actions.grep(actx).size %]
133
                                            <option value="[% actx | html %]" selected="selected">[% PROCESS translate_log_action action=actx %]</option>
137
                                        <label for="action[% actx | html %]" class="viewlog">[% PROCESS translate_log_action action=actx %] <input type="checkbox" id="action[% actx | html %]" name="actions" value="[% actx | html %]" checked="checked"></label>
134
                                        [% ELSE %]
138
                                    [% ELSE %]
135
                                                <option value="[% actx | html %]">[% PROCESS translate_log_action action=actx %]</option>
139
                                        <label for="action[% actx | html %]" class="viewlog">[% PROCESS translate_log_action action=actx %] <input type="checkbox" id="action[% actx | html %]" name="actions" value="[% actx | html %]"></label>
136
                                        [% END %]
137
                                    [% END %]
140
                                    [% END %]
138
                                </select>
141
                                [% END %]
139
                            </li>
142
                            </li>
140
                            <li>
143
                            <li>
141
                                [% IF src == 'circ' %]
144
                                [% IF src == 'circ' %]
Lines 152-172 Link Here
152
							</li>
155
							</li>
153
                            <li>
156
                            <li>
154
                                <label for="interfaces">Interface:</label>
157
                                <label for="interfaces">Interface:</label>
155
                                <select name="interfaces" id="interfaces" multiple="multiple">
158
                                [% UNLESS interfaces %]
156
                                    [% UNLESS interfaces %]
159
                                    <label for="interfaceALL" class="viewlog">All <input type="checkbox" id="interfaceALL" name="interfaces" value="" checked="checked"></label>
157
                                        <option value="" selected="selected">All</option>
160
                                [% ELSE %]
158
                                    [% ELSE %]
161
                                    <label for="interfaceALL" class="viewlog">All <input type="checkbox" id="interfaceALL" name="interfaces" value=""></label>
159
                                        <option value="">All</option>
162
                                [% END %]
160
                                    [% END %]
161
163
162
                                    [% FOREACH interf IN [ 'INTRANET' 'OPAC' 'SIP' 'COMMANDLINE' ] %]
164
                                [% FOREACH interf IN [ 'INTRANET' 'OPAC' 'SIP' 'COMMANDLINE' ] %]
163
                                        [% IF interfaces.grep(interf).size %]
165
                                    [% IF interfaces.grep(interf).size %]
164
                                            <option value="[% interf | html %]" selected="selected">[% PROCESS translate_log_interface log_interface=interf %]</option>
166
                                        <label for="interface[% interf | html %]" class="viewlog">[% PROCESS translate_log_interface log_interface=interf %] <input type="checkbox" id="interface[% interf | html %]" name="interfaces" value="" checked="checked"></label>
165
                                        [% ELSE %]
167
                                    [% ELSE %]
166
                                            <option value="[% interf | html %]">[% PROCESS translate_log_interface log_interface=interf %]</option>
168
                                        <label for="interface[% interf | html %]" class="viewlog">[% PROCESS translate_log_interface log_interface=interf %] <input type="checkbox" id="interface[% interf | html %]" name="interfaces" value=""></label>
167
                                        [% END %]
168
                                    [% END %]
169
                                    [% END %]
169
                                </select>
170
                                [% END %]
170
                            </li>
171
                            </li>
171
							<li>
172
							<li>
172
                                <label for="from"> Display from: </label> <input type="text" size="10" id="from" name="from" value="[% datefrom | html %]" class="datepickerfrom" />
173
                                <label for="from"> Display from: </label> <input type="text" size="10" id="from" name="from" value="[% datefrom | html %]" class="datepickerfrom" />
Lines 313-318 Link Here
313
        [% INCLUDE 'str/members-menu.inc' %]
314
        [% INCLUDE 'str/members-menu.inc' %]
314
        [% Asset.js("js/members-menu.js") | $raw %]
315
        [% Asset.js("js/members-menu.js") | $raw %]
315
    [% END %]
316
    [% END %]
317
    [% Asset.js("js/viewlog.js") | $raw %]
316
[% END %]
318
[% END %]
317
319
318
[% INCLUDE 'intranet-bottom.inc' %]
320
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/viewlog.js (-1 / +58 lines)
Line 0 Link Here
0
- 
1
function tickAll(section){
2
    $("input[name='" + section + "']").prop("checked", true);
3
    $("#" + section.slice(0,-1) + "ALL").prop("checked", true);
4
    $("input[name='" + section + "']").prop("disabled", true);
5
    $("#" + section.slice(0,-1) + "ALL").prop("disabled", false);
6
}
7
8
function untickAll(section){
9
    $("input[name='" + section + "']").prop("checked", false);
10
    $("input[name='" + section + "']").prop("disabled", false);
11
}
12
13
$(document).ready(function(){
14
    tickAll('modules');
15
    $("#moduleALL").change(function(){
16
        if ( this.checked == true ){
17
            tickAll('modules');
18
        } else {
19
            untickAll('modules');
20
        }
21
22
    });
23
    $("input[name='modules']").change(function(){
24
        if ( $("input[name='modules']:checked").length == $("input[name='modules']").length - 1 ){
25
            tickAll('modules');
26
        }
27
    });
28
29
    tickAll('actions');
30
    $("#actionALL").change(function(){
31
        if ( this.checked == true ){
32
            tickAll('actions');
33
        } else {
34
            untickAll('actions');
35
        }
36
37
    });
38
    $("input[name='actions']").change(function(){
39
        if ( $("input[name='actions']:checked").length == $("input[name='actions']").length - 1 ){
40
            tickAll('actions');
41
        }
42
    });
43
44
    tickAll('interfaces');
45
    $("#interfaceALL").change(function(){
46
        if ( this.checked == true ){
47
            tickAll('interfaces');
48
        } else {
49
            untickAll('interfaces');
50
        }
51
52
    });
53
    $("input[name='interfaces']").change(function(){
54
        if ( $("input[name='interfaces']:checked").length == $("input[name='interfaces']").length - 1 ){
55
            tickAll('interfaces');
56
        }
57
    });
58
});

Return to bug 24982