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
0b10ad00
Commit
0b10ad00
authored
May 11, 2014
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some initial work on adding trimmed chat functionality
parent
0b710b80
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
5 deletions
+37
-5
converse.js
converse.js
+27
-0
less/converse.less
less/converse.less
+4
-4
mockup/index.html
mockup/index.html
+1
-1
src/templates/trimmed_chat.html
src/templates/trimmed_chat.html
+4
-0
src/templates/trimmed_chats.html
src/templates/trimmed_chats.html
+1
-0
No files found.
converse.js
View file @
0b10ad00
...
...
@@ -1304,6 +1304,7 @@
trimChat
:
function
()
{
// TODO: Instead of closing the chat, we should add it to
// div#offscreen-chatboxes
this
.
model
.
set
(
'
trimmed
'
,
true
);
this
.
$el
.
hide
();
// Hide it immediately to avoid flashes on the screen
this
.
closeChat
();
},
...
...
@@ -2963,6 +2964,32 @@
}
});
this
.
TrimmedChatBoxes
=
Backbone
.
View
.
extend
({
/* A view for trimmed chat boxes and chat rooms.
* XXX: Add this view inside ChatBoxViews's $el (i.e. #conversejs)
*/
tagName
:
'
div
'
,
id
:
'
trimmed-chatboxes
'
,
initialize
:
function
()
{
var
views
=
{};
this
.
get
=
function
(
id
)
{
return
views
[
id
];
};
this
.
set
=
function
(
id
,
view
)
{
views
[
id
]
=
view
;
};
this
.
getAll
=
function
()
{
return
views
;
};
this
.
$el
.
html
(
converse
.
templates
.
trimmed_chats
());
this
.
model
.
on
(
"
add
"
,
function
(
item
)
{
if
(
!
item
.
get
(
'
trimmed
'
))
{
return
;
}
this
.
show
(
item
);
},
this
);
},
show
:
function
(
item
)
{
this
.
$
(
'
.box-flyout
'
).
append
(
converse
.
templates
.
trim_chat
());
}
});
this
.
RosterView
=
Backbone
.
View
.
extend
({
tagName
:
'
dl
'
,
id
:
'
converse-roster
'
,
...
...
less/converse.less
View file @
0b10ad00
...
...
@@ -551,14 +551,14 @@ span.spinner.hor_centered {
color: white;
}
#conversejs #
offscreen
-chatboxes {
#conversejs #
trimmed
-chatboxes {
float: left;
height: 25px;
margin-left: 5px;
display: block;
}
#conversejs #
offscreen
-chatboxes .box-flyout {
#conversejs #
trimmed
-chatboxes .box-flyout {
position: absolute;
display: block;
bottom: 1px;
...
...
@@ -567,7 +567,7 @@ span.spinner.hor_centered {
height: auto;
}
#conversejs #
offscreen
-chatboxes .box-flyout .chat-head {
#conversejs #
trimmed
-chatboxes .box-flyout .chat-head {
font-size: 100%;
border-radius: 4px;
padding: 3px 0 0 5px;
...
...
@@ -576,7 +576,7 @@ span.spinner.hor_centered {
height: 24px;
}
#conversejs #
offscreen
-chatboxes .chat-head-chatroom {
#conversejs #
trimmed
-chatboxes .chat-head-chatroom {
width: 100px;
}
...
...
mockup/index.html
View file @
0b10ad00
...
...
@@ -373,7 +373,7 @@
</div>
</div>
<div
id=
"
offscreen
-chatboxes"
>
<div
id=
"
trimmed
-chatboxes"
>
<div
class=
"box-flyout"
>
<div
class=
"chat-head chat-head-chatroom"
>
<a
class=
"close-chatbox-button icon-close"
></a>
...
...
src/templates/trimmed_chat.html
0 → 100644
View file @
0b10ad00
<div
class=
"chat-head"
>
<a
class=
"close-chatbox-button icon-close"
></a>
<div
class=
"chat-title"
>
JC Brand
</div>
</div>
src/templates/trimmed_chats.html
0 → 100644
View file @
0b10ad00
<div
class=
"box-flyout"
></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