160:9cff55b8bb87
Anton Shestakov <av6@dwimlabs.net>, Tue, 31 Oct 2017 13:06:26 +0800
pipelines: missing unzip, so let's specify all deps for `make libs` while at it

previous change 148:7a236aa969f8

static/js/framework/router.js

Permissions: -rw-r--r--

Other formats: Feeds:
var Router = Backbone.Router.extend({
routes: {
'': 'randomize',
':workspace': 'setWorkspace'
},
makeRandomString: function(length) {
return _.map(_.range(length), function() {
return (Math.random()*16|0).toString(16);
}).join('');
},
randomize: function() {
var randomString = this.makeRandomString(8);
this.navigate(randomString, {trigger: true, replace: true});
},
setWorkspace: function(workspace) {
fruitbar.trigger('workspace', workspace);
}
});