django-cards 0.11.1__tar.gz → 0.11.3__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {django-cards-0.11.1/django_cards.egg-info → django-cards-0.11.3}/PKG-INFO +1 -1
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/base.py +12 -5
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/standard.py +5 -1
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/templates/cards/standard/card_group.html +6 -2
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/templates/cards/standard/datatable.html +2 -0
- {django-cards-0.11.1 → django-cards-0.11.3/django_cards.egg-info}/PKG-INFO +1 -1
- {django-cards-0.11.1 → django-cards-0.11.3}/setup.py +1 -1
- {django-cards-0.11.1 → django-cards-0.11.3}/LICENSE +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/MANIFEST.in +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/README.md +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/__init__.py +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/apps.py +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/card_list/__init__.py +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/card_list/base.py +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/card_list/main.py +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/card_list/tree.py +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/includes.py +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/default/32px.png +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/default/40px.png +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/default/style.css +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/default/style.min.css +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/default/throbber.gif +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/default-dark/32px.png +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/default-dark/40px.png +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/default-dark/style.css +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/default-dark/style.min.css +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/default-dark/throbber.gif +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/proton/30px.png +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/proton/32px.png +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-bold-webfont.eot +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-bold-webfont.svg +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-bold-webfont.ttf +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-bold-webfont.woff +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-extralight-webfont.eot +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-extralight-webfont.svg +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-extralight-webfont.ttf +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-extralight-webfont.woff +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-regular-webfont.eot +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-regular-webfont.svg +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-regular-webfont.ttf +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-regular-webfont.woff +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/proton/style.css +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/proton/style.min.css +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/proton/throbber.gif +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/js/jstree.js +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/js/jstree.min.js +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/templates/cards/groups/groups.html +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/templates/cards/standard/blank.html +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/templates/cards/standard/default.html +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/templates/cards/standard/default_body.html +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/templates/cards/standard/html.html +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/templates/cards/standard/list_selection.html +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/templates/cards/standard/message.html +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/templates/cards/standard/table.html +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/templates/cards/standard/table_body.html +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/templates/cards/standard/tree_selection.html +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/templatetags/__init__.py +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/templatetags/django_cards_tags.py +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/cards/url_converters.py +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/django_cards.egg-info/SOURCES.txt +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/django_cards.egg-info/dependency_links.txt +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/django_cards.egg-info/top_level.txt +0 -0
- {django-cards-0.11.1 → django-cards-0.11.3}/setup.cfg +0 -0
@@ -1,5 +1,6 @@
|
|
1
1
|
import datetime
|
2
2
|
import json
|
3
|
+
from collections import defaultdict
|
3
4
|
|
4
5
|
from ajax_helpers.utils import random_string
|
5
6
|
from django.core.exceptions import FieldDoesNotExist
|
@@ -16,6 +17,7 @@ CARD_TYPE_ORDERED_DATATABLE = 3
|
|
16
17
|
CARD_TYPE_HTML = 4
|
17
18
|
CARD_TYPE_LIST_SELECTION = 5
|
18
19
|
CARD_TYPE_CARD_GROUP = 6
|
20
|
+
CARD_TYPE_CARD_LAYOUT = 7
|
19
21
|
|
20
22
|
|
21
23
|
class CardBase:
|
@@ -41,6 +43,10 @@ class CardBase:
|
|
41
43
|
'context': {'card_css_class': 'card django-card',
|
42
44
|
'card_body_css_outer_class': 'card-body',
|
43
45
|
'card_body_css_inner_class': 'row cards-list'}},
|
46
|
+
'card_layout': {'name': 'cards/standard/card_group.html',
|
47
|
+
'context': {'card_body_css_outer_class': '',
|
48
|
+
'card_css_class': '',
|
49
|
+
'card_body_css_inner_class': 'row'}},
|
44
50
|
'list_selection': {'name': 'cards/standard/list_selection.html',
|
45
51
|
'context': {'card_css_class': 'card django-card',
|
46
52
|
'card_link_css_class': 'list-group-item cards-list-group-item',
|
@@ -65,7 +71,8 @@ class CardBase:
|
|
65
71
|
CARD_TYPE_ORDERED_DATATABLE: 'datatable',
|
66
72
|
CARD_TYPE_HTML: 'html',
|
67
73
|
CARD_TYPE_LIST_SELECTION: 'list_selection',
|
68
|
-
CARD_TYPE_CARD_GROUP: 'card_group'
|
74
|
+
CARD_TYPE_CARD_GROUP: 'card_group',
|
75
|
+
CARD_TYPE_CARD_LAYOUT: 'card_layout'}
|
69
76
|
|
70
77
|
button_menu_type = 'button_group'
|
71
78
|
tab_menu_type = 'tabs'
|
@@ -410,11 +417,11 @@ class CardBase:
|
|
410
417
|
|
411
418
|
value_dict = {'value': value,
|
412
419
|
'label': label,
|
413
|
-
'menu': menu,
|
414
420
|
'link': link,
|
415
421
|
**kwargs}
|
416
|
-
|
417
|
-
|
422
|
+
if menu is not None:
|
423
|
+
value_dict['menu'] = menu.render()
|
424
|
+
row_style_html = html_row_style.format_map(defaultdict(lambda: '', value_dict))
|
418
425
|
|
419
426
|
entry = {'label': label,
|
420
427
|
'html': value,
|
@@ -560,7 +567,7 @@ class CardBase:
|
|
560
567
|
|
561
568
|
def add_child_card_group(self, *args, div_css_class='', div_inner_css_class='',
|
562
569
|
div_inner_css='', override_card_context=None):
|
563
|
-
if self.group_type
|
570
|
+
if self.group_type not in [CARD_TYPE_CARD_GROUP, CARD_TYPE_CARD_LAYOUT]:
|
564
571
|
raise Exception('This will only work for card group')
|
565
572
|
self.child_card_groups.append({'div_css_class': div_css_class,
|
566
573
|
'div_inner_css_class': div_inner_css_class,
|
@@ -4,7 +4,7 @@ from ajax_helpers.utils import is_ajax
|
|
4
4
|
from django.http import HttpResponse
|
5
5
|
from django.template.loader import render_to_string
|
6
6
|
|
7
|
-
from cards.base import CardBase, CARD_TYPE_HTML
|
7
|
+
from cards.base import CardBase, CARD_TYPE_HTML, CARD_TYPE_CARD_LAYOUT
|
8
8
|
|
9
9
|
|
10
10
|
class CardPostError(Exception):
|
@@ -87,6 +87,10 @@ class CardMixin:
|
|
87
87
|
self.cards[card_name] = card
|
88
88
|
return card
|
89
89
|
|
90
|
+
def add_layout_card(self, card_name=None):
|
91
|
+
return self.add_card(card_name=card_name,
|
92
|
+
group_type=CARD_TYPE_CARD_LAYOUT)
|
93
|
+
|
90
94
|
def get_context_data(self, **kwargs):
|
91
95
|
self.setup_datatable_cards()
|
92
96
|
self.setup_cards()
|
@@ -1,13 +1,17 @@
|
|
1
1
|
{% load django_cards_tags %}
|
2
2
|
<div class="{{ card_css_class }}" id="{{ card.code }}" data-title="">
|
3
|
+
|
4
|
+
{% if card.title or card.menu %}
|
3
5
|
<div class="card-header">
|
4
6
|
<div class="d-flex align-items-center">
|
5
7
|
<h5 class="mr-auto">{{ card.title }}</h5>
|
6
8
|
{{ card.menu.render }}
|
7
9
|
</div>
|
8
10
|
</div>
|
11
|
+
{% endif %}
|
9
12
|
{{ card.tab_menu.render }}
|
10
|
-
|
13
|
+
|
14
|
+
{% if card_body_css_outer_class %}<div class="{{ card_body_css_outer_class }}">{% endif %}
|
11
15
|
<div class="{{ card_body_css_inner_class }}">
|
12
16
|
{% for group in card.child_card_groups %}
|
13
17
|
<div class="{{ group.div_css_class }}">
|
@@ -23,7 +27,7 @@
|
|
23
27
|
</div>
|
24
28
|
{% endfor %}
|
25
29
|
</div>
|
26
|
-
</div>
|
30
|
+
{% if card_body_css_outer_class %}</div>{% endif %}
|
27
31
|
{% if card.footer %}
|
28
32
|
<div class="card-footer">
|
29
33
|
<small style="text-align: left">{{ card.footer|safe }}</small>
|
@@ -22,6 +22,7 @@
|
|
22
22
|
{{ card.tab_menu.render }}
|
23
23
|
<div class="{{ card_body_css_class }}{% if card.enable_collapse %} collapse{% if not card.collapsed %} show{% endif %}{% endif %}" id="{{ card.code }}_body"
|
24
24
|
{% if card_body_css_style %}style="{{ card_body_css_style }}"{% endif %}>
|
25
|
+
{{ top|safe }}
|
25
26
|
{% if show_search_bar and not show_pivot_table %}
|
26
27
|
<div class="d-flex">
|
27
28
|
<div class="p-2">{% no_of_results card.extra_card_info.datatable %}</div>
|
@@ -31,6 +32,7 @@
|
|
31
32
|
</div>
|
32
33
|
{% endif %}
|
33
34
|
{{ card.extra_card_info.datatable.render|safe }}
|
35
|
+
{{ bottom|safe }}
|
34
36
|
</div>
|
35
37
|
{% if card.footer %}
|
36
38
|
<div class="card-footer">
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/default/32px.png
RENAMED
File without changes
|
{django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/default/40px.png
RENAMED
File without changes
|
{django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/default/style.css
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/proton/30px.png
RENAMED
File without changes
|
{django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/proton/32px.png
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/proton/style.css
RENAMED
File without changes
|
File without changes
|
{django-cards-0.11.1 → django-cards-0.11.3}/cards/static/cards/jstree/css/themes/proton/throbber.gif
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{django-cards-0.11.1 → django-cards-0.11.3}/cards/templates/cards/standard/default_body.html
RENAMED
File without changes
|
File without changes
|
{django-cards-0.11.1 → django-cards-0.11.3}/cards/templates/cards/standard/list_selection.html
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{django-cards-0.11.1 → django-cards-0.11.3}/cards/templates/cards/standard/tree_selection.html
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|