Commit 6dfd0d1a authored by JC Brand's avatar JC Brand

Make sure popovers also work in overlay view mode

parent be99af4f
......@@ -9938,6 +9938,9 @@ body.reset {
#conversejs.converse-overlayed #controlbox .box-flyout {
min-width: 250px !important;
width: 250px; }
#conversejs.converse-overlayed #controlbox .login-trusted {
white-space: nowrap;
font-size: 90%; }
#conversejs.converse-overlayed #controlbox #converse-login-trusted {
margin-top: 0.5em; }
#conversejs.converse-overlayed #controlbox:not(.logged-out) .controlbox-head {
......
......@@ -62478,6 +62478,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
this.loginpanel.render();
}
this.loginpanel.initPopovers();
return this;
},
......@@ -62588,14 +62589,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
this.model.on('change', this.render, this);
this.listenTo(_converse.connfeedback, 'change', this.render);
this.render();
_.forEach(this.el.querySelectorAll('[data-title]'), el => {
const popover = new bootstrap.Popover(el, {
'trigger': _converse.view_mode === 'mobile' && 'click' || 'hover',
'dismissible': _converse.view_mode === 'mobile' && true || false,
'container': _converse.chatboxviews.el
});
});
},
toHTML() {
......@@ -62625,6 +62618,16 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}));
},
initPopovers() {
_.forEach(this.el.querySelectorAll('[data-title]'), el => {
const popover = new bootstrap.Popover(el, {
'trigger': _converse.view_mode === 'mobile' && 'click' || 'hover',
'dismissible': _converse.view_mode === 'mobile' && true || false,
'container': this.el.parentElement.parentElement.parentElement
});
});
},
validate() {
const form = this.el.querySelector('form');
const jid_element = form.querySelector('input[name=jid]');
......@@ -73944,7 +73947,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
'allow_registration': true,
'domain_placeholder': __(" e.g. conversejs.org"),
// Placeholder text shown in the domain input on the registration form
'providers_link': 'https://xmpp.net/directory.php',
'providers_link': 'https://compliance.conversations.im/',
// Link to XMPP providers shown on registration page
'registration_domain': ''
});
......@@ -74172,8 +74175,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}
this.reset({
domain: Strophe.getDomainFromJid(domain_name),
_registering: true
'domain': Strophe.getDomainFromJid(domain_name),
'_registering': true
});
_converse.connection.connect(this.domain, "", this.onConnectStatusChanged.bind(this));
......@@ -352,6 +352,11 @@
width: $controlbox-width;
}
.login-trusted {
white-space: nowrap;
font-size: 90%;
}
#converse-login-trusted {
margin-top: 0.5em;
}
......
......@@ -288,6 +288,7 @@
} else {
this.loginpanel.render();
}
this.loginpanel.initPopovers();
return this;
},
......@@ -388,13 +389,6 @@
this.model.on('change', this.render, this);
this.listenTo(_converse.connfeedback, 'change', this.render);
this.render();
_.forEach(this.el.querySelectorAll('[data-title]'), (el) => {
const popover = new bootstrap.Popover(el, {
'trigger': _converse.view_mode === 'mobile' && 'click' || 'hover',
'dismissible': _converse.view_mode === 'mobile' && true || false,
'container': _converse.chatboxviews.el
})
});
},
toHTML () {
......@@ -424,6 +418,16 @@
);
},
initPopovers () {
_.forEach(this.el.querySelectorAll('[data-title]'), el => {
const popover = new bootstrap.Popover(el, {
'trigger': _converse.view_mode === 'mobile' && 'click' || 'hover',
'dismissible': _converse.view_mode === 'mobile' && true || false,
'container': this.el.parentElement.parentElement.parentElement
})
});
},
validate () {
const form = this.el.querySelector('form');
const jid_element = form.querySelector('input[name=jid]');
......
......@@ -198,9 +198,7 @@
'domain_placeholder': _converse.domain_placeholder
});
if (_converse.registration_domain) {
this.fetchRegistrationForm(
_converse.registration_domain
);
this.fetchRegistrationForm(_converse.registration_domain);
}
return this;
},
......@@ -353,12 +351,10 @@
this.renderRegistrationRequest();
}
this.reset({
domain: Strophe.getDomainFromJid(domain_name),
_registering: true
'domain': Strophe.getDomainFromJid(domain_name),
'_registering': true
});
_converse.connection.connect(
this.domain, "", this.onConnectStatusChanged.bind(this)
);
_converse.connection.connect(this.domain, "", this.onConnectStatusChanged.bind(this));
return false;
},
......@@ -381,10 +377,7 @@
feedback.parentNode.removeChild(feedback);
}
const form = this.el.querySelector('form');
form.insertAdjacentHTML(
'afterbegin',
'<span class="reg-feedback"></span>'
);
form.insertAdjacentHTML('afterbegin', '<span class="reg-feedback"></span>');
feedback = form.querySelector('.reg-feedback');
feedback.textContent = message;
if (klass) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment