# HG changeset patch # User Brian Neal # Date 1259281307 0 # Node ID c515b7401078e315d09245602d13a4ca072c818e # Parent 06503edcc56b68bf8eec14838cf97aed93be5ff4 Use the new common way to apply markItUp to textareas and to get the smiley and markdown help dialogs for all the remaining apps except for forums and comments. diff -r 06503edcc56b -r c515b7401078 gpp/bio/forms.py --- a/gpp/bio/forms.py Thu Nov 26 22:51:07 2009 +0000 +++ b/gpp/bio/forms.py Fri Nov 27 00:21:47 2009 +0000 @@ -32,6 +32,10 @@ interests = forms.CharField(required=False, widget=forms.TextInput(attrs={'size' : 64 })) time_zone = forms.CharField(required=False, widget=forms.HiddenInput()) use_24_time = forms.BooleanField(label='Show times in 24-hour mode', required=False) + profile_text = forms.CharField(required=False, + widget=forms.Textarea(attrs={'class': 'markItUp'})) + signature = forms.CharField(required=False, + widget=forms.Textarea(attrs={'class': 'markItUp'})) class Meta: model = UserProfile diff -r 06503edcc56b -r c515b7401078 gpp/downloads/forms.py --- a/gpp/downloads/forms.py Thu Nov 26 22:51:07 2009 +0000 +++ b/gpp/downloads/forms.py Fri Nov 27 00:21:47 2009 +0000 @@ -20,6 +20,10 @@ class AddDownloadForm(forms.ModelForm): """Form to allow adding downloads.""" + title = forms.CharField(required=True, + widget=forms.TextInput(attrs={'size': 64, 'maxlength': 64})) + description = forms.CharField(required=False, + widget=forms.Textarea(attrs={'class': 'markItUp smileyTarget'})) def clean_file(self): file = self.cleaned_data['file'] @@ -35,8 +39,8 @@ class Media: css = { - 'all': settings.GPP_THIRD_PARTY_CSS['markitup'], + 'all': (settings.GPP_THIRD_PARTY_CSS['markitup'] + + settings.GPP_THIRD_PARTY_CSS['jquery-ui']) } - js = settings.GPP_THIRD_PARTY_JS['markitup'] + \ - ('js/downloads/add.js', ) - + js = (settings.GPP_THIRD_PARTY_JS['markitup'] + + settings.GPP_THIRD_PARTY_JS['jquery-ui']) diff -r 06503edcc56b -r c515b7401078 gpp/membermap/forms.py --- a/gpp/membermap/forms.py Thu Nov 26 22:51:07 2009 +0000 +++ b/gpp/membermap/forms.py Fri Nov 27 00:21:47 2009 +0000 @@ -8,6 +8,10 @@ class MapEntryForm(forms.ModelForm): + location = forms.CharField(required=True, + widget=forms.TextInput(attrs={'size': 64, 'maxlength': 255})) + message = forms.CharField(required=False, + widget=forms.Textarea(attrs={'class': 'markItUp smileyTarget'})) class Meta: model = MapEntry @@ -15,8 +19,9 @@ class Media: css = { - 'all': settings.GPP_THIRD_PARTY_CSS['markitup'] + 'all': (settings.GPP_THIRD_PARTY_CSS['markitup'] + + settings.GPP_THIRD_PARTY_CSS['jquery-ui']) } - js = settings.GPP_THIRD_PARTY_JS['markitup'] + js = (settings.GPP_THIRD_PARTY_JS['markitup'] + + settings.GPP_THIRD_PARTY_JS['jquery-ui']) -# vim: ts=4 sw=4 diff -r 06503edcc56b -r c515b7401078 gpp/messages/forms.py --- a/gpp/messages/forms.py Thu Nov 26 22:51:07 2009 +0000 +++ b/gpp/messages/forms.py Fri Nov 27 00:21:47 2009 +0000 @@ -24,7 +24,7 @@ max_length=30, widget=AutoCompleteUserInput()) subject = forms.CharField(max_length=120, widget=forms.TextInput(attrs={'size': 52})) - message = forms.CharField(widget=forms.Textarea(attrs={'rows': 20, 'cols': 80})) + message = forms.CharField(widget=forms.Textarea(attrs={'class': 'markItUp smileyTarget'})) attach_signature = forms.BooleanField(label='Attach Signature?', required=False) def __init__(self, user, *args, **kwargs): @@ -67,9 +67,11 @@ class Media: css = { - 'all': settings.GPP_THIRD_PARTY_CSS['markitup'], + 'all': (settings.GPP_THIRD_PARTY_CSS['markitup'] + + settings.GPP_THIRD_PARTY_CSS['jquery-ui']) } - js = ('js/messages/compose.js', ) + settings.GPP_THIRD_PARTY_JS['markitup'] + js = (settings.GPP_THIRD_PARTY_JS['markitup'] + + settings.GPP_THIRD_PARTY_JS['jquery-ui']) class OptionsForm(forms.ModelForm): diff -r 06503edcc56b -r c515b7401078 gpp/templates/downloads/add.html --- a/gpp/templates/downloads/add.html Thu Nov 26 22:51:07 2009 +0000 +++ b/gpp/templates/downloads/add.html Fri Nov 27 00:21:47 2009 +0000 @@ -1,5 +1,6 @@ {% extends 'base.html' %} {% load downloads_tags %} +{% load core_tags %} {% block title %}Add Download{% endblock %} {% block custom_css %} {{ add_form.media }} @@ -37,6 +38,7 @@   + {% comment_dialogs %} diff -r 06503edcc56b -r c515b7401078 gpp/templates/membermap/index.html --- a/gpp/templates/membermap/index.html Thu Nov 26 22:51:07 2009 +0000 +++ b/gpp/templates/membermap/index.html Fri Nov 27 00:21:47 2009 +0000 @@ -1,4 +1,5 @@ {% extends 'base.html' %} +{% load core_tags %} {% block title %}Member Map{% endblock %} {% block custom_js %} @@ -58,11 +59,11 @@
{{ form.as_p }} -

+ {% comment_dialogs %} -

+
{% else %}

The member map allows members to place themselves on a google map along with a short message. diff -r 06503edcc56b -r c515b7401078 gpp/templates/messages/compose.html --- a/gpp/templates/messages/compose.html Thu Nov 26 22:51:07 2009 +0000 +++ b/gpp/templates/messages/compose.html Fri Nov 27 00:21:47 2009 +0000 @@ -1,4 +1,5 @@ {% extends 'messages/base.html' %} +{% load core_tags %} {% block title %}Messages: Compose{% endblock %} {% block custom_js %} {{ compose_form.media }} @@ -12,6 +13,7 @@   + {% comment_dialogs %} diff -r 06503edcc56b -r c515b7401078 media/js/bio.js --- a/media/js/bio.js Thu Nov 26 22:51:07 2009 +0000 +++ b/media/js/bio.js Fri Nov 27 00:21:47 2009 +0000 @@ -1,7 +1,5 @@ $(document).ready(function() { - $('#id_profile_text').markItUp(mySettings); - $('#id_signature').markItUp(mySettings); $('#id_birthday').datepicker({changeMonth: true, changeYear: true, dateFormat: 'yy-mm-dd', diff -r 06503edcc56b -r c515b7401078 media/js/downloads/add.js --- a/media/js/downloads/add.js Thu Nov 26 22:51:07 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -$(document).ready(function() { - $('#id_description').markItUp(mySettings); -}); diff -r 06503edcc56b -r c515b7401078 media/js/downloads_admin.js --- a/media/js/downloads_admin.js Thu Nov 26 22:51:07 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -$(document).ready(function() { - $('#id_description').markItUp(mySettings); -}); diff -r 06503edcc56b -r c515b7401078 media/js/membermap.js --- a/media/js/membermap.js Thu Nov 26 22:51:07 2009 +0000 +++ b/media/js/membermap.js Fri Nov 27 00:21:47 2009 +0000 @@ -30,7 +30,6 @@ 'and click the Submit button.' }; $(document).ready(function() { - $('#id_message').markItUp(mySettings); if (GBrowserIsCompatible()) { $(window).unload(GUnload); diff -r 06503edcc56b -r c515b7401078 media/js/messages/compose.js --- a/media/js/messages/compose.js Thu Nov 26 22:51:07 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -$(document).ready(function() { - $('#id_message').markItUp(mySettings); -});