From 590ad722cd9de8dbd328a4a3a94210fc37b5ff40 Mon Sep 17 00:00:00 2001 From: Patrick Altman Date: Sun, 13 Jan 2013 18:21:37 -0600 Subject: [PATCH] Update docs per 1.0 changes --- docs/installation.rst | 12 +++++++++++- docs/templates.rst | 6 ++++++ docs/usage.rst | 29 ++++++----------------------- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/docs/installation.rst b/docs/installation.rst index 0a3d5c1..7d89d6e 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -29,6 +29,14 @@ Installation Dependencies ------------ +bootstrap-ajax_ +^^^^^^^^^^^^^^^ + +This is used to enable the markup based ajax. You can certain wire up your +own AJAX handling if you prefer to use something else. However, including +this script will just have things work out of the box. + + pinax-theme-bootstrap_ ^^^^^^^^^^^^^^^^^^^^^^ @@ -44,5 +52,7 @@ django-user-accounts_ Used for linking people to invitations when they confirm email addresses and sending and processing of signup codes via email. -.. _django-uni-form: https://github.com/pydanny/django-uni-form + +.. _bootstrap-ajax: http://github.com/eldarion/bootstrap-ajax +.. _pinax-theme-bootstrap: http://github.com/pinax/pinax-theme-bootstrap .. _django-user-accounts: http://github.com/pinax/django-user-accounts diff --git a/docs/templates.rst b/docs/templates.rst index 552f8fc..3a15dab 100644 --- a/docs/templates.rst +++ b/docs/templates.rst @@ -19,3 +19,9 @@ _invited.html A simple unordered list of people you have invited that is linked to their profile when they join the site. + + +_invites_remaining.html +----------------------- + +A fragment to display how many invites a particular user has. diff --git a/docs/usage.rst b/docs/usage.rst index f3a2e7e..f5cac88 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -28,26 +28,9 @@ showed the user if they were logged in or note you could have:: {% load kaleo_tags %} - - ({% remaining_invites user %}) - - - -And then a bit of jQuery (this assumes use of the jquery.form plugin):: - - $(function () { - $('.invites form').ajaxForm(function(data) { - if (data.status == "OK") { - $('#invitation-form-messages').html("

Invitation sent to " + data.email + "

"); - $('.empty-invites').remove(); - $('.invite-list').append("
  • " + data.email + "
  • "); - $('.invites form input[type=text]').val(""); - $('.invitations_remaining').html("(" + data.invitations_remaining + ")"); - if (data.invitations_remaining == 0) { - $('.invitation_form form').hide(); - } - } else { - $('#invitation-form-messages').html(data.errors); - } - }); - }); + {% invites_remaining user %} + + +You'll then need to include bootstrap-ajax:: + +