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 80-107 span.overridden { Link Here
80
    background: #FFF none;
73
    background: #FFF none;
81
    border: 0;
74
    border: 0;
82
    color: #004D99;
75
    color: #004D99;
83
    font-weight: normal;
84
    font-size: 100%;
76
    font-size: 100%;
77
    hyphens:  auto;
85
    margin: 0;
78
    margin: 0;
86
    padding: .2em .5em;
79
    padding: .2em .5em;
87
    text-align: right;
80
    text-align: right;
88
    text-decoration: underline;
89
}
81
}
90
82
91
dl.name-row {
83
#menu ul ul {
92
    border-bottom: 1px solid #EEE;
84
    padding-left: 0;
93
    margin: .3em 0;
94
    margin-left: 1em;
95
    padding: .3em 0;
96
}
85
}
97
86
98
.name-cell label {
87
.name-row label {
99
    font-weight: bold;
88
    font-weight: bold;
100
    font-size: 130%;
89
    font-size: 130%;
101
    color: #336699;
90
    color: #336699;
102
}
91
}
103
92
93
dl {
94
    margin-left : 1em;
95
}
96
97
dt {
98
    padding : .1em;
99
}
100
101
104
dd {
102
dd {
103
    border-bottom: 1px solid #EEE;
104
    line-height: 2em;
105
    margin-bottom:  1em;
106
    max-width: 75em;
107
    padding: 0 0 1em 3em;
105
    text-indent: 0;
108
    text-indent: 0;
106
    margin-left: 3em;
109
}
110
111
dd li {
112
    line-height: 1.5em;
113
}
114
115
.modified-warning {
116
    color: #006600;
107
}
117
}
(-)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 (-13 / +13 lines)
Lines 1-5 Link Here
1
// We can assume 'KOHA' exists, as we depend on KOHA.AJAX
1
/* global KOHA to_highlight search_jumped MSG_NOTHING_TO_SAVE MSG_SAVING MSG_SAVED_PREFERENCE MSG_MODIFIED MSG_MADE_CHANGES MSG_FILTER_NOT_FOUND humanMsg */
2
2
3
// We can assume 'KOHA' exists, as we depend on KOHA.AJAX
3
KOHA.Preferences = {
4
KOHA.Preferences = {
4
    Save: function ( form ) {
5
    Save: function ( form ) {
5
        modified_prefs = $( form ).find( '.modified' );
6
        modified_prefs = $( form ).find( '.modified' );
Lines 11-17 KOHA.Preferences = { Link Here
11
                unserialized.push($(this));
12
                unserialized.push($(this));
12
            }
13
            }
13
        });
14
        });
14
        data = modified_prefs.serialize();
15
        var data = modified_prefs.serialize();
15
        $(unserialized).each(function(){
16
        $(unserialized).each(function(){
16
            data += '&' + $(this).attr('name') + '=';
17
            data += '&' + $(this).attr('name') + '=';
17
        });
18
        });
Lines 23-30 KOHA.Preferences = { Link Here
23
        KOHA.AJAX.Submit( {
24
        KOHA.AJAX.Submit( {
24
            data: data,
25
            data: data,
25
            url: '/cgi-bin/koha/svc/config/systempreferences/',
26
            url: '/cgi-bin/koha/svc/config/systempreferences/',
26
            success: function ( data ) { KOHA.Preferences.Success( form ) },
27
            success: function () { KOHA.Preferences.Success( form ); },
27
            complete: function () { KOHA.AJAX.MarkDone( $( form ).find( '.save-all' ) ) }
28
            complete: function () { KOHA.AJAX.MarkDone( $( form ).find( '.save-all' ) ); }
28
        } );
29
        } );
29
    },
30
    },
30
    Success: function ( form ) {
31
    Success: function ( form ) {
Lines 48-54 $( document ).ready( function () { Link Here
48
    function mark_modified() {
49
    function mark_modified() {
49
        $( this.form ).find( '.save-all' ).prop('disabled', false);
50
        $( this.form ).find( '.save-all' ).prop('disabled', false);
50
        $( this ).addClass( 'modified' );
51
        $( this ).addClass( 'modified' );
51
        var name_cell = $( this ).parents( '.name-row' ).find( '.name-cell' );
52
        var name_cell = $( this ).parent();
52
        if ( !name_cell.find( '.modified-warning' ).length )
53
        if ( !name_cell.find( '.modified-warning' ).length )
53
            name_cell.append( '<em class="modified-warning">('+MSG_MODIFIED+')</em>' );
54
            name_cell.append( '<em class="modified-warning">('+MSG_MODIFIED+')</em>' );
54
        KOHA.Preferences.Modified = true;
55
        KOHA.Preferences.Modified = true;
Lines 74-81 $( document ).ready( function () { Link Here
74
        return false;
75
        return false;
75
    });
76
    });
76
77
77
    $("dl.sortable").sortable();
78
    $(".sortable").sortable();
78
    $("dl.sortable").on( "sortchange", function( event, ui ) {
79
    $(".sortable").on( "sortchange", function( event, ui ) {
79
        // This is not exact but we just need to trigger a change
80
        // This is not exact but we just need to trigger a change
80
        $(ui.item.find('input:first')).change();
81
        $(ui.item.find('input:first')).change();
81
    } );
82
    } );
Lines 84-92 $( document ).ready( function () { Link Here
84
        if ( KOHA.Preferences.Modified ) {
85
        if ( KOHA.Preferences.Modified ) {
85
            return MSG_MADE_CHANGES;
86
            return MSG_MADE_CHANGES;
86
        }
87
        }
87
    }
88
    };
88
89
89
    $( '.prefs-tab .action .cancel' ).click( function () { KOHA.Preferences.Modified = false } );
90
    $( '.prefs-tab .action .cancel' ).click( function () { KOHA.Preferences.Modified = false; } );
90
91
91
    $( '.prefs-tab .save-all' ).prop('disabled', true).click( function () {
92
    $( '.prefs-tab .save-all' ).prop('disabled', true).click( function () {
92
        KOHA.Preferences.Save( this.form );
93
        KOHA.Preferences.Save( this.form );
Lines 118-125 $( document ).ready( function () { Link Here
118
119
119
120
120
    // Filtering by mark.js
121
    // Filtering by mark.js
121
    var keyword_filter = $("#keyword_filter"),
122
    var keyword_filter = $("#keyword_filter");
122
    context = $(".name-row");
123
    var context = $(".name-row");
123
    $("#clear_filter").on("click", function(e){
124
    $("#clear_filter").on("click", function(e){
124
        e.preventDefault();
125
        e.preventDefault();
125
        keyword_filter.val("").trigger("input");
126
        keyword_filter.val("").trigger("input");
Lines 136-142 $( document ).ready( function () { Link Here
136
                        $("#filter_empty").remove();
137
                        $("#filter_empty").remove();
137
                    }
138
                    }
138
                },
139
                },
139
                noMatch: function(term){
140
                noMatch: function(){
140
                    if( $("#filter_empty").length < 1 ){
141
                    if( $("#filter_empty").length < 1 ){
141
                        $("main").prepend("<div id=\"filter_empty\" class=\"dialog alert\">" + MSG_FILTER_NOT_FOUND + "</div>");
142
                        $("main").prepend("<div id=\"filter_empty\" class=\"dialog alert\">" + MSG_FILTER_NOT_FOUND + "</div>");
142
                    }
143
                    }
143
- 

Return to bug 20935