Towards MKWS-64.
[mkws-moved-to-github.git] / src / mkws-team.js
index 890f582..73dd2f9 100644 (file)
@@ -101,6 +101,28 @@ mkws.makeTeam = function($, teamName) {
     return s;
   }
 
+  // ### what quoting do we need to undo? Complement of previous function
+  that.parseFragment = function(s) {
+    var x = {};
+
+    var list = s.split('@');
+    for (var i in list) {
+      var a = list[i].split('=');
+      x[a[0]] = a[1];
+    }
+
+    return x;
+  }
+
+  that.handleChanges = function(oldState, newState) {
+    for (var key in newState) {
+      if (newState.hasOwnProperty(key) &&
+          (!oldState || newState[key] != oldState[key])) {
+        that.warn("changed property " + key + ": '" + oldState[key] + "' -> '" + newState[key] + "'");
+      }
+    }
+  };
+
 
   // The following PubSub code is modified from the jQuery manual:
   // http://api.jquery.com/jQuery.Callbacks/