client/js/router.js
author rougeronj
Tue, 16 Jun 2015 11:36:09 +0200
changeset 482 a55c33989404
parent 473 6649d2d75a87
child 510 a8f02d66bf02
permissions -rw-r--r--
add type selector in the node editor add node_editor_template options to add custom templates for the node editor

(function(root) {
    "use strict";
    
    var Backbone = root.Backbone;
    
    var Router = root.Rkns.Router = Backbone.Router.extend({
        routes: {
            '': 'index'
        },
        
        index: function (parameters) {
            
            var result = {};
            if (parameters === null){
                return;
            }
            parameters.split("&").forEach(function(part) {
              var item = part.split("=");
              result[item[0]] = decodeURIComponent(item[1]);
            });
            this.trigger('router', result);            
        }  
    });

})(window);