bump semver-minor as this adds functionality.

This commit is contained in:
theodore.therone@gmail.com 2015-11-13 10:41:38 +00:00
parent 4b6cdb4a2c
commit 1bb8f258d2
2 changed files with 18 additions and 18 deletions

View file

@ -250,11 +250,11 @@ for updating specific fields within a django template.
There are two possible API calls that can be made:
1. ``api/unread_count/`` that returns a javascript object with 1 key: ``unread_count`` eg::
1. ``api/unread_count/`` that returns a javascript object with 1 key: ``unread_count`` eg::
{"unread_count":1}
#. ``api/unread_list/`` that returns a javascript object with 2 keys: `unread_count` and `unread_list` eg::
#. ``api/unread_list/`` that returns a javascript object with 2 keys: `unread_count` and `unread_list` eg::
{
"unread_count":1,
@ -267,37 +267,37 @@ There are two possible API calls that can be made:
How to use:
-----------
1. Put ``{% load notifications_tags %}`` in the template before you actually use notification tags.
2. In the area where you are loading javascript resources add the following tags in the order below::
1. Put ``{% load notifications_tags %}`` in the template before you actually use notification tags.
2. In the area where you are loading javascript resources add the following tags in the order below::
<script src="{% static 'notifications/notify.js' %}" type="text/javascript"></script>
{% register_notify_callbacks callbacks='fill_notification_list,fill_notification_badge' %}
``register_notify_callbacks`` takes the following arguments:
1. ``badge_id`` (default ``live_notify_badge``) - The `id` attribute of the element to show the unread count, that will be periodically updated.
#. ``menu_id`` (default ``live_notify_list``) - The `id` attribute of the element to insert a list of unread items, that will be periodically updated.
#. ``refresh_period`` (default ``15``) - How often to fetch unread items from the server (integer in seconds).
#. ``callbacks`` (default ``<empty string>``) - A comma-separated list of javascript functions to call each period.
#. ``api_url_name`` (default ``list``) - The name of the API to call (this can be either ``list`` or ``count``).
1. ``badge_id`` (default ``live_notify_badge``) - The `id` attribute of the element to show the unread count, that will be periodically updated.
#. ``menu_id`` (default ``live_notify_list``) - The `id` attribute of the element to insert a list of unread items, that will be periodically updated.
#. ``refresh_period`` (default ``15``) - How often to fetch unread items from the server (integer in seconds).
#. ``callbacks`` (default ``<empty string>``) - A comma-separated list of javascript functions to call each period.
#. ``api_url_name`` (default ``list``) - The name of the API to call (this can be either ``list`` or ``count``).
3. To insert a live-updating unread count, use the following template::
3. To insert a live-updating unread count, use the following template::
{% live_notify_badge %}
``live_notify_badge`` takes the following arguments:
1. ``badge_id`` (default ``live_notify_badge``) - The ``id`` attribute for the ``<span>`` element that will be created to show the unread count.
#. ``classes`` (default ``<empty string>``) - A string used to populate the ``class`` attribute of the above element.
1. ``badge_id`` (default ``live_notify_badge``) - The ``id`` attribute for the ``<span>`` element that will be created to show the unread count.
#. ``classes`` (default ``<empty string>``) - A string used to populate the ``class`` attribute of the above element.
4. To insert a live-updating unread count, use the following template::
4. To insert a live-updating unread count, use the following template::
{% live_notify_list %}
``live_notify_list`` takes the following arguments:
1. ``list_id`` (default ``live_notify_list``) - The ``id`` attribute for the ``<ul>`` element that will be created to insert the list of notifications into.
#. ``classes`` (default ``<empty string>``) - A string used to populate the ``class`` attribute of the above element.
1. ``list_id`` (default ``live_notify_list``) - The ``id`` attribute for the ``<ul>`` element that will be created to insert the list of notifications into.
#. ``classes`` (default ``<empty string>``) - A string used to populate the ``class`` attribute of the above element.
Using the live-updater with bootstrap
-------------------------------------
@ -319,7 +319,7 @@ While the live notifier for unread counts should suit most use cases, users may
unread notifications are shown.
The ``callbacks`` argument of the ``register_notify_callbacks`` dictates which javascript functions are called when
the unread api call is made.
the unread api call is made.
To add a custom javascript callback, simply add this to the list, like so::

View file

@ -11,7 +11,7 @@ except ImportError:
__version_info__ = {
'major': 0,
'minor': 7,
'minor': 8,
'micro': 0,
'releaselevel': 'final',
'serial': 0