History

Improve "update ready" notification

Thibaut Courouble committed 9 years ago

Commit d852bde1 parent 2e1af2f3 files · +5 −2Browse files

Showing the changes to assets/javascripts (2 of 3 files). Show all

Unified · Split

2 files
  1. assets/javascripts/templates/notif_tmpl.coffee +2 −2
  2. assets/javascripts/views/misc/notif.coffee +1 −0
assets/javascripts/templates/notif_tmpl.coffee+2−2
@@ -6,8 +6,8 @@ textNotif = (title, message) -> · 5 unmodified lines
6 notif title, """<p class="_notif-text">#{message}"""6 notif title, """<p class="_notif-text">#{message}"""
7 7
8app.templates.notifUpdateReady = ->8app.templates.notifUpdateReady = ->
9 textNotif """ DevDocs has been updated. """,9 textNotif """<span data-behavior="reboot">DevDocs has been updated.</span>""",
10 """ <a href="#" data-behavior="reboot">Reload the page</a> to use the new version. """10 """<span data-behavior="reboot"><a href="#" data-behavior="reboot">Reload the page</a> to use the new version.</span>"""
11 11
12app.templates.notifError = ->12app.templates.notifError = ->
13 textNotif """ Oops, an error occured. """,13 textNotif """ Oops, an error occured. """,
assets/javascripts/views/misc/notif.coffee+1−0
@@ -51,6 +51,7 @@ class app.views.Notif extends app.View · 50 unmodified lines
51 51
52 onClick: (event) =>52 onClick: (event) =>
53 return if event.which isnt 153 return if event.which isnt 1
54 return if event.target.hasAttribute('data-behavior')
54 if event.target.tagName isnt 'A' or event.target.classList.contains('_notif-close')55 if event.target.tagName isnt 'A' or event.target.classList.contains('_notif-close')
55 $.stopEvent(event)56 $.stopEvent(event)
56 @hide()57 @hide()

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t