Commit 6ecbf4ec authored by Leonidas Poulopoulos's avatar Leonidas Poulopoulos

Added TinyMCE to flatpages. Minor urls.py.dist fix

parent 802dfff6

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

===========
0.9.1 RELEASE
Major UI enhancements
Enhancements:
-Added bootstrap UI framework
-Added TinyMCE in flatpages
-Brought back flatpages with JS magic for translation switching
-HomeOrganization is no longer required-user selects from dropdown
-Added Shibboleth mapping in settings
-Added an Any button in source address
=========== ===========
0.9 RELEASE 0.9 RELEASE
Major enhancements Major enhancements
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
* python-nxpy * python-nxpy
* python-lxml * python-lxml
* python-ipaddr * python-ipaddr
* python-django-tinymce
* apache2 * apache2
* apache2-mod-proxy * apache2-mod-proxy
* apache2-mod-rewrite * apache2-mod-rewrite
...@@ -40,7 +41,6 @@ Components roles: ...@@ -40,7 +41,6 @@ Components roles:
* Shibboleth authentication * Shibboleth authentication
- Required shibboleth attributes: - Required shibboleth attributes:
- HTTP_EPPN - HTTP_EPPN
- HTTP_SHIB_HOMEORGANIZATION
- HTTP_SHIB_INETORGPERSON_MAIL - HTTP_SHIB_INETORGPERSON_MAIL
- An appropriate HTTP_SHIB_EP_ENTITLEMENT - An appropriate HTTP_SHIB_EP_ENTITLEMENT
- Optional Attributes: - Optional Attributes:
......
...@@ -8,3 +8,20 @@ class UserPrAdmin(admin.ModelAdmin): ...@@ -8,3 +8,20 @@ class UserPrAdmin(admin.ModelAdmin):
list_display = ('user', 'peer') list_display = ('user', 'peer')
admin.site.register(UserProfile, UserPrAdmin) admin.site.register(UserProfile, UserPrAdmin)
from django import forms
from django.core.urlresolvers import reverse
from django.contrib.flatpages.admin import FlatPageAdmin
from django.contrib.flatpages.models import FlatPage
from tinymce.widgets import TinyMCE
class TinyMCEFlatPageAdmin(FlatPageAdmin):
def formfield_for_dbfield(self, db_field, **kwargs):
if db_field.name == 'content':
return forms.CharField(widget=TinyMCE(
attrs={'cols': 80, 'rows': 30},
mce_attrs={'external_link_list_url': reverse('tinymce.views.flatpages_link_list')},
))
return super(TinyMCEFlatPageAdmin, self).formfield_for_dbfield(db_field, **kwargs)
admin.site.unregister(FlatPage)
admin.site.register(FlatPage, TinyMCEFlatPageAdmin)
\ No newline at end of file
...@@ -143,7 +143,8 @@ INSTALLED_APPS = ( ...@@ -143,7 +143,8 @@ INSTALLED_APPS = (
'djcelery', 'djcelery',
'peers', 'peers',
'registration', 'registration',
'accounts' 'accounts',
'tinymce',
) )
LOGIN_URL = '/fod/welcome' LOGIN_URL = '/fod/welcome'
...@@ -221,3 +222,12 @@ SHIB_FIRSTNAME = ['HTTP_SHIB_INETORGPERSON_GIVENNAME'] ...@@ -221,3 +222,12 @@ SHIB_FIRSTNAME = ['HTTP_SHIB_INETORGPERSON_GIVENNAME']
SHIB_LASTNAME = ['HTTP_SHIB_PERSON_SURNAME'] SHIB_LASTNAME = ['HTTP_SHIB_PERSON_SURNAME']
SHIB_ENTITLEMENT = ['HTTP_SHIB_EP_ENTITLEMENT'] SHIB_ENTITLEMENT = ['HTTP_SHIB_EP_ENTITLEMENT']
TINYMCE_JS_URL = '/static/js/tinymce/tiny_mce.js'
TINYMCE_DEFAULT_CONFIG = {
'extended_valid_elements' : 'iframe[src|width|height|name|align]',
'plugins': "table,spellchecker,paste,searchreplace",
'theme': "advanced",
}
tinyMCE.addI18n({ar:{
common:{
edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?",
apply:"Apply",
insert:"Insert",
update:"Update",
cancel:"Cancel",
close:"Close",
browse:"Browse",
class_name:"Class",
not_set:"-- Not set --",
clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?",
clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.",
popup_blocked:"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.",
invalid_data:"Error: Invalid values entered, these are marked in red.",
more_colors:"More colors"
},
contextmenu:{
align:"Alignment",
left:"Left",
center:"Center",
right:"Right",
full:"Full"
},
insertdatetime:{
date_fmt:"%Y-%m-%d",
time_fmt:"%H:%M:%S",
insertdate_desc:"Insert date",
inserttime_desc:"Insert time",
months_long:"January,February,March,April,May,June,July,August,September,October,November,December",
months_short:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",
day_long:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun"
},
print:{
print_desc:"Print"
},
preview:{
preview_desc:"Preview"
},
directionality:{
ltr_desc:"Direction left to right",
rtl_desc:"Direction right to left"
},
layer:{
insertlayer_desc:"Insert new layer",
forward_desc:"Move forward",
backward_desc:"Move backward",
absolute_desc:"Toggle absolute positioning",
content:"New layer..."
},
save:{
save_desc:"Save",
cancel_desc:"Cancel all changes"
},
nonbreaking:{
nonbreaking_desc:"Insert non-breaking space character"
},
iespell:{
iespell_desc:"Run spell checking",
download:"ieSpell not detected. Do you want to install it now?"
},
advhr:{
advhr_desc:"Horizontal rule"
},
emotions:{
emotions_desc:"Emotions"
},
searchreplace:{
search_desc:"Find",
replace_desc:"Find/Replace"
},
advimage:{
image_desc:"Insert/edit image"
},
advlink:{
link_desc:"Insert/edit link"
},
xhtmlxtras:{
cite_desc:"Citation",
abbr_desc:"Abbreviation",
acronym_desc:"Acronym",
del_desc:"Deletion",
ins_desc:"Insertion",
attribs_desc:"Insert/Edit Attributes"
},
style:{
desc:"Edit CSS Style"
},
paste:{