3 var Marionette
= require('backbone.marionette');
4 var ModalView
= require('./modal');
5 var template
= require('./tmpl/login-view.hbs');
7 require('@gitterhq/styleguide/css/components/buttons.css');
9 var View
= Marionette
.ItemView
.extend({
11 className
: 'login-view',
13 initialize: function(options
) {
14 options
= options
|| {};
16 // these are mixpanel variables that we have to pass on
17 // TODO action and source can be probably remove since we aren't using mixpanel anymore
18 this.action
= options
.action
|| '';
19 this.source
= options
.source
|| '';
20 this.returnTo
= options
.returnTo
|| '';
21 if (options
.returnTo
=== 'CURRENT') {
22 this.returnTo
= window
.location
.pathname
;
25 this.listenTo(this, 'menuItemClicked', this.menuItemClicked
);
28 menuItemClicked: function(button
) {
36 serializeData: function() {
40 returnTo
: this.returnTo
45 var Modal
= ModalView
.extend({
46 initialize: function(options
) {
47 options
= options
|| {};
48 options
.modalClassVariation
= 'modal--default__narrow';
50 ModalView
.prototype.initialize
.call(this, options
);
51 this.view
= new View(options
);
55 module
.exports
= Modal
;