Author: scottbw
Date: Fri Jun 10 10:01:26 2011
New Revision: 1134261

URL: http://svn.apache.org/viewvc?rev=1134261&view=rev
Log:
Implemented clear() method for Wave Gadget API. See WOOKIE-110. This is 
implemented client-side via submitDelta() rather than as a new server method.

Modified:
    incubator/wookie/trunk/WebContent/shared/js/wave.js

Modified: incubator/wookie/trunk/WebContent/shared/js/wave.js
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/WebContent/shared/js/wave.js?rev=1134261&r1=1134260&r2=1134261&view=diff
==============================================================================
--- incubator/wookie/trunk/WebContent/shared/js/wave.js (original)
+++ incubator/wookie/trunk/WebContent/shared/js/wave.js Fri Jun 10 10:01:26 2011
@@ -53,6 +53,14 @@
        wave.submitDelta(delta);
     }
     
+    this.clear = function(){
+        var delta =  {};
+        for (key in state.map){
+            delta[key] = null;
+        }
+        wave.submitDelta(delta);
+    }
+    
     this.toString = function(){
         var str = "";
         for (key in state.map){


Reply via email to