agenda-libre-ruby/app/assets/javascripts/events.js.coffee

27 lines
871 B
CoffeeScript

$(document).ready ->
$('form.region_selector select').change ->
this.form.submit()
tinyMCE.init
selector: 'textarea#event_description',
menubar : false,
schema: 'html5',
add_unload_trigger: true,
browser_spellcheck: true,
toolbar: [
' bold italic strikethrough
| bullist numlist outdent indent
| alignleft aligncenter alignright alignjustify
| link media insertdatetime charmap table
| undo redo
| searchreplace
| code visualblocks preview fullscreen'
],
plugins: 'lists, advlist, autolink, link, charmap, paste, print, preview,
table, fullscreen, searchreplace, media, insertdatetime, visualblocks,
visualchars, wordcount, contextmenu, code'
$(document).on 'page:receive', ->
# Delete existing tinymce editors, very important in the turbolinks context!
tinymce.remove()