@@ -, +, @@
---
koha-tmpl/intranet-tmpl/prog/css/preferences.css | 42 +++--
.../intranet-tmpl/prog/en/includes/prefs-menu.inc | 191 +++++++++++++++++++--
.../prog/en/modules/admin/preferences.tt | 13 +-
.../intranet-tmpl/prog/js/pages/preferences.js | 21 +--
4 files changed, 216 insertions(+), 51 deletions(-)
--- a/koha-tmpl/intranet-tmpl/prog/css/preferences.css
+++ a/koha-tmpl/intranet-tmpl/prog/css/preferences.css
@@ -27,13 +27,6 @@ a.collapse-textarea {
font-weight: bold;
}
-dl {
- margin-left : 1em;
-}
-dt {
- padding : .1em;
-}
-
h2 {
background-color: #e6f0f2;
font-size: 150%;
@@ -120,28 +113,45 @@ span.overridden {
background: #FFF none;
border: 0;
color: #004D99;
- font-weight: normal;
font-size: 100%;
+ hyphens: auto;
margin: 0;
padding: .2em .5em;
text-align: right;
- text-decoration: underline;
}
-dl.name-row {
- border-bottom: 1px solid #EEE;
- margin: .3em 0;
- margin-left: 1em;
- padding: .3em 0;
+#menu ul ul {
+ padding-left: 0;
}
-.name-cell label {
+.name-row label {
font-weight: bold;
font-size: 130%;
color: #336699;
}
+dl {
+ margin-left : 1em;
+}
+
+dt {
+ padding : .1em;
+}
+
+
dd {
+ border-bottom: 1px solid #EEE;
+ line-height: 2em;
+ margin-bottom: 1em;
+ max-width: 75em;
+ padding: 0 0 1em 3em;
text-indent: 0;
- margin-left: 3em;
+}
+
+dd li {
+ line-height: 1.5em;
+}
+
+.modified-warning {
+ color: #006600;
}
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc
+++ a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc
@@ -1,20 +1,175 @@
+
+[% BLOCK subtabs %]
+ [% FOREACH TAB IN TABS %]
+
@@ -53,7 +52,7 @@
[% UNLESS ( searchfield ) %]
[% END %]
@@ -61,7 +60,7 @@
[% FOREACH LINE IN TAB.LINES %]
[% IF ( LINE.is_group_title ) %]
[% UNLESS ( loop.first ) %][% END %]
-
[% LINE.title | html %]
+
[% LINE.title | html %]
[% UNLESS ( loop.last ) %][% END %]
[% ELSE %]
[% IF ( loop.first ) %][% END %]
--- a/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js
+++ a/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js
@@ -1,5 +1,6 @@
-// We can assume 'KOHA' exists, as we depend on KOHA.AJAX
+/* 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 */
+// We can assume 'KOHA' exists, as we depend on KOHA.AJAX
KOHA.Preferences = {
Save: function ( form ) {
modified_prefs = $( form ).find( '.modified' );
@@ -11,7 +12,7 @@ KOHA.Preferences = {
unserialized.push($(this));
}
});
- data = modified_prefs.serialize();
+ var data = modified_prefs.serialize();
$(unserialized).each(function(){
data += '&' + $(this).attr('name') + '=';
});
@@ -23,8 +24,8 @@ KOHA.Preferences = {
KOHA.AJAX.Submit( {
data: data,
url: '/cgi-bin/koha/svc/config/systempreferences/',
- success: function ( data ) { KOHA.Preferences.Success( form ) },
- complete: function () { KOHA.AJAX.MarkDone( $( form ).find( '.save-all' ) ) }
+ success: function () { KOHA.Preferences.Success( form ); },
+ complete: function () { KOHA.AJAX.MarkDone( $( form ).find( '.save-all' ) ); }
} );
},
Success: function ( form ) {
@@ -48,7 +49,7 @@ $( document ).ready( function () {
function mark_modified() {
$( this.form ).find( '.save-all' ).prop('disabled', false);
$( this ).addClass( 'modified' );
- var name_cell = $( this ).parents( '.name-row' ).find( '.name-cell' );
+ var name_cell = $( this ).parent();
if ( !name_cell.find( '.modified-warning' ).length )
name_cell.append( '
('+MSG_MODIFIED+')' );
KOHA.Preferences.Modified = true;
@@ -84,9 +85,9 @@ $( document ).ready( function () {
if ( KOHA.Preferences.Modified ) {
return MSG_MADE_CHANGES;
}
- }
+ };
- $( '.prefs-tab .action .cancel' ).click( function () { KOHA.Preferences.Modified = false } );
+ $( '.prefs-tab .action .cancel' ).click( function () { KOHA.Preferences.Modified = false; } );
$( '.prefs-tab .save-all' ).prop('disabled', true).click( function () {
KOHA.Preferences.Save( this.form );
@@ -118,8 +119,8 @@ $( document ).ready( function () {
// Filtering by mark.js
- var keyword_filter = $("#keyword_filter"),
- context = $(".name-row");
+ var keyword_filter = $("#keyword_filter");
+ var context = $(".name-row");
$("#clear_filter").on("click", function(e){
e.preventDefault();
keyword_filter.val("").trigger("input");
@@ -136,7 +137,7 @@ $( document ).ready( function () {
$("#filter_empty").remove();
}
},
- noMatch: function(term){
+ noMatch: function(){
if( $("#filter_empty").length < 1 ){
$("main").prepend("
" + MSG_FILTER_NOT_FOUND + "
");
}
--