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
1565decf
Commit
1565decf
authored
Mar 14, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add identifiable class name
parent
c219d370
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
17 deletions
+19
-17
css/converse.css
css/converse.css
+1
-2
sass/converse/_minimized_chats.scss
sass/converse/_minimized_chats.scss
+1
-2
sass/inverse/_minimized_chats.scss
sass/inverse/_minimized_chats.scss
+1
-2
spec/chatbox.js
spec/chatbox.js
+15
-10
src/templates/trimmed_chat.html
src/templates/trimmed_chat.html
+1
-1
No files found.
css/converse.css
View file @
1565decf
...
@@ -6250,8 +6250,7 @@ body.reset {
...
@@ -6250,8 +6250,7 @@ body.reset {
width
:
100%
;
}
width
:
100%
;
}
#conversejs
:not
(
.fullscreen
)
#minimized-chats
.minimized-chats-flyout.minimized
{
#conversejs
:not
(
.fullscreen
)
#minimized-chats
.minimized-chats-flyout.minimized
{
height
:
auto
;
}
height
:
auto
;
}
#conversejs
:not
(
.fullscreen
)
#minimized-chats
.unread-message-count
,
#conversejs
:not
(
.fullscreen
)
#minimized-chats
.unread-message-count
{
#conversejs
:not
(
.fullscreen
)
#minimized-chats
.chat-head-message-count
{
font-weight
:
bold
;
font-weight
:
bold
;
background-color
:
white
;
background-color
:
white
;
border
:
1px
solid
;
border
:
1px
solid
;
...
...
sass/converse/_minimized_chats.scss
View file @
1565decf
...
@@ -64,8 +64,7 @@
...
@@ -64,8 +64,7 @@
}
}
}
}
.unread-message-count
,
.unread-message-count
{
.chat-head-message-count
{
font-weight
:
bold
;
font-weight
:
bold
;
background-color
:
white
;
background-color
:
white
;
border
:
1px
solid
;
border
:
1px
solid
;
...
...
sass/inverse/_minimized_chats.scss
View file @
1565decf
...
@@ -40,8 +40,7 @@
...
@@ -40,8 +40,7 @@
}
}
}
}
.unread-message-count
,
.unread-message-count
{
.chat-head-message-count
{
font-weight
:
bold
;
font-weight
:
bold
;
background-color
:
white
;
background-color
:
white
;
border
:
1px
solid
;
border
:
1px
solid
;
...
...
spec/chatbox.js
View file @
1565decf
...
@@ -487,24 +487,29 @@
...
@@ -487,24 +487,29 @@
null
,
[
'
rosterGroupsFetched
'
],
{},
null
,
[
'
rosterGroupsFetched
'
],
{},
function
(
done
,
_converse
)
{
function
(
done
,
_converse
)
{
var
timeout
=
true
,
$toolbar
,
view
;
test_utils
.
createContacts
(
_converse
,
'
current
'
);
test_utils
.
createContacts
(
_converse
,
'
current
'
);
test_utils
.
openControlBox
();
test_utils
.
openControlBox
();
test_utils
.
waitUntil
(
function
()
{
test_utils
.
waitUntil
(
function
()
{
return
$
(
_converse
.
rosterview
.
el
).
find
(
'
.roster-group
'
).
length
;
return
$
(
_converse
.
rosterview
.
el
).
find
(
'
.roster-group
'
).
length
;
},
300
)
},
300
).
then
(
function
()
{
.
then
(
function
()
{
// TODO: More tests can be added here...
// TODO: More tests can be added here...
var
contact_jid
=
mock
.
cur_names
[
2
].
replace
(
/ /g
,
'
.
'
).
toLowerCase
()
+
'
@localhost
'
;
var
contact_jid
=
mock
.
cur_names
[
2
].
replace
(
/ /g
,
'
.
'
).
toLowerCase
()
+
'
@localhost
'
;
test_utils
.
openChatBoxFor
(
_converse
,
contact_jid
);
test_utils
.
openChatBoxFor
(
_converse
,
contact_jid
);
v
ar
v
iew
=
_converse
.
chatboxviews
.
get
(
contact_jid
);
view
=
_converse
.
chatboxviews
.
get
(
contact_jid
);
var
$toolbar
=
$
(
view
.
el
).
find
(
'
ul.chat-toolbar
'
);
$toolbar
=
$
(
view
.
el
).
find
(
'
ul.chat-toolbar
'
);
expect
(
$toolbar
.
children
(
'
.toggle-otr
'
).
length
).
toBe
(
1
);
expect
(
$toolbar
.
find
(
'
.toggle-otr
'
).
length
).
toBe
(
1
);
// Register spies
// Register spies
spyOn
(
view
,
'
toggleOTRMenu
'
).
and
.
callThrough
();
spyOn
(
view
,
'
toggleOTRMenu
'
).
and
.
callThrough
();
view
.
delegateEvents
();
// We need to rebind all events otherwise our spy won't be called
view
.
delegateEvents
();
// We need to rebind all events otherwise our spy won't be called
timeout
=
false
;
$toolbar
[
0
].
querySelector
(
'
.toggle-otr
'
).
click
();
$toolbar
[
0
].
querySelector
(
'
.toggle-otr
'
).
click
();
return
test_utils
.
waitUntil
(
function
()
{
return
view
.
el
.
querySelector
(
'
.otr-menu
'
).
offsetHeight
;
},
300
)
}).
then
(
function
()
{
expect
(
view
.
toggleOTRMenu
).
toHaveBeenCalled
();
expect
(
view
.
toggleOTRMenu
).
toHaveBeenCalled
();
done
();
done
();
});
});
...
@@ -1360,7 +1365,7 @@
...
@@ -1360,7 +1365,7 @@
expect
(
_converse
.
emit
).
toHaveBeenCalledWith
(
'
message
'
,
jasmine
.
any
(
Object
));
expect
(
_converse
.
emit
).
toHaveBeenCalledWith
(
'
message
'
,
jasmine
.
any
(
Object
));
var
trimmed_chatboxes
=
_converse
.
minimized_chats
;
var
trimmed_chatboxes
=
_converse
.
minimized_chats
;
var
trimmedview
=
trimmed_chatboxes
.
get
(
contact_jid
);
var
trimmedview
=
trimmed_chatboxes
.
get
(
contact_jid
);
var
$count
=
$
(
trimmedview
.
el
).
find
(
'
.
chat-head-
message-count
'
);
var
$count
=
$
(
trimmedview
.
el
).
find
(
'
.message-count
'
);
expect
(
u
.
isVisible
(
chatview
.
el
)).
toBeFalsy
();
expect
(
u
.
isVisible
(
chatview
.
el
)).
toBeFalsy
();
expect
(
trimmedview
.
model
.
get
(
'
minimized
'
)).
toBeTruthy
();
expect
(
trimmedview
.
model
.
get
(
'
minimized
'
)).
toBeTruthy
();
expect
(
u
.
isVisible
(
$count
[
0
])).
toBeTruthy
();
expect
(
u
.
isVisible
(
$count
[
0
])).
toBeTruthy
();
...
@@ -1376,7 +1381,7 @@
...
@@ -1376,7 +1381,7 @@
);
);
expect
(
u
.
isVisible
(
chatview
.
el
)).
toBeFalsy
();
expect
(
u
.
isVisible
(
chatview
.
el
)).
toBeFalsy
();
expect
(
trimmedview
.
model
.
get
(
'
minimized
'
)).
toBeTruthy
();
expect
(
trimmedview
.
model
.
get
(
'
minimized
'
)).
toBeTruthy
();
$count
=
$
(
trimmedview
.
el
).
find
(
'
.
chat-head-
message-count
'
);
$count
=
$
(
trimmedview
.
el
).
find
(
'
.message-count
'
);
expect
(
u
.
isVisible
(
$count
[
0
])).
toBeTruthy
();
expect
(
u
.
isVisible
(
$count
[
0
])).
toBeTruthy
();
expect
(
$count
.
html
()).
toBe
(
'
2
'
);
expect
(
$count
.
html
()).
toBe
(
'
2
'
);
trimmedview
.
el
.
querySelector
(
'
.restore-chat
'
).
click
();
trimmedview
.
el
.
querySelector
(
'
.restore-chat
'
).
click
();
...
@@ -2676,7 +2681,7 @@
...
@@ -2676,7 +2681,7 @@
};
};
var
selectUnreadMsgCount
=
function
()
{
var
selectUnreadMsgCount
=
function
()
{
var
minimizedChatBoxView
=
_converse
.
minimized_chats
.
get
(
sender_jid
);
var
minimizedChatBoxView
=
_converse
.
minimized_chats
.
get
(
sender_jid
);
return
$
(
minimizedChatBoxView
.
el
).
find
(
'
.
chat-head-
message-count
'
);
return
$
(
minimizedChatBoxView
.
el
).
find
(
'
.message-count
'
);
};
};
var
chatbox
=
_converse
.
chatboxes
.
get
(
sender_jid
);
var
chatbox
=
_converse
.
chatboxes
.
get
(
sender_jid
);
...
@@ -2706,7 +2711,7 @@
...
@@ -2706,7 +2711,7 @@
};
};
var
selectUnreadMsgCount
=
function
()
{
var
selectUnreadMsgCount
=
function
()
{
var
minimizedChatBoxView
=
_converse
.
minimized_chats
.
get
(
sender_jid
);
var
minimizedChatBoxView
=
_converse
.
minimized_chats
.
get
(
sender_jid
);
return
$
(
minimizedChatBoxView
.
el
).
find
(
'
.
chat-head-
message-count
'
);
return
$
(
minimizedChatBoxView
.
el
).
find
(
'
.message-count
'
);
};
};
var
chatboxview
=
_converse
.
chatboxviews
.
get
(
sender_jid
);
var
chatboxview
=
_converse
.
chatboxviews
.
get
(
sender_jid
);
...
...
src/templates/trimmed_chat.html
View file @
1565decf
<a
href=
"#"
class=
"restore-chat w-100 align-self-center"
title=
"{{{o.tooltip}}}"
>
<a
href=
"#"
class=
"restore-chat w-100 align-self-center"
title=
"{{{o.tooltip}}}"
>
{[ if (o.num_unread) { ]}
{[ if (o.num_unread) { ]}
<span
class=
"badge badge-light"
>
{{{o.num_unread}}}
</span>
<span
class=
"
message-count
badge badge-light"
>
{{{o.num_unread}}}
</span>
{[ } ]}
{[ } ]}
{{{o.title || o.jid }}}
{{{o.title || o.jid }}}
</a>
</a>
...
...
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