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
157157 new app.views.Updates()
158158 @updateChecker = new app.UpdateChecker()
159159
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+
160167 reload: ->
161168 @docs.clearCache()
162169 @disabledDocs.clearCache()
163− if @appCache then @appCache.reload() else window.location = '/'
170+ if @appCache then @appCache.reload() else @reboot()
164171 return
165172
166173 reset: ->
assets/javascripts/app/appcache.coffee+1−1
@@ -27,7 +27,7 @@ class app.AppCache · 26 unmodified lines
2727 return
2828
2929 reload: ->
30− $.on @cache, 'updateready noupdate error', -> window.location = '/'
30+ $.on @cache, 'updateready noupdate error', -> app.reboot()
3131 @notifyUpdate = false
3232 @notifyProgress = true
3333 try @cache.update() catch
assets/javascripts/lib/license.coffee+1−1
@@ -1,5 +1,5 @@
11 ###
2− * Copyright 2013-2018 Thibaut Courouble and other contributors
2+ * Copyright 2013-2019 Thibaut Courouble and other contributors
33 *
44 * This source code is licensed under the terms of the Mozilla
55 * 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
6262 <li>iOS 10+
6363 </ul>
6464 <p class="_fail-text">
65− If you're unable to upgrade, I apologize.
66− I decided to prioritize speed and new features over support for older browsers.
65+ If you're unable to upgrade, we apologize.
66+ We decided to prioritize speed and new features over support for older browsers.
6767 <p class="_fail-text">
6868 Note: if you're already using one of the browsers above, check your settings and add-ons.
6969 The app uses feature detection, not user agent sniffing.
7070 <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>
7272 </div>
7373 """
assets/javascripts/templates/pages/about_tmpl.coffee+17−22
@@ -11,22 +11,18 @@ app.templates.aboutPage = -> """ · 10 unmodified lines
1111 </nav>
1212
1313 <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.
15− <ul>
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>
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+ <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>.
2016 <p>To keep up-to-date with the latest news:
2117 <ul>
2218 <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>
24− <li>Join the <a href="https://groups.google.com/d/forum/devdocs">mailing list</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>
20+ <li>Join the <a href="https://gitter.im/FreeCodeCamp/DevDocs">Gitter</a> chat room
2521 </ul>
2622
2723 <h2 class="_block-heading" id="copyright">Copyright and License</h2>
2824 <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>
3026 This software is licensed under the terms of the Mozilla Public License v2.0.<br>
3127 You may obtain a copy of the source code at <a href="https://github.com/freeCodeCamp/devdocs">github.com/freeCodeCamp/devdocs</a>.<br>
3228 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
4844 <dt>Where can I suggest new docs and features?
4945 <dd>You can suggest and vote for new docs on the <a href="https://trello.com/b/6BmTulfx/devdocs-documentation">Trello board</a>.<br>
5046 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.
5248 <dt>Where can I report bugs?
5349 <dd>In the <a href="https://github.com/freeCodeCamp/devdocs/issues">issue tracker</a>. Thanks!
5450 </dl>
55− <p>For anything else, feel free to email me at <a href="mailto:thibaut@devdocs.io">thibaut@devdocs.io</a>.
5651
5752 <h2 class="_block-heading" id="credits">Credits</h2>
5853
@@ -76,12 +71,12 @@ app.templates.aboutPage = -> """ · 17 unmodified lines
7671
7772 <h2 class="_block-heading" id="privacy">Privacy Policy</h2>
7873 <ul>
79− <li><a href="https://devdocs.io">devdocs.io</a> ("App") is operated by Thibaut Courouble ("We").
80− <li>We do not collect personal information.
74+ <li><a href="https://devdocs.io">devdocs.io</a> ("App") is operated by <a href="https://www.freecodecamp.org/">freeCodeCamp</a> ("We").
75+ <li>We do not collect personal information through the app.
8176 <li>We use Google Analytics, Gauges and Sentry to collect anonymous traffic information and improve the app.
8277 <li>The app uses cookies to store user preferences.
8378 <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>.
8580 </ul>
8681 """
8782
@@ -102,7 +97,7 @@ credits = [ · 14 unmodified lines
10297 'https://www.apache.org/licenses/LICENSE-2.0'
10398 ], [
10499 'Async',
105− '2010-2017 Caolan McMahon',
100+ '2010-2018 Caolan McMahon',
106101 'MIT',
107102 'https://raw.githubusercontent.com/caolan/async/master/LICENSE'
108103 ], [
@@ -192,7 +187,7 @@ credits = [ · 83 unmodified lines
192187 'https://raw.githubusercontent.com/jashkenas/coffeescript/master/LICENSE'
193188 ], [
194189 'Cordova',
195− '2012-2017 The Apache Software Foundation',
190+ '2012-2018 The Apache Software Foundation',
196191 'Apache',
197192 'https://raw.githubusercontent.com/apache/cordova-docs/master/LICENSE'
198193 ], [
@@ -372,7 +367,7 @@ credits = [ · 173 unmodified lines
372367 'https://raw.githubusercontent.com/jquery/api.jqueryui.com/master/LICENSE.txt'
373368 ], [
374369 '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',
376371 'MIT',
377372 'https://raw.githubusercontent.com/JuliaLang/julia/master/LICENSE.md'
378373 ], [
@@ -447,7 +442,7 @@ credits = [ · 68 unmodified lines
447442 'https://daringfireball.net/projects/markdown/license'
448443 ], [
449444 'Matplotlib',
450− '2012-2017 Matplotlib Development Team. All rights reserved.',
445+ '2012-2018 Matplotlib Development Team. All rights reserved.',
451446 'Custom',
452447 'https://raw.githubusercontent.com/matplotlib/matplotlib/master/LICENSE/LICENSE'
453448 ], [
@@ -652,7 +647,7 @@ credits = [ · 198 unmodified lines
652647 'http://scikit-image.org/docs/dev/license.html'
653648 ], [
654649 'scikit-learn',
655− '2007-2017 The scikit-learn developers',
650+ '2007-2018 The scikit-learn developers',
656651 'BSD',
657652 'https://raw.githubusercontent.com/scikit-learn/scikit-learn/master/COPYING'
658653 ], [
@@ -697,9 +692,9 @@ credits = [ · 38 unmodified lines
697692 'https://raw.githubusercontent.com/hashicorp/terraform-website/master/LICENSE.md'
698693 ], [
699694 'Twig',
700− '2009-2017 The Twig Team',
695+ '2009-2018 The Twig Team',
701696 'BSD',
702− 'https://twig.sensiolabs.org/license'
697+ 'https://twig.symfony.com/license'
703698 ], [
704699 'TypeScript',
705700 'Microsoft and other contributors',
@@ -707,7 +702,7 @@ credits = [ · 1 unmodified line
707702 'https://raw.githubusercontent.com/Microsoft/TypeScript-Handbook/master/LICENSE'
708703 ], [
709704 'Underscore.js',
710− '2009-2017 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors',
705+ '2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors',
711706 'MIT',
712707 'https://raw.githubusercontent.com/jashkenas/underscore/master/LICENSE'
713708 ], [
assets/javascripts/templates/pages/root_tmpl.coffee.erb+1−1
@@ -14,7 +14,7 @@ app.templates.intro = """ · 13 unmodified lines
1414 <li>Run <code>thor docs:download --installed</code> to update all downloaded documentations.
1515 <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.
1616 <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>.
1818 <li>Contributions are welcome. See the <a href="https://github.com/freeCodeCamp/devdocs/blob/master/CONTRIBUTING.md">guidelines</a>.
1919 <li>DevDocs is licensed under the terms of the Mozilla Public License v2.0. For more information,
2020 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
5757 doc[action](@onInstallSuccess.bind(@, doc), @onInstallError.bind(@, doc), @onInstallProgress.bind(@, doc))
5858 el.parentNode.innerHTML = "#{el.textContent.replace(/e$/, '')}ing…"
5959 else if action = el.getAttribute('data-action-all')
60+ return unless action isnt 'uninstall' or window.confirm('Uninstall all docs?')
6061 app.db.migrate()
6162 $.click(el) for el in @findAll("[data-action='#{action}']")
6263 return
assets/javascripts/views/layout/document.coffee+1−1
@@ -77,7 +77,7 @@ class app.views.Document extends app.View · 76 unmodified lines
7777 switch target.getAttribute('data-behavior')
7878 when 'back' then history.back()
7979 when 'reload' then window.location.reload()
80− when 'reboot' then window.location = '/'
80+ when 'reboot' then app.reboot()
8181 when 'hard-reload' then app.reload()
8282 when 'reset' then app.reset() if confirm('Are you sure you want to reset DevDocs?')
8383 return