Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
304
Merge Requests
304
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
84407eb5
Commit
84407eb5
authored
Aug 28, 2015
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2526406
by eiriksm: JSDoc history module
parent
a7326f8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
core/modules/history/js/history.js
core/modules/history/js/history.js
+11
-7
No files found.
core/modules/history/js/history.js
View file @
84407eb5
...
...
@@ -75,7 +75,7 @@
},
/**
* Marks a node as read, store the last read timestamp
in client-side storag
e.
* Marks a node as read, store the last read timestamp
client-sid
e.
*
* @param {number|string} nodeID
* A node ID.
...
...
@@ -86,7 +86,8 @@
type
:
'
POST
'
,
dataType
:
'
json
'
,
success
:
function
(
timestamp
)
{
// If the data is embedded in the page, don't store on the client side.
// If the data is embedded in the page, don't store on the client
// side.
if
(
embeddedLastReadTimestamps
&&
embeddedLastReadTimestamps
[
nodeID
])
{
return
;
}
...
...
@@ -99,9 +100,10 @@
/**
* Determines whether a server check is necessary.
*
* Any content that is >30 days old never gets a "new" or "updated" indicator.
* Any content that was published before the oldest known reading also never
* gets a "new" or "updated" indicator, because it must've been read already.
* Any content that is >30 days old never gets a "new" or "updated"
* indicator. Any content that was published before the oldest known reading
* also never gets a "new" or "updated" indicator, because it must've been
* read already.
*
* @param {number|string} nodeID
* A node ID.
...
...
@@ -109,10 +111,12 @@
* The time at which some content (e.g. a comment) was published.
*
* @return {bool}
* Whether a server check is necessary for the given node and its timestamp.
* Whether a server check is necessary for the given node and its
* timestamp.
*/
needsServerCheck
:
function
(
nodeID
,
contentTimestamp
)
{
// First check if the content is older than 30 days, then we can bail early.
// First check if the content is older than 30 days, then we can bail
// early.
if
(
contentTimestamp
<
thirtyDaysAgo
)
{
return
false
;
}
...
...
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