Lines 11-20
KOHA.Preferences = {
Link Here
|
11 |
Save: function ( form ) { |
11 |
Save: function ( form ) { |
12 |
data = $( form ).find( '.modified' ).serialize(); |
12 |
data = $( form ).find( '.modified' ).serialize(); |
13 |
if ( !data ) { |
13 |
if ( !data ) { |
14 |
humanMsg.displayAlert( 'Nothing to save' ); |
14 |
humanMsg.displayAlert( MSG_NOTHING_TO_SAVE ); |
15 |
return; |
15 |
return; |
16 |
} |
16 |
} |
17 |
KOHA.AJAX.MarkRunning( $( form ).find( '.save-all' ), _( 'Saving...' ) ); |
17 |
KOHA.AJAX.MarkRunning( $( form ).find( '.save-all' ), _( MSG_SAVING ) ); |
18 |
KOHA.AJAX.Submit( { |
18 |
KOHA.AJAX.Submit( { |
19 |
data: data, |
19 |
data: data, |
20 |
url: '/cgi-bin/koha/svc/config/systempreferences/', |
20 |
url: '/cgi-bin/koha/svc/config/systempreferences/', |
Lines 38-44
$( document ).ready( function () {
Link Here
|
38 |
$( this ).addClass( 'modified' ); |
38 |
$( this ).addClass( 'modified' ); |
39 |
var name_cell = $( this ).parents( '.name-row' ).find( '.name-cell' ); |
39 |
var name_cell = $( this ).parents( '.name-row' ).find( '.name-cell' ); |
40 |
if ( !name_cell.find( '.modified-warning' ).length ) |
40 |
if ( !name_cell.find( '.modified-warning' ).length ) |
41 |
name_cell.append( '<em class="modified-warning">(modified)</em>' ); |
41 |
name_cell.append( '<em class="modified-warning">('+MSG_MODIFIED+')</em>' ); |
42 |
KOHA.Preferences.Modified = true; |
42 |
KOHA.Preferences.Modified = true; |
43 |
} |
43 |
} |
44 |
|
44 |
|
Lines 54-60
$( document ).ready( function () {
Link Here
|
54 |
|
54 |
|
55 |
window.onbeforeunload = function () { |
55 |
window.onbeforeunload = function () { |
56 |
if ( KOHA.Preferences.Modified ) { |
56 |
if ( KOHA.Preferences.Modified ) { |
57 |
return _( "You have made changes to system preferences." ); |
57 |
return MSG_MADE_CHANGES; |
58 |
} |
58 |
} |
59 |
} |
59 |
} |
60 |
|
60 |
|
Lines 73-88
$( document ).ready( function () {
Link Here
|
73 |
return false; |
73 |
return false; |
74 |
} ).nextAll( 'textarea, input[type=submit]' ).hide().css( { opacity: 0 } ); |
74 |
} ).nextAll( 'textarea, input[type=submit]' ).hide().css( { opacity: 0 } ); |
75 |
|
75 |
|
76 |
$("h3").attr("class","expanded").attr("title",_("Click to expand this section")); |
76 |
$("h3").attr("class","expanded").attr("title",MSG_CLICK_TO_EXPAND); |
77 |
var collapsible = $(".collapsed,.expanded"); |
77 |
var collapsible = $(".collapsed,.expanded"); |
78 |
|
78 |
|
79 |
$(collapsible).toggle( |
79 |
$(collapsible).toggle( |
80 |
function () { |
80 |
function () { |
81 |
$(this).addClass("collapsed").removeClass("expanded").attr("title",_("Click to expand this section")); |
81 |
$(this).addClass("collapsed").removeClass("expanded").attr("title",MSG_CLICK_TO_EXPAND); |
82 |
$(this).next("table").hide(); |
82 |
$(this).next("table").hide(); |
83 |
}, |
83 |
}, |
84 |
function () { |
84 |
function () { |
85 |
$(this).addClass("expanded").removeClass("collapsed").attr("title",_("Click to collapse this section")); |
85 |
$(this).addClass("expanded").removeClass("collapsed").attr("title",MSG_CLICK_TO_COLLAPSE); |
86 |
$(this).next("table").show(); |
86 |
$(this).next("table").show(); |
87 |
} |
87 |
} |
88 |
); |
88 |
); |