Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
darklow committed Jan 27, 2017
2 parents c37cc92 + d69fe8d commit 288648f
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 22 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ Changelog
Only important changes are mentioned below. See `commit log <https://github.com/darklow/django-suit/commits/develop>`_, `closed issues <https://github.com/darklow/django-suit/issues?direction=desc&sort=updated&state=closed>`_ and `closed pull
requests <https://github.com/darklow/django-suit/pulls?q=sort%3Aupdated-desc+is%3Apr+is%3Aclosed>`_ for full changes.

v0.2.24 (2017-01-27)
--------------------

* [Fix] Sortable inlines required fields detection fix (related to jQuery update).
* [Fix] More precise SPAN selector not to mess up editors and other content in stacked inlines.


v0.2.23 (2016-12-06)
--------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
# built documents.
#
# The short X.Y version.
version = '0.2.23'
version = '0.2.24'
# The full version, including alpha/beta/rc tags.
release = version

Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Installation

1. You can get stable version of Django Suit by using pip or easy_install::

pip install django-suit==0.2.23
pip install django-suit==0.2.24

2. You will need to add the ``'suit'`` application to the ``INSTALLED_APPS`` setting of your Django project ``settings.py`` file.::

Expand Down
2 changes: 1 addition & 1 deletion suit/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = '0.2.23'
VERSION = '0.2.24'
2 changes: 1 addition & 1 deletion suit/static/suit/css/suit.css

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions suit/static/suit/js/sortables.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,17 @@
return false;
}
}
} else if ($(input).hasClass('suit-sortable')) {
if (input.defaultValue == input.value && input.value == 0) {
} else {
var $input = $(input);
if ($input.hasClass('suit-sortable')) {
if (input.defaultValue == input.value && input.value == 0) {
return false;
}
} else if (!$input.val()) {
return false;
}
return true;
}
return true;
}

// Update input count right before submit
Expand All @@ -136,7 +141,7 @@
var fieldset_id = $input.attr('name').split(/-\d+-/)[0];
// Check if any of new dynamic block values has been added
var $set_block = $input.closest('.dynamic-' + fieldset_id);
var $changed_fields = $set_block.find(":input[value!=''][type!='hidden']").filter(filter_unchanged);
var $changed_fields = $set_block.find(":input[type!='hidden']").filter(filter_unchanged);
if (!$set_block.length
|| $set_block.hasClass('has_original')
|| $changed_fields.serialize()
Expand Down
25 changes: 11 additions & 14 deletions suit/static/suit/less/ui/form.less
Original file line number Diff line number Diff line change
Expand Up @@ -368,32 +368,29 @@ h3 {
margin-right: 10px;
}
span {

display: inline-block; // margin-left: 20px;
&.delete, &:last-child {
float: right;
margin-right: 10px;
font-weight: normal;
}
&.delete {
input {
margin: 0;
}
label {
padding: 7px 0 0 5px;
vertical-align: middle;
margin: 0;
}
}
}
}
&:not(:first-of-type) {
h3 {
margin-top: 5px;
}
}
span {
display: inline-block; // margin-left: 20px;
&.delete {
input {
margin: 0;
}
label {
padding: 7px 0 0 5px;
vertical-align: middle;
margin: 0;
}
}
}
&.tabular {
margin-top: 15px;
fieldset {
Expand Down

0 comments on commit 288648f

Please sign in to comment.