ndarville / pony-forum

A modern alternative to ancient forum CMSes like vBulletin and PHPBB in Python on Django. (Alpha stage.) (NB: dotCloud have since removed their free Sandbox tier.)
http://pony-forum.com
26 stars 7 forks source link

HTML fall-back for AJAX behaviour when NoScript is on #69

Closed ndarville closed 11 years ago

ndarville commented 12 years ago

Example and Code

Say you have a button:

<a class="js" href="{% thread_js %}>Subscribe</a>

Target this with JS:

// (...)

var jsButtons = // (...);

// Change `href` attribute to "#";

In other words, the buttons work with normal links and views, unless JS is enable, which alters the links to "#".

To Do

  1. Try this in the user view first, since there are a lot of problems with thanks/agrees
  2. Create view for non-JS queries, action_html
    • Apply @login_required()
  3. Template:
    • Turn GET buttons into POST forms
    • Insert {% url %}s in templates
  4. JS
ndarville commented 12 years ago

ef409fc405cdabcc5dee5e0840e2b76b073dbadc.

ndarville commented 12 years ago

Thread

HTML

CSS

JS

views.py

ndarville commented 11 years ago

Create a generic nonjs view for subscriptions, bookmarks, saves, thanks, and agrees later on with object_id and action arguments. (Done.)

Also rename simple_mod_action to simple_action. (Done.)

ndarville commented 11 years ago

Since thanks and agrees are off the table at the moment, I think it is fair to say that the app can now be considered to fully support NoScript!

a1nfJ

Suck it Twitter, Facebook, and all the rest of you who don’t.