Commit Graph

36 Commits (a6ea566ee85c9a0e91de45ea39ab040ef08ef72f)

Author SHA1 Message Date
blag 247078c7e0
Tweak CSS to restrict elements that have cursor: move 2020-05-25 18:44:32 -07:00
Brandon Taylor e35f36b25a Refactored sorting JS files to be includes so that server-side variables may be passed to them.
Added 'after_sorting_js_callback_name' attribute to SortableAdminBase.
Added callback to be executed after sorting for each of the possible sorting scenarios.
Added custom template examples to add a callback to be executed when sorting is finished.
2018-06-18 11:40:24 -04:00
Brandon Taylor 0a594928ef Increase margin between sortable elements in the change list. 2017-10-11 16:13:12 -04:00
Brandon Taylor bb70d5a3ad Added jQuery UI Touch Support 2017-10-11 07:15:42 -04:00
Brandon Taylor b29590a185 Minor formatting tweaks 2016-08-08 21:34:53 -04:00
Venelin Stoykov c59617e004 Fix sorted icons placement
- Move icons to the header of the row. By this way they will play nicely with custom
admin themes (like djangocms-admin-style).
- Also fix icons for Django 1.5 (now the admin looks the same as with Django >= 1.6)
2016-06-24 14:04:06 +03:00
Venelin Stoykov 7c235308b8 Fix UI when djangocms-admin-style is used 2016-06-15 17:53:35 +03:00
Brandon Taylor ada42c84de Version bump to 2.0.13.
Updated readme.
Slight refactor on JS to avoid extra function call.
Fixed missing semicolon.
2016-03-10 16:41:23 -05:00
Brandon Taylor f44220c3de Fixed missing semicolon. 2016-03-10 16:36:26 -05:00
Brandon Taylor 837a25268d [bt] Updated selector for index value on sortable tabular inlines. 2016-03-10 16:21:08 -05:00
Patrick 33074d8f65 js: fix indexes finding for tabular inlines
js: fix indexes finding for tabular inlines

Not sure with but unless I change the code the line 30 finds <i> tags instead of the input.
2016-03-10 14:43:44 -05:00
Brandon Taylor c1181b0e52 Support CSRF_COOKIE_NAME
Added support for custom CSRF_COOKIE_NAME by refactoring the jquery.django-csrf.js file into a separate .html file that can be used as an include, passing in the CSRF_COOKIE_NAME from settings.
2016-02-16 08:48:32 -05:00
Brandon Taylor 7e9d305c90 Added template tag to get django version to allow flat admin specific classing for Django 1.9 or above. 2015-12-23 17:16:47 -05:00
Brandon Taylor 5dee27e077 Added sorting icons.
Refactored determination of sortability of classes referenced as sortable foreign keys in admin in a more reliable way.
2015-12-23 16:39:45 -05:00
Brandon Taylor 3757ca98c0 Added extra JS to deterine which element to highlight in the case where all fieldsets of a stacked inline are set to collapse. 2015-11-18 09:20:45 -05:00
Brandon Taylor 2dab294b0c Updated readme.
Version bump to 2.0.6.
Added JS to remove inline style added by jQueryUI when highlighting form rows.
2015-11-18 07:52:18 -05:00
flyingeek 4a6a97a663 fix sortable function not found
Adminsortable uses django.jQuery
2015-03-24 13:40:07 +01:00
Venelin Stoykov cfcf6b1a46 Make inlines to work corectly with non sortable inlines 2014-11-18 17:04:20 +02:00
Brandon Taylor 53df734e15 Fixed jQuery namespace on inline model JavaScript includes.
Version bump to 1.6.5.
Updated readme.
2014-02-12 16:22:04 -05:00
Moritz Pfeiffer 818a231a1a Reordering with unsaved inlines is faulty and counter intuitive.
In this commit I added a javascript alert that prompts the user to save their changes before reordering if unsaved inlines are detected.
Please review and let me know if this in compliance with your guidelines.
2013-12-03 10:45:17 +01:00
Brandon Taylor 30f13aedff Added latest jQuery UI and added namespace fix so that jQueryUI can leverage jQuery included with Django admin.
Merged pull request 62 to replace depracated mimetype handling.
Bumped version to 1.6 to coincide with the release of Django 1.6.
Merged pull request 59 to improve query count speed by leveraging .count() instead of len().
Merged pull request 58 to ignore bad indexes.
2013-11-23 09:32:51 -05:00
Brandon Taylor b411576059 Merged README.
Included previously forgotten js file.
2013-09-23 08:45:18 -04:00
Brandon Taylor 8f64f6ea76 Bumped version to 1.5.5.
Fixed namespacing of so sorting urls.
Changed namespacing of sortable() calls.
Removed unit test to check for javascript include template, which has been eliminated.
2013-09-23 08:41:10 -04:00
Brandon Taylor 1bf917da61 Bumped version to 1.5.4.
Replaced jQuery loaded from CDN with jQuery included with Django Admin.
Replaced jQuery UI from CDN with django.jQuery namespaced jQueryUI 1.8.11.
Implemented static includes using {% static %} template tag.
Removed documentation concerning override of sortable inlines whose parent doesn't inherit from sortable until a consistent workaround can be achieved.
Added CSRF protection for sort views.
2013-09-05 14:09:50 -04:00
Mathijs de Bruin 7f043f588b Added jQuery tool for doing proper CSRF with AJAX. 2013-09-04 21:57:04 +02:00
Brandon Taylor 7f3bbbed4c Updated jQuery to 1.9.1 and jQueryUI to 1.10.2.
Added create function handler to unbind events from sortable that were being applied to checkboxes within a sortable item. This was preventing the delete checkbox for inline models from being checked.
Updated JavaScript inlcudes to not include unnecessary files.
2013-05-04 15:00:23 -04:00
Brandon Taylor 014f6d1660 Added support for queryset() overrides on admin classes and inline admin classes.
Updated version to 1.4.5.
Updated README with explanation of requirements for overriding queryset() on inline models.
Added extra models to sample project to demonstrate sortable models with custom querysets.
Improved JavaScript of sortables to be more efficient with better comparison checking.
Fixed highlighting of stacked inlines on sort finish.
2013-04-27 22:58:02 -04:00
Brandon Taylor a54e81434f Minor modifications for Django 1.5.x and 1.4.x backward-compatibility.
Added new sample project.
Improved documentation.
Refactored CSS selector for inlines that are sortable.
2013-03-10 20:53:05 -04:00
Brandon Taylor c7230002e8 Updated readme.
Added jquery.effects.core.js back to static files.
2013-01-06 20:39:05 -05:00
Ionel Maries Cristian d6efa21939 Disable ordering on .add-row. 2012-11-18 15:56:01 +02:00
Ionel Maries Cristian 5ef23ebca7 Fix wrong name for css file. 2012-11-18 15:36:24 +02:00
Brandon Taylor e206dfc30c Fixed application of CSS class 'sortable' to stacked inline elements that are sortable which was somehow excluded from the previous release. 2012-11-02 13:49:30 -04:00
Brandon Taylor 04bdb80637 Removed individual jQueryUI JavaScript files in favor of loading jQueryUI from Google Ajax API.
Updated jQuery to latest version from Google Ajax API.
Integrated pull-request from BlindHunter to add the ability to override templates on a per-model basis.
Updated README.
2012-09-25 10:52:31 -04:00
Brandon Taylor fd06064d48 Mode switches. 2011-11-22 20:58:09 -06:00
Brandon Taylor 8365043e0e Modified classmethod queries that determine if a Model is sortable to only retieve one record and not use count.
Fixed jQueryUI highlight method call in success handler of ajax function when dragging stops.
Fixed missing script resource for jquery.effects.core.js
2011-11-16 00:48:14 -06:00
Brandon Taylor 6c3e93ded8 Changed name of static media folder from \"media\" to \"static\" for use with django.contrib.staticfiles app. 2011-09-11 01:22:19 -05:00