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
ef9fd961
Commit
ef9fd961
authored
Jun 02, 2014
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rendering of minimized chatrooms
parent
afcb49b6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
17 deletions
+34
-17
converse.js
converse.js
+29
-16
css/converse.css
css/converse.css
+2
-0
less/converse.less
less/converse.less
+2
-0
src/templates/trimmed_chat.html
src/templates/trimmed_chat.html
+1
-1
No files found.
converse.js
View file @
ef9fd961
...
@@ -866,7 +866,7 @@
...
@@ -866,7 +866,7 @@
events
:
{
events
:
{
'
click .close-chatbox-button
'
:
'
close
'
,
'
click .close-chatbox-button
'
:
'
close
'
,
'
click .toggle-chatbox-button
'
:
'
toggl
e
'
,
'
click .toggle-chatbox-button
'
:
'
minimiz
e
'
,
'
keypress textarea.chat-textarea
'
:
'
keyPressed
'
,
'
keypress textarea.chat-textarea
'
:
'
keyPressed
'
,
'
click .toggle-smiley
'
:
'
toggleEmoticonMenu
'
,
'
click .toggle-smiley
'
:
'
toggleEmoticonMenu
'
,
'
click .toggle-smiley ul li
'
:
'
insertEmoticon
'
,
'
click .toggle-smiley ul li
'
:
'
insertEmoticon
'
,
...
@@ -897,9 +897,8 @@
...
@@ -897,9 +897,8 @@
this
.
updateVCard
();
this
.
updateVCard
();
this
.
$el
.
insertAfter
(
converse
.
chatboxviews
.
get
(
"
controlbox
"
).
$el
);
this
.
$el
.
insertAfter
(
converse
.
chatboxviews
.
get
(
"
controlbox
"
).
$el
);
this
.
model
.
messages
.
fetch
({
add
:
true
});
this
.
model
.
messages
.
fetch
({
add
:
true
});
this
.
render
()
.
showStatusMessage
()
;
this
.
render
();
if
(
this
.
model
.
get
(
'
minimized
'
))
{
if
(
this
.
model
.
get
(
'
minimized
'
))
{
this
.
hide
();
this
.
hide
();
}
else
{
}
else
{
...
@@ -925,7 +924,7 @@
...
@@ -925,7 +924,7 @@
setTimeout
(
function
()
{
setTimeout
(
function
()
{
converse
.
refreshWebkit
();
converse
.
refreshWebkit
();
},
50
);
},
50
);
return
this
;
return
this
.
showStatusMessage
()
;
},
},
initDragResize
:
function
()
{
initDragResize
:
function
()
{
...
@@ -1306,6 +1305,7 @@
...
@@ -1306,6 +1305,7 @@
if
(
msg
)
{
if
(
msg
)
{
this
.
$el
.
find
(
'
p.user-custom-message
'
).
text
(
msg
).
attr
(
'
title
'
,
msg
);
this
.
$el
.
find
(
'
p.user-custom-message
'
).
text
(
msg
).
attr
(
'
title
'
,
msg
);
}
}
return
this
;
},
},
close
:
function
()
{
close
:
function
()
{
...
@@ -1318,15 +1318,16 @@
...
@@ -1318,15 +1318,16 @@
},
},
maximize
:
function
()
{
maximize
:
function
()
{
// the opposite of trim, i.e. restoring a trimmed chat box
/* Restores a minimized chat box
*/
this
.
$el
.
insertAfter
(
converse
.
chatboxviews
.
get
(
"
controlbox
"
).
$el
).
show
();
this
.
$el
.
insertAfter
(
converse
.
chatboxviews
.
get
(
"
controlbox
"
).
$el
).
show
();
this
.
focus
();
this
.
focus
();
converse
.
refreshWebkit
();
converse
.
refreshWebkit
();
this
.
model
.
trigger
(
'
maximized
'
,
this
.
model
);
this
.
model
.
trigger
(
'
maximized
'
,
this
.
model
);
},
},
toggl
e
:
function
(
ev
)
{
minimiz
e
:
function
(
ev
)
{
/* Minimizes
or maximizes
a chat box
/* Minimizes a chat box
*/
*/
this
.
model
.
save
({
this
.
model
.
save
({
'
minimized
'
:
true
,
'
minimized
'
:
true
,
...
@@ -1439,8 +1440,8 @@
...
@@ -1439,8 +1440,8 @@
hide
:
function
()
{
hide
:
function
()
{
if
(
this
.
$el
.
is
(
'
:visible
'
)
&&
this
.
$el
.
css
(
'
opacity
'
)
==
"
1
"
)
{
if
(
this
.
$el
.
is
(
'
:visible
'
)
&&
this
.
$el
.
css
(
'
opacity
'
)
==
"
1
"
)
{
this
.
$el
.
fadeOut
(
'
fast
'
,
converse
.
refreshWebkit
);
this
.
$el
.
hide
(
);
converse
.
emit
(
'
onChatBoxClosed
'
,
this
);
converse
.
refreshWebkit
(
);
}
}
return
this
;
return
this
;
},
},
...
@@ -1886,7 +1887,7 @@
...
@@ -1886,7 +1887,7 @@
className
:
'
chatroom
'
,
className
:
'
chatroom
'
,
events
:
{
events
:
{
'
click .close-chatbox-button
'
:
'
close
'
,
'
click .close-chatbox-button
'
:
'
close
'
,
'
click .toggle-chatbox-button
'
:
'
toggl
e
'
,
'
click .toggle-chatbox-button
'
:
'
minimiz
e
'
,
'
click .configure-chatroom-button
'
:
'
configureChatRoom
'
,
'
click .configure-chatroom-button
'
:
'
configureChatRoom
'
,
'
click .toggle-smiley
'
:
'
toggleEmoticonMenu
'
,
'
click .toggle-smiley
'
:
'
toggleEmoticonMenu
'
,
'
click .toggle-smiley ul li
'
:
'
insertEmoticon
'
,
'
click .toggle-smiley ul li
'
:
'
insertEmoticon
'
,
...
@@ -1915,9 +1916,13 @@
...
@@ -1915,9 +1916,13 @@
undefined
);
undefined
);
},
},
this
);
this
);
this
.
$el
.
appendTo
(
converse
.
chatboxviews
.
$el
);
this
.
$el
.
insertAfter
(
converse
.
chatboxviews
.
get
(
"
controlbox
"
).
$el
);
this
.
render
().
show
().
model
.
messages
.
fetch
({
add
:
true
});
this
.
render
().
model
.
messages
.
fetch
({
add
:
true
});
this
.
initDragResize
();
if
(
this
.
model
.
get
(
'
minimized
'
))
{
this
.
hide
();
}
else
{
this
.
show
();
}
},
},
render
:
function
()
{
render
:
function
()
{
...
@@ -2601,8 +2606,15 @@
...
@@ -2601,8 +2606,15 @@
},
},
render
:
function
()
{
render
:
function
()
{
return
this
.
$el
.
addClass
(
'
chat-head-chatbox
'
).
html
(
var
data
=
this
.
model
.
toJSON
();
converse
.
templates
.
trimmed_chat
(
this
.
model
.
toJSON
()));
if
(
this
.
model
.
get
(
'
chatroom
'
))
{
data
[
'
title
'
]
=
this
.
model
.
get
(
'
name
'
);
this
.
$el
.
addClass
(
'
chat-head-chatroom
'
);
}
else
{
data
[
'
title
'
]
=
this
.
model
.
get
(
'
fullname
'
);
this
.
$el
.
addClass
(
'
chat-head-chatbox
'
);
}
return
this
.
$el
.
html
(
converse
.
templates
.
trimmed_chat
(
data
));
},
},
close
:
function
(
ev
)
{
close
:
function
(
ev
)
{
...
@@ -2612,6 +2624,7 @@
...
@@ -2612,6 +2624,7 @@
ev
.
preventDefault
();
ev
.
preventDefault
();
this
.
$el
.
remove
();
this
.
$el
.
remove
();
this
.
model
.
destroy
();
this
.
model
.
destroy
();
converse
.
emit
(
'
onChatBoxClosed
'
,
this
);
return
this
;
return
this
;
},
},
...
...
css/converse.css
View file @
ef9fd961
...
@@ -743,6 +743,8 @@ input.error {
...
@@ -743,6 +743,8 @@ input.error {
}
}
#conversejs
.chat-title
a
{
#conversejs
.chat-title
a
{
color
:
white
;
color
:
white
;
width
:
100%
;
display
:
block
;
}
}
#conversejs
.chat-head-chatbox
,
#conversejs
.chat-head-chatbox
,
#conversejs
.chat-head-chatroom
{
#conversejs
.chat-head-chatroom
{
...
...
less/converse.less
View file @
ef9fd961
...
@@ -806,6 +806,8 @@ input.error {
...
@@ -806,6 +806,8 @@ input.error {
#conversejs .chat-title a {
#conversejs .chat-title a {
color: white;
color: white;
width: 100%;
display: block;
}
}
#conversejs .chat-head-chatbox,
#conversejs .chat-head-chatbox,
...
...
src/templates/trimmed_chat.html
View file @
ef9fd961
...
@@ -2,6 +2,6 @@
...
@@ -2,6 +2,6 @@
<div
class=
"chat-title"
>
<div
class=
"chat-title"
>
<a
href=
"#"
class=
"restore-chat"
>
<a
href=
"#"
class=
"restore-chat"
>
<div
class=
"chat-head-message-count"
>
0
</div>
<div
class=
"chat-head-message-count"
>
0
</div>
{{
fullnam
e }}
{{
titl
e }}
</a>
</a>
</div>
</div>
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