django-cards 0.9.8__tar.gz → 0.10.1__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {django-cards-0.9.8 → django-cards-0.10.1}/PKG-INFO +1 -1
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/base.py +7 -1
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/card_list/base.py +0 -1
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/standard.py +0 -2
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/templates/cards/standard/datatable.html +6 -1
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/templates/cards/standard/default.html +5 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/templates/cards/standard/default_body.html +1 -1
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/templates/cards/standard/html.html +6 -1
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/templates/cards/standard/message.html +7 -1
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/templates/cards/standard/table.html +6 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/templates/cards/standard/table_body.html +4 -4
- {django-cards-0.9.8 → django-cards-0.10.1}/django_cards.egg-info/PKG-INFO +1 -1
- {django-cards-0.9.8 → django-cards-0.10.1}/setup.py +1 -1
- {django-cards-0.9.8 → django-cards-0.10.1}/LICENSE +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/MANIFEST.in +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/README.md +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/__init__.py +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/apps.py +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/card_list/__init__.py +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/card_list/main.py +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/card_list/tree.py +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/includes.py +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/default/32px.png +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/default/40px.png +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/default/style.css +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/default/style.min.css +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/default/throbber.gif +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/default-dark/32px.png +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/default-dark/40px.png +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/default-dark/style.css +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/default-dark/style.min.css +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/default-dark/throbber.gif +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/proton/30px.png +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/proton/32px.png +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-bold-webfont.eot +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-bold-webfont.svg +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-bold-webfont.ttf +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-bold-webfont.woff +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-extralight-webfont.eot +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-extralight-webfont.svg +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-extralight-webfont.ttf +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-extralight-webfont.woff +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-regular-webfont.eot +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-regular-webfont.svg +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-regular-webfont.ttf +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-regular-webfont.woff +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/proton/style.css +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/proton/style.min.css +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/proton/throbber.gif +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/js/jstree.js +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/js/jstree.min.js +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/templates/cards/groups/groups.html +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/templates/cards/standard/blank.html +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/templates/cards/standard/card_group.html +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/templates/cards/standard/list_selection.html +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/templates/cards/standard/tree_selection.html +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/templatetags/__init__.py +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/templatetags/django_cards_tags.py +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/cards/url_converters.py +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/django_cards.egg-info/SOURCES.txt +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/django_cards.egg-info/dependency_links.txt +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/django_cards.egg-info/top_level.txt +0 -0
- {django-cards-0.9.8 → django-cards-0.10.1}/setup.cfg +0 -0
@@ -1,6 +1,7 @@
|
|
1
1
|
import datetime
|
2
2
|
import json
|
3
3
|
|
4
|
+
from ajax_helpers.utils import random_string
|
4
5
|
from django.core.exceptions import FieldDoesNotExist
|
5
6
|
from django.template.loader import render_to_string
|
6
7
|
from django.utils.safestring import mark_safe
|
@@ -74,7 +75,10 @@ class CardBase:
|
|
74
75
|
menu=None, tab_menu=None, template_name=None, call_details_data=False,
|
75
76
|
group_type=CARD_TYPE_STANDARD, show_created_modified_dates=False,
|
76
77
|
footer=None, extra_card_context=None,
|
77
|
-
is_empty=False, empty_template_name=None, empty_message='N/A', **kwargs):
|
78
|
+
is_empty=False, empty_template_name=None, empty_message='N/A', collapsed=None, **kwargs):
|
79
|
+
|
80
|
+
if code is None:
|
81
|
+
code = random_string()
|
78
82
|
|
79
83
|
self.code = code
|
80
84
|
self.view = view
|
@@ -94,6 +98,8 @@ class CardBase:
|
|
94
98
|
tab_menu = HtmlMenu(self.request, self.tab_menu_type).add_items(*tab_menu)
|
95
99
|
self.tab_menu = tab_menu
|
96
100
|
self.call_details_data = call_details_data
|
101
|
+
self.enable_collapse = collapsed is not None
|
102
|
+
self.collapsed = collapsed
|
97
103
|
|
98
104
|
if is_empty:
|
99
105
|
self.group_type = CARD_TYPE_STANDARD
|
@@ -140,5 +140,3 @@ class CardMixin:
|
|
140
140
|
getattr(self, field_setup_table_field)(table=table, details_object=self.cards[table_id].details_object)
|
141
141
|
table.columns[kwargs['changed'][0]].alter_object(row_object, row_data[kwargs['changed'][0]])
|
142
142
|
return table.refresh_row(self.request, kwargs['row_no'])
|
143
|
-
|
144
|
-
|
@@ -12,10 +12,15 @@
|
|
12
12
|
<div class="d-flex align-items-center">
|
13
13
|
<h5 class="mr-auto">{{ card.title }}</h5>
|
14
14
|
{{ card.menu.render }}
|
15
|
+
{% if card.enable_collapse %}
|
16
|
+
<div class="section-header-right {% if card.collapsed %} collapsed{% endif %}" data-target="#{{ card.code }}_body" data-toggle="collapse">
|
17
|
+
<i class="expandicon"></i>
|
18
|
+
</div>
|
19
|
+
{% endif %}
|
15
20
|
</div>
|
16
21
|
</div>
|
17
22
|
{{ card.tab_menu.render }}
|
18
|
-
<div class="{{ card_body_css_class }}" id="{{ card.code }}_body"
|
23
|
+
<div class="{{ card_body_css_class }}{% if card.enable_collapse %} collapse{% if not card.collapsed %} show{% endif %}{% endif %}" id="{{ card.code }}_body"
|
19
24
|
{% if card_body_css_style %}style="{{ card_body_css_style }}"{% endif %}>
|
20
25
|
{% if show_search_bar and not show_pivot_table %}
|
21
26
|
<div class="d-flex">
|
@@ -3,6 +3,11 @@
|
|
3
3
|
<div class="d-flex align-items-center">
|
4
4
|
<h5 class="mr-auto">{{ card.title }}</h5>
|
5
5
|
{{ card.menu.render }}
|
6
|
+
{% if card.enable_collapse %}
|
7
|
+
<div class="section-header-right {% if card.collapsed %} collapsed{% endif %}" data-target="#{{ card.code }}_body" data-toggle="collapse">
|
8
|
+
<i class="expandicon"></i>
|
9
|
+
</div>
|
10
|
+
{% endif %}
|
6
11
|
</div>
|
7
12
|
</div>
|
8
13
|
{% include 'cards/standard/default_body.html' %}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
{{ card.tab_menu.render }}
|
3
|
-
<div class="{{ card_body_css_class }}">
|
3
|
+
<div class="{{ card_body_css_class }}{% if card.enable_collapse %} collapse{% if not card.collapsed %} show{% endif %}{% endif %}" id="{{ card.code }}_body">
|
4
4
|
<div class="list-group">
|
5
5
|
{% for row in card.rows %}
|
6
6
|
{% if row.type == 'html' %}<div class="{{ item_css_class }}">{{ row.html|safe }}</div>{% else %}
|
@@ -3,9 +3,14 @@
|
|
3
3
|
<div class="d-flex align-items-center">
|
4
4
|
<h5 class="mr-auto">{{ card.title }}</h5>
|
5
5
|
{{ card.menu.render }}
|
6
|
+
{% if card.enable_collapse %}
|
7
|
+
<div class="section-header-right {% if card.collapsed %} collapsed{% endif %}" data-target="#{{ card.code }}_body" data-toggle="collapse">
|
8
|
+
<i class="expandicon"></i>
|
9
|
+
</div>
|
10
|
+
{% endif %}
|
6
11
|
</div>
|
7
12
|
</div>
|
8
|
-
<div class="{{ card_body_css_class }}" id="{{ card.code }}_body" {% if card_body_css_style %}style="{{ card_body_css_style }}"{% endif %}>
|
13
|
+
<div class="{{ card_body_css_class }}{% if card.enable_collapse %} collapse{% if not card.collapsed %} show{% endif %}{% endif %}" id="{{ card.code }}_body" {% if card_body_css_style %}style="{{ card_body_css_style }}"{% endif %}>
|
9
14
|
{{ card.extra_card_info.html|safe }}
|
10
15
|
</div>
|
11
16
|
{% if card.footer %}
|
@@ -6,10 +6,16 @@
|
|
6
6
|
<div class="d-flex align-items-center">
|
7
7
|
<h5 class="mr-auto">{{ card.title|safe }}</h5>
|
8
8
|
{{ card.menu.render }}
|
9
|
+
{% if card.enable_collapse %}
|
10
|
+
<div class="section-header-right {% if card.collapsed %} collapsed{% endif %}"
|
11
|
+
data-target="#{{ card.code }}_body" data-toggle="collapse">
|
12
|
+
<i class="expandicon"></i>
|
13
|
+
</div>
|
14
|
+
{% endif %}
|
9
15
|
</div>
|
10
16
|
</div>
|
11
17
|
{% endif %}
|
12
|
-
<div class="card-body jms-list {{ card_body_css_class }}">
|
18
|
+
<div class="card-body jms-list {{ card_body_css_class }}{% if card.enable_collapse %} collapse{% if not card.collapsed %} show{% endif %}{% endif %}" id="{{ card.code }}_body">
|
13
19
|
<div class="alert {{ alert_css_class }} mb-0 small">{{ message|safe }}</div>
|
14
20
|
</div>
|
15
21
|
</div>
|
@@ -4,6 +4,12 @@
|
|
4
4
|
<div class="d-flex align-items-center">
|
5
5
|
<h5 class="mr-auto">{{ card.title }}</h5>
|
6
6
|
{{ card.menu.render }}
|
7
|
+
{% if card.enable_collapse %}
|
8
|
+
<div class="section-header-right {% if card.collapsed %} collapsed{% endif %}"
|
9
|
+
data-target="#{{ card.code }}_body" data-toggle="collapse">
|
10
|
+
<i class="expandicon"></i>
|
11
|
+
</div>
|
12
|
+
{% endif %}
|
7
13
|
</div>
|
8
14
|
</div>
|
9
15
|
|
@@ -1,13 +1,13 @@
|
|
1
1
|
{{ card.tab_menu.render }}
|
2
|
-
<div class="{{ card_body_css_class }}">
|
2
|
+
<div class="{{ card_body_css_class }}{% if card.enable_collapse %} collapse{% if not card.collapsed %} show{% endif %}{% endif %}" id="{{ card.code }}_body">
|
3
3
|
<div class="list-group">
|
4
4
|
<table class="{{ table_css_class }}">
|
5
5
|
{% for row in card.rows %}
|
6
6
|
<tr>
|
7
7
|
{% if row.type == 'html' %}{% if not row.exclude_td %}<td class="{{ table_td_css_class }}"{% if row.colspan %} colspan="{{ row.colspan }}"{% endif %} {% if row.rowspan %} rowspan="{{ row.rowspan }}"{% endif %}>{{ row.html|safe }}</td>{% else %}{{ row.html|safe }}{% endif %}{% else %}
|
8
8
|
{% for entry in row.entries %}
|
9
|
-
{% if forloop.first %}<th class="{{ table_th_css_class }}">{{ entry.label|safe }}</th>{% endif %}
|
10
|
-
<td class="{{ table_td_css_class }}"{% if entry.colspan %} colspan="{{ entry.colspan }}"{% endif %}{% if entry.rowspan %} rowspan="{{ entry.rowspan }}"{% endif %}>{% if entry.link %}
|
9
|
+
{% if forloop.first %}{% if entry.label_td %}<td>{{ entry.label|safe }}</td>{% else %}<th class="{{ table_th_css_class }}">{{ entry.label|safe }}</th>{% endif %}{% endif %}
|
10
|
+
{% if entry.value_th %}<th{% else %}<td class="{{ table_td_css_class }}"{% endif %}{% if entry.colspan %} colspan="{{ entry.colspan }}"{% endif %}{% if entry.rowspan %} rowspan="{{ entry.rowspan }}"{% endif %}>{% if entry.link %}
|
11
11
|
<a class="list-group-item cards-list-group-item" href="{{ entry.link }}">{% endif %}
|
12
12
|
{% if entry.multiple_lines %}
|
13
13
|
{% for x in entry.html %}
|
@@ -16,7 +16,7 @@
|
|
16
16
|
{% else %}
|
17
17
|
{{ entry.html|safe }}
|
18
18
|
{% endif %}
|
19
|
-
|
19
|
+
{% if entry.link %}</a>{% endif %}{% if entry.value_th %}</th>{% else %}</td>{% endif %}
|
20
20
|
{% endfor %}{% endif %}</tr>
|
21
21
|
{% endfor %}
|
22
22
|
</table>
|
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.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/default/32px.png
RENAMED
File without changes
|
{django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/default/40px.png
RENAMED
File without changes
|
{django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/default/style.css
RENAMED
File without changes
|
File without changes
|
{django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/default/throbber.gif
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/proton/30px.png
RENAMED
File without changes
|
{django-cards-0.9.8 → django-cards-0.10.1}/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.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/proton/style.css
RENAMED
File without changes
|
{django-cards-0.9.8 → django-cards-0.10.1}/cards/static/cards/jstree/css/themes/proton/style.min.css
RENAMED
File without changes
|
{django-cards-0.9.8 → django-cards-0.10.1}/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.9.8 → django-cards-0.10.1}/cards/templates/cards/standard/list_selection.html
RENAMED
File without changes
|
{django-cards-0.9.8 → django-cards-0.10.1}/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
|