Ticket #6619: add_js.diff
File add_js.diff, 958 bytes (added by , 17 years ago) |
---|
-
django/contrib/admin/options.py
221 221 save_on_top = False 222 222 ordering = None 223 223 inlines = [] 224 js = [] 224 225 225 226 def __init__(self, model, admin_site): 226 227 self.model = model … … 267 268 js.extend(['js/getElementsBySelector.js', 'js/dom-drag.js' , 'js/admin/ordering.js']) 268 269 if self.filter_vertical or self.filter_horizontal: 269 270 js.extend(['js/SelectBox.js' , 'js/SelectFilter2.js']) 271 js_list = ['%s%s' % (settings.ADMIN_MEDIA_PREFIX, url) for url in js] 272 js_list += self.js 270 273 271 return forms.Media(js= ['%s%s' % (settings.ADMIN_MEDIA_PREFIX, url) for url in js])274 return forms.Media(js=js_list) 272 275 media = property(_media) 273 276 274 277 def has_add_permission(self, request):