view service/shuttlepro/gui.js @ 139:5b607e8d35d0

add color/hex Ignore-this: 20a75656647a5049527ba255437a8542
author drewp@bigasterisk.com
date Sat, 12 Jul 2014 11:32:00 -0700
parents 57ae7dc0f417
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);   
})();