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

(-)a/koha-tmpl/intranet-tmpl/prog/css/preferences.css (-16 / +26 lines)
Lines 27-39 a.collapse-textarea { Link Here
27
    font-weight: bold;
27
    font-weight: bold;
28
}
28
}
29
29
30
dl {
31
	margin-left : 1em;
32
}
33
dt {
34
	padding : .1em;
35
}
36
37
h2 {
30
h2 {
38
    background-color: #e6f0f2;
31
    background-color: #e6f0f2;
39
    font-size: 150%;
32
    font-size: 150%;
Lines 126-153 span.overridden { Link Here
126
    background: #FFF none;
119
    background: #FFF none;
127
    border: 0;
120
    border: 0;
128
    color: #004D99;
121
    color: #004D99;
129
    font-weight: normal;
130
    font-size: 100%;
122
    font-size: 100%;
123
    hyphens:  auto;
131
    margin: 0;
124
    margin: 0;
132
    padding: .2em .5em;
125
    padding: .2em .5em;
133
    text-align: right;
126
    text-align: right;
134
    text-decoration: underline;
135
}
127
}
136
128
137
dl.name-row {
129
#menu ul ul {
138
    border-bottom: 1px solid #EEE;
130
    padding-left: 0;
139
    margin: .3em 0;
140
    margin-left: 1em;
141
    padding: .3em 0;
142
}
131
}
143
132
144
.name-cell label {
133
.name-row label {
145
    font-weight: bold;
134
    font-weight: bold;
146
    font-size: 130%;
135
    font-size: 130%;
147
    color: #336699;
136
    color: #336699;
148
}
137
}
149
138
139
dl {
140
    margin-left : 1em;
141
}
142
143
dt {
144
    padding : .1em;
145
}
146
147
150
dd {
148
dd {
149
    border-bottom: 1px solid #EEE;
150
    line-height: 2em;
151
    margin-bottom:  1em;
152
    max-width: 75em;
153
    padding: 0 0 1em 3em;
151
    text-indent: 0;
154
    text-indent: 0;
152
    margin-left: 3em;
155
}
156
157
dd li {
158
    line-height: 1.5em;
159
}
160
161
.modified-warning {
162
    color: #006600;
153
}
163
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc (-18 / +173 lines)
Lines 1-20 Link Here
1
<div id="menu">
1
<div id="menu">
2
<ul>
2
    <ul>
3
[% IF ( acquisitions ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Acquisitions" href="/cgi-bin/koha/admin/preferences.pl?tab=acquisitions">Acquisitions</a></li>
3
        [% IF ( acquisitions ) %]
4
[% IF ( admin ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Administration" href="/cgi-bin/koha/admin/preferences.pl?tab=admin">Administration</a></li>
4
            <li class="active">
5
[% IF ( authorities ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Authority Control" href="/cgi-bin/koha/admin/preferences.pl?tab=authorities">Authorities</a></li>
5
                <a title="Acquisitions" href="/cgi-bin/koha/admin/preferences.pl?tab=acquisitions">Acquisitions</a>
6
[% IF ( cataloguing ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Cataloging" href="/cgi-bin/koha/admin/preferences.pl?tab=cataloguing">Cataloging</a></li>
6
                [% PROCESS subtabs  %]
7
[% IF ( circulation ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Circulation" href="/cgi-bin/koha/admin/preferences.pl?tab=circulation">Circulation</a></li>
7
        [% ELSE %]
8
[% IF ( enhanced_content ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Enhanced content settings" href="/cgi-bin/koha/admin/preferences.pl?tab=enhanced_content">Enhanced content</a></li>
8
            <li>
9
[% IF ( i18n_l10n ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Internationalization and localization" href="/cgi-bin/koha/admin/preferences.pl?tab=i18n_l10n">I18N/L10N</a></li>
9
                <a title="Acquisitions" href="/cgi-bin/koha/admin/preferences.pl?tab=acquisitions">Acquisitions</a>
10
[% IF ( local_use ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/admin/systempreferences.pl">Local use</a></li>
10
        [% END %]
11
[% IF ( logs ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Transaction logs" href="/cgi-bin/koha/admin/preferences.pl?tab=logs">Logs</a></li>
11
        </li>
12
[% IF ( opac ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Online Public Access Catalog" href="/cgi-bin/koha/admin/preferences.pl?tab=opac">OPAC</a></li>
12
13
[% IF ( patrons ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Patrons" href="/cgi-bin/koha/admin/preferences.pl?tab=patrons">Patrons</a></li>
13
        [% IF ( admin ) %]
14
[% IF ( searching ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Searching" href="/cgi-bin/koha/admin/preferences.pl?tab=searching">Searching</a></li>
14
            <li class="active">
15
[% IF ( serials ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Serials" href="/cgi-bin/koha/admin/preferences.pl?tab=serials">Serials</a></li>
15
                <a title="Administration" href="/cgi-bin/koha/admin/preferences.pl?tab=admin">Administration</a>
16
[% IF ( staff_client ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Staff client" href="/cgi-bin/koha/admin/preferences.pl?tab=staff_client">Staff client</a></li>
16
                [% PROCESS subtabs  %]
17
[% IF ( tools ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Tools" href="/cgi-bin/koha/admin/preferences.pl?tab=tools">Tools</a></li>
17
        [% ELSE %]
18
[% IF ( web_services ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Web services" href="/cgi-bin/koha/admin/preferences.pl?tab=web_services">Web services</a></li>
18
            <li>
19
</ul>
19
                <a title="Administration" href="/cgi-bin/koha/admin/preferences.pl?tab=admin">Administration</a>
20
        [% END %]
21
        </li>
22
23
        [% IF ( authorities ) %]
24
            <li class="active">
25
                <a title="Authority Control" href="/cgi-bin/koha/admin/preferences.pl?tab=authorities">Authorities</a>
26
                [% PROCESS subtabs  %]
27
        [% ELSE %]
28
            <li>
29
                <a title="Authority Control" href="/cgi-bin/koha/admin/preferences.pl?tab=authorities">Authorities</a>
30
        [% END %]
31
        </li>
32
33
        [% IF ( cataloguing ) %]
34
            <li class="active">
35
                <a title="Cataloging" href="/cgi-bin/koha/admin/preferences.pl?tab=cataloguing">Cataloging</a>
36
                [% PROCESS subtabs  %]
37
        [% ELSE %]
38
            <li>
39
                <a title="Cataloging" href="/cgi-bin/koha/admin/preferences.pl?tab=cataloguing">Cataloging</a>
40
        [% END %]
41
        </li>
42
43
        [% IF ( circulation ) %]
44
            <li class="active">
45
                <a title="Circulation" href="/cgi-bin/koha/admin/preferences.pl?tab=circulation">Circulation</a>
46
                [% PROCESS subtabs  %]
47
        [% ELSE %]
48
            <li>
49
                <a title="Circulation" href="/cgi-bin/koha/admin/preferences.pl?tab=circulation">Circulation</a>
50
        [% END %]
51
        </li>
52
53
        [% IF ( enhanced_content ) %]
54
            <li class="active">
55
                <a title="Enhanced content settings" href="/cgi-bin/koha/admin/preferences.pl?tab=enhanced_content">Enhanced content</a>
56
                [% PROCESS subtabs  %]
57
        [% ELSE %]
58
            <li>
59
                <a title="Enhanced content settings" href="/cgi-bin/koha/admin/preferences.pl?tab=enhanced_content">Enhanced content</a>
60
        [% END %]
61
        </li>
62
63
        [% IF ( i18n_l10n ) %]
64
            <li class="active">
65
                <a title="Internationalization and localization" href="/cgi-bin/koha/admin/preferences.pl?tab=i18n_l10n">I18N/L10N</a>
66
                [% PROCESS subtabs  %]
67
        [% ELSE %]
68
            <li>
69
                <a title="Internationalization and localization" href="/cgi-bin/koha/admin/preferences.pl?tab=i18n_l10n">I18N/L10N</a>
70
        [% END %]
71
        </li>
72
73
        [% IF ( local_use ) %]
74
            <li class="active">
75
                <a href="/cgi-bin/koha/admin/systempreferences.pl">Local use</a>
76
                [% PROCESS subtabs  %]
77
        [% ELSE %]
78
            <li>
79
            <a href="/cgi-bin/koha/admin/systempreferences.pl">Local use</a>
80
        [% END %]
81
        </li>
82
83
        [% IF ( logs ) %]
84
            <li class="active">
85
                <a title="Transaction logs" href="/cgi-bin/koha/admin/preferences.pl?tab=logs">Logs</a>
86
                [% PROCESS subtabs  %]
87
        [% ELSE %]
88
            <li>
89
                <a title="Transaction logs" href="/cgi-bin/koha/admin/preferences.pl?tab=logs">Logs</a>
90
        [% END %]
91
        </li>
92
93
        [% IF ( opac ) %]
94
            <li class="active">
95
                <a title="Online Public Access Catalog" href="/cgi-bin/koha/admin/preferences.pl?tab=opac">OPAC</a>
96
                [% PROCESS subtabs  %]
97
        [% ELSE %]
98
            <li>
99
                <a title="Online Public Access Catalog" href="/cgi-bin/koha/admin/preferences.pl?tab=opac">OPAC</a>
100
        [% END %]
101
        </li>
102
103
        [% IF ( patrons ) %]
104
            <li class="active">
105
                <a title="Patrons" href="/cgi-bin/koha/admin/preferences.pl?tab=patrons">Patrons</a>
106
                [% PROCESS subtabs  %]
107
        [% ELSE %]
108
            <li>
109
                <a title="Patrons" href="/cgi-bin/koha/admin/preferences.pl?tab=patrons">Patrons</a>
110
        [% END %]
111
        </li>
112
113
        [% IF ( searching ) %]
114
            <li class="active">
115
                <a title="Searching" href="/cgi-bin/koha/admin/preferences.pl?tab=searching">Searching</a>
116
                [% PROCESS subtabs  %]
117
        [% ELSE %]
118
            <li>
119
                <a title="Searching" href="/cgi-bin/koha/admin/preferences.pl?tab=searching">Searching</a>
120
        [% END %]
121
        </li>
122
123
        [% IF ( serials ) %]
124
            <li class="active">
125
                <a title="Serials" href="/cgi-bin/koha/admin/preferences.pl?tab=serials">Serials</a>
126
                [% PROCESS subtabs  %]
127
        [% ELSE %]
128
            <li>
129
                <a title="Serials" href="/cgi-bin/koha/admin/preferences.pl?tab=serials">Serials</a>
130
        [% END %]
131
        </li>
132
133
        [% IF ( staff_client ) %]
134
            <li class="active">
135
                <a title="Staff client" href="/cgi-bin/koha/admin/preferences.pl?tab=staff_client">Staff client</a>
136
                [% PROCESS subtabs  %]
137
        [% ELSE %]
138
            <li>
139
                <a title="Staff client" href="/cgi-bin/koha/admin/preferences.pl?tab=staff_client">Staff client</a>
140
        [% END %]
141
        </li>
142
143
        [% IF ( tools ) %]
144
            <li class="active">
145
                <a title="Tools" href="/cgi-bin/koha/admin/preferences.pl?tab=tools">Tools</a>
146
                [% PROCESS subtabs  %]
147
        [% ELSE %]
148
            <li>
149
                <a title="Tools" href="/cgi-bin/koha/admin/preferences.pl?tab=tools">Tools</a>
150
        [% END %]
151
        </li>
152
153
        [% IF ( web_services ) %]
154
            <li class="active">
155
                <a title="Web services" href="/cgi-bin/koha/admin/preferences.pl?tab=web_services">Web services</a>
156
                [% PROCESS subtabs  %]
157
        [% ELSE %]
158
            <li>
159
                <a title="Web services" href="/cgi-bin/koha/admin/preferences.pl?tab=web_services">Web services</a>
160
        [% END %]
161
        </li>
162
    </ul>
20
</div>
163
</div>
164
165
[% BLOCK subtabs %]
166
    [% FOREACH TAB IN TABS %]
167
        <ul>
168
            [% FOREACH LINE IN TAB.LINES %]
169
                [% IF ( LINE.is_group_title ) %]
170
                    <li><a class="pref_sublink" href="#[% LINE.title | html %]">[% LINE.title | html %]</a></li>
171
                [% END %]
172
            [% END %]
173
        </ul>
174
    [% END %]
175
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt (-7 / +6 lines)
Lines 36-50 Link Here
36
        <h1>You searched for: [% searchfield | html %]</h1>
36
        <h1>You searched for: [% searchfield | html %]</h1>
37
    [% END %]
37
    [% END %]
38
    [% IF ( searchfield && !search_not_found ) %]
38
    [% IF ( searchfield && !search_not_found ) %]
39
        <p>
39
        <div id="toolbar">
40
            Results in sections:
40
            Results in sections:
41
            [% FOREACH TAB IN TABS %]
41
            [% FOREACH TAB IN TABS %]
42
                <a href="#[% TAB.tab_title %]">[% TAB.tab_title %]</a>[% UNLESS ( loop.last ) %] &bull; [% END %]
42
                <a href="#[% TAB.tab_title %]">[% TAB.tab_title %]</a>[% UNLESS ( loop.last ) %] &bull; [% END %]
43
            [% END %]
43
            [% END %]
44
        </p>
44
             &bull; <label for="keyword_filter">Filter: <input type="text" size="10" name="keyword_filter" id="keyword_filter" /> <a href="#" id="clear_filter" style="display:none;"><i class="fa fa-remove"></i></a></label>
45
    [% END %]
45
        </div>
46
    [% IF ( searchfield ) %]
46
47
        <label for="keyword_filter">Filter: <input type="text" size="10" name="keyword_filter" id="keyword_filter" /> <a href="#" id="clear_filter" style="display:none;"><i class="fa fa-remove"></i></a></label>
48
    [% END %]
47
    [% END %]
49
    [% FOREACH TAB IN TABS %]
48
    [% FOREACH TAB IN TABS %]
50
    <div class="prefs-tab">
49
    <div class="prefs-tab">
Lines 54-60 Link Here
54
        [% UNLESS ( searchfield ) %]
53
        [% UNLESS ( searchfield ) %]
55
            <div id="toolbar">
54
            <div id="toolbar">
56
                <button class="save-all submit" type="submit">Save all [% TAB.tab_title | html %] preferences</button>
55
                <button class="save-all submit" type="submit">Save all [% TAB.tab_title | html %] preferences</button>
57
                <label for="keyword_filter">Filter: <input type="text" size="10" name="keyword_filter" id="keyword_filter" /> <a href="#" id="clear_filter" style="display:none;"><i class="fa fa-remove"></i></a></label>
56
                &bull; <label for="keyword_filter">Filter: <input type="text" size="10" name="keyword_filter" id="keyword_filter" /> <a href="#" id="clear_filter" style="display:none;"><i class="fa fa-remove"></i></a></label>
58
            </div>
57
            </div>
59
        [% END %]
58
        [% END %]
60
        <input type="hidden" name="op" value="save" />
59
        <input type="hidden" name="op" value="save" />
Lines 62-68 Link Here
62
        [% FOREACH LINE IN TAB.LINES %]
61
        [% FOREACH LINE IN TAB.LINES %]
63
            [% IF ( LINE.is_group_title ) %]
62
            [% IF ( LINE.is_group_title ) %]
64
                [% UNLESS ( loop.first ) %][% END %]
63
                [% UNLESS ( loop.first ) %][% END %]
65
                <h3 class="name-row">[% LINE.title | html %]</h3>
64
                <h3 id="[% LINE.title | html %]" class="name-row">[% LINE.title | html %]</h3>
66
                [% UNLESS ( loop.last ) %][% END %]
65
                [% UNLESS ( loop.last ) %][% END %]
67
            [% ELSE %]
66
            [% ELSE %]
68
                [% IF ( loop.first ) %][% END %]
67
                [% IF ( loop.first ) %][% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js (-11 / +10 lines)
Lines 1-6 Link Here
1
/* global KOHA MSG_MADE_CHANGES CodeMirror MSG_CLICK_TO_EXPAND MSG_CLICK_TO_COLLAPSE to_highlight search_jumped humanMsg MSG_NOTHING_TO_SAVE MSG_MODIFIED MSG_SAVING MSG_SAVED_PREFERENCE dataTablesDefaults */
1
/* global KOHA MSG_MADE_CHANGES CodeMirror to_highlight search_jumped humanMsg MSG_NOTHING_TO_SAVE MSG_MODIFIED MSG_SAVING MSG_SAVED_PREFERENCE MSG_FILTER_NOT_FOUND MSG_INVALID MSG_ALL_VALUE_WARN MSG_UPD_LOC_FORMAT_WARN */
2
// We can assume 'KOHA' exists, as we depend on KOHA.AJAX
3
2
3
// We can assume 'KOHA' exists, as we depend on KOHA.AJAX
4
KOHA.Preferences = {
4
KOHA.Preferences = {
5
    Save: function ( form ) {
5
    Save: function ( form ) {
6
        if ( ! $(form).valid() ) {
6
        if ( ! $(form).valid() ) {
Lines 17-23 KOHA.Preferences = { Link Here
17
                unserialized.push($(this));
17
                unserialized.push($(this));
18
            }
18
            }
19
        });
19
        });
20
        data = modified_prefs.serialize();
20
        var data = modified_prefs.serialize();
21
        $(unserialized).each(function(){
21
        $(unserialized).each(function(){
22
            data += '&' + $(this).attr('name') + '=';
22
            data += '&' + $(this).attr('name') + '=';
23
        });
23
        });
Lines 29-36 KOHA.Preferences = { Link Here
29
        KOHA.AJAX.Submit( {
29
        KOHA.AJAX.Submit( {
30
            data: data,
30
            data: data,
31
            url: '/cgi-bin/koha/svc/config/systempreferences/',
31
            url: '/cgi-bin/koha/svc/config/systempreferences/',
32
            success: function ( data ) { KOHA.Preferences.Success( form ) },
32
            success: function () { KOHA.Preferences.Success( form ); },
33
            complete: function () { KOHA.AJAX.MarkDone( $( form ).find( '.save-all' ) ) }
33
            complete: function () { KOHA.AJAX.MarkDone( $( form ).find( '.save-all' ) ); }
34
        } );
34
        } );
35
    },
35
    },
36
    Success: function ( form ) {
36
    Success: function ( form ) {
Lines 54-60 $( document ).ready( function () { Link Here
54
    function mark_modified() {
54
    function mark_modified() {
55
        $( this.form ).find( '.save-all' ).prop('disabled', false);
55
        $( this.form ).find( '.save-all' ).prop('disabled', false);
56
        $( this ).addClass( 'modified' );
56
        $( this ).addClass( 'modified' );
57
        var name_cell = $( this ).parents( '.name-row' ).find( '.name-cell' );
57
        var name_cell = $( this ).parent();
58
        if ( !name_cell.find( '.modified-warning' ).length )
58
        if ( !name_cell.find( '.modified-warning' ).length )
59
            name_cell.append( '<em class="modified-warning">('+MSG_MODIFIED+')</em>' );
59
            name_cell.append( '<em class="modified-warning">('+MSG_MODIFIED+')</em>' );
60
        KOHA.Preferences.Modified = true;
60
        KOHA.Preferences.Modified = true;
Lines 92-98 $( document ).ready( function () { Link Here
92
        }
92
        }
93
    };
93
    };
94
94
95
    $( '.prefs-tab .action .cancel' ).click( function () { KOHA.Preferences.Modified = false } );
95
    $( '.prefs-tab .action .cancel' ).click( function () { KOHA.Preferences.Modified = false; } );
96
96
97
    $( '.prefs-tab .save-all' ).prop('disabled', true).click( function () {
97
    $( '.prefs-tab .save-all' ).prop('disabled', true).click( function () {
98
        KOHA.Preferences.Save( this.form );
98
        KOHA.Preferences.Save( this.form );
Lines 142-149 $( document ).ready( function () { Link Here
142
    $(".name-row").mark( to_highlight );
142
    $(".name-row").mark( to_highlight );
143
143
144
    // Filtering by mark.js
144
    // Filtering by mark.js
145
    var keyword_filter = $("#keyword_filter"),
145
    var keyword_filter = $("#keyword_filter");
146
    context = $(".name-row");
146
    var context = $(".name-row");
147
    $("#clear_filter").on("click", function(e){
147
    $("#clear_filter").on("click", function(e){
148
        e.preventDefault();
148
        e.preventDefault();
149
        keyword_filter.val("").trigger("input");
149
        keyword_filter.val("").trigger("input");
Lines 160-166 $( document ).ready( function () { Link Here
160
                        $("#filter_empty").remove();
160
                        $("#filter_empty").remove();
161
                    }
161
                    }
162
                },
162
                },
163
                noMatch: function(term){
163
                noMatch: function(){
164
                    if( $("#filter_empty").length < 1 ){
164
                    if( $("#filter_empty").length < 1 ){
165
                        $("main").prepend("<div id=\"filter_empty\" class=\"dialog alert\">" + MSG_FILTER_NOT_FOUND + "</div>");
165
                        $("main").prepend("<div id=\"filter_empty\" class=\"dialog alert\">" + MSG_FILTER_NOT_FOUND + "</div>");
166
                    }
166
                    }
167
- 

Return to bug 20935