diff service/shuttlepro/gui.js @ 935:9bb3eac740f0

new shuttlepro web service with /graph Ignore-this: 1c8e71aad6ab24fa24532f4e5e01d2d9 darcs-hash:20131012053641-312f9-c29b698a215697c0dc4955bdaada3923ef8b6d28
author drewp <drewp@bigasterisk.com>
date Fri, 11 Oct 2013 22:36:41 -0700
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/shuttlepro/gui.js	Fri Oct 11 22:36:41 2013 -0700
@@ -0,0 +1,20 @@
+(function () {
+    function abbreviateTrig(trig) {
+        // prefixes, abbreviations, make everything into links, etc
+        return trig;
+    }
+    
+    var model = {
+        current: ko.observable("...")
+    };
+    model.refreshGraph = function() {
+        $.ajax({
+            url: "graph",
+            success: function(data) {
+                model.current(abbreviateTrig(data));
+            }
+        });
+    };
+    model.refreshGraph();
+    ko.applyBindings(model);   
+})();