Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
f54516aa2c
@ -37,16 +37,15 @@
|
|||||||
return _.get(_converse.chatboxviews.get('controlbox'), 'registerpanel');
|
return _.get(_converse.chatboxviews.get('controlbox'), 'registerpanel');
|
||||||
}, 300)
|
}, 300)
|
||||||
.then(function () {
|
.then(function () {
|
||||||
|
|
||||||
var cbview = _converse.chatboxviews.get('controlbox');
|
var cbview = _converse.chatboxviews.get('controlbox');
|
||||||
test_utils.openControlBox();
|
test_utils.openControlBox();
|
||||||
var $panels = cbview.$('.controlbox-panes');
|
var $panels = cbview.$('.controlbox-panes');
|
||||||
var $login = $panels.children().first();
|
var $login = $panels.children().first();
|
||||||
var $registration = $panels.children().last();
|
var $registration = $panels.children().last();
|
||||||
|
|
||||||
var $register_link = cbview.$('a.register-account');
|
var register_link = cbview.el.querySelector('a.register-account');
|
||||||
expect($register_link.text()).toBe("Create an account");
|
expect(register_link.textContent).toBe("Create an account");
|
||||||
$register_link.click();
|
register_link.click();
|
||||||
test_utils.waitUntil(function () {
|
test_utils.waitUntil(function () {
|
||||||
return $registration.is(':visible');
|
return $registration.is(':visible');
|
||||||
}, 300).then(function () {
|
}, 300).then(function () {
|
||||||
|
@ -2013,15 +2013,16 @@
|
|||||||
this.connection = settings.connection;
|
this.connection = settings.connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: fallback when global history has already been started
|
|
||||||
Backbone.history.start();
|
|
||||||
|
|
||||||
function finishInitialization () {
|
function finishInitialization () {
|
||||||
_converse.initPlugins();
|
_converse.initPlugins();
|
||||||
_converse.initConnection();
|
_converse.initConnection();
|
||||||
_converse.setUpXMLLogging();
|
_converse.setUpXMLLogging();
|
||||||
_converse.logIn();
|
_converse.logIn();
|
||||||
_converse.registerGlobalEventHandlers();
|
_converse.registerGlobalEventHandlers();
|
||||||
|
|
||||||
|
if (!Backbone.history.started) {
|
||||||
|
Backbone.history.start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_.isUndefined(_converse.connection) &&
|
if (!_.isUndefined(_converse.connection) &&
|
||||||
|
@ -81,7 +81,6 @@
|
|||||||
ControlBoxView: {
|
ControlBoxView: {
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
'click .toggle-register-login': 'switchToRegisterForm',
|
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize () {
|
initialize () {
|
||||||
@ -89,15 +88,6 @@
|
|||||||
this.model.on('change:active-form', this.showLoginOrRegisterForm.bind(this))
|
this.model.on('change:active-form', this.showLoginOrRegisterForm.bind(this))
|
||||||
},
|
},
|
||||||
|
|
||||||
switchToRegisterForm (ev) {
|
|
||||||
ev.preventDefault();
|
|
||||||
if (this.model.get('active-form') == "register") {
|
|
||||||
this.model.set('active-form', 'login');
|
|
||||||
} else {
|
|
||||||
this.model.set('active-form', 'register');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
showLoginOrRegisterForm () {
|
showLoginOrRegisterForm () {
|
||||||
const { _converse } = this.__super__;
|
const { _converse } = this.__super__;
|
||||||
if (_.isNil(this.registerpanel)) {
|
if (_.isNil(this.registerpanel)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user