view service/shuttlepro/gui.js @ 1000:df5a40967a2f

polymer updates Ignore-this: f4f88b324b54abf90af6dc5360910041 darcs-hash:20150830185325-312f9-8f07ba7ccc6ecd6528159fa5fd09a166d3ce1650
author drewp <drewp@bigasterisk.com>
date Sun, 30 Aug 2015 11:53:25 -0700
parents 9bb3eac740f0
children
line wrap: on
line source

(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);   
})();