Showing the changes to assets/javascripts (3 of 3 files). Show all
Unified · Split
| @@ -84,7 +84,9 @@ · 83 unmodified lines | |||
| 84 | @trigger 'ready' | 84 | @trigger 'ready' |
| 85 | @router.start() | 85 | @router.start() |
| 86 | @hideLoading() | 86 | @hideLoading() |
| 87 | new app.views.News() unless @doc | 87 | unless @doc |
| 88 | new app.views.News() | ||
| 89 | new app.views.Share() | ||
| 88 | @removeEvent 'ready bootError' | 90 | @removeEvent 'ready bootError' |
| 89 | return | 91 | return |
| 90 | 92 | ||
| @@ -21,3 +21,11 @@ app.templates.notifInvalidLocation = -> · 20 unmodified lines | |||
| 21 | 21 | ||
| 22 | app.templates.notifNews = (news) -> | 22 | app.templates.notifNews = (news) -> |
| 23 | notif 'Changelog', app.templates.newsList(news) | 23 | notif 'Changelog', app.templates.newsList(news) |
| 24 | |||
| 25 | app.templates.notifShare = -> | ||
| 26 | textNotif """ Hi there! """, | ||
| 27 | """ Like DevDocs? Help us reach more developers by sharing the link with your friends, on | ||
| 28 | <a href="https://twitter.com/intent/tweet?url=http%3A%2F%2Fdevdocs.io&via=DevDocs&text=All-in-one%2C%20quickly%20searchable%20API%20docs%3A" target="_blank">Twitter</a>, | ||
| 29 | <a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fdevdocs.io" target="_blank">Facebook</a>, | ||
| 30 | <a href="http://www.reddit.com/submit?url=http%3A%2F%2Fdevdocs.io&title=All-in-one%2C%20quickly%20searchable%20API%20docs&resubmit=true" target="_blank">Reddit</a>, | ||
| 31 | etc.<br>Thanks :)""" | ||
| @@ -0,0 +1,12 @@ | |||
| 1 | #= require views/misc/notif | ||
| 2 | |||
| 3 | class app.views.Share extends app.views.Notif | ||
| 4 | @defautOptions: | ||
| 5 | autoHide: null | ||
| 6 | |||
| 7 | init: -> | ||
| 8 | @type = 'Share' | ||
| 9 | @count = app.store.get('count') or 0 | ||
| 10 | app.store.set 'count', ++@count | ||
| 11 | @show() if @count is 5 | ||
| 12 | return | ||