Skip to content

Commit

Permalink
Updated package version to 2.2.1. ContentPopover / UiPopover Bootstra…
Browse files Browse the repository at this point in the history
…p 5.3.x compatibility.
  • Loading branch information
Dmitri-Sintsov committed Dec 9, 2023
1 parent 88485ad commit 9304b67
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
python: "3.12"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
Expand All @@ -29,4 +29,3 @@ formats:
# python:
# install:
# - requirements: docs/requirements.txt

4 changes: 4 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -378,3 +378,7 @@ Alternative breadcrumbs layout of field filters widgets.
* Nested components are supported in ``Grid`` cells, including the cells of compound columns.
* ``Tpl.domTemplate`` optional template kwargs support.
* ``djk_bootstrap5`` now uses native ``Bootstrap Icons`` font for ``iconui`` actions.

2.2.1
-----
* Python 3.12 / Django 5.0 compatibility.
2 changes: 1 addition & 1 deletion INSTALLATION.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ To install latest master from repository::

To install specific tag::

python3 -m pip install --upgrade git+https://github.com/Dmitri-Sintsov/[email protected].0
python3 -m pip install --upgrade git+https://github.com/Dmitri-Sintsov/[email protected].1

settings.py
-----------
Expand Down
6 changes: 5 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ More screenshots with descriptions are available at: https://github.com/Dmitri-S

Documentation (in development): https://django-jinja-knockout.readthedocs.org/

* Supports Django 3.2 LTS, 4.1, 4.2 LTS; Python 3.9 / 3.10 / 3.11.
* Supports Django 4.2 LTS, 5.0; Python 3.10 / 3.11 / 3.12.

Please contribute to the localization of the project:

Expand Down Expand Up @@ -145,6 +145,10 @@ scripts. Although it may be used for SPA as well. Classical Web applications are
applications are much better indexable by web crawlers, Python is better language than Javascript in general, also
server-side rendering generally is more robust.

Version 2.2.1
-------------
Python 3.12 / Django 5.0 compatibility.

Version 2.2.0
-------------
`FormFieldsRenderer`_ / `fields_template`_ allows fine-grained customization of `ModelForm`_ fields layout.
Expand Down
2 changes: 1 addition & 1 deletion django_jinja_knockout/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '2.2.0'
__version__ = '2.2.1'

# Patch for Django datetime 'en' locales format to work with Bootstrap datetimepicker.
# Currently is disabled, because Bootstrap datetimepicker is patched instead
Expand Down
20 changes: 14 additions & 6 deletions django_jinja_knockout/static/djk/js/popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,20 +231,28 @@ function ContentPopover(k, v) {
var $popover = $(v);
new UiPopover($popover).create({
container: 'body',
content: function() {
var template = $(this).data("contentTemplate");
content: function(target) {
if (typeof target === 'undefined') {
// Bootstrap <5.3
target = this;
}
var template = $(target).data("contentTemplate");
if (template !== undefined) {
var options = $(this).data("contentTemplateOptions");
var options = $(target).data("contentTemplateOptions");
var processor = globalIoc.factory('Tpl', options);
var $content = processor.domTemplate(template);
initClient($content);
return $content;
} else {
return $(this).attr('bs-content');
return $(target).attr('bs-content');
}
},
title: function() {
return $(this).attr('title');
title: function(target) {
if (typeof target === 'undefined') {
// Bootstrap <5.3
target = this;
}
return $(target).attr('title');
},
});
$popover.on("hidden.bs.popover", function(e) {
Expand Down
2 changes: 1 addition & 1 deletion docs/djk_ui.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ on the fly, so that's not much of problem.

conf.py
-------
Contains the default ``layout_classes`` values, for example for Bootstrap 5 (version 2.2.0)::
Contains the default ``layout_classes`` values, for example for Bootstrap 5 (version 2.2.1)::

LAYOUT_CLASSES = {
'': {
Expand Down

0 comments on commit 9304b67

Please sign in to comment.