Author: scottbw
Date: Wed Nov  9 16:15:12 2011
New Revision: 1199821

URL: http://svn.apache.org/viewvc?rev=1199821&view=rev
Log:
Don't try to delete read-only preferences on clear() (see WOOKIE-20)

Modified:
    incubator/wookie/trunk/WebContent/shared/js/wookie-wrapper.js

Modified: incubator/wookie/trunk/WebContent/shared/js/wookie-wrapper.js
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/WebContent/shared/js/wookie-wrapper.js?rev=1199821&r1=1199820&r2=1199821&view=diff
==============================================================================
--- incubator/wookie/trunk/WebContent/shared/js/wookie-wrapper.js (original)
+++ incubator/wookie/trunk/WebContent/shared/js/wookie-wrapper.js Wed Nov  9 
16:15:12 2011
@@ -181,7 +181,8 @@ var WidgetPreferences = new function Wid
     this.clear = function () {
         for (var key in this.prefs) {
             try {
-                this.removeItem(key);
+                if(this.prefs[key]["readOnly"] === false)
+                   this.removeItem(key);
             } catch (e) {
                 // swallow errors, as this method must never throw them 
according to spec.
             }


Reply via email to