Fix for Bug 5532 - sysprefs editor should show names of saved prefs
authorOwen Leonard <oleonard@myacpl.org>
Thu, 3 Feb 2011 23:53:15 +0000 (18:53 -0500)
committerChris Nighswonger <chris.nighswonger@gmail.com>
Mon, 7 Feb 2011 23:18:11 +0000 (18:18 -0500)
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 7acfb3a17f9ab592b385b032c93c96d6894ff821)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/css/preferences.css
koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js

index 095b007..d9fde24 100644 (file)
@@ -61,3 +61,8 @@ h3.collapsed {
        cursor : pointer;
        padding-left : 12px;
 }
+
+.humanMsg strong {
+       display: block;
+       font-weight: normal;
+}
\ No newline at end of file
index e7d84fd..93dfaac 100644 (file)
@@ -9,7 +9,8 @@ $(document).ready(function() {
 
 KOHA.Preferences = {
     Save: function ( form ) {
-        data = $( form ).find( '.modified' ).serialize();
+        modified_prefs = $( form ).find( '.modified' );
+        data = modified_prefs.serialize();
         if ( !data ) {
             humanMsg.displayAlert( MSG_NOTHING_TO_SAVE );
             return;
@@ -23,7 +24,13 @@ KOHA.Preferences = {
         } );
     },
     Success: function ( form ) {
-        humanMsg.displayAlert( 'Saved' );
+        var msg = "";
+        modified_prefs.each(function(){
+            var modified_pref = $(this).attr("id");
+            modified_pref = modified_pref.replace("pref_","");
+            msg += '<strong>Saved preference '+modified_pref+'</strong>\n';
+        });
+        humanMsg.displayAlert(msg);
 
         $( form )
             .find( '.modified-warning' ).remove().end()