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
9392377f
Commit
9392377f
authored
Jun 26, 2020
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chatview: Remove unused template and method
parent
9026062a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
34 deletions
+0
-34
src/converse-chatview.js
src/converse-chatview.js
+0
-30
src/templates/new_day.html
src/templates/new_day.html
+0
-4
No files found.
src/converse-chatview.js
View file @
9392377f
...
...
@@ -11,7 +11,6 @@ import log from "@converse/headless/log";
import
tpl_chatbox
from
"
templates/chatbox.js
"
;
import
tpl_chatbox_head
from
"
templates/chatbox_head.js
"
;
import
tpl_chatbox_message_form
from
"
templates/chatbox_message_form.js
"
;
import
tpl_new_day
from
"
templates/new_day.html
"
;
import
tpl_spinner
from
"
templates/spinner.html
"
;
import
tpl_spoiler_button
from
"
templates/spoiler_button.html
"
;
import
tpl_toolbar
from
"
templates/toolbar.js
"
;
...
...
@@ -586,35 +585,6 @@ converse.plugins.add('converse-chatview', {
this
.
content
.
querySelectorAll
(
'
.spinner
'
).
forEach
(
u
.
removeElement
);
},
/**
* Inserts an indicator into the chat area, showing the
* day as given by the passed in date.
* The indicator is only inserted if necessary.
* @private
* @method _converse.ChatBoxView#insertDayIndicator
* @param { HTMLElement } next_msg_el - The message element before
* which the day indicator element must be inserted.
* This element must have a "data-isodate" attribute
* which specifies its creation date.
*/
insertDayIndicator
(
next_msg_el
)
{
const
prev_msg_el
=
u
.
getPreviousElement
(
next_msg_el
,
"
.message:not(.chat-state-notification)
"
);
const
prev_msg_date
=
(
prev_msg_el
===
null
)
?
null
:
prev_msg_el
.
getAttribute
(
'
data-isodate
'
);
const
next_msg_date
=
next_msg_el
.
getAttribute
(
'
data-isodate
'
);
if
(
prev_msg_date
===
null
&&
next_msg_date
===
null
)
{
return
;
}
if
((
prev_msg_date
===
null
)
||
dayjs
(
next_msg_date
).
isAfter
(
prev_msg_date
,
'
day
'
))
{
const
day_date
=
dayjs
(
next_msg_date
).
startOf
(
'
day
'
);
next_msg_el
.
insertAdjacentHTML
(
'
beforeBegin
'
,
tpl_new_day
({
'
isodate
'
:
day_date
.
toISOString
(),
'
datestring
'
:
day_date
.
format
(
"
dddd MMM Do YYYY
"
)
})
);
}
},
setScrollPosition
(
message_el
)
{
/* Given a newly inserted message, determine whether we
* should keep the scrollbar in place (so as to not scroll
...
...
src/templates/new_day.html
deleted
100644 → 0
View file @
9026062a
<div
class=
"message date-separator"
data-isodate=
"{{{o.isodate}}}"
>
<hr
class=
"separator"
/>
<time
class=
"separator-text"
datetime=
"{{{o.isodate}}}"
><span>
{{{o.datestring}}}
</span></time>
</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