jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dvit...@apache.org
Subject svn commit: r1659548 - in /jspwiki/trunk: ChangeLog jspwiki-war/src/main/java/org/apache/wiki/preferences/Preferences.java jspwiki-war/src/main/webapp/templates/default/skins/Smart/skin.css
Date Fri, 13 Feb 2015 12:56:00 GMT
Author: dvittor
Date: Fri Feb 13 12:56:00 2015
New Revision: 1659548

URL: http://svn.apache.org/r1659548
Log:
JSPWIKI-566 - problem with Cookie set preferences and the GSon.fromJson() parser
Fixed search icon in Smart Template "search.gif" instead of "search.png"

Modified:
    jspwiki/trunk/ChangeLog
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/preferences/Preferences.java
    jspwiki/trunk/jspwiki-war/src/main/webapp/templates/default/skins/Smart/skin.css

Modified: jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/jspwiki/trunk/ChangeLog?rev=1659548&r1=1659547&r2=1659548&view=diff
==============================================================================
--- jspwiki/trunk/ChangeLog (original)
+++ jspwiki/trunk/ChangeLog Fri Feb 13 12:56:00 2015
@@ -3,6 +3,10 @@
        * 2.10.2-svn-13
 
        * Fixed JSPWIKI-867 - Deleting attachments should retain focus on the Attach tab
+       
+       * JSPWIKI-566 - problem with Cookie set preferences and the GSon.fromJson() parser
+       
+       * Fixed search icon in Smart Template "search.gif" instead of "search.png"
 
 2015-01-30  David Vittor (dvittor@apache.org)
 

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/preferences/Preferences.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/preferences/Preferences.java?rev=1659548&r1=1659547&r2=1659548&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/preferences/Preferences.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/preferences/Preferences.java Fri
Feb 13 12:56:00 2015
@@ -149,11 +149,15 @@ public class Preferences
             Gson gson=new Gson(); 
             Map<String,String> map = new HashMap<String,String>();
             // Convert prefVal JSON to a generic hashmap
-            map=gson.fromJson(prefVal, map.getClass());
+            map= (Map<String,String>) gson.fromJson(prefVal, map.getClass());
 
             for (String key : map.keySet()) {
                 key = TextUtil.replaceEntities( key );
-                prefs.put(key, map.get(key) );
+                // Sometimes this is not a String as it comes from the Cookie set by Javascript
+                Object value = map.get(key);
+                if (value != null) {
+                	prefs.put(key, value.toString() );
+                }
             }
         }
     }

Modified: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/default/skins/Smart/skin.css
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/default/skins/Smart/skin.css?rev=1659548&r1=1659547&r2=1659548&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/default/skins/Smart/skin.css (original)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/default/skins/Smart/skin.css Fri Feb
13 12:56:00 2015
@@ -304,7 +304,7 @@ a.tool:hover, .btn:hover {
 /* +++ 480 PreferencesContent, LoginContent, GroupContent +++ */
 /* +++ 485 SearchBox +++ */
 #searchSubmit {
-	background: url(../../images/search.png) no-repeat center;
+	background: url(../../images/search.gif) no-repeat center;
 }
 #header a:link, #header a:visited, #recentSearches { 
 	color:#666;



Mime
View raw message