Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Removed media.ljworld.com reference from admin_media/js/SelectFilter2…

….js. Refs #49

git-svn-id: http://code.djangoproject.com/svn/django/trunk@451 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit d8f5cad47e417c3c16e133324b76fce71474ad7d 1 parent 5144a60
Adrian Holovaty authored August 10, 2005
6  django/conf/admin_media/js/SelectFilter2.js
@@ -15,7 +15,7 @@ function findForm(node) {
15 15
 }
16 16
 
17 17
 var SelectFilter = {
18  
-    init: function(field_id, field_name, is_stacked) {
  18
+    init: function(field_id, field_name, is_stacked, admin_media_prefix) {
19 19
         var from_box = document.getElementById(field_id);
20 20
         from_box.id += '_from'; // change its ID
21 21
         from_box.className = 'filtered';
@@ -36,7 +36,7 @@ var SelectFilter = {
36 36
         quickElement('h2', selector_available, 'Available ' + field_name);
37 37
         var filter_p = quickElement('p', selector_available, '');
38 38
         filter_p.className = 'selector-filter';
39  
-        quickElement('img', filter_p, '', 'src', 'http://media.ljworld.com/img/admin/selector-search.gif');
  39
+        quickElement('img', filter_p, '', 'src', admin_media_prefix + 'img/admin/selector-search.gif');
40 40
         filter_p.appendChild(document.createTextNode(' '));
41 41
         var filter_input = quickElement('input', filter_p, '', 'type', 'text');
42 42
         filter_input.id = field_id + '_input';
@@ -58,7 +58,7 @@ var SelectFilter = {
58 58
         quickElement('h2', selector_chosen, 'Chosen ' + field_name);
59 59
         var selector_filter = quickElement('p', selector_chosen, 'Select your choice(s) and click ');
60 60
         selector_filter.className = 'selector-filter';
61  
-        quickElement('img', selector_filter, '', 'src', 'http://media.ljworld.com/img/admin/selector-add.gif', 'alt', 'Add');
  61
+        quickElement('img', selector_filter, '', 'src', admin_media_prefix + 'img/admin/selector-add.gif', 'alt', 'Add');
62 62
         var to_box = quickElement('select', selector_chosen, '', 'id', field_id + '_to', 'multiple', 'multiple', 'size', from_box.size, 'name', from_box.getAttribute('name'));
63 63
         to_box.className = 'filtered';
64 64
         var clear_all = quickElement('a', selector_chosen, 'Clear all', 'href', 'javascript: (function() { SelectBox.move_all("' + field_id + '_to", "' + field_id + '_from");})()');
2  django/views/admin/main.py
@@ -597,7 +597,7 @@ def _get_template(opts, app_label, add=False, change=False, show_delete=False, f
597 597
             t.append(_get_admin_field(field_list, 'form.', False, add, change))
598 598
             for f in field_list:
599 599
                 if f.rel and isinstance(f, meta.ManyToManyField) and f.rel.filter_interface:
600  
-                    t.append('<script type="text/javascript">addEvent(window, "load", function(e) { SelectFilter.init("id_%s", "%s", %s); });</script>\n' % (f.name, f.verbose_name, f.rel.filter_interface-1))
  600
+                    t.append('<script type="text/javascript">addEvent(window, "load", function(e) { SelectFilter.init("id_%s", "%s", %s, %r); });</script>\n' % (f.name, f.verbose_name, f.rel.filter_interface-1, ADMIN_MEDIA_PREFIX))
601 601
         t.append('</fieldset>\n')
602 602
     if ordered_objects and change:
603 603
         t.append('<fieldset class="module"><h2>Ordering</h2>')

0 notes on commit d8f5cad

Please sign in to comment.
Something went wrong with that request. Please try again.