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 807 of 807+ 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
Major enhancements
......
......@@ -16,6 +16,7 @@
* python-nxpy
* python-lxml
* python-ipaddr
* python-django-tinymce
* apache2
* apache2-mod-proxy
* apache2-mod-rewrite
......@@ -40,7 +41,6 @@ Components roles:
* Shibboleth authentication
- Required shibboleth attributes:
- HTTP_EPPN
- HTTP_SHIB_HOMEORGANIZATION
- HTTP_SHIB_INETORGPERSON_MAIL
- An appropriate HTTP_SHIB_EP_ENTITLEMENT
- Optional Attributes:
......
......@@ -7,4 +7,21 @@ from django.conf import settings
class UserPrAdmin(admin.ModelAdmin):
list_display = ('user', 'peer')
admin.site.register(UserProfile, UserPrAdmin)
\ No newline at end of file
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 = (
'djcelery',
'peers',
'registration',
'accounts'
'accounts',
'tinymce',
)
LOGIN_URL = '/fod/welcome'
......@@ -221,3 +222,12 @@ SHIB_FIRSTNAME = ['HTTP_SHIB_INETORGPERSON_GIVENNAME']
SHIB_LASTNAME = ['HTTP_SHIB_PERSON_SURNAME']
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:{
paste_text_desc:"Paste as Plain Text",
paste_word_desc:"Paste from Word",
selectall_desc:"Select All",
plaintext_mode_sticky:"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.",
plaintext_mode:"Paste is now in plain text mode. Click again to toggle back to regular paste mode."
},
paste_dlg:{
text_title:"Use CTRL+V on your keyboard to paste the text into the window.",
text_linebreaks:"Keep linebreaks",
word_title:"Use CTRL+V on your keyboard to paste the text into the window."
},
table:{
desc:"Inserts a new table",
row_before_desc:"Insert row before",
row_after_desc:"Insert row after",
delete_row_desc:"Delete row",
col_before_desc:"Insert column before",
col_after_desc:"Insert column after",
delete_col_desc:"Remove column",
split_cells_desc:"Split merged table cells",
merge_cells_desc:"Merge table cells",
row_desc:"Table row properties",
cell_desc:"Table cell properties",
props_desc:"Table properties",
paste_row_before_desc:"Paste table row before",
paste_row_after_desc:"Paste table row after",
cut_row_desc:"Cut table row",
copy_row_desc:"Copy table row",
del:"Delete table",
row:"Row",
col:"Column",
cell:"Cell"
},
autosave:{
unload_msg:"The changes you made will be lost if you navigate away from this page.",
restore_content:"Restore auto-saved content.",
warning_message:"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?."
},
fullscreen:{
desc:"Toggle fullscreen mode"
},
media:{
desc:"Insert / edit embedded media",
edit:"Edit embedded media"
},
fullpage:{
desc:"Document properties"
},
template:{
desc:"Insert predefined template content"
},
visualchars:{
desc:"Visual control characters on/off."
},
spellchecker:{
desc:"Toggle spellchecker",
menu:"Spellchecker settings",
ignore_word:"Ignore word",
ignore_words:"Ignore all",
langs:"Languages",
wait:"Please wait...",
sug:"Suggestions",
no_sug:"No suggestions",
no_mpell:"No misspellings found."
},
pagebreak:{
desc:"Insert page break."
},
advlist:{
types:"Types",
def:"Default",
lower_alpha:"Lower alpha",
lower_greek:"Lower greek",
lower_roman:"Lower roman",
upper_alpha:"Upper alpha",
upper_roman:"Upper roman",
circle:"Circle",
disc:"Disc",
square:"Square"
}}});
\ No newline at end of file
tinyMCE.addI18n({az:{
common:{
edit_confirm:"Siz haz\u0131rki m\u0259tn sah\u0259si \u00FC\u00E7\u00FCn WYSIWYG rejimi istifad\u0259 etm\u0259k ist\u0259yirsiniz?",
apply:"T\u0259tbiq et",
insert:"\u018Flav\u0259 et",
update:"Yenil\u0259",
cancel:"L\u0259\u011Fv et",
close:"Ba\u011Fla",
browse:"G\u00F6zd\u0259n ke\u00E7ir",
class_name:"Sinif",
not_set:"-- M\u00FC\u0259yy\u0259n edilm\u0259yib --",
clipboard_msg:"Kopyalama/\u018Flav\u0259 et Mozilla v\u0259 Firefox-da i\u015Fl\u0259mir.\nN\u0259 ba\u015F verdiyi haqda daha \u0259trafl\u0131 \u00F6yr\u0259nm\u0259k ist\u0259yirsiniz?",
clipboard_no_support:"Hal-haz\u0131rda b\u0259l\u0259d\u00E7iniz t\u0259r\u0259find\u0259n d\u0259st\u0259kl\u0259nmir. Klaviatura q\u0131saldmas\u0131ndan istifad\u0259 edin.",
popup_blocked:"Ba\u011F\u0131\u015Flay\u0131n, lakin sizin \u00FCz\u0259 \u00E7\u0131xan p\u0259nc\u0259r\u0259l\u0259riniz funksiya p\u0259nc\u0259r\u0259sinin qar\u015F\u0131s\u0131n\u0131 ald\u0131. G\u0259r\u0259k \u00FCz\u0259 \u00E7\u0131xan p\u0259nc\u0259r\u0259l\u0259rin bloklama nizamlamas\u0131n\u0131 l\u0259\u011Fv ed\u0259siniz ki, al\u0259td\u0259n tam istifad\u0259 ed\u0259 bil\u0259siniz.",
invalid_data:"X\u0259ta: Q\u0131rm\u0131z\u0131 il\u0259 qeyd edilmi\u015Fl\u0259r s\u0259hv daxil edilib.",
more_colors:"Daha \u00E7ox r\u0259ng"
},
contextmenu:{
align:"Tarazla\u015Fd\u0131r",
left:"Sola",
center:"M