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
47e9e963
Commit
47e9e963
authored
Sep 17, 2014
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remember state of chat room sidebar.
parent
ba6b7201
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
21 deletions
+28
-21
converse.js
converse.js
+28
-21
No files found.
converse.js
View file @
47e9e963
...
@@ -1060,26 +1060,6 @@
...
@@ -1060,26 +1060,6 @@
this
.
scrollDown
();
this
.
scrollDown
();
},
},
toggleParticipants
:
function
(
ev
)
{
if
(
ev
)
{
ev
.
preventDefault
();
ev
.
stopPropagation
();
}
var
$el
=
$
(
ev
.
target
);
if
(
$el
.
hasClass
(
"
icon-hide-users
"
))
{
$el
.
removeClass
(
'
icon-hide-users
'
).
addClass
(
'
icon-show-users
'
);
this
.
$
(
'
div.participants
'
).
animate
({
width
:
0
}).
hide
();
this
.
$
(
'
.chat-area
'
).
animate
({
width
:
'
100%
'
});
this
.
$
(
'
form.sendXMPPMessage
'
).
animate
({
width
:
'
100%
'
});
}
else
{
$el
.
removeClass
(
'
icon-show-users
'
).
addClass
(
'
icon-hide-users
'
);
this
.
$
(
'
.chat-area
'
).
animate
({
width
:
'
200px
'
},
$
.
proxy
(
function
()
{
this
.
$
(
'
div.participants
'
).
css
({
width
:
'
100px
'
}).
show
();
},
this
));
this
.
$
(
'
form.sendXMPPMessage
'
).
animate
({
width
:
'
200px
'
});
}
},
clearChatRoomMessages
:
function
(
ev
)
{
clearChatRoomMessages
:
function
(
ev
)
{
ev
.
stopPropagation
();
ev
.
stopPropagation
();
var
result
=
confirm
(
__
(
"
Are you sure you want to clear the messages from this room?
"
));
var
result
=
confirm
(
__
(
"
Are you sure you want to clear the messages from this room?
"
));
...
@@ -2180,7 +2160,7 @@
...
@@ -2180,7 +2160,7 @@
'
click .toggle-smiley
'
:
'
toggleEmoticonMenu
'
,
'
click .toggle-smiley
'
:
'
toggleEmoticonMenu
'
,
'
click .toggle-smiley ul li
'
:
'
insertEmoticon
'
,
'
click .toggle-smiley ul li
'
:
'
insertEmoticon
'
,
'
click .toggle-clear
'
:
'
clearChatRoomMessages
'
,
'
click .toggle-clear
'
:
'
clearChatRoomMessages
'
,
'
click .toggle-participants a
'
:
'
toggle
Partici
pants
'
,
'
click .toggle-participants a
'
:
'
toggle
Occu
pants
'
,
'
keypress textarea.chat-textarea
'
:
'
keyPressed
'
,
'
keypress textarea.chat-textarea
'
:
'
keyPressed
'
,
'
mousedown .dragresize-tm
'
:
'
onDragResizeStart
'
'
mousedown .dragresize-tm
'
:
'
onDragResizeStart
'
},
},
...
@@ -2245,9 +2225,36 @@
...
@@ -2245,9 +2225,36 @@
.
append
(
this
.
occupantsview
.
render
().
$el
);
.
append
(
this
.
occupantsview
.
render
().
$el
);
this
.
renderToolbar
();
this
.
renderToolbar
();
}
}
// XXX: This is a bit of a hack, to make sure that the
// sidebar's state is remembered.
this
.
model
.
set
({
hidden_occupants
:
!
this
.
model
.
get
(
'
hidden_occupants
'
)});
this
.
toggleOccupants
();
return
this
;
return
this
;
},
},
toggleOccupants
:
function
(
ev
)
{
if
(
ev
)
{
ev
.
preventDefault
();
ev
.
stopPropagation
();
}
var
$el
=
this
.
$
(
'
.icon-hide-users
'
);
if
(
!
this
.
model
.
get
(
'
hidden_occupants
'
))
{
this
.
model
.
save
({
hidden_occupants
:
true
});
$el
.
removeClass
(
'
icon-hide-users
'
).
addClass
(
'
icon-show-users
'
);
this
.
$
(
'
div.participants
'
).
animate
({
width
:
0
}).
hide
();
this
.
$
(
'
.chat-area
'
).
animate
({
width
:
'
100%
'
});
this
.
$
(
'
form.sendXMPPMessage
'
).
animate
({
width
:
'
100%
'
});
}
else
{
this
.
model
.
save
({
hidden_occupants
:
false
});
$el
.
removeClass
(
'
icon-show-users
'
).
addClass
(
'
icon-hide-users
'
);
this
.
$
(
'
.chat-area
'
).
animate
({
width
:
'
200px
'
},
$
.
proxy
(
function
()
{
this
.
$
(
'
div.participants
'
).
css
({
width
:
'
100px
'
}).
show
();
},
this
));
this
.
$
(
'
form.sendXMPPMessage
'
).
animate
({
width
:
'
200px
'
});
}
},
onCommandError
:
function
(
stanza
)
{
onCommandError
:
function
(
stanza
)
{
this
.
showStatusNotification
(
__
(
"
Error: could not execute the command
"
),
true
);
this
.
showStatusNotification
(
__
(
"
Error: could not execute the command
"
),
true
);
},
},
...
...
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