]> git.parisson.com Git - mezzo.git/commitdiff
tiny mce js
authorEmilie <zawadzki@ircam.fr>
Fri, 15 Jul 2016 15:32:17 +0000 (17:32 +0200)
committerEmilie <zawadzki@ircam.fr>
Fri, 15 Jul 2016 15:32:17 +0000 (17:32 +0200)
app/local_settings.py
app/organization/core/static/js/tinymce_setup.js [new file with mode: 0644]

index 0cc467575f8e61d4f97b83a95585d62052cfb7cd..a27b8129b77806456cd99948e8e3c1196c023a0d 100644 (file)
@@ -101,7 +101,7 @@ EVENT_PASS_URL = 'http://eve.ircam.fr/manifeste.php/pass/'
 if DEBUG:
     TINYMCE_SETUP_JS = "/static/js/tinymce_setup.js"
 else:
-    TINYMCE_SETUP_JS = "/srv/app/static/js/tinymce_setup.js"
+    TINYMCE_SETUP_JS = "/srv/app/organization/core/static/js/tinymce_setup.js"
 
 SLUGIFY = 'django.template.defaultfilters.slugify'
 
diff --git a/app/organization/core/static/js/tinymce_setup.js b/app/organization/core/static/js/tinymce_setup.js
new file mode 100644 (file)
index 0000000..b51a231
--- /dev/null
@@ -0,0 +1,2 @@
+function custom_file_browser(field_name,url,type,win){return tinyMCE.activeEditor.windowManager.open({title:"Select "+type+" to insert",file:window.__filebrowser_url+"?pop=5&type="+type,width:800,height:500,resizable:"yes",scrollbars:"yes",inline:"yes",close_previous:"no"},{window:win,input:field_name}),!1}var language_codes={ar:"ar",ca:"ca",cs:"cs",da:"da",de:"de",es:"es",et:"et",fa:"fa","fa-ir":"fa_IR",fi:"fi",fr:"fr_FR","hr-hr":"hr",hu:"hu_HU","id-id":"id","is-is":"is_IS",it:"it",ja:"ja",ko:"ko_KR",lv:"lv",nb:"nb_NO",nl:"nl",pl:"pl","pt-br":"pt_BR","pt-pt":"pt_PT",ru:"ru",sk:"sk",sr:"sr",sv:"sv_SE",tr:"tr",uk:"uk_UA",vi:"vi","zh-cn":"zh_CN","zh-tw":"zh_TW","zh-hant":"zh_TW","zh-hans":"zh_CN"};jQuery(function($){"undefined"!=typeof tinyMCE&&tinyMCE.init({selector:"textarea.mceEditor",height:"500px",language:language_codes[window.__language_code]||"en",plugins:["advlist autolink lists link image charmap print preview anchor","searchreplace visualblocks code fullscreen","insertdatetime media table contextmenu paste"],link_list:window.__link_list_url,relative_urls:!1,convert_urls:!1,menubar:!0,statusbar:!1,toolbar:"insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image table | code fullscreen",image_advtab:!0,file_browser_callback:custom_file_browser,content_css:window.__tinymce_css,valid_elements:"*[*]"})});
+//# sourceMappingURL=tinymce_setup.js.map