Merge branch 'hotfix/21.56.9' into master
[gitter.git] / public / js / routes / router.js
bloba3169ef1aecd43b5203c6e4574db401dec45ba1e
1 'use strict';
3 var Backbone = require('backbone');
4 var _ = require('lodash');
6 var Router = Backbone.Router.extend({
7 constructor: function(options) {
8 this.dialogRegion = options.dialogRegion;
10 var routes = {
11 '': 'hideModal'
14 options.routes.forEach(function(r) {
15 _.extend(routes, r);
16 });
18 Backbone.Router.call(this, _.extend(options, { routes: routes }));
21 hideModal: function() {
22 this.dialogRegion.destroy();
24 });
26 module.exports = Router;