-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make rouxcode/django-text-ckeditor optional
- Loading branch information
Showing
9 changed files
with
41 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ Simple terms and condition notify app | |
|
||
## Install | ||
```shell | ||
$ pip install -e git+https://github.com/rouxcode/[email protected].6#egg=django-tac | ||
$ pip install -e git+https://github.com/rouxcode/[email protected].7#egg=django-tac | ||
``` | ||
|
||
## Usage | ||
|
@@ -39,6 +39,10 @@ use the template tag: | |
```html | ||
{% tac_popup %} | ||
``` | ||
or if rouxcode/django-text-ckeditor is not installed | ||
```html | ||
{% tac_popup_no_ckeditor %} | ||
``` | ||
|
||
### javascript | ||
jquery needs to be loaded before: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
from __future__ import unicode_literals | ||
|
||
|
||
__version__ = '0.0.6' | ||
__version__ = '0.0.7' | ||
default_app_config = 'tac.apps.TACConfig' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from __future__ import unicode_literals | ||
|
||
from django import forms | ||
|
||
|
||
class CKEditorWidget(forms.Textarea): | ||
|
||
def __init__(self, *args, **kwargs): | ||
try: | ||
kwargs.popu('conf') | ||
except Exception: | ||
pass | ||
|
||
super(CKEditorWidget, self).__init__(*args, **kwargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{% if show %}<div class="tac-popup tac-popup-no-ckeditor"> | ||
<div class="tac-popup-text">{{ object.text|safe }}</div> | ||
<a class="tac-popup-button" href="{{ url }}" data-apiurl="{{ apiurl }}">{{ object.get_button_label }}</a> | ||
</div>{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters