activeadmin_trumbowyg 0.1.6 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/LICENSE.txt +1 -1
- data/README.md +42 -39
- data/Rakefile +2 -2
- data/app/assets/fonts/trumbowyg/icons.svg +1 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/ar.js +67 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/bg.js +54 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/by.js +61 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/ca.js +57 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/cs.js +54 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/da.js +64 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/de.js +57 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/de.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/el.js +59 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/es.js +63 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/es_ar.js +56 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/fa.js +58 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/fi.js +58 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/fr.js +66 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/he.js +57 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/hr.js +54 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/hu.js +58 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/id.js +57 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/it.js +59 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/ja.js +63 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/ko.js +63 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/ko.min.js +3 -4
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/lt.js +59 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/mn.js +49 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/my.js +54 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/nl.js +61 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/nl.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/no_nb.js +56 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/ph.js +54 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/pl.js +55 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/pt.js +65 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/pt_br.js +65 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/pt_br.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/ro.js +58 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/rs.js +53 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/rs_latin.js +54 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/ru.js +61 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/ru.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/sk.js +54 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/sl.js +48 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/sl.min.js +1 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/sq.js +65 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/sv.js +58 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/th.js +55 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/th.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/tr.js +55 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/ua.js +54 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/vi.js +56 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/vi.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/zh_cn.js +57 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/zh_tw.js +66 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/allowtagsfrompaste/trumbowyg.allowtagsfrompaste.js +22 -3
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/allowtagsfrompaste/trumbowyg.allowtagsfrompaste.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/base64/trumbowyg.base64.js +14 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/base64/trumbowyg.base64.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/cleanpaste/trumbowyg.cleanpaste.js +9 -10
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/cleanpaste/trumbowyg.cleanpaste.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/trumbowyg.colors.js +88 -36
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/trumbowyg.colors.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/ui/sass/trumbowyg.colors.scss +30 -11
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/ui/trumbowyg.colors.css +27 -15
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/ui/trumbowyg.colors.min.css +2 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/trumbowyg.emoji.js +914 -840
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/trumbowyg.emoji.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/ui/sass/trumbowyg.emoji.scss +1 -4
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/ui/trumbowyg.emoji.css +2 -5
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/ui/trumbowyg.emoji.min.css +2 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/fontfamily/trumbowyg.fontfamily.js +24 -11
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/fontfamily/trumbowyg.fontfamily.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/fontsize/trumbowyg.fontsize.js +121 -24
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/fontsize/trumbowyg.fontsize.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/giphy/trumbowyg.giphy.js +182 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/giphy/trumbowyg.giphy.min.js +1 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/giphy/ui/sass/trumbowyg.giphy.scss +111 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/giphy/ui/trumbowyg.giphy.css +90 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/giphy/ui/trumbowyg.giphy.min.css +2 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/trumbowyg.highlight.js +11 -3
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/trumbowyg.highlight.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/ui/sass/trumbowyg.highlight.scss +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/ui/trumbowyg.highlight.css +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/ui/trumbowyg.highlight.min.css +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/history/trumbowyg.history.js +17 -3
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/history/trumbowyg.history.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/insertaudio/trumbowyg.insertaudio.js +9 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/insertaudio/trumbowyg.insertaudio.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/lineheight/trumbowyg.lineheight.js +59 -19
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/lineheight/trumbowyg.lineheight.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/trumbowyg.mathml.js +25 -6
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/trumbowyg.mathml.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/ui/sass/trumbowyg.mathml.scss +10 -10
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/ui/trumbowyg.mathml.css +9 -9
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/ui/trumbowyg.mathml.min.css +2 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/trumbowyg.mention.js +26 -21
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/trumbowyg.mention.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/ui/sass/trumbowyg.mention.scss +1 -11
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/ui/trumbowyg.mention.css +14 -22
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/ui/trumbowyg.mention.min.css +2 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/noembed/trumbowyg.noembed.js +11 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/noembed/trumbowyg.noembed.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/pasteimage/trumbowyg.pasteimage.js +9 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/pasteimage/trumbowyg.pasteimage.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/preformatted/trumbowyg.preformatted.js +6 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/preformatted/trumbowyg.preformatted.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/resizimg/resizable-resolveconflict.js +20 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/resizimg/resizable-resolveconflict.min.js +1 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/resizimg/trumbowyg.resizimg.js +252 -18
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/resizimg/trumbowyg.resizimg.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/ruby/trumbowyg.ruby.js +12 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/ruby/trumbowyg.ruby.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/trumbowyg.specialchars.js +79 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/trumbowyg.specialchars.min.js +1 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/ui/sass/trumbowyg.specialchars.scss +56 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/ui/trumbowyg.specialchars.css +47 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/ui/trumbowyg.specialchars.min.css +2 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/table/trumbowyg.table.js +272 -157
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/table/trumbowyg.table.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/table/ui/sass/trumbowyg.table.scss +5 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/table/ui/trumbowyg.table.css +4 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/table/ui/trumbowyg.table.min.css +2 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/template/trumbowyg.template.js +14 -3
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/template/trumbowyg.template.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/upload/trumbowyg.upload.js +15 -4
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/upload/trumbowyg.upload.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/trumbowyg.js +234 -132
- data/app/assets/javascripts/activeadmin/trumbowyg/trumbowyg.min.js +2 -2
- data/app/assets/javascripts/activeadmin/trumbowyg_input.js +22 -9
- data/app/assets/stylesheets/activeadmin/_trumbowyg_input.scss +67 -0
- data/app/assets/stylesheets/activeadmin/trumbowyg/{ui/sass/trumbowyg.scss → trumbowyg.scss} +22 -7
- data/lib/activeadmin/trumbowyg.rb +2 -0
- data/lib/activeadmin/trumbowyg/engine.rb +2 -0
- data/lib/activeadmin/trumbowyg/version.rb +3 -1
- data/lib/activeadmin_trumbowyg.rb +2 -1
- data/lib/formtastic/inputs/trumbowyg_input.rb +3 -2
- data/lib/tasks/trumbowyg.rake +4 -2
- metadata +193 -23
- data/.gitignore +0 -3
- data/Gemfile +0 -4
- data/activeadmin_trumbowyg.gemspec +0 -19
- data/app/assets/fonts/active_admin-trumbowyg.svg +0 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/ui/icons.svg +0 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/ui/sass/trumbowyg.scss +0 -809
- data/app/assets/javascripts/activeadmin/trumbowyg/ui/trumbowyg.css +0 -587
- data/app/assets/javascripts/activeadmin/trumbowyg/ui/trumbowyg.min.css +0 -2
- data/app/assets/stylesheets/activeadmin/_trumbowyg_input.sass +0 -56
- data/app/assets/stylesheets/activeadmin/trumbowyg/ui/icons.svg +0 -1
- data/app/assets/stylesheets/activeadmin/trumbowyg/ui/trumbowyg.css +0 -587
- data/app/assets/stylesheets/activeadmin/trumbowyg/ui/trumbowyg.min.css +0 -2
- data/screenshot.jpg +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){"use strict";function e(i,e){var n,t;return function(){var o=this,l=+new Date,c=arguments;n&&l<n+e?(clearTimeout(t),t=setTimeout(function(){n=l,i.apply(o,c)},e)):(n=l,i.apply(o,c))}}function n(e,n,t,o){var l=(n.width()-20)/3,c=e.data.filter(function(i){return""!==i.images.downsized.url}).map(function(i){var e=i.images.downsized,n=e.height/e.width;return'<div class="img-container"><img src='+e.url+' width="'+l+'" height="'+n*l+'" loading="lazy" onload="this.classList.add(\'tbw-loaded\')"/></div>'}).join("");if(o===!0){if(0===c.length){if(i("."+t.o.prefix+"giphy-no-result",n).length>0)return;c='<img class="'+t.o.prefix+'giphy-no-result" src="'+t.o.plugins.giphy.noResultGifUrl+'"/>'}n.empty()}n.append(c),i("img",n).on("click",function(){t.restoreRange(),t.execCmd("insertImage",i(this).attr("src"),!1,!0),i("img",n).off(),t.closeModal()})}i.extend(!0,i.trumbowyg,{langs:{en:{giphy:"Insert GIF"},fr:{giphy:"Insérer un GIF"}}});var t='<svg viewBox="0 0 231 53" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M48.32 22.386c0-1.388-.252-1.892-1.767-1.85-3.448.126-6.855.042-10.303.042H25.443c-.927 0-1.346.211-1.305 1.22.085 2.86.085 5.72.043 8.58 0 .883.252 1.169 1.169 1.135 2.018-.084 3.995-.042 6.014 0 1.64 0 4.164-.546 4.752.252.841 1.169.421 3.364.337 5.089-.043.547-.547 1.304-1.094 1.598-2.692 1.556-5.678 2.018-8.747 1.892-5.342-.21-9.336-2.439-11.481-7.527-1.388-3.364-1.725-6.855-1.01-10.43 1.01-4.963 3.407-8.747 8.58-10.051 5.215-1.305 10.136-.547 14.467 2.817 1.219.967 1.798.715 2.691-.294 1.514-1.724 3.154-3.322 4.753-4.963 1.892-1.933 1.892-1.892-.169-3.7C38.429.813 31.238-.617 23.5.224 12.818 1.393 5.248 6.658 1.59 17.045-.177 22.008-.428 27.097.623 32.227c1.682 7.914 5.551 14.12 13.289 17.368 6.898 2.901 14.046 3.448 21.321 1.598 4.331-1.093 8.411-2.608 11.354-6.223 1.136-1.388 1.725-2.902 1.682-4.71l.043-17.873.008-.001zm125.153 3.784l.042-23.046c0-1.136-.168-1.598-1.472-1.556a238.02 238.02 0 0 1-11.017 0c-1.136-.042-1.439.337-1.439 1.439v15.645c0 1.345-.421 1.556-1.641 1.556a422.563 422.563 0 0 0-14.593 0c-1.262.042-1.472-.421-1.439-1.556l.043-15.813c0-.926-.169-1.304-1.17-1.262h-11.513c-.927 0-1.304.169-1.304 1.22v46.764c0 .967.252 1.262 1.219 1.262h11.512c1.169.042 1.262-.462 1.262-1.388l-.042-15.644c0-1.053.251-1.346 1.304-1.346h15.14c1.22 0 1.388.421 1.388 1.472l-.042 15.477c0 1.093.21 1.472 1.388 1.439 3.615-.085 7.233-.085 10.807 0 1.304.042 1.598-.337 1.598-1.598l-.042-23.047.011-.018zM106.565 1.654c-8.369-.211-16.728-.126-25.065-.211-1.346 0-1.767.337-1.767 1.724l.043 23.004v23.215c0 1.009.168 1.439 1.304 1.387a271.22 271.22 0 0 1 11.691 0c1.094 0 1.346-.336 1.346-1.345l-.042-10.64c0-1.052.294-1.345 1.345-1.345 3.322.042 6.645.085 9.967-.085 4.407-.21 8.621-1.219 12.111-4.12 5.551-4.584 7.613-12.701 5.131-20.061-2.313-6.561-8.747-11.354-16.064-11.522v-.001zm-3.028 24.013c-2.818.042-5.594-.043-8.411.042-1.169.042-1.439-.378-1.345-1.439.084-1.556 0-3.069 0-4.626v-5.131c-.043-.841.251-1.094 1.052-1.052 2.986.042 5.929-.085 8.915.042 3.616.126 5.887 2.692 5.846 6.266-.126 3.658-2.313 5.846-6.055 5.887l-.002.011zM229.699 1.569c-4.458 0-8.915-.042-13.415.043-.629 0-1.472.503-1.85 1.052a505.695 505.695 0 0 0-8.957 14.214c-.884 1.472-1.22 1.169-1.977-.084l-8.496-14.089c-.503-.841-1.052-1.136-2.018-1.136l-13.078.043c-.462 0-.967.125-1.439.21.21.378.378.799.629 1.169l17.412 27.167c.462.715.715 1.682.757 2.524v16.653c0 1.052.168 1.514 1.388 1.472 3.784-.084 7.57-.084 11.354 0 1.136.043 1.304-.377 1.304-1.387l-.042-8.58c0-2.734-.084-5.51.042-8.243.043-.926.337-1.933.841-2.649l18.167-27.041c.252-.337.337-.758.547-1.17a3.636 3.636 0 0 0-1.169-.168zM70.104 2.661c0-1.009-.294-1.219-1.262-1.219H57.69c-1.262-.043-1.472.377-1.472 1.513l.042 23.004v23.34c0 1.053.126 1.514 1.346 1.473 3.7-.085 7.444-.043 11.152 0 .966 0 1.387-.085 1.387-1.262l-.042-46.857.001.008z" fill="currentColor" fill-rule="nonzero"/></svg>',o="tbwcancel",l={rating:"g",apiKey:null,throttleDelay:300,noResultGifUrl:"https://media.giphy.com/media/2Faz9FbRzmwxY0pZS/giphy.gif"};i.extend(!0,i.trumbowyg,{plugins:{giphy:{init:function(c){c.o.plugins.giphy=i.extend({},l,c.o.plugins.giphy||{}),c.addBtnDef("giphy",{fn:function(){if(null===c.o.plugins.giphy.apiKey)throw new Error("You must set a Giphy API Key");var l="https://api.giphy.com/v1/gifs/search?api_key="+c.o.plugins.giphy.apiKey+"&rating="+c.o.plugins.giphy.rating,a=l.replace("/search","/trending"),r={abort:function(){}},s=c.o.prefix,p='<input name="" class="'+s+'giphy-search" placeholder="Search a GIF" autofocus="autofocus">',g='<button class="'+s+'giphy-close" title="'+c.lang.close+'"><svg><use xlink:href="'+c.svgPath+"#"+s+'close"/></svg></button>',u='<div class="'+s+'powered-by-giphy"><span>Powered by</span>'+t+"</div>",h=p+g+u+'<div class="'+s+'giphy-modal-scroll"><div class="'+s+'giphy-modal"></div></div>';c.openModal(null,h,!1).one(o,function(){try{r.abort()}catch(i){}c.closeModal()});var d=i("."+s+"giphy-search"),f=i("."+s+"giphy-close"),y=i("."+s+"giphy-modal"),v=function(){navigator.onLine||i("."+s+"giphy-offline",y).length||(y.empty(),y.append('<p class="'+s+'giphy-offline">You are offline</p>'))};i.ajax({url:a,dataType:"json",success:function(i){n(i,y,c,!0)},error:v});var m=function(){var e=d.val();if(0!==e.length){try{r.abort()}catch(t){}r=i.ajax({url:l+"&q="+encodeURIComponent(e),dataType:"json",success:function(i){n(i,y,c,!0)},error:v})}},w=e(m,c.o.plugins.giphy.throttleDelay);d.on("input",w),d.focus(),f.one("click",function(){y.trigger(o)})}})}}}})}(jQuery);
|
@@ -0,0 +1,111 @@
|
|
1
|
+
/**
|
2
|
+
* Trumbowyg v2.21.0 - A lightweight WYSIWYG editor
|
3
|
+
* Default stylesheet for Trumbowyg editor plugin
|
4
|
+
* ------------------------
|
5
|
+
* @link http://alex-d.github.io/Trumbowyg
|
6
|
+
* @license MIT
|
7
|
+
* @author Alexandre Demode (Alex-D)
|
8
|
+
* Twitter : @AlexandreDemode
|
9
|
+
* Website : alex-d.fr
|
10
|
+
*/
|
11
|
+
|
12
|
+
.trumbowyg-giphy-button svg {
|
13
|
+
transform: scale(1.22);
|
14
|
+
}
|
15
|
+
|
16
|
+
.trumbowyg-giphy-search {
|
17
|
+
display: block;
|
18
|
+
width: 80%;
|
19
|
+
margin: 5%;
|
20
|
+
padding-left: 10px;
|
21
|
+
padding-right: 150px;
|
22
|
+
}
|
23
|
+
|
24
|
+
.trumbowyg-giphy-close {
|
25
|
+
position: absolute;
|
26
|
+
top: calc(5% + 8px);
|
27
|
+
right: calc(5% - 2px);
|
28
|
+
width: 30px;
|
29
|
+
height: 30px;
|
30
|
+
background: none;
|
31
|
+
border: 1px solid transparent;
|
32
|
+
|
33
|
+
&:hover,
|
34
|
+
&:focus {
|
35
|
+
outline: none;
|
36
|
+
background: #ecf0f1;
|
37
|
+
}
|
38
|
+
&:focus {
|
39
|
+
border-color: rgba(0, 0, 0, 0.3);
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
.trumbowyg-powered-by-giphy {
|
44
|
+
position: absolute;
|
45
|
+
top: calc(5% + 12px);
|
46
|
+
right: calc(15% + 10px);
|
47
|
+
pointer-events: none;
|
48
|
+
user-select: none;
|
49
|
+
|
50
|
+
span {
|
51
|
+
text-transform: uppercase;
|
52
|
+
font-weight: bold;
|
53
|
+
font-size: 10px;
|
54
|
+
opacity: 0.6;
|
55
|
+
}
|
56
|
+
|
57
|
+
svg {
|
58
|
+
width: 66px;
|
59
|
+
height: 15px;
|
60
|
+
vertical-align: bottom;
|
61
|
+
margin-left: 6px;
|
62
|
+
opacity: 0.45;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
.trumbowyg-giphy-modal-scroll {
|
67
|
+
overflow: auto;
|
68
|
+
overflow-x: hidden;
|
69
|
+
height: 240px;
|
70
|
+
}
|
71
|
+
|
72
|
+
.trumbowyg-giphy-modal {
|
73
|
+
padding: 0 5%;
|
74
|
+
columns: 3;
|
75
|
+
column-gap: 10px;
|
76
|
+
|
77
|
+
.trumbowyg-giphy-no-result {
|
78
|
+
width: 250%;
|
79
|
+
margin: 13% 0 0 29%;
|
80
|
+
}
|
81
|
+
|
82
|
+
.trumbowyg-giphy-offline {
|
83
|
+
font-size: 18px;
|
84
|
+
width: 305%;
|
85
|
+
height: 600px;
|
86
|
+
margin-top: 95px;
|
87
|
+
text-align: center;
|
88
|
+
}
|
89
|
+
}
|
90
|
+
|
91
|
+
.trumbowyg-giphy-modal .img-container {
|
92
|
+
width: 100%;
|
93
|
+
margin-bottom: 10px;
|
94
|
+
background-color: #ecf0f1;
|
95
|
+
|
96
|
+
img {
|
97
|
+
width: 100%;
|
98
|
+
cursor: pointer;
|
99
|
+
opacity: 0;
|
100
|
+
transition: opacity 150ms;
|
101
|
+
|
102
|
+
&:hover,
|
103
|
+
&:focus {
|
104
|
+
border: #2ecc71 solid 3px;
|
105
|
+
}
|
106
|
+
}
|
107
|
+
|
108
|
+
img.tbw-loaded {
|
109
|
+
opacity: 1;
|
110
|
+
}
|
111
|
+
}
|
@@ -0,0 +1,90 @@
|
|
1
|
+
/**
|
2
|
+
* Trumbowyg v2.21.0 - A lightweight WYSIWYG editor
|
3
|
+
* Trumbowyg plugin stylesheet
|
4
|
+
* ------------------------
|
5
|
+
* @link http://alex-d.github.io/Trumbowyg
|
6
|
+
* @license MIT
|
7
|
+
* @author Alexandre Demode (Alex-D)
|
8
|
+
* Twitter : @AlexandreDemode
|
9
|
+
* Website : alex-d.fr
|
10
|
+
*/
|
11
|
+
|
12
|
+
.trumbowyg-giphy-button svg {
|
13
|
+
transform: scale(1.22); }
|
14
|
+
|
15
|
+
.trumbowyg-giphy-search {
|
16
|
+
display: block;
|
17
|
+
width: 80%;
|
18
|
+
margin: 5%;
|
19
|
+
padding-left: 10px;
|
20
|
+
padding-right: 150px; }
|
21
|
+
|
22
|
+
.trumbowyg-giphy-close {
|
23
|
+
position: absolute;
|
24
|
+
top: calc(5% + 8px);
|
25
|
+
right: calc(5% - 2px);
|
26
|
+
width: 30px;
|
27
|
+
height: 30px;
|
28
|
+
background: none;
|
29
|
+
border: 1px solid transparent; }
|
30
|
+
.trumbowyg-giphy-close:hover, .trumbowyg-giphy-close:focus {
|
31
|
+
outline: none;
|
32
|
+
background: #ecf0f1; }
|
33
|
+
.trumbowyg-giphy-close:focus {
|
34
|
+
border-color: rgba(0, 0, 0, 0.3); }
|
35
|
+
|
36
|
+
.trumbowyg-powered-by-giphy {
|
37
|
+
position: absolute;
|
38
|
+
top: calc(5% + 12px);
|
39
|
+
right: calc(15% + 10px);
|
40
|
+
pointer-events: none;
|
41
|
+
-webkit-user-select: none;
|
42
|
+
-moz-user-select: none;
|
43
|
+
-ms-user-select: none;
|
44
|
+
user-select: none; }
|
45
|
+
.trumbowyg-powered-by-giphy span {
|
46
|
+
text-transform: uppercase;
|
47
|
+
font-weight: bold;
|
48
|
+
font-size: 10px;
|
49
|
+
opacity: 0.6; }
|
50
|
+
.trumbowyg-powered-by-giphy svg {
|
51
|
+
width: 66px;
|
52
|
+
height: 15px;
|
53
|
+
vertical-align: bottom;
|
54
|
+
margin-left: 6px;
|
55
|
+
opacity: 0.45; }
|
56
|
+
|
57
|
+
.trumbowyg-giphy-modal-scroll {
|
58
|
+
overflow: auto;
|
59
|
+
overflow-x: hidden;
|
60
|
+
height: 240px; }
|
61
|
+
|
62
|
+
.trumbowyg-giphy-modal {
|
63
|
+
padding: 0 5%;
|
64
|
+
-moz-columns: 3;
|
65
|
+
columns: 3;
|
66
|
+
-moz-column-gap: 10px;
|
67
|
+
column-gap: 10px; }
|
68
|
+
.trumbowyg-giphy-modal .trumbowyg-giphy-no-result {
|
69
|
+
width: 250%;
|
70
|
+
margin: 13% 0 0 29%; }
|
71
|
+
.trumbowyg-giphy-modal .trumbowyg-giphy-offline {
|
72
|
+
font-size: 18px;
|
73
|
+
width: 305%;
|
74
|
+
height: 600px;
|
75
|
+
margin-top: 95px;
|
76
|
+
text-align: center; }
|
77
|
+
|
78
|
+
.trumbowyg-giphy-modal .img-container {
|
79
|
+
width: 100%;
|
80
|
+
margin-bottom: 10px;
|
81
|
+
background-color: #ecf0f1; }
|
82
|
+
.trumbowyg-giphy-modal .img-container img {
|
83
|
+
width: 100%;
|
84
|
+
cursor: pointer;
|
85
|
+
opacity: 0;
|
86
|
+
transition: opacity 150ms; }
|
87
|
+
.trumbowyg-giphy-modal .img-container img:hover, .trumbowyg-giphy-modal .img-container img:focus {
|
88
|
+
border: #2ecc71 solid 3px; }
|
89
|
+
.trumbowyg-giphy-modal .img-container img.tbw-loaded {
|
90
|
+
opacity: 1; }
|
@@ -0,0 +1,2 @@
|
|
1
|
+
/** Trumbowyg v2.21.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */
|
2
|
+
.trumbowyg-giphy-button svg{transform:scale(1.22)}.trumbowyg-giphy-search{display:block;width:80%;margin:5%;padding-left:10px;padding-right:150px}.trumbowyg-giphy-close{position:absolute;top:calc(5% + 8px);right:calc(5% - 2px);width:30px;height:30px;background:0 0;border:1px solid transparent}.trumbowyg-giphy-close:focus,.trumbowyg-giphy-close:hover{outline:0;background:#ecf0f1}.trumbowyg-giphy-close:focus{border-color:rgba(0,0,0,.3)}.trumbowyg-powered-by-giphy{position:absolute;top:calc(5% + 12px);right:calc(15% + 10px);pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.trumbowyg-powered-by-giphy span{text-transform:uppercase;font-weight:700;font-size:10px;opacity:.6}.trumbowyg-powered-by-giphy svg{width:66px;height:15px;vertical-align:bottom;margin-left:6px;opacity:.45}.trumbowyg-giphy-modal-scroll{overflow:auto;overflow-x:hidden;height:240px}.trumbowyg-giphy-modal{padding:0 5%;-moz-columns:3;columns:3;-moz-column-gap:10px;column-gap:10px}.trumbowyg-giphy-modal .trumbowyg-giphy-no-result{width:250%;margin:13% 0 0 29%}.trumbowyg-giphy-modal .trumbowyg-giphy-offline{font-size:18px;width:305%;height:600px;margin-top:95px;text-align:center}.trumbowyg-giphy-modal .img-container{width:100%;margin-bottom:10px;background-color:#ecf0f1}.trumbowyg-giphy-modal .img-container img{width:100%;cursor:pointer;opacity:0;transition:opacity 150ms}.trumbowyg-giphy-modal .img-container img:focus,.trumbowyg-giphy-modal .img-container img:hover{border:3px solid #2ecc71}.trumbowyg-giphy-modal .img-container img.tbw-loaded{opacity:1}
|
@@ -24,7 +24,7 @@
|
|
24
24
|
var options = '';
|
25
25
|
|
26
26
|
for (var lang in Prism.languages) {
|
27
|
-
if (Prism.languages
|
27
|
+
if (Prism.languages.hasOwnProperty(lang)) {
|
28
28
|
options += '<option value="' + lang + '">' + lang + '</option>';
|
29
29
|
}
|
30
30
|
}
|
@@ -59,11 +59,19 @@
|
|
59
59
|
$.extend(true, $.trumbowyg, {
|
60
60
|
// Add some translations
|
61
61
|
langs: {
|
62
|
+
// jshint camelcase:false
|
62
63
|
en: {
|
63
64
|
highlight: 'Code syntax highlight'
|
64
|
-
}
|
65
|
+
},
|
66
|
+
pt_br: {
|
67
|
+
highlight: 'Realçar sintaxe de código'
|
68
|
+
},
|
69
|
+
ko: {
|
70
|
+
highlight: '코드 문법 하이라이트'
|
71
|
+
},
|
72
|
+
// jshint camelcase:true
|
65
73
|
},
|
66
|
-
// Add our plugin to Trumbowyg
|
74
|
+
// Add our plugin to Trumbowyg registered plugins
|
67
75
|
plugins: {
|
68
76
|
highlight: {
|
69
77
|
init: function (trumbowyg) {
|
data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/trumbowyg.highlight.min.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(n
|
1
|
+
!function(i,n){"use strict";function e(i,e){return['<pre class="language-'+e+'">','<code class="language-'+e+'">'+n.highlight(i,n.languages[e])+"</code>","</pre>"].join("")}function o(i){return{fn:function(){var o=i.openModal("Code",['<div class="'+i.o.prefix+'highlight-form-group">',' <select class="'+i.o.prefix+'highlight-form-control language">',function(){var i="";for(var e in n.languages)n.languages.hasOwnProperty(e)&&(i+='<option value="'+e+'">'+e+"</option>");return i}()," </select>","</div>",'<div class="'+i.o.prefix+'highlight-form-group">',' <textarea class="'+i.o.prefix+'highlight-form-control code"></textarea>',"</div>"].join("\n")),t=o.find(".language"),g=o.find(".code");o.on("tbwconfirm",function(){i.restoreRange(),i.execCmd("insertHTML",e(g.val(),t.val())),i.execCmd("insertHTML","<p><br></p>"),i.closeModal()}),o.on("tbwcancel",function(){i.closeModal()})}}}var t={};i.extend(!0,i.trumbowyg,{langs:{en:{highlight:"Code syntax highlight"},pt_br:{highlight:"Realçar sintaxe de código"},ko:{highlight:"코드 문법 하이라이트"}},plugins:{highlight:{init:function(n){n.o.plugins.highlight=i.extend(!0,{},t,n.o.plugins.highlight||{}),n.addBtnDef("highlight",o(n))}}}})}(jQuery,Prism);
|
data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/ui/trumbowyg.highlight.min.css
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
/** Trumbowyg v2.
|
1
|
+
/** Trumbowyg v2.21.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */
|
2
2
|
.trumbowyg-highlight-form-group{margin:15px 10px}.trumbowyg-highlight-form-group .trumbowyg-highlight-form-control{width:100%;border:1px solid #DEDEDE;font-size:14px;padding:7px}.trumbowyg-highlight-form-group .trumbowyg-highlight-form-control.code{height:200px}
|
@@ -10,6 +10,7 @@
|
|
10
10
|
'use strict';
|
11
11
|
$.extend(true, $.trumbowyg, {
|
12
12
|
langs: {
|
13
|
+
// jshint camelcase:false
|
13
14
|
de: {
|
14
15
|
history: {
|
15
16
|
redo: 'Wiederholen',
|
@@ -39,7 +40,20 @@
|
|
39
40
|
redo: '重做',
|
40
41
|
undo: '復原'
|
41
42
|
}
|
42
|
-
}
|
43
|
+
},
|
44
|
+
pt_br: {
|
45
|
+
history: {
|
46
|
+
redo: 'Refazer',
|
47
|
+
undo: 'Desfazer'
|
48
|
+
}
|
49
|
+
},
|
50
|
+
ko: {
|
51
|
+
history: {
|
52
|
+
redo: '다시 실행',
|
53
|
+
undo: '되돌리기'
|
54
|
+
}
|
55
|
+
},
|
56
|
+
// jshint camelcase:true
|
43
57
|
},
|
44
58
|
plugins: {
|
45
59
|
history: {
|
@@ -129,7 +143,7 @@
|
|
129
143
|
t.o.plugins.history._stack = stack.slice(
|
130
144
|
0, t.o.plugins.history._index
|
131
145
|
);
|
132
|
-
// now add new state to
|
146
|
+
// now add new state to modified history
|
133
147
|
t.o.plugins.history._stack.push(newState);
|
134
148
|
} else {
|
135
149
|
// modify last stack entry
|
@@ -199,4 +213,4 @@
|
|
199
213
|
}
|
200
214
|
}
|
201
215
|
});
|
202
|
-
})(jQuery);
|
216
|
+
})(jQuery);
|
@@ -1 +1 @@
|
|
1
|
-
!function(o){"use strict";o.extend(!0,o.trumbowyg,{langs:{de:{history:{redo:"Wiederholen",undo:"Rückgängig"}},en:{history:{redo:"Redo",undo:"Undo"}},da:{history:{redo:"Annuller fortryd",undo:"Fortryd"}},fr:{history:{redo:"Annuler",undo:"Rétablir"}},zh_tw:{history:{redo:"重做",undo:"復原"}}},plugins:{history:{init:function(i){i.o.plugins.history=o.extend(!0,{_stack:[],_index:-1,_focusEl:void 0},i.o.plugins.history||{});var t={title:i.lang.history.redo,ico:"redo",key:"Y",fn:function(){if(i.o.plugins.history._index<i.o.plugins.history._stack.length-1){i.o.plugins.history._index+=1;var o=i.o.plugins.history._index,t=i.o.plugins.history._stack[o];i.execCmd("html",t),i.o.plugins.history._stack[o]=i.$ed.html(),l(),s()}}},n={title:i.lang.history.undo,ico:"undo",key:"Z",fn:function(){if(i.o.plugins.history._index>0){i.o.plugins.history._index-=1;var o=i.o.plugins.history._index,t=i.o.plugins.history._stack[o];i.execCmd("html",t),i.o.plugins.history._stack[o]=i.$ed.html(),l(),s()}}},e=function(){var t,n,e=i.o.plugins.history._index,r=i.o.plugins.history._stack,l=r.slice(-1)[0]||"<p></p>",u=r[e],h=i.$ed.html(),c=i.doc.getSelection().focusNode,g="",a=i.o.plugins.history._focusEl;t=o("<div>"+l+"</div>").find("*").map(function(){return this.localName}),n=o("<div>"+h+"</div>").find("*").map(function(){return this.localName}),c&&(i.o.plugins.history._focusEl=c,g=c.outerHTML||c.textContent),h!==u&&(g.slice(-1).match(/\s/)||!d(t,n)||i.o.plugins.history._index<=0||c!==a?(i.o.plugins.history._index+=1,i.o.plugins.history._stack=r.slice(0,i.o.plugins.history._index),i.o.plugins.history._stack.push(h)):i.o.plugins.history._stack[e]=h,s())},s=function(){var o=i.o.plugins.history._index,t=i.o.plugins.history._stack.length,n=o>0,e=0!==t&&o!==t-1;r("historyUndo",n),r("historyRedo",e)},r=function(o,t){var n=i.$box.find(".trumbowyg-"+o+"-button");t?n.removeClass("trumbowyg-disable"):n.hasClass("trumbowyg-disable")||n.addClass("trumbowyg-disable")},d=function(o,i){if(o===i)return!0;if(null==o||null==i)return!1;if(o.length!==i.length)return!1;for(var t=0;t<o.length;t+=1)if(o[t]!==i[t])return!1;return!0},l=function(){var o=i.doc.getSelection().focusNode,t=i.doc.createRange();o.childNodes.length>0&&(t.setStartAfter(o.childNodes[o.childNodes.length-1]),t.setEndAfter(o.childNodes[o.childNodes.length-1]),i.doc.getSelection().removeAllRanges(),i.doc.getSelection().addRange(t))};i.$c.on("tbwinit tbwchange",e),i.addBtnDef("historyRedo",t),i.addBtnDef("historyUndo",n)}}}})}(jQuery);
|
1
|
+
!function(o){"use strict";o.extend(!0,o.trumbowyg,{langs:{de:{history:{redo:"Wiederholen",undo:"Rückgängig"}},en:{history:{redo:"Redo",undo:"Undo"}},da:{history:{redo:"Annuller fortryd",undo:"Fortryd"}},fr:{history:{redo:"Annuler",undo:"Rétablir"}},zh_tw:{history:{redo:"重做",undo:"復原"}},pt_br:{history:{redo:"Refazer",undo:"Desfazer"}},ko:{history:{redo:"다시 실행",undo:"되돌리기"}}},plugins:{history:{init:function(i){i.o.plugins.history=o.extend(!0,{_stack:[],_index:-1,_focusEl:void 0},i.o.plugins.history||{});var t={title:i.lang.history.redo,ico:"redo",key:"Y",fn:function(){if(i.o.plugins.history._index<i.o.plugins.history._stack.length-1){i.o.plugins.history._index+=1;var o=i.o.plugins.history._index,t=i.o.plugins.history._stack[o];i.execCmd("html",t),i.o.plugins.history._stack[o]=i.$ed.html(),l(),s()}}},n={title:i.lang.history.undo,ico:"undo",key:"Z",fn:function(){if(i.o.plugins.history._index>0){i.o.plugins.history._index-=1;var o=i.o.plugins.history._index,t=i.o.plugins.history._stack[o];i.execCmd("html",t),i.o.plugins.history._stack[o]=i.$ed.html(),l(),s()}}},e=function(){var t,n,e=i.o.plugins.history._index,r=i.o.plugins.history._stack,l=r.slice(-1)[0]||"<p></p>",u=r[e],h=i.$ed.html(),c=i.doc.getSelection().focusNode,g="",a=i.o.plugins.history._focusEl;t=o("<div>"+l+"</div>").find("*").map(function(){return this.localName}),n=o("<div>"+h+"</div>").find("*").map(function(){return this.localName}),c&&(i.o.plugins.history._focusEl=c,g=c.outerHTML||c.textContent),h!==u&&(g.slice(-1).match(/\s/)||!d(t,n)||i.o.plugins.history._index<=0||c!==a?(i.o.plugins.history._index+=1,i.o.plugins.history._stack=r.slice(0,i.o.plugins.history._index),i.o.plugins.history._stack.push(h)):i.o.plugins.history._stack[e]=h,s())},s=function(){var o=i.o.plugins.history._index,t=i.o.plugins.history._stack.length,n=o>0,e=0!==t&&o!==t-1;r("historyUndo",n),r("historyRedo",e)},r=function(o,t){var n=i.$box.find(".trumbowyg-"+o+"-button");t?n.removeClass("trumbowyg-disable"):n.hasClass("trumbowyg-disable")||n.addClass("trumbowyg-disable")},d=function(o,i){if(o===i)return!0;if(null==o||null==i)return!1;if(o.length!==i.length)return!1;for(var t=0;t<o.length;t+=1)if(o[t]!==i[t])return!1;return!0},l=function(){var o=i.doc.getSelection().focusNode,t=i.doc.createRange();o.childNodes.length>0&&(t.setStartAfter(o.childNodes[o.childNodes.length-1]),t.setEndAfter(o.childNodes[o.childNodes.length-1]),i.doc.getSelection().removeAllRanges(),i.doc.getSelection().addRange(t))};i.$c.on("tbwinit tbwchange",e),i.addBtnDef("historyRedo",t),i.addBtnDef("historyUndo",n)}}}})}(jQuery);
|
data/app/assets/javascripts/activeadmin/trumbowyg/plugins/insertaudio/trumbowyg.insertaudio.js
CHANGED
@@ -33,6 +33,7 @@
|
|
33
33
|
|
34
34
|
$.extend(true, $.trumbowyg, {
|
35
35
|
langs: {
|
36
|
+
// jshint camelcase:false
|
36
37
|
en: {
|
37
38
|
insertAudio: 'Insert Audio'
|
38
39
|
},
|
@@ -50,7 +51,14 @@
|
|
50
51
|
},
|
51
52
|
tr: {
|
52
53
|
insertAudio: 'Ses Ekle'
|
53
|
-
}
|
54
|
+
},
|
55
|
+
pt_br: {
|
56
|
+
insertAudio: 'Inserir áudio'
|
57
|
+
},
|
58
|
+
ko: {
|
59
|
+
insertAudio: '소리 넣기'
|
60
|
+
},
|
61
|
+
// jshint camelcase:true
|
54
62
|
},
|
55
63
|
plugins: {
|
56
64
|
insertAudio: {
|
data/app/assets/javascripts/activeadmin/trumbowyg/plugins/insertaudio/trumbowyg.insertaudio.min.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e){"use strict";var r={src:{label:"URL",required:!0},autoplay:{label:"AutoPlay",required:!1,type:"checkbox"},muted:{label:"Muted",required:!1,type:"checkbox"},preload:{label:"preload options",required:!1}};e.extend(!0,e.trumbowyg,{langs:{en:{insertAudio:"Insert Audio"},da:{insertAudio:"Indsæt lyd"},fr:{insertAudio:"Insérer un son"},ru:{insertAudio:"Вставить аудио"},ja:{insertAudio:"音声の挿入"},tr:{insertAudio:"Ses Ekle"}},plugins:{insertAudio:{init:function(n){var t={fn:function(){var t=function(r){var t="<audio controls";r.src&&(t+=" src='"+r.src+"'"),r.autoplay&&(t+=" autoplay"),r.muted&&(t+=" muted"),r.preload&&(t+=" preload='"+r+"'"),t+="></audio>";var
|
1
|
+
!function(e){"use strict";var r={src:{label:"URL",required:!0},autoplay:{label:"AutoPlay",required:!1,type:"checkbox"},muted:{label:"Muted",required:!1,type:"checkbox"},preload:{label:"preload options",required:!1}};e.extend(!0,e.trumbowyg,{langs:{en:{insertAudio:"Insert Audio"},da:{insertAudio:"Indsæt lyd"},fr:{insertAudio:"Insérer un son"},ru:{insertAudio:"Вставить аудио"},ja:{insertAudio:"音声の挿入"},tr:{insertAudio:"Ses Ekle"},pt_br:{insertAudio:"Inserir áudio"},ko:{insertAudio:"소리 넣기"}},plugins:{insertAudio:{init:function(n){var t={fn:function(){var t=function(r){var t="<audio controls";r.src&&(t+=" src='"+r.src+"'"),r.autoplay&&(t+=" autoplay"),r.muted&&(t+=" muted"),r.preload&&(t+=" preload='"+r+"'"),t+="></audio>";var i=e(t)[0];return n.range.deleteContents(),n.range.insertNode(i),!0};n.openModalInsert(n.lang.insertAudio,r,t)}};n.addBtnDef("insertAudio",t)}}}})}(jQuery);
|
data/app/assets/javascripts/activeadmin/trumbowyg/plugins/lineheight/trumbowyg.lineheight.js
CHANGED
@@ -7,46 +7,46 @@
|
|
7
7
|
en: {
|
8
8
|
lineheight: 'Line height',
|
9
9
|
lineheights: {
|
10
|
-
'0.9':
|
10
|
+
'0.9': 'Small',
|
11
11
|
'normal': 'Regular',
|
12
|
-
'1.5':
|
13
|
-
'2.0':
|
12
|
+
'1.5': 'Large',
|
13
|
+
'2.0': 'Extra large'
|
14
14
|
}
|
15
15
|
},
|
16
16
|
da: {
|
17
17
|
lineheight: 'Linjehøjde',
|
18
18
|
lineheights: {
|
19
|
-
'0.9':
|
19
|
+
'0.9': 'Lille',
|
20
20
|
'normal': 'Normal',
|
21
|
-
'1.5':
|
22
|
-
'2.0':
|
21
|
+
'1.5': 'Stor',
|
22
|
+
'2.0': 'Ekstra stor'
|
23
23
|
}
|
24
24
|
},
|
25
25
|
fr: {
|
26
26
|
lineheight: 'Hauteur de ligne',
|
27
27
|
lineheights: {
|
28
|
-
'0.9':
|
29
|
-
'normal': '
|
30
|
-
'1.5':
|
31
|
-
'2.0':
|
28
|
+
'0.9': 'Petite',
|
29
|
+
'normal': 'Normale',
|
30
|
+
'1.5': 'Grande',
|
31
|
+
'2.0': 'Très grande'
|
32
32
|
}
|
33
33
|
},
|
34
34
|
nl: {
|
35
35
|
lineheight: 'Regelhoogte',
|
36
36
|
lineheights: {
|
37
|
-
'0.9':
|
37
|
+
'0.9': 'Klein',
|
38
38
|
'normal': 'Normaal',
|
39
|
-
'1.5':
|
40
|
-
'2.0':
|
39
|
+
'1.5': 'Groot',
|
40
|
+
'2.0': 'Extra groot'
|
41
41
|
}
|
42
42
|
},
|
43
43
|
tr: {
|
44
44
|
lineheight: 'Satır yüksekliği',
|
45
45
|
lineheights: {
|
46
|
-
'0.9':
|
46
|
+
'0.9': 'Küçük',
|
47
47
|
'normal': 'Normal',
|
48
|
-
'1.5':
|
49
|
-
'2.0':
|
48
|
+
'1.5': 'Büyük',
|
49
|
+
'2.0': 'Çok Büyük'
|
50
50
|
}
|
51
51
|
},
|
52
52
|
zh_tw: {
|
@@ -58,15 +58,56 @@
|
|
58
58
|
'2.0': '特大'
|
59
59
|
}
|
60
60
|
},
|
61
|
+
pt_br: {
|
62
|
+
lineheight: 'Altura de linha',
|
63
|
+
lineheights: {
|
64
|
+
'0.9': 'Pequena',
|
65
|
+
'normal': 'Regular',
|
66
|
+
'1.5': 'Grande',
|
67
|
+
'2.0': 'Extra grande'
|
68
|
+
}
|
69
|
+
},
|
70
|
+
it: {
|
71
|
+
lineheight: 'Altezza linea',
|
72
|
+
lineheights: {
|
73
|
+
'0.9': 'Bassa',
|
74
|
+
'normal': 'Normale',
|
75
|
+
'1.5': 'Alta',
|
76
|
+
'2.0': 'Molto alta'
|
77
|
+
}
|
78
|
+
},
|
79
|
+
ko: {
|
80
|
+
lineheight: '줄 간격',
|
81
|
+
lineheights: {
|
82
|
+
'0.9': '좁게',
|
83
|
+
'normal': '보통',
|
84
|
+
'1.5': '넓게',
|
85
|
+
'2.0': '아주 넓게'
|
86
|
+
}
|
87
|
+
},
|
61
88
|
}
|
62
89
|
});
|
63
90
|
// jshint camelcase:true
|
64
91
|
|
92
|
+
var defaultOptions = {
|
93
|
+
sizeList: [
|
94
|
+
'0.9',
|
95
|
+
'normal',
|
96
|
+
'1.5',
|
97
|
+
'2.0'
|
98
|
+
]
|
99
|
+
};
|
100
|
+
|
65
101
|
// Add dropdown with font sizes
|
66
102
|
$.extend(true, $.trumbowyg, {
|
67
103
|
plugins: {
|
68
104
|
lineheight: {
|
69
105
|
init: function (trumbowyg) {
|
106
|
+
trumbowyg.o.plugins.lineheight = $.extend({},
|
107
|
+
defaultOptions,
|
108
|
+
trumbowyg.o.plugins.lineheight || {}
|
109
|
+
);
|
110
|
+
|
70
111
|
trumbowyg.addBtnDef('lineheight', {
|
71
112
|
dropdown: buildDropdown(trumbowyg)
|
72
113
|
});
|
@@ -78,11 +119,10 @@
|
|
78
119
|
// Build the dropdown
|
79
120
|
function buildDropdown(trumbowyg) {
|
80
121
|
var dropdown = [];
|
81
|
-
var sizes = ['0.9', 'normal', '1.5', '2.0'];
|
82
122
|
|
83
|
-
$.each(
|
123
|
+
$.each(trumbowyg.o.plugins.lineheight.sizeList, function(index, size) {
|
84
124
|
trumbowyg.addBtnDef('lineheight_' + size, {
|
85
|
-
text:
|
125
|
+
text: trumbowyg.lang.lineheights[size] || size,
|
86
126
|
hasIcon: false,
|
87
127
|
fn: function(){
|
88
128
|
trumbowyg.saveRange();
|