# HG changeset patch # User Ludovic Chabant # Date 1490073512 25200 # Node ID ba977a547daa71af127d3c7ff0ee41d847b71eb8 # Parent c93ac92aef5b93de465320ab72f8933a999ad178 web: Support browsers without Javascript. * Add development flag to disable Javascript. * Fix editing/previewing pages when there's not Javascript. diff -r c93ac92aef5b -r ba977a547daa wikked/commands/web.py --- a/wikked/commands/web.py Thu Jan 12 09:19:21 2017 -0800 +++ b/wikked/commands/web.py Mon Mar 20 22:18:32 2017 -0700 @@ -38,6 +38,10 @@ "code reloading and debugging.", action='store_true') parser.add_argument( + '--no-js', + help="Disable Javascript.", + action='store_true') + parser.add_argument( '--no-update', help="Don't auto-update the wiki if a page file has been " "touched (which means you can refresh a locally modified " @@ -81,6 +85,8 @@ wikked.settings.WIKI_SERVE_FILES = True if ctx.args.dev: wikked.settings.WIKI_DEV_ASSETS = True + if ctx.args.no_js: + wikked.settings.WIKI_DEV_NO_JS = True if not ctx.args.no_update: wikked.settings.WIKI_AUTO_RELOAD = True diff -r c93ac92aef5b -r ba977a547daa wikked/templates/edit-page.html --- a/wikked/templates/edit-page.html Thu Jan 12 09:19:21 2017 -0800 +++ b/wikked/templates/edit-page.html Mon Mar 20 22:18:32 2017 -0700 @@ -44,8 +44,8 @@
- - + + Cancel
@@ -57,10 +57,12 @@ {% endblock %} {% block scripts %} {% if is_dev %} +{% if not no_js %} +{% endif %} {% else %} diff -r c93ac92aef5b -r ba977a547daa wikked/templates/index.html --- a/wikked/templates/index.html Thu Jan 12 09:19:21 2017 -0800 +++ b/wikked/templates/index.html Mon Mar 20 22:18:32 2017 -0700 @@ -12,7 +12,7 @@ -