Commit Graph

89 Commits

Author SHA1 Message Date
Andrew Godwin c236d5e44d Fixed #14193: prepopulated_fields javascript now concatenates in correct order. Thanks to bmihelac for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14122 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-10 09:57:23 +00:00
Malcolm Tredinnick 443cb9b6ed Fixed date parsing of 31st dates when current month has 30 days (!!).
Patch from rich@tablexi.com. Fixed #2975.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13713 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-10 18:09:18 +00:00
Russell Keith-Magee 23976fa4b5 Fixed #13486 -- Corrected handling of %I in admin javascript version of strftime. Thanks to Bufke for the report, and jmil for the solution.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13239 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-12 11:00:12 +00:00
Russell Keith-Magee 16c64bc2b7 Fixed #13521 -- Corrected javascript comparisons determining when to show and hide the 'add another' inline button. Thanks to darkrho for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13234 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-11 13:40:17 +00:00
Russell Keith-Magee e99b283e77 Fixed #13459 -- Corrected numbering of tr elements in the admin. Reverts the changes introduced in r13068. Thanks to 3point2 for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13083 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-04 07:23:02 +00:00
Jannis Leidel cce32a9b09 Fixed #13166 - Added JavaScript warnings to admin changelist to help against ambiguity between action and list_editable form submission. Thanks to blinkylights and aaugustin for the report and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13072 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-02 23:02:16 +00:00
Russell Keith-Magee cb02b92f85 Fixed #13459 -- Corrected ID numbering of dynamically added inlines in the admin. Thanks to 3point2 for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13068 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-02 13:25:13 +00:00
Jacob Kaplan-Moss ea7df23395 Fixed #11967: use a different technique to get `ADMIN_MEDIA_PREFIX` in admin JS.
We now store ADMIN_MEDIA_PREFIX on the window object and let JS files read it
from there. The old technique -- looking a <script> tags and trying to deduce
the prefix -- broke with libraries like TineMCE that dynamically add <script>
tags to the <head>.

This is potentially backwards-incompatible for folks who've overridden
`admin/base.html`; they'll need to add the proper <script> line to
their new `admin/base.html`. For that reason, this changeset shouldn't
be backported to 1.1.X.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13002 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-19 18:37:12 +00:00
Jannis Leidel b3390fede0 Fixed #13290 - Added a section about minification of admin JavaScript files to the contributing docs. Thanks to Gabriel Hurley for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12969 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-13 10:29:44 +00:00
Jannis Leidel 31f7ff1518 Fixed #12903 - Made translating the admin action selection text easier. Thanks to Ramiro Morales for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12968 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-13 10:29:19 +00:00
Jannis Leidel c3d1267c15 Also minify the JavaScript file for pre-populated form fields in the admin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-13 10:28:44 +00:00
Jannis Leidel 1fcf747b13 Fixed #12882 - Moved the admin's jQuery into our own namespace to lower the risk of a clash with third party apps that use jQuery.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12966 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-13 10:28:24 +00:00
Luke Plant 736b751ed9 Fixed #13068, #9264, #9983, #9784 - regression with pre-populated fields and javascript inlines, and related bugs.
Thanks to hejsan for the report, and to Sean Brant and Carl Meyer for the patch.

#13068 is a regression caused by the new javascript inline forms in the
admin.  The others were existing javascript bugs with prepopulated fields. 
Since the solution depends on jQuery and would likely be very hard to
backport without it, it will not be backported to 1.1.X.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@12937 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-07 23:37:48 +00:00
Jannis Leidel 2a4990a5de Updated jQuery to 1.4.2.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12873 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-27 23:04:18 +00:00
Jannis Leidel aba95dcc0b Fixed #13023 - Removed ambiguity with regard to the max_num option of formsets and as a result of admin inlines. Thanks to Gabriel Hurley for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12872 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-27 23:03:56 +00:00
Jannis Leidel 9df8d9c294 Fixed #13175 - Fixed an off-by-one error in the admin inline JavaScript that resulted in wrong form field prefixes. Thanks DrMeers for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12871 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-27 23:03:12 +00:00
Jannis Leidel a03f675876 Fixed #13026 - Also update the index of lookup links when adding inlines dynmacially in the admin. Thanks to ramusus and Rob Hudson for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12784 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-15 12:15:44 +00:00
Justin Bronn eaa17e13e8 Fixed #12705 -- Date/time and select filter widgets now work again with newly added inline forms in the admin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12454 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-17 18:54:02 +00:00
Jannis Leidel fdb9f83253 Fixed #12748 - Use charAt instead of array-like access to format string to please IE. Thanks, yedpodtrzitko.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12397 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-07 14:42:16 +00:00
Jannis Leidel 5dad2350f7 Use a closure for embedding the admin actions JavaScript and updated the minified versions a little bit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12372 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-01 14:16:44 +00:00
Jannis Leidel 816fced5d7 Being a good citizen, adding the jQuery license and a command line script to easily minify the jQuery based scripts.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12371 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-01 14:16:01 +00:00
Jannis Leidel f839736c60 Fixed #12695 - Force Firefox to not autocomplete input fields that are critical to the dynamic admin inlines.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12370 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-01 14:15:27 +00:00
Jannis Leidel 9555f2be9d Fixed #12692 - Properly handle the extra clause of admin inline formsets. Also fixes #12703, second error.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12369 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-01 14:14:56 +00:00
Jannis Leidel a260980f98 Ported collapsible admin fieldsets to jQuery. Thanks Rob Hudson.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12299 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-26 15:03:52 +00:00
Jannis Leidel f109f36a06 Fixed #12282 - When paginated allow selecting all items in the admin changlist.
Thanks to Martin Mahner, Rob Hudson and Zain Memon for providing inital patches and guidance.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12298 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-26 15:03:23 +00:00
Jannis Leidel c14937cf7a Fixed #12508 - Added ability to dynamically add inlines in the admin app.
Refs #13. Also introduces an ``empty_form`` attribute on formsets to make it easier to implement dynamic forms.

Many thanks to Zain Memon for the initial patch from his Summer of Code 2009 project, Stanislaus Madueke for his django-dynamic-formset app and all the other people helping out.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12297 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-26 15:02:53 +00:00
Jannis Leidel 9ec29cf1dc Fixed #11697 - Allow shift clicking for selecting multiple action checkboxes in the admin changelist. Thanks buriy and Sean Brant.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12155 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-09 23:49:11 +00:00
Jannis Leidel afa4c5ac60 Fixed #10615 - Added selection counter to admin change list. Thanks to Martin Mahner for the idea and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12107 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-05 18:24:27 +00:00
Jannis Leidel 7c3387ae3a Fixed #11314 - Highlight the current date in the admin calendar widget.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12089 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-04 22:48:36 +00:00
Jannis Leidel f6c519e2b9 Fixed #12492 - Refactored JavaScript format localization by separating it from the translation backend. Thanks, Ramiro Morales.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12081 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-04 02:28:34 +00:00
Jannis Leidel dab8743193 Adding trailing semicolons to admin date and time widgets JavaScript (Refs [12030]). Some whitespace cleanup.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12052 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-01 21:37:18 +00:00
Jannis Leidel fa0653cd1d Fixed #12454 - Added support for localized formats to admin date and time widgets.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12030 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-30 22:12:16 +00:00
Jannis Leidel 9233d04265 Fixed #7980 - Improved i18n framework to support locale aware formatting (dates and numbers) and form processing.
Thanks to Marc Garcia for working on this during his Google Summer of Code 2009!

Additionally fixes #1061, #2203, #3940, #5526, #6449, #6231, #6693, #6783, #9366 and #10891.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11964 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-22 17:58:49 +00:00
Malcolm Tredinnick 0d2cf7bdd6 Fixed #10783 -- Fixed Javascript error when adding a new object in admin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10516 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-11 11:33:10 +00:00
Malcolm Tredinnick f4072f5be8 Fixed #10782 -- Fixed a Javascript error in the admin.
Viewing an empty changelist page no longer attempts to attach event
listeners to an undefined object.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10515 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-11 11:32:50 +00:00
Jacob Kaplan-Moss 6eaf154a2e Fixed #9341: add another on `ManyToManyField`s with `raw_id_admins` now works correctly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10452 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-08 19:57:27 +00:00
Jacob Kaplan-Moss aea0bb68e0 Fixed a corner case from [10258]; thanks, Alex.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10272 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 17:10:23 +00:00
Jacob Kaplan-Moss c823e9d7cc Added row highlighting when selecting action checkmarks.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10258 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 16:24:12 +00:00
Brian Rosner c5aa6fa710 Fixed #10597 -- select all checkbox on admin changelist now works under IE 6 and 7. Thanks kyle.fox.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10135 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-24 03:11:38 +00:00
Jacob Kaplan-Moss 44f3080226 Fixed #10505: added support for bulk admin actions, including a globally-available "delete selected" action. See the documentation for details.
This work started life as Brian Beck's "django-batchadmin." It was rewritten for inclusion in Django by Alex Gaynor, Jannis Leidel (jezdez), and Martin Mahner (bartTC). Thanks, guys!

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10121 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-23 20:22:56 +00:00
Karen Tracey 380e31ddb7 Fixed #9642 -- Made the admin calendar/clock popups go away when the users clicks outside them. The previous javascript code did not work on IE. Thanks northtea for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9514 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-21 14:52:58 +00:00
Karen Tracey c7078ff0a2 Fixed #106 -- Refrain from generating popup window names that IE refuses to pop up. Thanks for the reports and initial patches nbstrite and jsmullyan.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9403 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-12 16:23:04 +00:00
Brian Rosner 9d1ec0b5ec Fixed #5385 -- Made the date returned from the calendar picker consistent with the usual format of dates in the admin. Thanks Petr Marhoun for the ticket and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8390 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-15 19:51:45 +00:00
Brian Rosner a19ed8aea3 Merged the newforms-admin branch into trunk.
This is a backward incompatible change. The admin contrib app has been
refactored. The newforms module has several improvements including FormSets
and Media definitions.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18 23:54:34 +00:00
Malcolm Tredinnick d1793f1774 Fixed #6248 -- Fixed typo in urlify.js. Pointed out by arien.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6999 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-06 03:55:23 +00:00
Malcolm Tredinnick 402ca0b77b Fixed #5044 -- Added Latvian character map for Javascript slug generation. Patch from arien.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6933 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-17 09:14:59 +00:00
Gary Wilson Jr 38d972b9ec Fixed #5880 -- Fixed an XSS hole in the admin interface.
* Escaped text that gets sent after saving the admin foreignkey popup form.
 * Added quotes around the second argument passed to `opener.dismissAddAnotherPopup` to make the function also work when a text field is used as the primary key.
 * Added a `html_unescape` javascript function to unescape the strings passed in to the `dismissAddAnotherPopup` function so that the added choice displays correctly in the dropdown box.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6691 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-18 06:51:20 +00:00
Malcolm Tredinnick 4362d154fb Fixed #4902 -- Added some missing Czech uppercase characters to urlify.js.
Thanks, michal@plovarna.cz.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6557 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-20 09:27:12 +00:00
Malcolm Tredinnick dc9def7859 Fixed #5678 -- Added Polish transliteration to urlify.js. Thanks,
regexbot@gmail.com.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6541 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-20 04:42:30 +00:00
Adrian Holovaty 5c3905cf48 Fixed #1888 -- Fixed small interface inaccuracy when using filter_interface=models.VERTICAL. Thanks, ryankanno, wnielson and SmileyChris
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6262 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 05:01:58 +00:00