Turn vc operators into buttongroup

Change-Id: I61df007ac73cdb009f26a0fedb5e6f99012d185a
diff --git a/dev/js/src/buttongroup.js b/dev/js/src/buttongroup.js
index a1dac7b..12870b5 100644
--- a/dev/js/src/buttongroup.js
+++ b/dev/js/src/buttongroup.js
@@ -19,6 +19,7 @@
       return this;
     },
 
+    
     /**
      * Return main element
      */
@@ -26,6 +27,21 @@
       return this._element;
     },
 
+    
+    /**
+     * Upgrade this object to another object,
+     * while private data stays intact.
+     *
+     * @param {Object} An object with properties.
+     */
+    upgradeTo : function (props) {
+      for (var prop in props) {
+        this[prop] = props[prop];
+      };
+      return this;
+    },
+
+    
     /**
      * Add button in order
      */
@@ -48,6 +64,7 @@
       });
     },
 
+    
     /**
      * Bind an object to all callbacks of the button group
      */
@@ -56,6 +73,15 @@
         this._bind = obj;
       };
       return this._bind || this;
+    },
+
+    
+    /**
+     * Remove all defined buttons
+     */
+    clear : function () {
+      _removeChildren(this._element);
+      return this;
     }
   }
 });