bug 4155 followup: fix indication of when checkbox syspref is modified

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
Galen Charlton 2010-02-18 10:26:31 -05:00
parent b5d8fd8ecb
commit b83474516b
2 changed files with 3 additions and 3 deletions

View File

@ -29,7 +29,7 @@ $( document ).ready( function () {
function mark_modified() {
$( this.form ).find( '.save-all' ).removeAttr( 'disabled' );
$( this ).addClass( 'modified' );
var name_cell = $( this ).parent().parent().find( '.name-cell' );
var name_cell = $( this ).parents( '.name-row' ).find( '.name-cell' );
if ( !name_cell.find( '.modified-warning' ).length )
name_cell.append( '<em class="modified-warning">(modified)</em>' );
KOHA.Preferences.Modified = true;
@ -40,7 +40,7 @@ $( document ).ready( function () {
if ( this.defaultValue === undefined || this.value != this.defaultValue ) mark_modified.call( this );
} ).end()
.find( 'select.preference' ).change( mark_modified );
$('.$preference-checkbox').change( function () {
$('.preference-checkbox').change( function () {
$('.preference-checkbox').addClass('modified');
mark_modified.call(this);
} );

View File

@ -53,7 +53,7 @@
<!-- TMPL_UNLESS NAME="__last__" --><tbody><!-- /TMPL_UNLESS -->
<!-- TMPL_ELSE -->
<!-- TMPL_IF NAME="__first__" --><table><thead><tr><th>Preference</th><th>Value</th></tr></thead><tbody><!-- /TMPL_IF -->
<tr>
<tr class="name-row">
<td class="name-cell">
<code>
<!-- TMPL_LOOP NAME="NAMES" -->