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
95ac01b8
Commit
95ac01b8
authored
Jan 03, 2018
by
Weblate
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
3a0dac3a
8bdaa410
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
105 additions
and
82 deletions
+105
-82
dev.html
dev.html
+2
-2
spec/minchats.js
spec/minchats.js
+7
-3
src/converse-minimize.js
src/converse-minimize.js
+70
-66
src/converse-otr.js
src/converse-otr.js
+1
-4
src/utils.js
src/utils.js
+25
-7
No files found.
dev.html
View file @
95ac01b8
...
...
@@ -64,8 +64,8 @@
'
discuss@conference.conversejs.org
'
],
auto_reconnect
:
true
,
//
bosh_service_url: 'http://chat.example.org:5280/http-bind/',
bosh_service_url
:
'
https://conversejs.org/http-bind/
'
,
// Please use this connection manager only for testing purposes
bosh_service_url
:
'
http://chat.example.org:5280/http-bind/
'
,
//
bosh_service_url: 'https://conversejs.org/http-bind/', // Please use this connection manager only for testing purposes
message_archiving
:
'
always
'
,
show_controlbox_by_default
:
true
,
strict_plugin_dependencies
:
false
,
...
...
spec/minchats.js
View file @
95ac01b8
...
...
@@ -63,9 +63,13 @@
expect
(
_converse
.
minimized_chats
.
$
(
'
.minimized-chats-flyout
'
).
is
(
'
:visible
'
)).
toBeTruthy
();
expect
(
_converse
.
minimized_chats
.
toggleview
.
model
.
get
(
'
collapsed
'
)).
toBeFalsy
();
_converse
.
minimized_chats
.
$
(
'
#toggle-minimized-chats
'
).
click
();
expect
(
_converse
.
minimized_chats
.
$
(
'
.minimized-chats-flyout
'
).
is
(
'
:visible
'
)).
toBeFalsy
();
expect
(
_converse
.
minimized_chats
.
toggleview
.
model
.
get
(
'
collapsed
'
)).
toBeTruthy
();
done
();
return
test_utils
.
waitUntil
(
function
()
{
return
_converse
.
minimized_chats
.
$
(
'
.minimized-chats-flyout
'
).
is
(
'
:visible
'
);
},
500
).
then
(
function
()
{
expect
(
_converse
.
minimized_chats
.
toggleview
.
model
.
get
(
'
collapsed
'
)).
toBeTruthy
();
done
();
});
}));
it
(
"
shows the number messages received to minimized chats
"
,
...
...
src/converse-minimize.js
View file @
95ac01b8
This diff is collapsed.
Click to expand it.
src/converse-otr.js
View file @
95ac01b8
...
...
@@ -389,10 +389,7 @@
[
menu
]
);
utils
.
slideInAllElements
(
elements
).
then
(
_
.
partial
(
utils
.
slideToggleElement
,
menu
)
_
.
partial
(
utils
.
slideToggleElement
,
menu
)
);
},
...
...
src/utils.js
View file @
95ac01b8
...
...
@@ -87,8 +87,14 @@
var
u
=
{};
u
.
addClass
=
function
(
el
,
className
)
{
if
(
el
instanceof
Element
)
{
el
.
classList
.
add
(
className
);
}
}
u
.
removeClass
=
function
(
klass
,
el
)
{
if
(
!
_
.
isNil
(
el
)
)
{
if
(
el
instanceof
Element
)
{
el
.
classList
.
remove
(
klass
);
}
return
el
;
...
...
@@ -163,11 +169,12 @@
));
};
u
.
slideToggleElement
=
function
(
el
)
{
if
(
_
.
includes
(
el
.
classList
,
'
collapsed
'
))
{
return
u
.
slideOut
(
el
);
u
.
slideToggleElement
=
function
(
el
,
duration
)
{
if
(
_
.
includes
(
el
.
classList
,
'
collapsed
'
)
||
_
.
includes
(
el
.
classList
,
'
hidden
'
))
{
return
u
.
slideOut
(
el
,
duration
);
}
else
{
return
u
.
slideIn
(
el
);
return
u
.
slideIn
(
el
,
duration
);
}
};
...
...
@@ -331,9 +338,10 @@
* message, i.e. not a MAM archived one.
*/
if
(
message
instanceof
Element
)
{
return
!
(
sizzle
(
'
result[xmlns="
'
+
Strophe
.
NS
.
MAM
+
'
"]
'
,
message
).
length
);
return
!
sizzle
(
'
result[xmlns="
'
+
Strophe
.
NS
.
MAM
+
'
"]
'
,
message
).
length
&&
!
sizzle
(
'
delay[xmlns="
'
+
Strophe
.
NS
.
DELAY
+
'
"]
'
,
message
).
length
;
}
else
{
return
!
message
.
get
(
'
archive_id
'
);
return
!
message
.
get
(
'
archive_id
'
)
&&
!
message
.
get
(
'
delayed
'
)
;
}
};
...
...
@@ -415,6 +423,16 @@
return
div
.
firstChild
;
};
u
.
getOuterWidth
=
function
(
el
,
include_margin
=
false
)
{
var
width
=
el
.
offsetWidth
;
if
(
!
include_margin
)
{
return
width
;
}
var
style
=
window
.
getComputedStyle
(
el
);
width
+=
parseInt
(
style
.
marginLeft
,
10
)
+
parseInt
(
style
.
marginRight
,
10
);
return
width
;
};
u
.
stringToElement
=
function
(
s
)
{
/* Converts an HTML string into a DOM element.
* Expects that the HTML string has only one top-level element,
...
...
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