Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
darklow committed Nov 19, 2014
2 parents 23198c2 + 202a9cf commit e1bda8b
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 5 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ Changelog
Only important changes are mentioned below. See `commit log <https://github.com/darklow/django-suit/commits/develop>`_ and `closed issues <https://github.com/darklow/django-suit/issues?direction=desc&sort=updated&state=closed>`_ for full changes.


v0.2.12 (2014-11-19)
--------------------

* [Fix] Raise an exception if inline fields are defined as tuple. `#302 <https://github.com/darklow/django-suit/pull/302>`_ [Thanks to @peterfarrell]
* [Fix] Fixes change_form first field focus. `#290 <https://github.com/darklow/django-suit/pull/290>`_ `#295 <https://github.com/darklow/django-suit/issues/295>`_ [Thanks to @cybersimon]
* [Fix] Django 1.7: Fix LinkedSelect if extra url args. `#310 <https://github.com/darklow/django-suit/issues/310>`_ `#294 <https://github.com/darklow/django-suit/issues/294>`_


v0.2.11 (2014-09-11)
--------------------

Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
# built documents.
#
# The short X.Y version.
version = '0.2.11'
version = '0.2.12'
# The full version, including alpha/beta/rc tags.
release = '0.2.11'
release = '0.2.12'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
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.11'
VERSION = '0.2.12'
9 changes: 9 additions & 0 deletions suit/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@ def get_fieldsets(self, *args, **kwargs):
continue

fields = line.get('fields')

# Some use tuples for fields however they are immutable
if isinstance(fields, tuple):
raise AssertionError(
"The fields attribute of your Inline is a tuple. "
"This must be list as we may need to modify it and "
"tuples are immutable."
)

if self.sortable in fields:
fields.remove(self.sortable)

Expand Down
2 changes: 1 addition & 1 deletion suit/static/suit/js/suit.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@

var get_url = function ($add_link, $select) {
var value = $select.val();
return $add_link.attr('href') + '../' + value + '/';
return $add_link.attr('href').split('?')[0] + '../' + value + '/';
};

var add_link = function ($select) {
Expand Down
6 changes: 5 additions & 1 deletion suit/templates/admin/change_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,11 @@ <h4 class="italic-title">{% trans 'tools'|capfirst %}</h4>
{% include 'suit/includes/change_form_includes.html' with position='bottom' %}

{% if adminform and add %}
<script type="text/javascript">document.getElementById("{{ adminform.first_field.id_for_label }}").focus();</script>
<script type="text/javascript">
(function ($) {
$('form#{{ opts.module_name }}_form :input[type!=button][type!=submit]:visible:enabled:first').focus();
})(django.jQuery);
</script>
{% endif %}

{# JavaScript for prepopulated fields #}
Expand Down

0 comments on commit e1bda8b

Please sign in to comment.