Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
6
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
C
colt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nala Ginrut
colt
Commits
4d9e927d
Verified
Commit
4d9e927d
authored
Sep 19, 2019
by
Nala Ginrut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix auto save content
parent
4674c089
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
11 deletions
+6
-11
pub/js/dashboard.js
pub/js/dashboard.js
+3
-0
pub/js/editor.js
pub/js/editor.js
+3
-11
No files found.
pub/js/dashboard.js
View file @
4d9e927d
...
...
@@ -23,6 +23,9 @@
for the JavaScript code in this page.
*/
window
.
addEventListener
(
'
touchstart
'
,
{});
// in top window
window
.
addEventListener
(
'
touchmove
'
,
{});
// in top window
document
.
addEventListener
(
'
DOMContentLoaded
'
,
function
()
{
let
sidenav
=
document
.
querySelectorAll
(
'
.sidenav
'
);
let
mboxed
=
document
.
querySelectorAll
(
'
.materialboxed
'
);
...
...
pub/js/editor.js
View file @
4d9e927d
...
...
@@ -27,12 +27,9 @@ var children_nodes;
var
quill
;
var
url_name
;
var
article_oid
;
setInterval
(
_
=>
{
if
(
typeof
quill
!==
'
undefined
'
)
localStorage
.
setItem
(
'
colt.saved_content
'
,
quill
.
root
.
innerHTML
);
},
1000
);
window
.
addEventListener
(
'
touchstart
'
,
{});
// in top window
function
new_post
(
obj
)
{
let
article_title
=
$
(
'
#edit-article-title
'
)[
0
]
;
let
article_title
=
document
.
getElementById
(
'
edit-article-title
'
)
;
hljs
.
configure
({
languages
:
[
'
javascript
'
,
'
ruby
'
,
'
python
'
,
'
lua
'
,
'
erlang
'
,
'
c++
'
,
'
scheme
'
,
'
rust
'
,
'
haskell
'
,
'
bash
'
]
...
...
@@ -52,12 +49,7 @@ function new_post(obj) {
theme
:
'
snow
'
});
if
(
typeof
article_title
!==
"
undefined
"
&&
article_title
!==
null
&&
""
===
article_title
.
value
)
{
quill
.
root
.
innerHTML
=
localStorage
.
getItem
(
'
colt.saved_content
'
);
}
quill
.
root
.
innerHTML
=
localStorage
.
getItem
(
'
colt.saved_content
'
);
setInterval
(
_
=>
{
localStorage
.
setItem
(
'
colt.saved_content
'
,
quill
.
root
.
innerHTML
);
},
1000
);
}
...
...
@@ -111,7 +103,7 @@ function cancel_edit() {
}
function
show_msg_layer
(
msg
)
{
let
ml
=
$
(
'
#msg-layer
'
)[
0
]
;
let
ml
=
document
.
getElementById
(
'
msg-layer
'
)
;
ml
.
innerHTML
=
msg
;
ml
.
classList
.
add
(
'
msg-layer
'
);
ml
.
addEventListener
(
'
click
'
,
function
(
e
)
{
...
...
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