History

Merge branch 'master' into mariadb

Jasper van Merle committed 7 years ago

Commit 29337982 parents ad53c65 2eb8654168 files · +874 −358Browse files

Showing the changes to assets/javascripts (8 of 168 files). Show all

Unified · Split

8 files
  1. assets/javascripts/app/app.coffee +8 −1
  2. assets/javascripts/app/appcache.coffee +1 −1
  3. assets/javascripts/lib/license.coffee +1 −1
  4. assets/javascripts/templates/error_tmpl.coffee +3 −3
  5. assets/javascripts/templates/pages/about_tmpl.coffee +17 −22
  6. assets/javascripts/templates/pages/root_tmpl.coffee.erb +1 −1
  7. assets/javascripts/views/content/offline_page.coffee +1 −0
  8. assets/javascripts/views/layout/document.coffee +1 −1
assets/javascripts/app/app.coffee+8−1
@@ -157,10 +157,17 @@ · 156 unmodified lines
157 new app.views.Updates()157 new app.views.Updates()
158 @updateChecker = new app.UpdateChecker()158 @updateChecker = new app.UpdateChecker()
159 159
160 reboot: ->
161 if location.pathname isnt '/' and location.pathname isnt '/settings'
162 window.location = "/##{location.pathname}"
163 else
164 window.location = '/'
165 return
166
160 reload: ->167 reload: ->
161 @docs.clearCache()168 @docs.clearCache()
162 @disabledDocs.clearCache()169 @disabledDocs.clearCache()
163 if @appCache then @appCache.reload() else window.location = '/'170 if @appCache then @appCache.reload() else @reboot()
164 return171 return
165 172
166 reset: ->173 reset: ->
assets/javascripts/app/appcache.coffee+1−1
@@ -27,7 +27,7 @@ class app.AppCache · 26 unmodified lines
27 return27 return
28 28
29 reload: ->29 reload: ->
30 $.on @cache, 'updateready noupdate error', -> window.location = '/'30 $.on @cache, 'updateready noupdate error', -> app.reboot()
31 @notifyUpdate = false31 @notifyUpdate = false
32 @notifyProgress = true32 @notifyProgress = true
33 try @cache.update() catch33 try @cache.update() catch
assets/javascripts/lib/license.coffee+1−1
@@ -1,5 +1,5 @@
1###1###
2 * Copyright 2013-2018 Thibaut Courouble and other contributors2 * Copyright 2013-2019 Thibaut Courouble and other contributors
3 *3 *
4 * This source code is licensed under the terms of the Mozilla4 * This source code is licensed under the terms of the Mozilla
5 * Public License, v. 2.0, a copy of which may be obtained at:5 * Public License, v. 2.0, a copy of which may be obtained at:
assets/javascripts/templates/error_tmpl.coffee+3−3
@@ -62,12 +62,12 @@ app.templates.unsupportedBrowser = """ · 61 unmodified lines
62 <li>iOS 10+62 <li>iOS 10+
63 </ul>63 </ul>
64 <p class="_fail-text">64 <p class="_fail-text">
65 If you're unable to upgrade, I apologize.65 If you're unable to upgrade, we apologize.
66 I decided to prioritize speed and new features over support for older browsers.66 We decided to prioritize speed and new features over support for older browsers.
67 <p class="_fail-text">67 <p class="_fail-text">
68 Note: if you're already using one of the browsers above, check your settings and add-ons.68 Note: if you're already using one of the browsers above, check your settings and add-ons.
69 The app uses feature detection, not user agent sniffing.69 The app uses feature detection, not user agent sniffing.
70 <p class="_fail-text">70 <p class="_fail-text">
71 &mdash; Thibaut <a href="https://twitter.com/DevDocs" class="_fail-link">@DevDocs</a>71 &mdash; <a href="https://twitter.com/DevDocs">@DevDocs</a>
72 </div>72 </div>
73"""73"""
assets/javascripts/templates/pages/about_tmpl.coffee+17−22
@@ -11,22 +11,18 @@ app.templates.aboutPage = -> """ · 10 unmodified lines
11 </nav>11 </nav>
12 12
13 <h1 class="_lined-heading">DevDocs: API Documentation Browser</h1>13 <h1 class="_lined-heading">DevDocs: API Documentation Browser</h1>
14 <p>DevDocs combines multiple API documentations in a clean and organized web UI with instant search, offline support, mobile version, dark theme, keyboard shortcuts, and more.14 <p>DevDocs combines multiple developer documentations in a clean and organized web UI with instant search, offline support, mobile version, dark theme, keyboard shortcuts, and more.
15 <ul>15 <p>DevDocs is free and <a href="https://github.com/freeCodeCamp/devdocs">open source</a>. It was created by <a href="https://thibaut.me">Thibaut Courouble</a> and is operated by <a href="https://www.freecodecamp.org/">freeCodeCamp</a>.
16 <li>Created and maintained by <a href="https://thibaut.me">Thibaut Courouble</a>
17 <li>Free and <a href="https://github.com/freeCodeCamp/devdocs">open source</a>
18 <iframe class="_github-btn" src="https://ghbtns.com/github-btn.html?user=freeCodeCamp&repo=devdocs&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100" height="20" tabindex="-1"></iframe>
19 </ul>
20 <p>To keep up-to-date with the latest news:16 <p>To keep up-to-date with the latest news:
21 <ul>17 <ul>
22 <li>Follow <a href="https://twitter.com/DevDocs">@DevDocs</a> on Twitter18 <li>Follow <a href="https://twitter.com/DevDocs">@DevDocs</a> on Twitter
23 <li>Watch the repository on <a href="https://github.com/freeCodeCamp/devdocs/subscription">GitHub</a>19 <li>Watch the repository on <a href="https://github.com/freeCodeCamp/devdocs/subscription">GitHub</a> <iframe class="_github-btn" src="https://ghbtns.com/github-btn.html?user=freeCodeCamp&repo=devdocs&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100" height="20" tabindex="-1"></iframe>
24 <li>Join the <a href="https://groups.google.com/d/forum/devdocs">mailing list</a>20 <li>Join the <a href="https://gitter.im/FreeCodeCamp/DevDocs">Gitter</a> chat room
25 </ul>21 </ul>
26 22
27 <h2 class="_block-heading" id="copyright">Copyright and License</h2>23 <h2 class="_block-heading" id="copyright">Copyright and License</h2>
28 <p class="_note">24 <p class="_note">
29 <strong>Copyright 2013&ndash;2018 Thibaut Courouble and <a href="https://github.com/freeCodeCamp/devdocs/graphs/contributors">other contributors</a></strong><br>25 <strong>Copyright 2013&ndash;2019 Thibaut Courouble and <a href="https://github.com/freeCodeCamp/devdocs/graphs/contributors">other contributors</a></strong><br>
30 This software is licensed under the terms of the Mozilla Public License v2.0.<br>26 This software is licensed under the terms of the Mozilla Public License v2.0.<br>
31 You may obtain a copy of the source code at <a href="https://github.com/freeCodeCamp/devdocs">github.com/freeCodeCamp/devdocs</a>.<br>27 You may obtain a copy of the source code at <a href="https://github.com/freeCodeCamp/devdocs">github.com/freeCodeCamp/devdocs</a>.<br>
32 For more information, see the <a href="https://github.com/freeCodeCamp/devdocs/blob/master/COPYRIGHT">COPYRIGHT</a>28 For more information, see the <a href="https://github.com/freeCodeCamp/devdocs/blob/master/COPYRIGHT">COPYRIGHT</a>
@@ -48,11 +44,10 @@ app.templates.aboutPage = -> """ · 15 unmodified lines
48 <dt>Where can I suggest new docs and features?44 <dt>Where can I suggest new docs and features?
49 <dd>You can suggest and vote for new docs on the <a href="https://trello.com/b/6BmTulfx/devdocs-documentation">Trello board</a>.<br>45 <dd>You can suggest and vote for new docs on the <a href="https://trello.com/b/6BmTulfx/devdocs-documentation">Trello board</a>.<br>
50 If you have a specific feature request, add it to the <a href="https://github.com/freeCodeCamp/devdocs/issues">issue tracker</a>.<br>46 If you have a specific feature request, add it to the <a href="https://github.com/freeCodeCamp/devdocs/issues">issue tracker</a>.<br>
51 Otherwise use the <a href="https://groups.google.com/d/forum/devdocs">mailing list</a>.47 Otherwise, come talk to us in the <a href="https://gitter.im/FreeCodeCamp/DevDocs">Gitter</a> chat room.
52 <dt>Where can I report bugs?48 <dt>Where can I report bugs?
53 <dd>In the <a href="https://github.com/freeCodeCamp/devdocs/issues">issue tracker</a>. Thanks!49 <dd>In the <a href="https://github.com/freeCodeCamp/devdocs/issues">issue tracker</a>. Thanks!
54 </dl>50 </dl>
55 <p>For anything else, feel free to email me at <a href="mailto:thibaut@devdocs.io">thibaut@devdocs.io</a>.
56 51
57 <h2 class="_block-heading" id="credits">Credits</h2>52 <h2 class="_block-heading" id="credits">Credits</h2>
58 53
@@ -76,12 +71,12 @@ app.templates.aboutPage = -> """ · 17 unmodified lines
76 71
77 <h2 class="_block-heading" id="privacy">Privacy Policy</h2>72 <h2 class="_block-heading" id="privacy">Privacy Policy</h2>
78 <ul>73 <ul>
79 <li><a href="https://devdocs.io">devdocs.io</a> ("App") is operated by Thibaut Courouble ("We").74 <li><a href="https://devdocs.io">devdocs.io</a> ("App") is operated by <a href="https://www.freecodecamp.org/">freeCodeCamp</a> ("We").
80 <li>We do not collect personal information.75 <li>We do not collect personal information through the app.
81 <li>We use Google Analytics, Gauges and Sentry to collect anonymous traffic information and improve the app.76 <li>We use Google Analytics, Gauges and Sentry to collect anonymous traffic information and improve the app.
82 <li>The app uses cookies to store user preferences.77 <li>The app uses cookies to store user preferences.
83 <li>By using the app, you signify your acceptance of this policy. If you do not agree to this policy, please do not use the app.78 <li>By using the app, you signify your acceptance of this policy. If you do not agree to this policy, please do not use the app.
84 <li>If you have any questions regarding privacy, please email <a href="mailto:thibaut@devdocs.io">thibaut@devdocs.io</a>.79 <li>If you have any questions regarding privacy, please email <a href="mailto:privacy@freecodecamp.org">privacy@freecodecamp.org</a>.
85 </ul>80 </ul>
86"""81"""
87 82
@@ -102,7 +97,7 @@ credits = [ · 14 unmodified lines
102 'https://www.apache.org/licenses/LICENSE-2.0'97 'https://www.apache.org/licenses/LICENSE-2.0'
103 ], [98 ], [
104 'Async',99 'Async',
105 '2010-2017 Caolan McMahon',100 '2010-2018 Caolan McMahon',
106 'MIT',101 'MIT',
107 'https://raw.githubusercontent.com/caolan/async/master/LICENSE'102 'https://raw.githubusercontent.com/caolan/async/master/LICENSE'
108 ], [103 ], [
@@ -192,7 +187,7 @@ credits = [ · 83 unmodified lines
192 'https://raw.githubusercontent.com/jashkenas/coffeescript/master/LICENSE'187 'https://raw.githubusercontent.com/jashkenas/coffeescript/master/LICENSE'
193 ], [188 ], [
194 'Cordova',189 'Cordova',
195 '2012-2017 The Apache Software Foundation',190 '2012-2018 The Apache Software Foundation',
196 'Apache',191 'Apache',
197 'https://raw.githubusercontent.com/apache/cordova-docs/master/LICENSE'192 'https://raw.githubusercontent.com/apache/cordova-docs/master/LICENSE'
198 ], [193 ], [
@@ -372,7 +367,7 @@ credits = [ · 173 unmodified lines
372 'https://raw.githubusercontent.com/jquery/api.jqueryui.com/master/LICENSE.txt'367 'https://raw.githubusercontent.com/jquery/api.jqueryui.com/master/LICENSE.txt'
373 ], [368 ], [
374 'Julia',369 'Julia',
375 '2009-2016 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors',370 '2009-2018 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors',
376 'MIT',371 'MIT',
377 'https://raw.githubusercontent.com/JuliaLang/julia/master/LICENSE.md'372 'https://raw.githubusercontent.com/JuliaLang/julia/master/LICENSE.md'
378 ], [373 ], [
@@ -447,7 +442,7 @@ credits = [ · 68 unmodified lines
447 'https://daringfireball.net/projects/markdown/license'442 'https://daringfireball.net/projects/markdown/license'
448 ], [443 ], [
449 'Matplotlib',444 'Matplotlib',
450 '2012-2017 Matplotlib Development Team. All rights reserved.',445 '2012-2018 Matplotlib Development Team. All rights reserved.',
451 'Custom',446 'Custom',
452 'https://raw.githubusercontent.com/matplotlib/matplotlib/master/LICENSE/LICENSE'447 'https://raw.githubusercontent.com/matplotlib/matplotlib/master/LICENSE/LICENSE'
453 ], [448 ], [
@@ -652,7 +647,7 @@ credits = [ · 198 unmodified lines
652 'http://scikit-image.org/docs/dev/license.html'647 'http://scikit-image.org/docs/dev/license.html'
653 ], [648 ], [
654 'scikit-learn',649 'scikit-learn',
655 '2007-2017 The scikit-learn developers',650 '2007-2018 The scikit-learn developers',
656 'BSD',651 'BSD',
657 'https://raw.githubusercontent.com/scikit-learn/scikit-learn/master/COPYING'652 'https://raw.githubusercontent.com/scikit-learn/scikit-learn/master/COPYING'
658 ], [653 ], [
@@ -697,9 +692,9 @@ credits = [ · 38 unmodified lines
697 'https://raw.githubusercontent.com/hashicorp/terraform-website/master/LICENSE.md'692 'https://raw.githubusercontent.com/hashicorp/terraform-website/master/LICENSE.md'
698 ], [693 ], [
699 'Twig',694 'Twig',
700 '2009-2017 The Twig Team',695 '2009-2018 The Twig Team',
701 'BSD',696 'BSD',
702 'https://twig.sensiolabs.org/license'697 'https://twig.symfony.com/license'
703 ], [698 ], [
704 'TypeScript',699 'TypeScript',
705 'Microsoft and other contributors',700 'Microsoft and other contributors',
@@ -707,7 +702,7 @@ credits = [ · 1 unmodified line
707 'https://raw.githubusercontent.com/Microsoft/TypeScript-Handbook/master/LICENSE'702 'https://raw.githubusercontent.com/Microsoft/TypeScript-Handbook/master/LICENSE'
708 ], [703 ], [
709 'Underscore.js',704 'Underscore.js',
710 '2009-2017 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors',705 '2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors',
711 'MIT',706 'MIT',
712 'https://raw.githubusercontent.com/jashkenas/underscore/master/LICENSE'707 'https://raw.githubusercontent.com/jashkenas/underscore/master/LICENSE'
713 ], [708 ], [
assets/javascripts/templates/pages/root_tmpl.coffee.erb+1−1
@@ -14,7 +14,7 @@ app.templates.intro = """ · 13 unmodified lines
14 <li>Run <code>thor docs:download --installed</code> to update all downloaded documentations.14 <li>Run <code>thor docs:download --installed</code> to update all downloaded documentations.
15 <li>To be notified about new versions, don't forget to <a href="https://github.com/freeCodeCamp/devdocs/subscription">watch the repository</a> on GitHub.15 <li>To be notified about new versions, don't forget to <a href="https://github.com/freeCodeCamp/devdocs/subscription">watch the repository</a> on GitHub.
16 <li>The <a href="https://github.com/freeCodeCamp/devdocs/issues">issue tracker</a> is the preferred channel for bug reports and16 <li>The <a href="https://github.com/freeCodeCamp/devdocs/issues">issue tracker</a> is the preferred channel for bug reports and
17 feature requests. For everything else, use the <a href="https://groups.google.com/d/forum/devdocs">mailing list</a>.17 feature requests. For everything else, use <a href="https://gitter.im/FreeCodeCamp/DevDocs">Gitter</a>.
18 <li>Contributions are welcome. See the <a href="https://github.com/freeCodeCamp/devdocs/blob/master/CONTRIBUTING.md">guidelines</a>.18 <li>Contributions are welcome. See the <a href="https://github.com/freeCodeCamp/devdocs/blob/master/CONTRIBUTING.md">guidelines</a>.
19 <li>DevDocs is licensed under the terms of the Mozilla Public License v2.0. For more information,19 <li>DevDocs is licensed under the terms of the Mozilla Public License v2.0. For more information,
20 see the <a href="https://github.com/freeCodeCamp/devdocs/blob/master/COPYRIGHT">COPYRIGHT</a> and20 see the <a href="https://github.com/freeCodeCamp/devdocs/blob/master/COPYRIGHT">COPYRIGHT</a> and
assets/javascripts/views/content/offline_page.coffee+1−0
@@ -57,6 +57,7 @@ class app.views.OfflinePage extends app.View · 56 unmodified lines
57 doc[action](@onInstallSuccess.bind(@, doc), @onInstallError.bind(@, doc), @onInstallProgress.bind(@, doc))57 doc[action](@onInstallSuccess.bind(@, doc), @onInstallError.bind(@, doc), @onInstallProgress.bind(@, doc))
58 el.parentNode.innerHTML = "#{el.textContent.replace(/e$/, '')}ing…"58 el.parentNode.innerHTML = "#{el.textContent.replace(/e$/, '')}ing…"
59 else if action = el.getAttribute('data-action-all')59 else if action = el.getAttribute('data-action-all')
60 return unless action isnt 'uninstall' or window.confirm('Uninstall all docs?')
60 app.db.migrate()61 app.db.migrate()
61 $.click(el) for el in @findAll("[data-action='#{action}']")62 $.click(el) for el in @findAll("[data-action='#{action}']")
62 return63 return
assets/javascripts/views/layout/document.coffee+1−1
@@ -77,7 +77,7 @@ class app.views.Document extends app.View · 76 unmodified lines
77 switch target.getAttribute('data-behavior')77 switch target.getAttribute('data-behavior')
78 when 'back' then history.back()78 when 'back' then history.back()
79 when 'reload' then window.location.reload()79 when 'reload' then window.location.reload()
80 when 'reboot' then window.location = '/'80 when 'reboot' then app.reboot()
81 when 'hard-reload' then app.reload()81 when 'hard-reload' then app.reload()
82 when 'reset' then app.reset() if confirm('Are you sure you want to reset DevDocs?')82 when 'reset' then app.reset() if confirm('Are you sure you want to reset DevDocs?')
83 return83 return