Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
6dfd0d1a
Commit
6dfd0d1a
authored
Sep 19, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure popovers also work in overlay view mode
parent
be99af4f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
30 deletions
+38
-30
css/converse.css
css/converse.css
+3
-0
dist/converse.js
dist/converse.js
+14
-11
sass/_controlbox.scss
sass/_controlbox.scss
+5
-0
src/converse-controlbox.js
src/converse-controlbox.js
+11
-7
src/converse-register.js
src/converse-register.js
+5
-12
No files found.
css/converse.css
View file @
6dfd0d1a
...
...
@@ -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
{
...
...
dist/converse.js
View file @
6dfd0d1a
...
...
@@ -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));
sass/_controlbox.scss
View file @
6dfd0d1a
...
...
@@ -352,6 +352,11 @@
width
:
$controlbox-width
;
}
.login-trusted
{
white-space
:
nowrap
;
font-size
:
90%
;
}
#converse-login-trusted
{
margin-top
:
0
.5em
;
}
...
...
src/converse-controlbox.js
View file @
6dfd0d1a
...
...
@@ -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]
'
);
...
...
src/converse-register.js
View file @
6dfd0d1a
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment