activeadmin_trumbowyg 0.2.12 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -2
  3. data/app/assets/javascripts/activeadmin/trumbowyg/langs/bn.js +62 -0
  4. data/app/assets/javascripts/activeadmin/trumbowyg/langs/bn.min.js +9 -0
  5. data/app/assets/javascripts/activeadmin/trumbowyg/langs/et.js +65 -0
  6. data/app/assets/javascripts/activeadmin/trumbowyg/langs/et.min.js +9 -0
  7. data/app/assets/javascripts/activeadmin/trumbowyg/langs/sl.js +9 -1
  8. data/app/assets/javascripts/activeadmin/trumbowyg/langs/sl.min.js +7 -0
  9. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/allowtagsfrompaste/trumbowyg.allowtagsfrompaste.js +3 -3
  10. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/allowtagsfrompaste/trumbowyg.allowtagsfrompaste.min.js +1 -1
  11. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/base64/trumbowyg.base64.js +6 -0
  12. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/base64/trumbowyg.base64.min.js +1 -1
  13. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/cleanpaste/trumbowyg.cleanpaste.min.js +1 -1
  14. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/trumbowyg.colors.js +10 -2
  15. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/trumbowyg.colors.min.js +1 -1
  16. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/ui/sass/trumbowyg.colors.scss +1 -1
  17. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/ui/trumbowyg.colors.css +3 -2
  18. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/ui/trumbowyg.colors.min.css +2 -2
  19. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/trumbowyg.emoji.js +3 -0
  20. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/trumbowyg.emoji.min.js +1 -1
  21. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/ui/sass/trumbowyg.emoji.scss +1 -1
  22. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/ui/trumbowyg.emoji.css +3 -2
  23. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/ui/trumbowyg.emoji.min.css +2 -2
  24. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/fontfamily/trumbowyg.fontfamily.js +4 -1
  25. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/fontfamily/trumbowyg.fontfamily.min.js +1 -1
  26. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/fontsize/trumbowyg.fontsize.js +25 -4
  27. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/fontsize/trumbowyg.fontsize.min.js +1 -1
  28. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/giphy/trumbowyg.giphy.js +6 -0
  29. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/giphy/trumbowyg.giphy.min.js +1 -1
  30. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/giphy/ui/sass/trumbowyg.giphy.scss +1 -1
  31. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/giphy/ui/trumbowyg.giphy.css +13 -6
  32. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/giphy/ui/trumbowyg.giphy.min.css +2 -2
  33. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/trumbowyg.highlight.js +223 -22
  34. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/trumbowyg.highlight.min.js +1 -1
  35. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/ui/sass/trumbowyg.highlight.scss +1 -1
  36. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/ui/trumbowyg.highlight.css +1 -1
  37. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/ui/trumbowyg.highlight.min.css +1 -1
  38. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/history/trumbowyg.history.js +6 -0
  39. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/history/trumbowyg.history.min.js +1 -1
  40. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/indent/trumbowyg.indent.js +9 -5
  41. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/indent/trumbowyg.indent.min.js +1 -1
  42. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/insertaudio/trumbowyg.insertaudio.js +3 -0
  43. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/insertaudio/trumbowyg.insertaudio.min.js +1 -1
  44. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/lineheight/trumbowyg.lineheight.js +9 -0
  45. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/lineheight/trumbowyg.lineheight.min.js +1 -1
  46. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/trumbowyg.mathml.js +5 -0
  47. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/trumbowyg.mathml.min.js +1 -1
  48. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/ui/sass/trumbowyg.mathml.scss +1 -1
  49. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/ui/trumbowyg.mathml.css +3 -2
  50. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/ui/trumbowyg.mathml.min.css +2 -2
  51. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/trumbowyg.mention.js +3 -0
  52. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/trumbowyg.mention.min.js +1 -1
  53. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/ui/sass/trumbowyg.mention.scss +1 -1
  54. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/ui/trumbowyg.mention.css +6 -2
  55. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/ui/trumbowyg.mention.min.css +2 -2
  56. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/noembed/trumbowyg.noembed.js +4 -0
  57. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/noembed/trumbowyg.noembed.min.js +1 -1
  58. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/pasteembed/trumbowyg.pasteembed.min.js +1 -1
  59. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/pasteimage/trumbowyg.pasteimage.min.js +1 -1
  60. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/preformatted/trumbowyg.preformatted.js +3 -0
  61. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/preformatted/trumbowyg.preformatted.min.js +1 -1
  62. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/resizimg/trumbowyg.resizimg.js +2 -2
  63. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/resizimg/trumbowyg.resizimg.min.js +1 -1
  64. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/ruby/trumbowyg.ruby.js +5 -0
  65. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/ruby/trumbowyg.ruby.min.js +1 -1
  66. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/trumbowyg.specialchars.js +3 -0
  67. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/trumbowyg.specialchars.min.js +1 -1
  68. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/ui/sass/trumbowyg.specialchars.scss +1 -1
  69. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/ui/trumbowyg.specialchars.css +3 -2
  70. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/ui/trumbowyg.specialchars.min.css +2 -2
  71. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/table/trumbowyg.table.js +28 -4
  72. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/table/trumbowyg.table.min.js +1 -1
  73. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/table/ui/sass/trumbowyg.table.scss +1 -1
  74. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/table/ui/trumbowyg.table.css +5 -3
  75. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/table/ui/trumbowyg.table.min.css +2 -2
  76. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/template/trumbowyg.template.js +3 -0
  77. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/template/trumbowyg.template.min.js +1 -1
  78. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/upload/trumbowyg.upload.js +5 -0
  79. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/upload/trumbowyg.upload.min.js +1 -1
  80. data/app/assets/javascripts/activeadmin/trumbowyg/trumbowyg.js +26 -17
  81. data/app/assets/javascripts/activeadmin/trumbowyg/trumbowyg.min.js +12 -2
  82. data/app/assets/stylesheets/activeadmin/trumbowyg/trumbowyg.scss +68 -56
  83. data/lib/activeadmin/trumbowyg/version.rb +1 -2
  84. metadata +14 -148
  85. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/resizimg/resizable-resolveconflict.js +0 -20
  86. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/resizimg/resizable-resolveconflict.min.js +0 -1
@@ -1 +1 @@
1
- !function(e){"use strict";function t(){var e,t=null;return window.getSelection?(e=window.getSelection(),e.rangeCount&&(t=e.getRangeAt(0).commonAncestorContainer,1!==t.nodeType&&(t=t.parentNode))):(e=document.selection)&&"Control"!==e.type&&(t=e.createRange().parentElement()),t}function r(e){var t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}function n(){var t=null;if(document.selection)t=document.selection.createRange().parentElement();else{var r=window.getSelection();r.rangeCount>0&&(t=r.getRangeAt(0).startContainer.parentNode)}var n=e(t).contents().closest("pre").length,o=e(t).contents().closest("code").length;n&&o?e(t).contents().unwrap("code").unwrap("pre"):n?e(t).contents().unwrap("pre"):o&&e(t).contents().unwrap("code")}e.extend(!0,e.trumbowyg,{langs:{en:{preformatted:"Code sample <pre>"},da:{preformatted:"Præformateret <pre>"},fr:{preformatted:"Exemple de code <pre>"},hu:{preformatted:"Kód minta <pre>"},it:{preformatted:"Codice <pre>"},ja:{preformatted:"コードサンプル <pre>"},ko:{preformatted:"코드 예제 <pre>"},pt_br:{preformatted:"Exemple de código <pre>"},ru:{preformatted:"Пример кода <pre>"},tr:{preformatted:"Kod örneği <pre>"},zh_cn:{preformatted:"代码示例 <pre>"},zh_tw:{preformatted:"代碼範例 <pre>"}},plugins:{preformatted:{init:function(e){var o={fn:function(){e.saveRange();var o=e.getRangeText();if(""!==o.replace(/\s/g,""))try{var a=t().tagName.toLowerCase();if("code"===a||"pre"===a)return n();e.execCmd("insertHTML","<pre><code>"+r(o)+"</code></pre>")}catch(p){}},tag:"pre"};e.addBtnDef("preformatted",o)}}}})}(jQuery);
1
+ !function(e){"use strict";e.extend(!0,e.trumbowyg,{langs:{en:{preformatted:"Code sample <pre>"},da:{preformatted:"Præformateret <pre>"},et:{preformatted:"Eelvormindatud tekst <pre>"},fr:{preformatted:"Exemple de code <pre>"},hu:{preformatted:"Kód minta <pre>"},it:{preformatted:"Codice <pre>"},ja:{preformatted:"コードサンプル <pre>"},ko:{preformatted:"코드 예제 <pre>"},pt_br:{preformatted:"Exemple de código <pre>"},ru:{preformatted:"Пример кода <pre>"},tr:{preformatted:"Kod örneği <pre>"},zh_cn:{preformatted:"代码示例 <pre>"},zh_tw:{preformatted:"代碼範例 <pre>"}},plugins:{preformatted:{init:function(t){var r={fn:function(){t.saveRange();var r,n,o=t.getRangeText();if(""!==o.replace(/\s/g,""))try{var a=function(){var e,t=null;window.getSelection?(e=window.getSelection()).rangeCount&&1!==(t=e.getRangeAt(0).commonAncestorContainer).nodeType&&(t=t.parentNode):(e=document.selection)&&"Control"!==e.type&&(t=e.createRange().parentElement());return t}().tagName.toLowerCase();if("code"===a||"pre"===a)return function(){var t=null;if(document.selection)t=document.selection.createRange().parentElement();else{var r=window.getSelection();r.rangeCount>0&&(t=r.getRangeAt(0).startContainer.parentNode)}var n=e(t).contents().closest("pre").length,o=e(t).contents().closest("code").length;n&&o?e(t).contents().unwrap("code").unwrap("pre"):n?e(t).contents().unwrap("pre"):o&&e(t).contents().unwrap("code")}();t.execCmd("insertHTML","<pre><code>"+(r=o,(n=document.createElement("DIV")).innerHTML=r,(n.textContent||n.innerText||"")+"</code></pre>"))}catch(e){}},tag:"pre"};t.addBtnDef("preformatted",r)}}}})}(jQuery);
@@ -137,7 +137,7 @@
137
137
  updateCanvas(this.resizeCanvas, this.ctx, this.resizeImg, this.resizeCanvas.width, this.resizeCanvas.height);
138
138
 
139
139
  // enable resize
140
- $(this.resizeCanvas).resizable(resizableOptions)
140
+ $(this.resizeCanvas).resizableSafe(resizableOptions)
141
141
  .on('mousedown', preventDefault);
142
142
 
143
143
  var _this = this;
@@ -207,7 +207,7 @@
207
207
  this.destroyResizable = function () {
208
208
  // clean html code
209
209
  trumbowyg.$ed.find('canvas.resizable')
210
- .resizable('destroy')
210
+ .resizableSafe('destroy')
211
211
  .off('mousedown', preventDefault)
212
212
  .removeClass('resizable');
213
213
 
@@ -1 +1 @@
1
- !function(e){"use strict";function i(e){e.stopPropagation(),e.preventDefault()}var t={minSize:32,step:4},s=function(t){this.resizeCanvas=document.createElement("canvas"),this.resizeCanvas.setAttribute("tabindex","0"),this.resizeCanvas.id="trumbowyg-resizimg-"+ +new Date,this.ctx=null,this.resizeImg=null,this.pressEscape=function(e){e.reset()},this.pressBackspaceOrDelete=function(i){e(i.resizeCanvas).remove(),i.resizeImg=null,null!==t&&(t.syncCode(),t.$c.trigger("tbwchange"))};var s,n,r=!1,a=!1,o=function(e){var i=e.getBoundingClientRect();s=i.left,n=i.top},h=function(e,i,t,s,n){return i.translate(.5,.5),i.lineWidth=1,i.drawImage(t,5,5,s-10,n-10),i.beginPath(),i.rect(5,5,s-10,n-10),i.stroke(),i.beginPath(),i.fillStyle="rgb(255, 255, 255)",i.rect(s-10,n-10,9,9),i.fill(),i.stroke(),o(e),i};this.init=function(){var i=this;e(window).on("scroll resize",function(){i.reCalcOffset()})},this.reCalcOffset=function(){o(this.resizeCanvas)},this.canvasId=function(){return this.resizeCanvas.id},this.isActive=function(){return null!==this.resizeImg},this.isFocusedNow=function(){return r},this.blurNow=function(){r=!1},this.reset=function(){null!==this.resizeImg&&(this.resizeImg.setAttribute("style","width: 100%; max-width: "+(this.resizeCanvas.clientWidth-10)+"px; height: auto; max-height: "+(this.resizeCanvas.clientHeight-10)+"px;"),e(this.resizeCanvas).replaceWith(e(this.resizeImg)),this.resizeCanvas.removeAttribute("style"),this.resizeImg=null)},this.setup=function(o,c){if(this.resizeImg=o,!this.resizeCanvas.getContext)return!1;r=!0,this.resizeCanvas.width=e(this.resizeImg).width()+10,this.resizeCanvas.height=e(this.resizeImg).height()+10,this.resizeCanvas.style.margin="-5px",this.ctx=this.resizeCanvas.getContext("2d"),e(this.resizeImg).replaceWith(e(this.resizeCanvas)),h(this.resizeCanvas,this.ctx,this.resizeImg,this.resizeCanvas.width,this.resizeCanvas.height),e(this.resizeCanvas).resizable(c).on("mousedown",i);var u=this;return e(this.resizeCanvas).on("mousemove",function(e){var i=Math.round(e.clientX-s),t=Math.round(e.clientY-n),r=a;u.ctx.rect(u.resizeCanvas.width-10,u.resizeCanvas.height-10,9,9),a=u.ctx.isPointInPath(i,t),r!==a&&(this.style.cursor=a?"se-resize":"default")}).on("keydown",function(e){if(u.isActive()){var i=e.keyCode;27===i?u.pressEscape(u):8!==i&&46!==i||u.pressBackspaceOrDelete(u)}}).on("focus",i).on("blur",function(){u.reset(),null!==t&&(t.syncCode(),t.$c.trigger("tbwchange"))}),this.resizeCanvas.focus(),!0},this.refresh=function(){this.resizeCanvas.getContext&&(this.resizeCanvas.width=this.resizeCanvas.clientWidth,this.resizeCanvas.height=this.resizeCanvas.clientHeight,h(this.resizeCanvas,this.ctx,this.resizeImg,this.resizeCanvas.width,this.resizeCanvas.height))}};e.extend(!0,e.trumbowyg,{plugins:{resizimg:{destroyResizable:function(){},init:function(n){function r(){n.$ed.find("img").off("click").on("click",function(e){o.isActive()&&o.reset(),o.setup(this,n.o.plugins.resizimg.resizable),i(e)})}var a=this.destroyResizable,o=new s(n);this.destroyResizable=function(){n.$ed.find("canvas.resizable").resizable("destroy").off("mousedown",i).removeClass("resizable"),o.reset(),n.syncCode()},n.o.plugins.resizimg=e.extend(!0,{},t,n.o.plugins.resizimg||{},{resizable:{resizeWidth:!1,onDragStart:function(e,i){var t=n.o.plugins.resizimg,s=e.pageX-i.offset().left,r=e.pageY-i.offset().top;if(s<i.width()-t.minSize||r<i.height()-t.minSize)return!1},onDrag:function(e,i,t,s){var r=n.o.plugins.resizimg;return s<r.minSize&&(s=r.minSize),s-=s%r.step,i.height(s),!1},onDragEnd:function(){o.refresh(),n.syncCode()}}}),n.$c.on("tbwinit",function(){r(),n.$ed.on("click",function(t){e(t.target).is("img")||t.target.id===o.canvasId()||(i(t),o.reset(),n.syncCode(),n.$c.trigger("tbwchange"))}),n.$ed.on("scroll",function(){o.reCalcOffset()})}),n.$c.on("tbwfocus tbwchange",r),n.$c.on("tbwresize",function(){o.reCalcOffset()}),n.$c.on("tbwblur",function(){o.isFocusedNow()?o.blurNow():a()})},destroy:function(){this.destroyResizable()}}}})}(jQuery);
1
+ !function(e){"use strict";var i={minSize:32,step:4};function t(e){e.stopPropagation(),e.preventDefault()}var s=function(i){this.resizeCanvas=document.createElement("canvas"),this.resizeCanvas.setAttribute("tabindex","0"),this.resizeCanvas.id="trumbowyg-resizimg-"+ +new Date,this.ctx=null,this.resizeImg=null,this.pressEscape=function(e){e.reset()},this.pressBackspaceOrDelete=function(t){e(t.resizeCanvas).remove(),t.resizeImg=null,null!==i&&(i.syncCode(),i.$c.trigger("tbwchange"))};var s,n,r=!1,a=!1,o=function(e){var i=e.getBoundingClientRect();s=i.left,n=i.top},h=function(e,i,t,s,n){return i.translate(.5,.5),i.lineWidth=1,i.drawImage(t,5,5,s-10,n-10),i.beginPath(),i.rect(5,5,s-10,n-10),i.stroke(),i.beginPath(),i.fillStyle="rgb(255, 255, 255)",i.rect(s-10,n-10,9,9),i.fill(),i.stroke(),o(e),i};this.init=function(){var i=this;e(window).on("scroll resize",(function(){i.reCalcOffset()}))},this.reCalcOffset=function(){o(this.resizeCanvas)},this.canvasId=function(){return this.resizeCanvas.id},this.isActive=function(){return null!==this.resizeImg},this.isFocusedNow=function(){return r},this.blurNow=function(){r=!1},this.reset=function(){null!==this.resizeImg&&(this.resizeImg.setAttribute("style","width: 100%; max-width: "+(this.resizeCanvas.clientWidth-10)+"px; height: auto; max-height: "+(this.resizeCanvas.clientHeight-10)+"px;"),e(this.resizeCanvas).replaceWith(e(this.resizeImg)),this.resizeCanvas.removeAttribute("style"),this.resizeImg=null)},this.setup=function(o,c){if(this.resizeImg=o,!this.resizeCanvas.getContext)return!1;r=!0,this.resizeCanvas.width=e(this.resizeImg).width()+10,this.resizeCanvas.height=e(this.resizeImg).height()+10,this.resizeCanvas.style.margin="-5px",this.ctx=this.resizeCanvas.getContext("2d"),e(this.resizeImg).replaceWith(e(this.resizeCanvas)),h(this.resizeCanvas,this.ctx,this.resizeImg,this.resizeCanvas.width,this.resizeCanvas.height),e(this.resizeCanvas).resizableSafe(c).on("mousedown",t);var u=this;return e(this.resizeCanvas).on("mousemove",(function(e){var i=Math.round(e.clientX-s),t=Math.round(e.clientY-n),r=a;u.ctx.rect(u.resizeCanvas.width-10,u.resizeCanvas.height-10,9,9),r!==(a=u.ctx.isPointInPath(i,t))&&(this.style.cursor=a?"se-resize":"default")})).on("keydown",(function(e){if(u.isActive()){var i=e.keyCode;27===i?u.pressEscape(u):8!==i&&46!==i||u.pressBackspaceOrDelete(u)}})).on("focus",t).on("blur",(function(){u.reset(),null!==i&&(i.syncCode(),i.$c.trigger("tbwchange"))})),this.resizeCanvas.focus(),!0},this.refresh=function(){this.resizeCanvas.getContext&&(this.resizeCanvas.width=this.resizeCanvas.clientWidth,this.resizeCanvas.height=this.resizeCanvas.clientHeight,h(this.resizeCanvas,this.ctx,this.resizeImg,this.resizeCanvas.width,this.resizeCanvas.height))}};e.extend(!0,e.trumbowyg,{plugins:{resizimg:{destroyResizable:function(){},init:function(n){var r=this.destroyResizable,a=new s(n);function o(){n.$ed.find("img").off("click").on("click",(function(e){a.isActive()&&a.reset(),a.setup(this,n.o.plugins.resizimg.resizable),t(e)}))}this.destroyResizable=function(){n.$ed.find("canvas.resizable").resizableSafe("destroy").off("mousedown",t).removeClass("resizable"),a.reset(),n.syncCode()},n.o.plugins.resizimg=e.extend(!0,{},i,n.o.plugins.resizimg||{},{resizable:{resizeWidth:!1,onDragStart:function(e,i){var t=n.o.plugins.resizimg,s=e.pageX-i.offset().left,r=e.pageY-i.offset().top;if(s<i.width()-t.minSize||r<i.height()-t.minSize)return!1},onDrag:function(e,i,t,s){var r=n.o.plugins.resizimg;return s<r.minSize&&(s=r.minSize),s-=s%r.step,i.height(s),!1},onDragEnd:function(){a.refresh(),n.syncCode()}}}),n.$c.on("tbwinit",(function(){o(),n.$ed.on("click",(function(i){e(i.target).is("img")||i.target.id===a.canvasId()||(t(i),a.reset(),n.syncCode(),n.$c.trigger("tbwchange"))})),n.$ed.on("scroll",(function(){a.reCalcOffset()}))})),n.$c.on("tbwfocus tbwchange",o),n.$c.on("tbwresize",(function(){a.reCalcOffset()})),n.$c.on("tbwblur",(function(){a.isFocusedNow()?a.blurNow():r()}))},destroy:function(){this.destroyResizable()}}}})}(jQuery);
@@ -24,6 +24,11 @@
24
24
  rubyModal: 'Ruby modal',
25
25
  rubyText: 'Ruby tekst'
26
26
  },
27
+ et: {
28
+ ruby: 'Lisa ruby tekst',
29
+ rubyModal: 'Ruby modaal',
30
+ rubyText: 'Ruby tekst'
31
+ },
27
32
  fr: {
28
33
  ruby: 'Ajouter du texte ruby',
29
34
  rubyModal: 'Modale ruby',
@@ -1 +1 @@
1
- !function(r){"use strict";r.extend(!0,r.trumbowyg,{langs:{en:{ruby:"Add ruby text",rubyModal:"Ruby modal",rubyText:"Ruby text"},da:{ruby:"Tilføj ruby tekst",rubyModal:"Ruby modal",rubyText:"Ruby tekst"},fr:{ruby:"Ajouter du texte ruby",rubyModal:"Modale ruby",rubyText:"Texte ruby"},hu:{ruby:"Ruby szöveg hozzáadás",rubyModal:"Ruby modal",rubyText:"Ruby szöveg"},id:{ruby:"Sisipkan teks ruby",rubyModal:"Modal teks ruby",rubyText:"Teks ruby"},ko:{ruby:"루비 문자 넣기",rubyModal:"대상 문자",rubyText:"루비 문자"},pt_br:{ruby:"Adicionar texto ruby",rubyModal:"Modal ruby",rubyText:"Texto ruby"},tr:{ruby:"Ruby metni ekle",rubyModal:"Ruby modal",rubyText:"Ruby metni"},zh_tw:{ruby:"加入 ruby 文字",rubyModal:"Ruby 彈跳視窗",rubyText:"Ruby 文字"}},plugins:{ruby:{init:function(u){var e={fn:function(){u.saveRange(),u.openModalInsert(u.lang.ruby,{rubyText:{label:u.lang.rubyText,required:!1},modal:{label:u.lang.rubyModal,value:u.getRangeText(),required:!0}},function(e){var b=r('<ruby title="'+e.rubyText+'">'+e.modal+"<rp> (</rp><rt>"+e.rubyText+"</rt><rp>)</rp></ruby>")[0];return u.range.deleteContents(),u.range.insertNode(b),u.syncCode(),u.$c.trigger("tbwchange"),!0})}};u.addBtnDef("ruby",e)}}}})}(jQuery);
1
+ !function(u){"use strict";u.extend(!0,u.trumbowyg,{langs:{en:{ruby:"Add ruby text",rubyModal:"Ruby modal",rubyText:"Ruby text"},da:{ruby:"Tilføj ruby tekst",rubyModal:"Ruby modal",rubyText:"Ruby tekst"},et:{ruby:"Lisa ruby tekst",rubyModal:"Ruby modaal",rubyText:"Ruby tekst"},fr:{ruby:"Ajouter du texte ruby",rubyModal:"Modale ruby",rubyText:"Texte ruby"},hu:{ruby:"Ruby szöveg hozzáadás",rubyModal:"Ruby modal",rubyText:"Ruby szöveg"},id:{ruby:"Sisipkan teks ruby",rubyModal:"Modal teks ruby",rubyText:"Teks ruby"},ko:{ruby:"루비 문자 넣기",rubyModal:"대상 문자",rubyText:"루비 문자"},pt_br:{ruby:"Adicionar texto ruby",rubyModal:"Modal ruby",rubyText:"Texto ruby"},tr:{ruby:"Ruby metni ekle",rubyModal:"Ruby modal",rubyText:"Ruby metni"},zh_tw:{ruby:"加入 ruby 文字",rubyModal:"Ruby 彈跳視窗",rubyText:"Ruby 文字"}},plugins:{ruby:{init:function(r){var b={fn:function(){r.saveRange(),r.openModalInsert(r.lang.ruby,{rubyText:{label:r.lang.rubyText,required:!1},modal:{label:r.lang.rubyModal,value:r.getRangeText(),required:!0}},(function(b){var e=u('<ruby title="'+b.rubyText+'">'+b.modal+"<rp> (</rp><rt>"+b.rubyText+"</rt><rp>)</rp></ruby>")[0];return r.range.deleteContents(),r.range.insertNode(e),r.syncCode(),r.$c.trigger("tbwchange"),!0}))}};r.addBtnDef("ruby",b)}}}})}(jQuery);
@@ -28,6 +28,9 @@
28
28
  en: {
29
29
  specialChars: 'Special characters'
30
30
  },
31
+ et: {
32
+ specialChars: 'Erimärgid'
33
+ },
31
34
  fr: {
32
35
  specialChars: 'Caractères spéciaux'
33
36
  },
@@ -1 +1 @@
1
- !function(a){"use strict";function s(s){var e=[];return a.each(s.o.plugins.specialchars.symbolList,function(a,n){n=null===n?"&nbsp":"&#x"+n;var r=n.replace(/:/g,""),l="symbol-"+r,c={text:n,hasIcon:!1,fn:function(){var a=String.fromCodePoint(parseInt(n.replace("&#","0")));return s.execCmd("insertText",a),!0}};s.addBtnDef(l,c),e.push(l)}),e}var e={symbolList:["0024","20AC","00A3","00A2","00A5","00A4","2030",null,"00A9","00AE","2122",null,"00A7","00B6","00C6","00E6","0152","0153",null,"2022","25CF","2023","25B6","2B29","25C6",null,"00B1","00D7","00F7","21D2","21D4","220F","2211","2243","2264","2265"]};a.extend(!0,a.trumbowyg,{langs:{en:{specialChars:"Special characters"},fr:{specialChars:"Caractères spéciaux"},hu:{specialChars:"Speciális karakterek"},ko:{specialChars:"특수문자"}},plugins:{specialchars:{init:function(a){a.o.plugins.specialchars=a.o.plugins.specialchars||e;var n={dropdown:s(a)};a.addBtnDef("specialChars",n)}}}})}(jQuery);
1
+ !function(a){"use strict";var s={symbolList:["0024","20AC","00A3","00A2","00A5","00A4","2030",null,"00A9","00AE","2122",null,"00A7","00B6","00C6","00E6","0152","0153",null,"2022","25CF","2023","25B6","2B29","25C6",null,"00B1","00D7","00F7","21D2","21D4","220F","2211","2243","2264","2265"]};function e(s){var e=[];return a.each(s.o.plugins.specialchars.symbolList,(function(a,r){var n="symbol-"+(r=null===r?"&nbsp":"&#x"+r).replace(/:/g,""),i={text:r,hasIcon:!1,fn:function(){var a=String.fromCodePoint(parseInt(r.replace("&#","0")));return s.execCmd("insertText",a),!0}};s.addBtnDef(n,i),e.push(n)})),e}a.extend(!0,a.trumbowyg,{langs:{en:{specialChars:"Special characters"},et:{specialChars:"Erimärgid"},fr:{specialChars:"Caractères spéciaux"},hu:{specialChars:"Speciális karakterek"},ko:{specialChars:"특수문자"}},plugins:{specialchars:{init:function(a){a.o.plugins.specialchars=a.o.plugins.specialchars||s;var r={dropdown:e(a)};a.addBtnDef("specialChars",r)}}}})}(jQuery);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Trumbowyg v2.23.0 - A lightweight WYSIWYG editor
2
+ * Trumbowyg v2.25.1 - A lightweight WYSIWYG editor
3
3
  * Default stylesheet for Trumbowyg editor plugin
4
4
  * ------------------------
5
5
  * @link http://alex-d.github.io/Trumbowyg
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Trumbowyg v2.23.0 - A lightweight WYSIWYG editor
2
+ * Trumbowyg v2.25.1 - A lightweight WYSIWYG editor
3
3
  * Trumbowyg plugin stylesheet
4
4
  * ------------------------
5
5
  * @link http://alex-d.github.io/Trumbowyg
@@ -37,7 +37,8 @@
37
37
  height: 27px;
38
38
  width: 27px;
39
39
  background: inherit;
40
- box-shadow: #000 0 0 2px;
40
+ -webkit-box-shadow: #000 0 0 2px;
41
+ box-shadow: #000 0 0 2px;
41
42
  z-index: 10;
42
43
  background-color: transparent; }
43
44
 
@@ -1,2 +1,2 @@
1
- /** Trumbowyg v2.23.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */
2
- .trumbowyg-symbol-\&nbsp-dropdown-button{display:none!important}.trumbowyg-symbol-\&nbsp-dropdown-button+button{clear:both}.trumbowyg-dropdown-specialChars{width:248px;padding:5px 3px 3px}.trumbowyg-dropdown-specialChars button{display:block;position:relative;float:left;height:26px;width:26px;padding:0;margin:2px;line-height:24px;text-align:center}.trumbowyg-dropdown-specialChars button:focus::after,.trumbowyg-dropdown-specialChars button:hover::after{display:block;position:absolute;top:-5px;left:-5px;height:27px;width:27px;background:inherit;box-shadow:#000 0 0 2px;z-index:10;background-color:transparent}.trumbowyg .specialChars{width:22px;height:22px;display:inline-block}
1
+ /** Trumbowyg v2.25.1 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */
2
+ .trumbowyg-symbol-\&nbsp-dropdown-button{display:none!important}.trumbowyg-symbol-\&nbsp-dropdown-button+button{clear:both}.trumbowyg-dropdown-specialChars{width:248px;padding:5px 3px 3px}.trumbowyg-dropdown-specialChars button{display:block;position:relative;float:left;height:26px;width:26px;padding:0;margin:2px;line-height:24px;text-align:center}.trumbowyg-dropdown-specialChars button:focus::after,.trumbowyg-dropdown-specialChars button:hover::after{display:block;position:absolute;top:-5px;left:-5px;height:27px;width:27px;background:inherit;-webkit-box-shadow:#000 0 0 2px;box-shadow:#000 0 0 2px;z-index:10;background-color:transparent}.trumbowyg .specialChars{width:22px;height:22px;display:inline-block}
@@ -59,6 +59,17 @@
59
59
  tableDestroy: 'Tabelle löschen',
60
60
  error: 'Error'
61
61
  },
62
+ et: {
63
+ table: 'Sisesta tabel',
64
+ tableAddRow: 'Lisa rida',
65
+ tableAddRowAbove: 'Lisa rida üles',
66
+ tableAddColumnLeft: 'Lisa tulp vasakule',
67
+ tableAddColumn: 'Lisa tulp paremale',
68
+ tableDeleteRow: 'Kustuta rida',
69
+ tableDeleteColumn: 'Kustuta tulp',
70
+ tableDestroy: 'Kustuta tabel',
71
+ error: 'Viga'
72
+ },
62
73
  fr: {
63
74
  table: 'Insérer un tableau',
64
75
  tableAddRow: 'Ajouter des lignes',
@@ -144,9 +155,12 @@
144
155
  tr: {
145
156
  table: 'Tablo ekle',
146
157
  tableAddRow: 'Satır ekle',
147
- tableAddRowAbove: 'Satır ekle',
148
- tableAddColumnLeft: 'Kolon ekle',
149
- tableAddColumn: 'Kolon ekle',
158
+ tableAddRowAbove: 'Yukarıya satır ekle',
159
+ tableAddColumnLeft: 'Sola sütun ekle',
160
+ tableAddColumn: 'Sağa sütun ekle',
161
+ tableDeleteRow: 'Satırı sil',
162
+ tableDeleteColumn: 'Sütunu sil',
163
+ tableDestroy: 'Tabloyu sil',
150
164
  error: 'Hata'
151
165
  },
152
166
  zh_tw: {
@@ -160,7 +174,17 @@
160
174
  tableDestroy: '刪除表格',
161
175
  error: '錯誤'
162
176
  },
163
- // jshint camelcase:true
177
+ es: {
178
+ table: 'Insertar tabla',
179
+ tableAddRow: 'Agregar fila',
180
+ tableAddRowAbove: 'Agregar fila arriba',
181
+ tableAddColumnLeft: 'Agregar columna a la izquierda',
182
+ tableAddColumn: 'Agregar columna a la derecha',
183
+ tableDeleteRow: 'Borrar fila',
184
+ tableDeleteColumn: 'Borrar columna',
185
+ tableDestroy: 'Borrar tabla',
186
+ error: 'Error'
187
+ }// jshint camelcase:true
164
188
  },
165
189
 
166
190
  plugins: {
@@ -1 +1 @@
1
- !function(e){"use strict";var t={rows:8,columns:8,styler:"table"};e.extend(!0,e.trumbowyg,{langs:{en:{table:"Insert table",tableAddRow:"Add row",tableAddRowAbove:"Add row above",tableAddColumnLeft:"Add column to the left",tableAddColumn:"Add column to the right",tableDeleteRow:"Delete row",tableDeleteColumn:"Delete column",tableDestroy:"Delete table",error:"Error"},cs:{table:"Vytvořit příkaz Table",tableAddRow:"Přidat řádek",tableAddRowAbove:"Přidat řádek",tableAddColumnLeft:"Přidat sloupec",tableAddColumn:"Přidat sloupec",error:"Chyba"},da:{table:"Indsæt tabel",tableAddRow:"Tilføj række",tableAddRowAbove:"Tilføj række",tableAddColumnLeft:"Tilføj kolonne",tableAddColumn:"Tilføj kolonne",tableDeleteRow:"Slet række",tableDeleteColumn:"Slet kolonne",tableDestroy:"Slet tabel",error:"Fejl"},de:{table:"Tabelle einfügen",tableAddRow:"Zeile hinzufügen",tableAddRowAbove:"Zeile hinzufügen",tableAddColumnLeft:"Spalte hinzufügen",tableAddColumn:"Spalte hinzufügen",tableDeleteRow:"Zeile löschen",tableDeleteColumn:"Spalte löschen",tableDestroy:"Tabelle löschen",error:"Error"},fr:{table:"Insérer un tableau",tableAddRow:"Ajouter des lignes",tableAddRowAbove:"Ajouter des lignes",tableAddColumnLeft:"Ajouter des colonnes",tableAddColumn:"Ajouter des colonnes",tableDeleteRow:"Effacer la ligne",tableDeleteColumn:"Effacer la colonne",tableDestroy:"Effacer le tableau",error:"Erreur"},hu:{table:"Táblázat beszúrás",tableAddRow:"Sor hozzáadás",tableAddRowAbove:"Sor beszúrás fönt",tableAddColumnLeft:"Sor beszúrás balra",tableAddColumn:"Sor beszúrás jobbra",tableDeleteRow:"Sor törlés",tableDeleteColumn:"Oszlop törlés",tableDestroy:"Táblázat törlés",error:"Hiba"},id:{table:"Sisipkan tabel",tableAddRow:"Sisipkan baris",tableAddRowAbove:"Sisipkan baris",tableAddColumnLeft:"Sisipkan kolom",tableAddColumn:"Sisipkan kolom",tableDeleteRow:"Hapus baris",tableDeleteColumn:"Hapus kolom",tableDestroy:"Hapus tabel",error:"Galat"},ja:{table:"表の挿入",tableAddRow:"行の追加",tableAddRowAbove:"行の追加",tableAddColumnLeft:"列の追加",tableAddColumn:"列の追加",error:"エラー"},ko:{table:"표 넣기",tableAddRow:"줄 추가",tableAddRowAbove:"줄 추가",tableAddColumnLeft:"칸 추가",tableAddColumn:"칸 추가",tableDeleteRow:"줄 삭제",tableDeleteColumn:"칸 삭제",tableDestroy:"표 지우기",error:"에러"},pt_br:{table:"Inserir tabela",tableAddRow:"Adicionar linha",tableAddRowAbove:"Adicionar linha",tableAddColumnLeft:"Adicionar coluna",tableAddColumn:"Adicionar coluna",tableDeleteRow:"Deletar linha",tableDeleteColumn:"Deletar coluna",tableDestroy:"Deletar tabela",error:"Erro"},ru:{table:"Вставить таблицу",tableAddRow:"Добавить строку",tableAddRowAbove:"Добавить строку",tableAddColumnLeft:"Добавить столбец",tableAddColumn:"Добавить столбец",tableDeleteRow:"Удалить строку",tableDeleteColumn:"Удалить столбец",tableDestroy:"Удалить таблицу",error:"Ошибка"},sk:{table:"Vytvoriť tabuľky",tableAddRow:"Pridať riadok",tableAddRowAbove:"Pridať riadok",tableAddColumnLeft:"Pridať stĺpec",tableAddColumn:"Pridať stĺpec",error:"Chyba"},tr:{table:"Tablo ekle",tableAddRow:"Satır ekle",tableAddRowAbove:"Satır ekle",tableAddColumnLeft:"Kolon ekle",tableAddColumn:"Kolon ekle",error:"Hata"},zh_tw:{table:"插入表格",tableAddRow:"加入行",tableAddRowAbove:"加入行",tableAddColumnLeft:"加入列",tableAddColumn:"加入列",tableDeleteRow:"刪除行",tableDeleteColumn:"刪除列",tableDestroy:"刪除表格",error:"錯誤"}},plugins:{table:{init:function(l){l.o.plugins.table=e.extend(!0,{},t,l.o.plugins.table||{});var o={fn:function(){l.saveRange();var t="table",o=l.o.prefix+"dropdown",n={"class":o+"-"+t+" "+o+" "+l.o.prefix+"fixed-top"};n["data-"+o]=t;var b=e("<div/>",n);if(0===l.$box.find("."+o+"-"+t).length?l.$box.append(b.hide()):b=l.$box.find("."+o+"-"+t),b.html(""),l.$box.find("."+l.o.prefix+"table-button").hasClass(l.o.prefix+"active-button"))b.append(l.buildSubBtn("tableAddRowAbove")),b.append(l.buildSubBtn("tableAddRow")),b.append(l.buildSubBtn("tableAddColumnLeft")),b.append(l.buildSubBtn("tableAddColumn")),b.append(l.buildSubBtn("tableDeleteRow")),b.append(l.buildSubBtn("tableDeleteColumn")),b.append(l.buildSubBtn("tableDestroy"));else{var r=e("<table/>");e("<tbody/>").appendTo(r);for(var i=0;i<l.o.plugins.table.rows;i+=1)for(var s=e("<tr/>").appendTo(r),u=0;u<l.o.plugins.table.columns;u+=1)e("<td/>").appendTo(s);r.find("td").on("mouseover",a),r.find("td").on("mousedown",d),b.append(r),b.append(e('<div class="trumbowyg-table-size">1x1</div>'))}l.dropdown(t)}},a=function(t){var l=e(t.target),o=l.closest("table"),a=this.cellIndex,d=this.parentNode.rowIndex;o.find("td").removeClass("active");for(var n=0;n<=d;n+=1)for(var b=0;b<=a;b+=1)o.find("tr:nth-of-type("+(n+1)+")").find("td:nth-of-type("+(b+1)+")").addClass("active");o.next(".trumbowyg-table-size").html(a+1+"x"+(d+1))},d=function(){l.saveRange();var t=e("<table/>");e("<tbody/>").appendTo(t),l.o.plugins.table.styler&&t.attr("class",l.o.plugins.table.styler);for(var o=this.cellIndex,a=this.parentNode.rowIndex,d=0;d<=a;d+=1)for(var n=e("<tr></tr>").appendTo(t),b=0;b<=o;b+=1)e("<td/>").appendTo(n);l.range.deleteContents(),l.range.insertNode(t[0]),l.$c.trigger("tbwchange")},n={title:l.lang.tableAddRow,text:l.lang.tableAddRow,ico:"row-below",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode,o=e(t).closest("tr"),a=e(t).closest("table");if(a.length>0){for(var d=e("<tr/>"),n=0;n<a.find("tr")[0].childElementCount;n+=1)e("<td/>").appendTo(d);o.after(d)}l.syncCode()}},b={title:l.lang.tableAddRowAbove,text:l.lang.tableAddRowAbove,ico:"row-above",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode,o=e(t).closest("tr"),a=e(t).closest("table");if(a.length>0){for(var d=e("<tr/>"),n=0;n<a.find("tr")[0].childElementCount;n+=1)e("<td/>").appendTo(d);o.before(d)}l.syncCode()}},r={title:l.lang.tableAddColumn,text:l.lang.tableAddColumn,ico:"col-right",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode,o=e(t).closest("td"),a=e(t).closest("table"),d=o.index();a.length>0&&e(a).find("tr").each(function(){e(e(this).children()[d]).after("<td></td>")}),l.syncCode()}},i={title:l.lang.tableAddColumnLeft,text:l.lang.tableAddColumnLeft,ico:"col-left",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode,o=e(t).closest("td"),a=e(t).closest("table"),d=o.index();a.length>0&&e(a).find("tr").each(function(){e(e(this).children()[d]).before("<td></td>")}),l.syncCode()}},s={title:l.lang.tableDestroy,text:l.lang.tableDestroy,ico:"table-delete",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode,o=e(t).closest("table");o.remove(),l.syncCode()}},u={title:l.lang.tableDeleteRow,text:l.lang.tableDeleteRow,ico:"row-delete",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode,o=e(t).closest("tr");o.remove(),l.syncCode()}},f={title:l.lang.tableDeleteColumn,text:l.lang.tableDeleteColumn,ico:"col-delete",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode,o=e(t).closest("table"),a=e(t).closest("td"),d=a.index();e(o).find("tr").each(function(){e(this).find("td:eq("+d+")").remove()}),l.syncCode()}};l.addBtnDef("table",o),l.addBtnDef("tableAddRowAbove",b),l.addBtnDef("tableAddRow",n),l.addBtnDef("tableAddColumnLeft",i),l.addBtnDef("tableAddColumn",r),l.addBtnDef("tableDeleteRow",u),l.addBtnDef("tableDeleteColumn",f),l.addBtnDef("tableDestroy",s)}}}})}(jQuery);
1
+ !function(e){"use strict";var t={rows:8,columns:8,styler:"table"};e.extend(!0,e.trumbowyg,{langs:{en:{table:"Insert table",tableAddRow:"Add row",tableAddRowAbove:"Add row above",tableAddColumnLeft:"Add column to the left",tableAddColumn:"Add column to the right",tableDeleteRow:"Delete row",tableDeleteColumn:"Delete column",tableDestroy:"Delete table",error:"Error"},cs:{table:"Vytvořit příkaz Table",tableAddRow:"Přidat řádek",tableAddRowAbove:"Přidat řádek",tableAddColumnLeft:"Přidat sloupec",tableAddColumn:"Přidat sloupec",error:"Chyba"},da:{table:"Indsæt tabel",tableAddRow:"Tilføj række",tableAddRowAbove:"Tilføj række",tableAddColumnLeft:"Tilføj kolonne",tableAddColumn:"Tilføj kolonne",tableDeleteRow:"Slet række",tableDeleteColumn:"Slet kolonne",tableDestroy:"Slet tabel",error:"Fejl"},de:{table:"Tabelle einfügen",tableAddRow:"Zeile hinzufügen",tableAddRowAbove:"Zeile hinzufügen",tableAddColumnLeft:"Spalte hinzufügen",tableAddColumn:"Spalte hinzufügen",tableDeleteRow:"Zeile löschen",tableDeleteColumn:"Spalte löschen",tableDestroy:"Tabelle löschen",error:"Error"},et:{table:"Sisesta tabel",tableAddRow:"Lisa rida",tableAddRowAbove:"Lisa rida üles",tableAddColumnLeft:"Lisa tulp vasakule",tableAddColumn:"Lisa tulp paremale",tableDeleteRow:"Kustuta rida",tableDeleteColumn:"Kustuta tulp",tableDestroy:"Kustuta tabel",error:"Viga"},fr:{table:"Insérer un tableau",tableAddRow:"Ajouter des lignes",tableAddRowAbove:"Ajouter des lignes",tableAddColumnLeft:"Ajouter des colonnes",tableAddColumn:"Ajouter des colonnes",tableDeleteRow:"Effacer la ligne",tableDeleteColumn:"Effacer la colonne",tableDestroy:"Effacer le tableau",error:"Erreur"},hu:{table:"Táblázat beszúrás",tableAddRow:"Sor hozzáadás",tableAddRowAbove:"Sor beszúrás fönt",tableAddColumnLeft:"Sor beszúrás balra",tableAddColumn:"Sor beszúrás jobbra",tableDeleteRow:"Sor törlés",tableDeleteColumn:"Oszlop törlés",tableDestroy:"Táblázat törlés",error:"Hiba"},id:{table:"Sisipkan tabel",tableAddRow:"Sisipkan baris",tableAddRowAbove:"Sisipkan baris",tableAddColumnLeft:"Sisipkan kolom",tableAddColumn:"Sisipkan kolom",tableDeleteRow:"Hapus baris",tableDeleteColumn:"Hapus kolom",tableDestroy:"Hapus tabel",error:"Galat"},ja:{table:"表の挿入",tableAddRow:"行の追加",tableAddRowAbove:"行の追加",tableAddColumnLeft:"列の追加",tableAddColumn:"列の追加",error:"エラー"},ko:{table:"표 넣기",tableAddRow:"줄 추가",tableAddRowAbove:"줄 추가",tableAddColumnLeft:"칸 추가",tableAddColumn:"칸 추가",tableDeleteRow:"줄 삭제",tableDeleteColumn:"칸 삭제",tableDestroy:"표 지우기",error:"에러"},pt_br:{table:"Inserir tabela",tableAddRow:"Adicionar linha",tableAddRowAbove:"Adicionar linha",tableAddColumnLeft:"Adicionar coluna",tableAddColumn:"Adicionar coluna",tableDeleteRow:"Deletar linha",tableDeleteColumn:"Deletar coluna",tableDestroy:"Deletar tabela",error:"Erro"},ru:{table:"Вставить таблицу",tableAddRow:"Добавить строку",tableAddRowAbove:"Добавить строку",tableAddColumnLeft:"Добавить столбец",tableAddColumn:"Добавить столбец",tableDeleteRow:"Удалить строку",tableDeleteColumn:"Удалить столбец",tableDestroy:"Удалить таблицу",error:"Ошибка"},sk:{table:"Vytvoriť tabuľky",tableAddRow:"Pridať riadok",tableAddRowAbove:"Pridať riadok",tableAddColumnLeft:"Pridať stĺpec",tableAddColumn:"Pridať stĺpec",error:"Chyba"},tr:{table:"Tablo ekle",tableAddRow:"Satır ekle",tableAddRowAbove:"Yukarıya satır ekle",tableAddColumnLeft:"Sola sütun ekle",tableAddColumn:"Sağa sütun ekle",tableDeleteRow:"Satırı sil",tableDeleteColumn:"Sütunu sil",tableDestroy:"Tabloyu sil",error:"Hata"},zh_tw:{table:"插入表格",tableAddRow:"加入行",tableAddRowAbove:"加入行",tableAddColumnLeft:"加入列",tableAddColumn:"加入列",tableDeleteRow:"刪除行",tableDeleteColumn:"刪除列",tableDestroy:"刪除表格",error:"錯誤"},es:{table:"Insertar tabla",tableAddRow:"Agregar fila",tableAddRowAbove:"Agregar fila arriba",tableAddColumnLeft:"Agregar columna a la izquierda",tableAddColumn:"Agregar columna a la derecha",tableDeleteRow:"Borrar fila",tableDeleteColumn:"Borrar columna",tableDestroy:"Borrar tabla",error:"Error"}},plugins:{table:{init:function(l){l.o.plugins.table=e.extend(!0,{},t,l.o.plugins.table||{});var a={fn:function(){l.saveRange();var t="table",a=l.o.prefix+"dropdown",n={class:a+"-"+"table "+a+" "+l.o.prefix+"fixed-top"};n["data-"+a]=t;var b=e("<div/>",n);if(0===l.$box.find("."+a+"-"+t).length?l.$box.append(b.hide()):b=l.$box.find("."+a+"-"+t),b.html(""),l.$box.find("."+l.o.prefix+"table-button").hasClass(l.o.prefix+"active-button"))b.append(l.buildSubBtn("tableAddRowAbove")),b.append(l.buildSubBtn("tableAddRow")),b.append(l.buildSubBtn("tableAddColumnLeft")),b.append(l.buildSubBtn("tableAddColumn")),b.append(l.buildSubBtn("tableDeleteRow")),b.append(l.buildSubBtn("tableDeleteColumn")),b.append(l.buildSubBtn("tableDestroy"));else{var r=e("<table/>");e("<tbody/>").appendTo(r);for(var i=0;i<l.o.plugins.table.rows;i+=1)for(var s=e("<tr/>").appendTo(r),u=0;u<l.o.plugins.table.columns;u+=1)e("<td/>").appendTo(s);r.find("td").on("mouseover",o),r.find("td").on("mousedown",d),b.append(r),b.append(e('<div class="trumbowyg-table-size">1x1</div>'))}l.dropdown(t)}},o=function(t){var l=e(t.target).closest("table"),a=this.cellIndex,o=this.parentNode.rowIndex;l.find("td").removeClass("active");for(var d=0;d<=o;d+=1)for(var n=0;n<=a;n+=1)l.find("tr:nth-of-type("+(d+1)+")").find("td:nth-of-type("+(n+1)+")").addClass("active");l.next(".trumbowyg-table-size").html(a+1+"x"+(o+1))},d=function(){l.saveRange();var t=e("<table/>");e("<tbody/>").appendTo(t),l.o.plugins.table.styler&&t.attr("class",l.o.plugins.table.styler);for(var a=this.cellIndex,o=this.parentNode.rowIndex,d=0;d<=o;d+=1)for(var n=e("<tr></tr>").appendTo(t),b=0;b<=a;b+=1)e("<td/>").appendTo(n);l.range.deleteContents(),l.range.insertNode(t[0]),l.$c.trigger("tbwchange")},n={title:l.lang.tableAddRow,text:l.lang.tableAddRow,ico:"row-below",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode,a=e(t).closest("tr"),o=e(t).closest("table");if(o.length>0){for(var d=e("<tr/>"),n=0;n<o.find("tr")[0].childElementCount;n+=1)e("<td/>").appendTo(d);a.after(d)}l.syncCode()}},b={title:l.lang.tableAddRowAbove,text:l.lang.tableAddRowAbove,ico:"row-above",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode,a=e(t).closest("tr"),o=e(t).closest("table");if(o.length>0){for(var d=e("<tr/>"),n=0;n<o.find("tr")[0].childElementCount;n+=1)e("<td/>").appendTo(d);a.before(d)}l.syncCode()}},r={title:l.lang.tableAddColumn,text:l.lang.tableAddColumn,ico:"col-right",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode,a=e(t).closest("td"),o=e(t).closest("table"),d=a.index();o.length>0&&e(o).find("tr").each((function(){e(e(this).children()[d]).after("<td></td>")})),l.syncCode()}},i={title:l.lang.tableAddColumnLeft,text:l.lang.tableAddColumnLeft,ico:"col-left",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode,a=e(t).closest("td"),o=e(t).closest("table"),d=a.index();o.length>0&&e(o).find("tr").each((function(){e(e(this).children()[d]).before("<td></td>")})),l.syncCode()}},s={title:l.lang.tableDestroy,text:l.lang.tableDestroy,ico:"table-delete",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode;e(t).closest("table").remove(),l.syncCode()}},u={title:l.lang.tableDeleteRow,text:l.lang.tableDeleteRow,ico:"row-delete",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode;e(t).closest("tr").remove(),l.syncCode()}},f={title:l.lang.tableDeleteColumn,text:l.lang.tableDeleteColumn,ico:"col-delete",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode,a=e(t).closest("table"),o=e(t).closest("td").index();e(a).find("tr").each((function(){e(this).find("td:eq("+o+")").remove()})),l.syncCode()}};l.addBtnDef("table",a),l.addBtnDef("tableAddRowAbove",b),l.addBtnDef("tableAddRow",n),l.addBtnDef("tableAddColumnLeft",i),l.addBtnDef("tableAddColumn",r),l.addBtnDef("tableDeleteRow",u),l.addBtnDef("tableDeleteColumn",f),l.addBtnDef("tableDestroy",s)}}}})}(jQuery);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Trumbowyg v2.23.0 - A lightweight WYSIWYG editor
2
+ * Trumbowyg v2.25.1 - A lightweight WYSIWYG editor
3
3
  * Default stylesheet for Trumbowyg editor plugin
4
4
  * ------------------------
5
5
  * @link http://alex-d.github.io/Trumbowyg
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Trumbowyg v2.23.0 - A lightweight WYSIWYG editor
2
+ * Trumbowyg v2.25.1 - A lightweight WYSIWYG editor
3
3
  * Trumbowyg plugin stylesheet
4
4
  * ------------------------
5
5
  * @link http://alex-d.github.io/Trumbowyg
@@ -26,10 +26,12 @@
26
26
  margin: 1px;
27
27
  padding: 0;
28
28
  background-color: #fff;
29
- box-shadow: 0 0 0 1px #cecece inset; }
29
+ -webkit-box-shadow: 0 0 0 1px #cecece inset;
30
+ box-shadow: 0 0 0 1px #cecece inset; }
30
31
  .trumbowyg-dropdown-table table td.active {
31
32
  background-color: #00b393;
32
- box-shadow: none;
33
+ -webkit-box-shadow: none;
34
+ box-shadow: none;
33
35
  cursor: pointer; }
34
36
 
35
37
  .trumbowyg-dropdown-table .trumbowyg-table-size {
@@ -1,2 +1,2 @@
1
- /** Trumbowyg v2.23.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */
2
- .trumbowyg-editor table{width:100%}.trumbowyg-editor table td{border:1px dotted #e7eaec;padding:8px}.trumbowyg-dropdown-table table{margin:10px;display:inline-block}.trumbowyg-dropdown-table table td{display:inline-block;height:20px;width:20px;margin:1px;padding:0;background-color:#fff;box-shadow:0 0 0 1px #cecece inset}.trumbowyg-dropdown-table table td.active{background-color:#00b393;box-shadow:none;cursor:pointer}.trumbowyg-dropdown-table .trumbowyg-table-size{text-align:center}
1
+ /** Trumbowyg v2.25.1 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */
2
+ .trumbowyg-editor table{width:100%}.trumbowyg-editor table td{border:1px dotted #e7eaec;padding:8px}.trumbowyg-dropdown-table table{margin:10px;display:inline-block}.trumbowyg-dropdown-table table td{display:inline-block;height:20px;width:20px;margin:1px;padding:0;background-color:#fff;-webkit-box-shadow:0 0 0 1px #cecece inset;box-shadow:0 0 0 1px #cecece inset}.trumbowyg-dropdown-table table td.active{background-color:#00b393;-webkit-box-shadow:none;box-shadow:none;cursor:pointer}.trumbowyg-dropdown-table .trumbowyg-table-size{text-align:center}
@@ -14,6 +14,9 @@
14
14
  de: {
15
15
  template: 'Vorlage'
16
16
  },
17
+ et: {
18
+ template: 'Mall'
19
+ },
17
20
  fr: {
18
21
  template: 'Patron'
19
22
  },
@@ -1 +1 @@
1
- !function(t){"use strict";function e(e){var a=e.o.plugins.templates,n=[];return t.each(a,function(t,a){e.addBtnDef("template_"+t,{fn:function(){e.html(a.html)},hasIcon:!1,title:a.name}),n.push("template_"+t)}),n}t.extend(!0,t.trumbowyg,{langs:{en:{template:"Template"},da:{template:"Skabelon"},de:{template:"Vorlage"},fr:{template:"Patron"},hu:{template:"Sablon"},ja:{template:"テンプレート"},ko:{template:"서식"},nl:{template:"Sjabloon"},pt_br:{template:"Modelo"},ru:{template:"Шаблон"},tr:{template:"Şablon"},zh_tw:{template:"模板"}}}),t.extend(!0,t.trumbowyg,{plugins:{template:{shouldInit:function(t){return t.o.plugins.hasOwnProperty("templates")},init:function(t){t.addBtnDef("template",{dropdown:e(t),hasIcon:!1,text:t.lang.template})}}}})}(jQuery);
1
+ !function(t){"use strict";function e(e){var a=e.o.plugins.templates,l=[];return t.each(a,(function(t,a){e.addBtnDef("template_"+t,{fn:function(){e.html(a.html)},hasIcon:!1,title:a.name}),l.push("template_"+t)})),l}t.extend(!0,t.trumbowyg,{langs:{en:{template:"Template"},da:{template:"Skabelon"},de:{template:"Vorlage"},et:{template:"Mall"},fr:{template:"Patron"},hu:{template:"Sablon"},ja:{template:"テンプレート"},ko:{template:"서식"},nl:{template:"Sjabloon"},pt_br:{template:"Modelo"},ru:{template:"Шаблон"},tr:{template:"Şablon"},zh_tw:{template:"模板"}}}),t.extend(!0,t.trumbowyg,{plugins:{template:{shouldInit:function(t){return t.o.plugins.hasOwnProperty("templates")},init:function(t){t.addBtnDef("template",{dropdown:e(t),hasIcon:!1,text:t.lang.template})}}}})}(jQuery);
@@ -68,6 +68,11 @@
68
68
  file: 'Datei',
69
69
  uploadError: 'Fehler'
70
70
  },
71
+ et: {
72
+ upload: 'Lae üles',
73
+ file: 'Fail',
74
+ uploadError: 'Viga'
75
+ },
71
76
  fr: {
72
77
  upload: 'Envoi',
73
78
  file: 'Fichier',
@@ -1 +1 @@
1
- !function(r){"use strict";function a(r,e){var o=e.shift(),l=e;if(null!==r){if(0===l.length)return r[o];if("object"==typeof r)return a(r[o],l)}return r}function e(){if(!r.trumbowyg.addedXhrProgressEvent){var a=r.ajaxSettings.xhr;r.ajaxSetup({xhr:function(){var r=this,e=a();return e&&"object"==typeof e.upload&&void 0!==r.progressUpload&&e.upload.addEventListener("progress",function(a){r.progressUpload(a)},!1),e}}),r.trumbowyg.addedXhrProgressEvent=!0}}var o={serverPath:"",fileFieldName:"fileToUpload",data:[],headers:{},xhrFields:{},urlPropertyName:"file",statusPropertyName:"success",success:void 0,error:void 0,imageWidthModalEdit:!1};e(),r.extend(!0,r.trumbowyg,{langs:{en:{upload:"Upload",file:"File",uploadError:"Error"},cs:{upload:"Nahrát obrázek",file:"Soubor",uploadError:"Chyba"},da:{upload:"Upload",file:"Fil",uploadError:"Fejl"},de:{upload:"Hochladen",file:"Datei",uploadError:"Fehler"},fr:{upload:"Envoi",file:"Fichier",uploadError:"Erreur"},hu:{upload:"Feltöltés",file:"Fájl",uploadError:"Hiba"},ja:{upload:"アップロード",file:"ファイル",uploadError:"エラー"},ko:{upload:"그림 올리기",file:"파일",uploadError:"에러"},pt_br:{upload:"Enviar do local",file:"Arquivo",uploadError:"Erro"},ru:{upload:"Загрузка",file:"Файл",uploadError:"Ошибка"},sk:{upload:"Nahrať",file:"Súbor",uploadError:"Chyba"},tr:{upload:"Yükle",file:"Dosya",uploadError:"Hata"},zh_cn:{upload:"上传",file:"文件",uploadError:"错误"},zh_tw:{upload:"上傳",file:"文件",uploadError:"錯誤"}},plugins:{upload:{init:function(e){e.o.plugins.upload=r.extend(!0,{},o,e.o.plugins.upload||{});var l={fn:function(){e.saveRange();var o,l=e.o.prefix,t={file:{type:"file",required:!0,attributes:{accept:"image/*"}},alt:{label:"description",value:e.getRangeText()}};e.o.plugins.upload.imageWidthModalEdit&&(t.width={value:""});var d=!1,i=e.openModalInsert(e.lang.upload,t,function(t){if(!d){d=!0;var u=new FormData;u.append(e.o.plugins.upload.fileFieldName,o),e.o.plugins.upload.data.map(function(r){u.append(r.name,r.value)}),r.map(t,function(r,a){"file"!==a&&u.append(a,r)}),0===r("."+l+"progress",i).length&&r("."+l+"modal-title",i).after(r("<div/>",{"class":l+"progress"}).append(r("<div/>",{"class":l+"progress-bar"}))),r.ajax({url:e.o.plugins.upload.serverPath,headers:e.o.plugins.upload.headers,xhrFields:e.o.plugins.upload.xhrFields,type:"POST",data:u,cache:!1,dataType:"json",processData:!1,contentType:!1,progressUpload:function(a){r("."+l+"progress-bar").css("width",Math.round(100*a.loaded/a.total)+"%")},success:function(o){if(e.o.plugins.upload.success)e.o.plugins.upload.success(o,e,i,t);else if(a(o,e.o.plugins.upload.statusPropertyName.split("."))){var l=a(o,e.o.plugins.upload.urlPropertyName.split("."));e.execCmd("insertImage",l,!1,!0);var u=r('img[src="'+l+'"]:not([alt])',e.$box);u.attr("alt",t.alt),e.o.plugins.upload.imageWidthModalEdit&&parseInt(t.width)>0&&u.attr({width:t.width}),setTimeout(function(){e.closeModal()},250),e.$c.trigger("tbwuploadsuccess",[e,o,l])}else e.addErrorOnModalField(r("input[type=file]",i),e.lang[o.message]),e.$c.trigger("tbwuploaderror",[e,o]);d=!1},error:e.o.plugins.upload.error||function(){e.addErrorOnModalField(r("input[type=file]",i),e.lang.uploadError),e.$c.trigger("tbwuploaderror",[e]),d=!1}})}});r("input[type=file]").on("change",function(r){try{o=r.target.files[0]}catch(a){o=r.target.value}})}};e.addBtnDef("upload",l)}}}})}(jQuery);
1
+ !function(r){"use strict";var a={serverPath:"",fileFieldName:"fileToUpload",data:[],headers:{},xhrFields:{},urlPropertyName:"file",statusPropertyName:"success",success:void 0,error:void 0,imageWidthModalEdit:!1};function e(r,a){var o=a.shift(),l=a;if(null!==r){if(0===l.length)return r[o];if("object"==typeof r)return e(r[o],l)}return r}!function(){if(!r.trumbowyg.addedXhrProgressEvent){var a=r.ajaxSettings.xhr;r.ajaxSetup({xhr:function(){var r=this,e=a();return e&&"object"==typeof e.upload&&void 0!==r.progressUpload&&e.upload.addEventListener("progress",(function(a){r.progressUpload(a)}),!1),e}}),r.trumbowyg.addedXhrProgressEvent=!0}}(),r.extend(!0,r.trumbowyg,{langs:{en:{upload:"Upload",file:"File",uploadError:"Error"},cs:{upload:"Nahrát obrázek",file:"Soubor",uploadError:"Chyba"},da:{upload:"Upload",file:"Fil",uploadError:"Fejl"},de:{upload:"Hochladen",file:"Datei",uploadError:"Fehler"},et:{upload:"Lae üles",file:"Fail",uploadError:"Viga"},fr:{upload:"Envoi",file:"Fichier",uploadError:"Erreur"},hu:{upload:"Feltöltés",file:"Fájl",uploadError:"Hiba"},ja:{upload:"アップロード",file:"ファイル",uploadError:"エラー"},ko:{upload:"그림 올리기",file:"파일",uploadError:"에러"},pt_br:{upload:"Enviar do local",file:"Arquivo",uploadError:"Erro"},ru:{upload:"Загрузка",file:"Файл",uploadError:"Ошибка"},sk:{upload:"Nahrať",file:"Súbor",uploadError:"Chyba"},tr:{upload:"Yükle",file:"Dosya",uploadError:"Hata"},zh_cn:{upload:"上传",file:"文件",uploadError:"错误"},zh_tw:{upload:"上傳",file:"文件",uploadError:"錯誤"}},plugins:{upload:{init:function(o){o.o.plugins.upload=r.extend(!0,{},a,o.o.plugins.upload||{});var l={fn:function(){o.saveRange();var a,l=o.o.prefix,t={file:{type:"file",required:!0,attributes:{accept:"image/*"}},alt:{label:"description",value:o.getRangeText()}};o.o.plugins.upload.imageWidthModalEdit&&(t.width={value:""});var d=!1,i=o.openModalInsert(o.lang.upload,t,(function(t){if(!d){d=!0;var u=new FormData;u.append(o.o.plugins.upload.fileFieldName,a),o.o.plugins.upload.data.map((function(r){u.append(r.name,r.value)})),r.map(t,(function(r,a){"file"!==a&&u.append(a,r)})),0===r("."+l+"progress",i).length&&r("."+l+"modal-title",i).after(r("<div/>",{class:l+"progress"}).append(r("<div/>",{class:l+"progress-bar"}))),r.ajax({url:o.o.plugins.upload.serverPath,headers:o.o.plugins.upload.headers,xhrFields:o.o.plugins.upload.xhrFields,type:"POST",data:u,cache:!1,dataType:"json",processData:!1,contentType:!1,progressUpload:function(a){r("."+l+"progress-bar").css("width",Math.round(100*a.loaded/a.total)+"%")},success:function(a){if(o.o.plugins.upload.success)o.o.plugins.upload.success(a,o,i,t);else if(e(a,o.o.plugins.upload.statusPropertyName.split("."))){var l=e(a,o.o.plugins.upload.urlPropertyName.split("."));o.execCmd("insertImage",l,!1,!0);var u=r('img[src="'+l+'"]:not([alt])',o.$box);u.attr("alt",t.alt),o.o.plugins.upload.imageWidthModalEdit&&parseInt(t.width)>0&&u.attr({width:t.width}),setTimeout((function(){o.closeModal()}),250),o.$c.trigger("tbwuploadsuccess",[o,a,l])}else o.addErrorOnModalField(r("input[type=file]",i),o.lang[a.message]),o.$c.trigger("tbwuploaderror",[o,a]);d=!1},error:o.o.plugins.upload.error||function(){o.addErrorOnModalField(r("input[type=file]",i),o.lang.uploadError),o.$c.trigger("tbwuploaderror",[o]),d=!1}})}}));r("input[type=file]").on("change",(function(r){try{a=r.target.files[0]}catch(e){a=r.target.value}}))}};o.addBtnDef("upload",l)}}}})}(jQuery);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Trumbowyg v2.23.0 - A lightweight WYSIWYG editor
2
+ * Trumbowyg v2.25.1 - A lightweight WYSIWYG editor
3
3
  * Trumbowyg core file
4
4
  * ------------------------
5
5
  * @link http://alex-d.github.io/Trumbowyg
@@ -1272,7 +1272,7 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', {
1272
1272
  return false;
1273
1273
  }
1274
1274
 
1275
- if(t.range.startContainer.parentNode && t.range.startContainer.parentNode === this) {
1275
+ if (t.range && t.range.startContainer.parentNode === this) {
1276
1276
  resetRange = true;
1277
1277
  }
1278
1278
  var $newTag = $('<' + newTag + '/>');
@@ -1617,7 +1617,7 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', {
1617
1617
 
1618
1618
  if (buildForm) {
1619
1619
  // Focus in modal box
1620
- $('input:first', $box).focus();
1620
+ $(':input:first', $box).focus();
1621
1621
 
1622
1622
  // Append Confirm and Cancel buttons
1623
1623
  t.buildModalBtn('submit', $box);
@@ -1668,22 +1668,31 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', {
1668
1668
  var t = this,
1669
1669
  prefix = t.o.prefix,
1670
1670
  lg = t.lang,
1671
- html = '';
1671
+ html = '',
1672
+ idPrefix = prefix + 'form-' + Date.now() + '-';
1672
1673
 
1673
1674
  $.each(fields, function (fieldName, field) {
1674
1675
  var l = field.label || fieldName,
1675
1676
  n = field.name || fieldName,
1676
- a = field.attributes || {};
1677
+ a = field.attributes || {},
1678
+ fieldId = idPrefix + fieldName;
1677
1679
 
1678
1680
  var attr = Object.keys(a).map(function (prop) {
1679
1681
  return prop + '="' + a[prop] + '"';
1680
1682
  }).join(' ');
1681
1683
 
1682
- html += '<label><input type="' + (field.type || 'text') + '" name="' + n + '"' +
1683
- (field.type === 'checkbox' && field.value ? ' checked="checked"' : ' value="' + (field.value || '').replace(/"/g, '&quot;')) +
1684
- '"' + attr + '><span class="' + prefix + 'input-infos"><span>' +
1685
- (lg[l] ? lg[l] : l) +
1686
- '</span></span></label>';
1684
+ if (typeof field.type === 'function') {
1685
+ if (!field.name) {
1686
+ field.name = n;
1687
+ }
1688
+ html += field.type(field, fieldId, prefix, lg);
1689
+ } else {
1690
+ html += '<div class="' + prefix + 'input-row">' +
1691
+ '<div class="' + prefix + 'input-infos"><label for="' + fieldId + '"><span>' + (lg[l] ? lg[l] : l) + '</span></label></div>' +
1692
+ '<div class="' + prefix + 'input-html"><input id="' + fieldId + '" type="' + (field.type || 'text') + '" name="' + n + '" ' + attr;
1693
+ html += (field.type === 'checkbox' && field.value ? ' checked="checked"' : '') + ' value="' + (field.value || '').replace(/"/g, '&quot;') + '"></div>';
1694
+ html += '</div>';
1695
+ }
1687
1696
  });
1688
1697
 
1689
1698
  return t.openModal(title, html)
@@ -1695,8 +1704,8 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', {
1695
1704
  $.each(fields, function (fieldName, field) {
1696
1705
  var n = field.name || fieldName;
1697
1706
 
1698
- var $field = $('input[name="' + n + '"]', $form),
1699
- inputType = $field.attr('type');
1707
+ var $field = $(':input[name="' + n + '"]', $form),
1708
+ inputType = $field[0].type;
1700
1709
 
1701
1710
  switch (inputType.toLowerCase()) {
1702
1711
  case 'checkbox':
@@ -1738,19 +1747,19 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', {
1738
1747
  addErrorOnModalField: function ($field, err) {
1739
1748
  var prefix = this.o.prefix,
1740
1749
  spanErrorClass = prefix + 'msg-error',
1741
- $label = $field.parent();
1750
+ $row = $field.closest('.' + prefix + 'input-row');
1742
1751
 
1743
1752
  $field
1744
1753
  .on('change keyup', function () {
1745
- $label.removeClass(prefix + 'input-error');
1754
+ $row.removeClass(prefix + 'input-error');
1746
1755
  setTimeout(function () {
1747
- $label.find('.' + spanErrorClass).remove();
1756
+ $row.find('.' + spanErrorClass).remove();
1748
1757
  }, 150);
1749
1758
  });
1750
1759
 
1751
- $label
1760
+ $row
1752
1761
  .addClass(prefix + 'input-error')
1753
- .find('input+span')
1762
+ .find('.' + prefix + 'input-infos label')
1754
1763
  .append(
1755
1764
  $('<span/>', {
1756
1765
  class: spanErrorClass,