BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
bf02072a
Commit
bf02072a
authored
Mar 06, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly handle autosave local storage exceptions.
parent
e916f1c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
CHANGELOG
CHANGELOG
+1
-0
autosave.js.coffee
app/assets/javascripts/autosave.js.coffee
+9
-4
No files found.
CHANGELOG
View file @
bf02072a
...
...
@@ -20,6 +20,7 @@ v 7.9.0 (unreleased)
- Add brakeman (security scanner for Ruby on Rails)
- Slack username and channel options
- Add grouped milestones from all projects to dashboard.
- Properly handle autosave local storage exceptions.
v 7.8.1
- Fix run of custom post receive hooks
...
...
app/assets/javascripts/autosave.js.coffee
View file @
bf02072a
...
...
@@ -14,7 +14,11 @@ class @Autosave
restore
:
->
return
unless
window
.
localStorage
?
text
=
window
.
localStorage
.
getItem
@
key
try
text
=
window
.
localStorage
.
getItem
@
key
catch
return
@
field
.
val
text
if
text
?
.
length
>
0
@
field
.
trigger
"input"
...
...
@@ -23,11 +27,13 @@ class @Autosave
text
=
@
field
.
val
()
if
text
?
.
length
>
0
window
.
localStorage
.
setItem
@
key
,
text
try
window
.
localStorage
.
setItem
@
key
,
text
else
@
reset
()
reset
:
->
return
unless
window
.
localStorage
?
window
.
localStorage
.
removeItem
@
key
\ No newline at end of file
try
window
.
localStorage
.
removeItem
@
key
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