X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/a6694613ce70707661b795a121ef126b11c1777a..484c42694c9d4f2e5ad762d94fdc2384ad27872d:/philo/admin/widgets.py?ds=inline diff --git a/philo/admin/widgets.py b/philo/admin/widgets.py index 7fda164..3d7d64b 100644 --- a/philo/admin/widgets.py +++ b/philo/admin/widgets.py @@ -1,6 +1,6 @@ from django import forms from django.conf import settings -from django.contrib.admin.widgets import FilteredSelectMultiple, url_params_from_lookup_dict +from django.contrib.admin.widgets import url_params_from_lookup_dict from django.utils import simplejson as json from django.utils.html import escape from django.utils.safestring import mark_safe @@ -41,34 +41,6 @@ class ModelLookupWidget(forms.TextInput): return mark_safe(u''.join(output)) -class TagFilteredSelectMultiple(FilteredSelectMultiple): - """ - A SelectMultiple with a JavaScript filter interface. - - Note that the resulting JavaScript assumes that the jsi18n - catalog has been loaded in the page - """ - class Media: - js = ( - settings.ADMIN_MEDIA_PREFIX + "js/core.js", - settings.ADMIN_MEDIA_PREFIX + "js/SelectBox.js", - settings.ADMIN_MEDIA_PREFIX + "js/SelectFilter2.js", - "philo/js/TagCreation.js", - ) - - def render(self, name, value, attrs=None, choices=()): - if attrs is None: attrs = {} - attrs['class'] = 'selectfilter' - if self.is_stacked: attrs['class'] += 'stacked' - output = [super(FilteredSelectMultiple, self).render(name, value, attrs, choices)] - output.append(u'\n' % \ - (name, self.verbose_name.replace('"', '\\"'), int(self.is_stacked), settings.ADMIN_MEDIA_PREFIX, name)) - return mark_safe(u''.join(output)) - - class EmbedWidget(forms.Textarea): """A form widget with the HTML class embedding and an embedded list of content-types.""" def __init__(self, attrs=None): @@ -93,4 +65,4 @@ class EmbedWidget(forms.Textarea): css = { 'all': ('philo/css/EmbedWidget.css',), } - js = ('philo/js/EmbedWidget.js',) \ No newline at end of file + js = ('philo/js/EmbedWidget.js',)