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
This commit is contained in:
parent
5144a60efc
commit
d8f5cad47e
|
@ -15,7 +15,7 @@ function findForm(node) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var SelectFilter = {
|
var SelectFilter = {
|
||||||
init: function(field_id, field_name, is_stacked) {
|
init: function(field_id, field_name, is_stacked, admin_media_prefix) {
|
||||||
var from_box = document.getElementById(field_id);
|
var from_box = document.getElementById(field_id);
|
||||||
from_box.id += '_from'; // change its ID
|
from_box.id += '_from'; // change its ID
|
||||||
from_box.className = 'filtered';
|
from_box.className = 'filtered';
|
||||||
|
@ -36,7 +36,7 @@ var SelectFilter = {
|
||||||
quickElement('h2', selector_available, 'Available ' + field_name);
|
quickElement('h2', selector_available, 'Available ' + field_name);
|
||||||
var filter_p = quickElement('p', selector_available, '');
|
var filter_p = quickElement('p', selector_available, '');
|
||||||
filter_p.className = 'selector-filter';
|
filter_p.className = 'selector-filter';
|
||||||
quickElement('img', filter_p, '', 'src', 'http://media.ljworld.com/img/admin/selector-search.gif');
|
quickElement('img', filter_p, '', 'src', admin_media_prefix + 'img/admin/selector-search.gif');
|
||||||
filter_p.appendChild(document.createTextNode(' '));
|
filter_p.appendChild(document.createTextNode(' '));
|
||||||
var filter_input = quickElement('input', filter_p, '', 'type', 'text');
|
var filter_input = quickElement('input', filter_p, '', 'type', 'text');
|
||||||
filter_input.id = field_id + '_input';
|
filter_input.id = field_id + '_input';
|
||||||
|
@ -58,7 +58,7 @@ var SelectFilter = {
|
||||||
quickElement('h2', selector_chosen, 'Chosen ' + field_name);
|
quickElement('h2', selector_chosen, 'Chosen ' + field_name);
|
||||||
var selector_filter = quickElement('p', selector_chosen, 'Select your choice(s) and click ');
|
var selector_filter = quickElement('p', selector_chosen, 'Select your choice(s) and click ');
|
||||||
selector_filter.className = 'selector-filter';
|
selector_filter.className = 'selector-filter';
|
||||||
quickElement('img', selector_filter, '', 'src', 'http://media.ljworld.com/img/admin/selector-add.gif', 'alt', 'Add');
|
quickElement('img', selector_filter, '', 'src', admin_media_prefix + 'img/admin/selector-add.gif', 'alt', 'Add');
|
||||||
var to_box = quickElement('select', selector_chosen, '', 'id', field_id + '_to', 'multiple', 'multiple', 'size', from_box.size, 'name', from_box.getAttribute('name'));
|
var to_box = quickElement('select', selector_chosen, '', 'id', field_id + '_to', 'multiple', 'multiple', 'size', from_box.size, 'name', from_box.getAttribute('name'));
|
||||||
to_box.className = 'filtered';
|
to_box.className = 'filtered';
|
||||||
var clear_all = quickElement('a', selector_chosen, 'Clear all', 'href', 'javascript: (function() { SelectBox.move_all("' + field_id + '_to", "' + field_id + '_from");})()');
|
var clear_all = quickElement('a', selector_chosen, 'Clear all', 'href', 'javascript: (function() { SelectBox.move_all("' + field_id + '_to", "' + field_id + '_from");})()');
|
||||||
|
|
|
@ -597,7 +597,7 @@ def _get_template(opts, app_label, add=False, change=False, show_delete=False, f
|
||||||
t.append(_get_admin_field(field_list, 'form.', False, add, change))
|
t.append(_get_admin_field(field_list, 'form.', False, add, change))
|
||||||
for f in field_list:
|
for f in field_list:
|
||||||
if f.rel and isinstance(f, meta.ManyToManyField) and f.rel.filter_interface:
|
if f.rel and isinstance(f, meta.ManyToManyField) and f.rel.filter_interface:
|
||||||
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))
|
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))
|
||||||
t.append('</fieldset>\n')
|
t.append('</fieldset>\n')
|
||||||
if ordered_objects and change:
|
if ordered_objects and change:
|
||||||
t.append('<fieldset class="module"><h2>Ordering</h2>')
|
t.append('<fieldset class="module"><h2>Ordering</h2>')
|
||||||
|
|
Loading…
Reference in New Issue