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
43408a61
Commit
43408a61
authored
Jun 13, 2017
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dragresize: render handles in the plugin
instead of having them already in the templates.
parent
19d51f55
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
20 deletions
+24
-20
src/converse-dragresize.js
src/converse-dragresize.js
+24
-14
src/templates/chatbox.html
src/templates/chatbox.html
+0
-3
src/templates/controlbox.html
src/templates/controlbox.html
+0
-3
No files found.
src/converse-dragresize.js
View file @
43408a61
...
...
@@ -19,6 +19,17 @@
var
$
=
converse
.
env
.
jQuery
,
_
=
converse
.
env
.
_
;
function
renderDragResizeHandles
(
_converse
,
view
)
{
var
flyout
=
view
.
el
.
querySelector
(
'
.box-flyout
'
);
var
div
=
document
.
createElement
(
'
div
'
);
div
.
innerHTML
=
tpl_dragresize
();
flyout
.
insertBefore
(
div
,
flyout
.
firstChild
);
}
converse
.
plugins
.
add
(
'
converse-dragresize
'
,
{
/* Optional dependencies are other plugins which might be
* overridden or relied upon, and therefore need to be loaded before
...
...
@@ -102,6 +113,7 @@
render
:
function
()
{
var
result
=
this
.
__super__
.
render
.
apply
(
this
,
arguments
);
renderDragResizeHandles
(
this
.
__super__
.
_converse
,
this
);
this
.
setWidth
();
return
result
;
},
...
...
@@ -257,8 +269,10 @@
},
render
:
function
()
{
$
(
window
).
on
(
'
resize
'
,
_
.
debounce
(
this
.
setWidth
.
bind
(
this
),
100
));
return
this
.
__super__
.
render
.
apply
(
this
,
arguments
);
var
result
=
this
.
__super__
.
render
.
apply
(
this
,
arguments
);
renderDragResizeHandles
(
this
.
__super__
.
_converse
,
this
);
this
.
setWidth
();
return
result
;
}
},
...
...
@@ -274,6 +288,13 @@
this
.
__super__
.
initialize
.
apply
(
this
,
arguments
);
},
render
:
function
()
{
var
result
=
this
.
__super__
.
render
.
apply
(
this
,
arguments
);
renderDragResizeHandles
(
this
.
__super__
.
_converse
,
this
);
this
.
setWidth
();
return
result
;
},
renderLoginPanel
:
function
()
{
var
result
=
this
.
__super__
.
renderLoginPanel
.
apply
(
this
,
arguments
);
this
.
initDragResize
().
setDimensions
();
...
...
@@ -301,20 +322,9 @@
render
:
function
()
{
var
result
=
this
.
__super__
.
render
.
apply
(
this
,
arguments
);
this
.
renderDragResizeHandles
(
);
renderDragResizeHandles
(
this
.
__super__
.
_converse
,
this
);
this
.
setWidth
();
return
result
;
},
renderDragResizeHandles
:
function
()
{
var
_converse
=
this
.
__super__
.
_converse
;
var
flyout
=
this
.
el
.
querySelector
(
'
.box-flyout
'
);
var
div
=
document
.
createElement
(
'
div
'
);
div
.
innerHTML
=
tpl_dragresize
();
flyout
.
insertBefore
(
div
,
flyout
.
firstChild
);
}
}
},
...
...
src/templates/chatbox.html
View file @
43408a61
<div
class=
"flyout box-flyout"
>
<div
class=
"dragresize dragresize-top"
></div>
<div
class=
"dragresize dragresize-topleft"
></div>
<div
class=
"dragresize dragresize-left"
></div>
<div
class=
"chat-head chat-head-chatbox"
>
<a
class=
"chatbox-btn close-chatbox-button icon-close"
title=
"{{{info_close}}}"
></a>
<div
class=
"chat-title"
>
...
...
src/templates/controlbox.html
View file @
43408a61
<div
class=
"flyout box-flyout"
>
<div
class=
"dragresize dragresize-top"
></div>
<div
class=
"dragresize dragresize-topleft"
></div>
<div
class=
"dragresize dragresize-left"
></div>
<div
class=
"chat-head controlbox-head"
>
<ul
id=
"controlbox-tabs"
></ul>
{[ if (!sticky_controlbox) { ]}
...
...
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