mirador_rails 0.3.3 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -0
  3. data/app/controllers/mirador_rails/locales_controller.rb +10 -0
  4. data/config/routes.rb +7 -0
  5. data/lib/mirador_rails/exceptions.rb +6 -0
  6. data/lib/mirador_rails/locale.rb +24 -0
  7. data/lib/mirador_rails/version.rb +1 -1
  8. data/lib/mirador_rails.rb +9 -2
  9. data/mirador_rails.gemspec +3 -0
  10. data/tasks/mirador_rails.rake +44 -10
  11. data/vendor/assets/images/border_type_4.png +0 -0
  12. data/vendor/assets/images/border_type_5.png +0 -0
  13. data/vendor/assets/javascripts/mirador/mirador.js.erb +20105 -0
  14. data/vendor/assets/javascripts/mirador.js +4 -1
  15. data/vendor/assets/locales/de/translation.json +3 -0
  16. data/vendor/assets/locales/en/translation.json +11 -7
  17. data/vendor/assets/locales/ko/translation.json +18 -9
  18. data/vendor/assets/stylesheets/enhancements.scss +36 -0
  19. data/vendor/assets/stylesheets/mirador-combined.css +1488 -1642
  20. data/vendor/assets/stylesheets/mirador.css +1 -0
  21. metadata +52 -174
  22. data/vendor/assets/javascripts/mirador.min.js +0 -89
  23. data/vendor/assets/javascripts/mirador.min.js.map +0 -1
  24. data/vendor/assets/plugins/plugins/advlist/plugin.js +0 -97
  25. data/vendor/assets/plugins/plugins/advlist/plugin.min.js +0 -1
  26. data/vendor/assets/plugins/plugins/anchor/plugin.js +0 -45
  27. data/vendor/assets/plugins/plugins/anchor/plugin.min.js +0 -1
  28. data/vendor/assets/plugins/plugins/autolink/plugin.js +0 -194
  29. data/vendor/assets/plugins/plugins/autolink/plugin.min.js +0 -1
  30. data/vendor/assets/plugins/plugins/autoresize/plugin.js +0 -152
  31. data/vendor/assets/plugins/plugins/autoresize/plugin.min.js +0 -1
  32. data/vendor/assets/plugins/plugins/autosave/plugin.js +0 -165
  33. data/vendor/assets/plugins/plugins/autosave/plugin.min.js +0 -1
  34. data/vendor/assets/plugins/plugins/bbcode/plugin.js +0 -123
  35. data/vendor/assets/plugins/plugins/bbcode/plugin.min.js +0 -1
  36. data/vendor/assets/plugins/plugins/charmap/plugin.js +0 -370
  37. data/vendor/assets/plugins/plugins/charmap/plugin.min.js +0 -1
  38. data/vendor/assets/plugins/plugins/code/plugin.js +0 -60
  39. data/vendor/assets/plugins/plugins/code/plugin.min.js +0 -1
  40. data/vendor/assets/plugins/plugins/colorpicker/plugin.js +0 -112
  41. data/vendor/assets/plugins/plugins/colorpicker/plugin.min.js +0 -1
  42. data/vendor/assets/plugins/plugins/compat3x/css/dialog.css +0 -118
  43. data/vendor/assets/plugins/plugins/compat3x/img/buttons.png +0 -0
  44. data/vendor/assets/plugins/plugins/compat3x/img/icons.gif +0 -0
  45. data/vendor/assets/plugins/plugins/compat3x/img/items.gif +0 -0
  46. data/vendor/assets/plugins/plugins/compat3x/img/menu_arrow.gif +0 -0
  47. data/vendor/assets/plugins/plugins/compat3x/img/menu_check.gif +0 -0
  48. data/vendor/assets/plugins/plugins/compat3x/img/progress.gif +0 -0
  49. data/vendor/assets/plugins/plugins/compat3x/img/tabs.gif +0 -0
  50. data/vendor/assets/plugins/plugins/compat3x/plugin.js +0 -297
  51. data/vendor/assets/plugins/plugins/compat3x/plugin.min.js +0 -1
  52. data/vendor/assets/plugins/plugins/compat3x/tiny_mce_popup.js +0 -542
  53. data/vendor/assets/plugins/plugins/compat3x/utils/editable_selects.js +0 -70
  54. data/vendor/assets/plugins/plugins/compat3x/utils/form_utils.js +0 -210
  55. data/vendor/assets/plugins/plugins/compat3x/utils/mctabs.js +0 -164
  56. data/vendor/assets/plugins/plugins/compat3x/utils/validate.js +0 -252
  57. data/vendor/assets/plugins/plugins/contextmenu/plugin.js +0 -87
  58. data/vendor/assets/plugins/plugins/contextmenu/plugin.min.js +0 -1
  59. data/vendor/assets/plugins/plugins/directionality/plugin.js +0 -64
  60. data/vendor/assets/plugins/plugins/directionality/plugin.min.js +0 -1
  61. data/vendor/assets/plugins/plugins/emoticons/img/smiley-cool.gif +0 -0
  62. data/vendor/assets/plugins/plugins/emoticons/img/smiley-cry.gif +0 -0
  63. data/vendor/assets/plugins/plugins/emoticons/img/smiley-embarassed.gif +0 -0
  64. data/vendor/assets/plugins/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
  65. data/vendor/assets/plugins/plugins/emoticons/img/smiley-frown.gif +0 -0
  66. data/vendor/assets/plugins/plugins/emoticons/img/smiley-innocent.gif +0 -0
  67. data/vendor/assets/plugins/plugins/emoticons/img/smiley-kiss.gif +0 -0
  68. data/vendor/assets/plugins/plugins/emoticons/img/smiley-laughing.gif +0 -0
  69. data/vendor/assets/plugins/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
  70. data/vendor/assets/plugins/plugins/emoticons/img/smiley-sealed.gif +0 -0
  71. data/vendor/assets/plugins/plugins/emoticons/img/smiley-smile.gif +0 -0
  72. data/vendor/assets/plugins/plugins/emoticons/img/smiley-surprised.gif +0 -0
  73. data/vendor/assets/plugins/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
  74. data/vendor/assets/plugins/plugins/emoticons/img/smiley-undecided.gif +0 -0
  75. data/vendor/assets/plugins/plugins/emoticons/img/smiley-wink.gif +0 -0
  76. data/vendor/assets/plugins/plugins/emoticons/img/smiley-yell.gif +0 -0
  77. data/vendor/assets/plugins/plugins/emoticons/plugin.js +0 -65
  78. data/vendor/assets/plugins/plugins/emoticons/plugin.min.js +0 -1
  79. data/vendor/assets/plugins/plugins/example/dialog.html +0 -8
  80. data/vendor/assets/plugins/plugins/example/plugin.js +0 -68
  81. data/vendor/assets/plugins/plugins/example/plugin.min.js +0 -1
  82. data/vendor/assets/plugins/plugins/example_dependency/plugin.js +0 -22
  83. data/vendor/assets/plugins/plugins/example_dependency/plugin.min.js +0 -1
  84. data/vendor/assets/plugins/plugins/fullpage/plugin.js +0 -490
  85. data/vendor/assets/plugins/plugins/fullpage/plugin.min.js +0 -1
  86. data/vendor/assets/plugins/plugins/fullscreen/plugin.js +0 -136
  87. data/vendor/assets/plugins/plugins/fullscreen/plugin.min.js +0 -1
  88. data/vendor/assets/plugins/plugins/hr/plugin.js +0 -30
  89. data/vendor/assets/plugins/plugins/hr/plugin.min.js +0 -1
  90. data/vendor/assets/plugins/plugins/image/plugin.js +0 -439
  91. data/vendor/assets/plugins/plugins/image/plugin.min.js +0 -1
  92. data/vendor/assets/plugins/plugins/importcss/plugin.js +0 -195
  93. data/vendor/assets/plugins/plugins/importcss/plugin.min.js +0 -1
  94. data/vendor/assets/plugins/plugins/insertdatetime/plugin.js +0 -121
  95. data/vendor/assets/plugins/plugins/insertdatetime/plugin.min.js +0 -1
  96. data/vendor/assets/plugins/plugins/layer/plugin.js +0 -225
  97. data/vendor/assets/plugins/plugins/layer/plugin.min.js +0 -1
  98. data/vendor/assets/plugins/plugins/legacyoutput/plugin.js +0 -211
  99. data/vendor/assets/plugins/plugins/legacyoutput/plugin.min.js +0 -1
  100. data/vendor/assets/plugins/plugins/link/plugin.js +0 -400
  101. data/vendor/assets/plugins/plugins/link/plugin.min.js +0 -1
  102. data/vendor/assets/plugins/plugins/lists/plugin.js +0 -791
  103. data/vendor/assets/plugins/plugins/lists/plugin.min.js +0 -1
  104. data/vendor/assets/plugins/plugins/media/moxieplayer.swf +0 -0
  105. data/vendor/assets/plugins/plugins/media/plugin.js +0 -774
  106. data/vendor/assets/plugins/plugins/media/plugin.min.js +0 -1
  107. data/vendor/assets/plugins/plugins/nonbreaking/plugin.js +0 -53
  108. data/vendor/assets/plugins/plugins/nonbreaking/plugin.min.js +0 -1
  109. data/vendor/assets/plugins/plugins/noneditable/plugin.js +0 -540
  110. data/vendor/assets/plugins/plugins/noneditable/plugin.min.js +0 -1
  111. data/vendor/assets/plugins/plugins/pagebreak/plugin.js +0 -88
  112. data/vendor/assets/plugins/plugins/pagebreak/plugin.min.js +0 -1
  113. data/vendor/assets/plugins/plugins/paste/classes/Clipboard.js +0 -634
  114. data/vendor/assets/plugins/plugins/paste/classes/Plugin.js +0 -110
  115. data/vendor/assets/plugins/plugins/paste/classes/Quirks.js +0 -159
  116. data/vendor/assets/plugins/plugins/paste/classes/Utils.js +0 -130
  117. data/vendor/assets/plugins/plugins/paste/classes/WordFilter.js +0 -493
  118. data/vendor/assets/plugins/plugins/paste/plugin.dev.js +0 -120
  119. data/vendor/assets/plugins/plugins/paste/plugin.js +0 -1625
  120. data/vendor/assets/plugins/plugins/paste/plugin.min.js +0 -1
  121. data/vendor/assets/plugins/plugins/preview/plugin.js +0 -88
  122. data/vendor/assets/plugins/plugins/preview/plugin.min.js +0 -1
  123. data/vendor/assets/plugins/plugins/print/plugin.js +0 -32
  124. data/vendor/assets/plugins/plugins/print/plugin.min.js +0 -1
  125. data/vendor/assets/plugins/plugins/save/plugin.js +0 -94
  126. data/vendor/assets/plugins/plugins/save/plugin.min.js +0 -1
  127. data/vendor/assets/plugins/plugins/searchreplace/plugin.js +0 -594
  128. data/vendor/assets/plugins/plugins/searchreplace/plugin.min.js +0 -1
  129. data/vendor/assets/plugins/plugins/spellchecker/classes/DomTextMatcher.js +0 -470
  130. data/vendor/assets/plugins/plugins/spellchecker/classes/Plugin.js +0 -436
  131. data/vendor/assets/plugins/plugins/spellchecker/plugin.dev.js +0 -117
  132. data/vendor/assets/plugins/plugins/spellchecker/plugin.js +0 -996
  133. data/vendor/assets/plugins/plugins/spellchecker/plugin.min.js +0 -1
  134. data/vendor/assets/plugins/plugins/tabfocus/plugin.js +0 -120
  135. data/vendor/assets/plugins/plugins/tabfocus/plugin.min.js +0 -1
  136. data/vendor/assets/plugins/plugins/table/classes/CellSelection.js +0 -176
  137. data/vendor/assets/plugins/plugins/table/classes/Dialogs.js +0 -749
  138. data/vendor/assets/plugins/plugins/table/classes/Plugin.js +0 -422
  139. data/vendor/assets/plugins/plugins/table/classes/Quirks.js +0 -372
  140. data/vendor/assets/plugins/plugins/table/classes/TableGrid.js +0 -864
  141. data/vendor/assets/plugins/plugins/table/plugin.dev.js +0 -118
  142. data/vendor/assets/plugins/plugins/table/plugin.js +0 -2680
  143. data/vendor/assets/plugins/plugins/table/plugin.min.js +0 -1
  144. data/vendor/assets/plugins/plugins/template/plugin.js +0 -262
  145. data/vendor/assets/plugins/plugins/template/plugin.min.js +0 -1
  146. data/vendor/assets/plugins/plugins/textcolor/plugin.js +0 -272
  147. data/vendor/assets/plugins/plugins/textcolor/plugin.min.js +0 -1
  148. data/vendor/assets/plugins/plugins/textpattern/plugin.js +0 -268
  149. data/vendor/assets/plugins/plugins/textpattern/plugin.min.js +0 -1
  150. data/vendor/assets/plugins/plugins/visualblocks/css/visualblocks.css +0 -135
  151. data/vendor/assets/plugins/plugins/visualblocks/img/address.gif +0 -0
  152. data/vendor/assets/plugins/plugins/visualblocks/img/article.gif +0 -0
  153. data/vendor/assets/plugins/plugins/visualblocks/img/aside.gif +0 -0
  154. data/vendor/assets/plugins/plugins/visualblocks/img/blockquote.gif +0 -0
  155. data/vendor/assets/plugins/plugins/visualblocks/img/div.gif +0 -0
  156. data/vendor/assets/plugins/plugins/visualblocks/img/dl.gif +0 -0
  157. data/vendor/assets/plugins/plugins/visualblocks/img/figure.gif +0 -0
  158. data/vendor/assets/plugins/plugins/visualblocks/img/h1.gif +0 -0
  159. data/vendor/assets/plugins/plugins/visualblocks/img/h2.gif +0 -0
  160. data/vendor/assets/plugins/plugins/visualblocks/img/h3.gif +0 -0
  161. data/vendor/assets/plugins/plugins/visualblocks/img/h4.gif +0 -0
  162. data/vendor/assets/plugins/plugins/visualblocks/img/h5.gif +0 -0
  163. data/vendor/assets/plugins/plugins/visualblocks/img/h6.gif +0 -0
  164. data/vendor/assets/plugins/plugins/visualblocks/img/hgroup.gif +0 -0
  165. data/vendor/assets/plugins/plugins/visualblocks/img/ol.gif +0 -0
  166. data/vendor/assets/plugins/plugins/visualblocks/img/p.gif +0 -0
  167. data/vendor/assets/plugins/plugins/visualblocks/img/pre.gif +0 -0
  168. data/vendor/assets/plugins/plugins/visualblocks/img/section.gif +0 -0
  169. data/vendor/assets/plugins/plugins/visualblocks/img/ul.gif +0 -0
  170. data/vendor/assets/plugins/plugins/visualblocks/plugin.js +0 -86
  171. data/vendor/assets/plugins/plugins/visualblocks/plugin.min.js +0 -1
  172. data/vendor/assets/plugins/plugins/visualchars/plugin.js +0 -88
  173. data/vendor/assets/plugins/plugins/visualchars/plugin.min.js +0 -1
  174. data/vendor/assets/plugins/plugins/wordcount/plugin.js +0 -69
  175. data/vendor/assets/plugins/plugins/wordcount/plugin.min.js +0 -1
  176. data/vendor/assets/skins/skins/lightgray/content.inline.min.css +0 -1
  177. data/vendor/assets/skins/skins/lightgray/content.min.css +0 -1
  178. data/vendor/assets/skins/skins/lightgray/fonts/tinymce-small.eot +0 -0
  179. data/vendor/assets/skins/skins/lightgray/fonts/tinymce-small.svg +0 -62
  180. data/vendor/assets/skins/skins/lightgray/fonts/tinymce-small.ttf +0 -0
  181. data/vendor/assets/skins/skins/lightgray/fonts/tinymce-small.woff +0 -0
  182. data/vendor/assets/skins/skins/lightgray/fonts/tinymce.eot +0 -0
  183. data/vendor/assets/skins/skins/lightgray/fonts/tinymce.svg +0 -63
  184. data/vendor/assets/skins/skins/lightgray/fonts/tinymce.ttf +0 -0
  185. data/vendor/assets/skins/skins/lightgray/fonts/tinymce.woff +0 -0
  186. data/vendor/assets/skins/skins/lightgray/img/anchor.gif +0 -0
  187. data/vendor/assets/skins/skins/lightgray/img/loader.gif +0 -0
  188. data/vendor/assets/skins/skins/lightgray/img/object.gif +0 -0
  189. data/vendor/assets/skins/skins/lightgray/img/trans.gif +0 -0
  190. data/vendor/assets/skins/skins/lightgray/skin.ie7.min.css +0 -1
  191. data/vendor/assets/skins/skins/lightgray/skin.min.css +0 -1
  192. data/vendor/assets/themes/themes/modern/theme.js +0 -617
  193. data/vendor/assets/themes/themes/modern/theme.min.js +0 -1
@@ -1 +0,0 @@
1
- !function(a,b){"use strict";function c(a,b){for(var c,d=[],f=0;f<a.length;++f){if(c=g[a[f]]||e(a[f]),!c)throw"module definition dependecy not found: "+a[f];d.push(c)}b.apply(null,d)}function d(a,d,e){if("string"!=typeof a)throw"invalid module definition, module id must be defined and be a string";if(d===b)throw"invalid module definition, dependencies must be specified";if(e===b)throw"invalid module definition, definition function must be specified";c(d,function(){g[a]=e.apply(null,arguments)})}function e(b){for(var c=a,d=b.split(/[.\/]/),e=0;e<d.length;++e){if(!c[d[e]])return;c=c[d[e]]}return c}function f(c){for(var d=0;d<c.length;d++){for(var e=a,f=c[d],h=f.split(/[.\/]/),i=0;i<h.length-1;++i)e[h[i]]===b&&(e[h[i]]={}),e=e[h[i]];e[h[h.length-1]]=g[f]}}var g={};d("tinymce/spellcheckerplugin/DomTextMatcher",[],function(){return function(a,b){function c(a,b){if(!a[0])throw"findAndReplaceDOMText cannot handle zero-length matches";return{start:a.index,end:a.index+a[0].length,text:a[0],data:b}}function d(a){var b;if(3===a.nodeType)return a.data;if(x[a.nodeName]&&!w[a.nodeName])return"";if(b="",(w[a.nodeName]||y[a.nodeName])&&(b+="\n"),a=a.firstChild)do b+=d(a);while(a=a.nextSibling);return b}function e(a,b,c){var d,e,f,g,h,i=[],j=0,k=a,l=0;b=b.slice(0),b.sort(function(a,b){return a.start-b.start}),h=b.shift();a:for(;;){if((w[k.nodeName]||y[k.nodeName])&&j++,3===k.nodeType&&(!e&&k.length+j>=h.end?(e=k,g=h.end-j):d&&i.push(k),!d&&k.length+j>h.start&&(d=k,f=h.start-j),j+=k.length),d&&e){if(k=c({startNode:d,startNodeIndex:f,endNode:e,endNodeIndex:g,innerNodes:i,match:h.text,matchIndex:l}),j-=e.length-g,d=null,e=null,i=[],h=b.shift(),l++,!h)break}else{if((!x[k.nodeName]||w[k.nodeName])&&k.firstChild){k=k.firstChild;continue}if(k.nextSibling){k=k.nextSibling;continue}}for(;;){if(k.nextSibling){k=k.nextSibling;break}if(k.parentNode===a)break a;k=k.parentNode}}}function f(a){function b(b,c){var d=z[c];d.stencil||(d.stencil=a(d));var e=d.stencil.cloneNode(!1);return e.setAttribute("data-mce-index",c),b&&e.appendChild(A.doc.createTextNode(b)),e}return function(a){var c,d,e,f=a.startNode,g=a.endNode,h=a.matchIndex,i=A.doc;if(f===g){var j=f;e=j.parentNode,a.startNodeIndex>0&&(c=i.createTextNode(j.data.substring(0,a.startNodeIndex)),e.insertBefore(c,j));var k=b(a.match,h);return e.insertBefore(k,j),a.endNodeIndex<j.length&&(d=i.createTextNode(j.data.substring(a.endNodeIndex)),e.insertBefore(d,j)),j.parentNode.removeChild(j),k}c=i.createTextNode(f.data.substring(0,a.startNodeIndex)),d=i.createTextNode(g.data.substring(a.endNodeIndex));for(var l=b(f.data.substring(a.startNodeIndex),h),m=[],n=0,o=a.innerNodes.length;o>n;++n){var p=a.innerNodes[n],q=b(p.data,h);p.parentNode.replaceChild(q,p),m.push(q)}var r=b(g.data.substring(0,a.endNodeIndex),h);return e=f.parentNode,e.insertBefore(c,f),e.insertBefore(l,f),e.removeChild(f),e=g.parentNode,e.insertBefore(r,g),e.insertBefore(d,g),e.removeChild(g),r}}function g(a){var b=a.parentNode;b.insertBefore(a.firstChild,a),a.parentNode.removeChild(a)}function h(b){var c=a.getElementsByTagName("*"),d=[];b="number"==typeof b?""+b:null;for(var e=0;e<c.length;e++){var f=c[e],g=f.getAttribute("data-mce-index");null!==g&&g.length&&(g===b||null===b)&&d.push(f)}return d}function i(a){for(var b=z.length;b--;)if(z[b]===a)return b;return-1}function j(a){var b=[];return k(function(c,d){a(c,d)&&b.push(c)}),z=b,this}function k(a){for(var b=0,c=z.length;c>b&&a(z[b],b)!==!1;b++);return this}function l(b){return z.length&&e(a,z,f(b)),this}function m(a,b){if(v&&a.global)for(;u=a.exec(v);)z.push(c(u,b));return this}function n(a){var b,c=h(a?i(a):null);for(b=c.length;b--;)g(c[b]);return this}function o(a){return z[a.getAttribute("data-mce-index")]}function p(a){return h(i(a))[0]}function q(a,b,c){return z.push({start:a,end:a+b,text:v.substr(a,b),data:c}),this}function r(a){var c=h(i(a)),d=b.dom.createRng();return d.setStartBefore(c[0]),d.setEndAfter(c[c.length-1]),d}function s(a,c){var d=r(a);return d.deleteContents(),c.length>0&&d.insertNode(b.dom.doc.createTextNode(c)),d}function t(){return z.splice(0,z.length),n(),this}var u,v,w,x,y,z=[],A=b.dom;return w=b.schema.getBlockElements(),x=b.schema.getWhiteSpaceElements(),y=b.schema.getShortEndedElements(),v=d(a),{text:v,matches:z,each:k,filter:j,reset:t,matchFromElement:o,elementFromMatch:p,find:m,add:q,wrap:l,unwrap:n,replace:s,rangeFromMatch:r,indexOf:i}}}),d("tinymce/spellcheckerplugin/Plugin",["tinymce/spellcheckerplugin/DomTextMatcher","tinymce/PluginManager","tinymce/util/Tools","tinymce/ui/Menu","tinymce/dom/DOMUtils","tinymce/util/XHR","tinymce/util/URI","tinymce/util/JSON"],function(a,b,c,d,e,f,g,h){b.add("spellchecker",function(b,i){function j(){return E.textMatcher||(E.textMatcher=new a(b.getBody(),b)),E.textMatcher}function k(a,b){var d=[];return c.each(b,function(a){d.push({selectable:!0,text:a.name,data:a.value})}),d}function l(a){for(var b in a)return!1;return!0}function m(a,f){var g=[],h=A[a];c.each(h,function(a){g.push({text:a,onclick:function(){b.insertContent(b.dom.encode(a)),b.dom.remove(f),r()}})}),g.push({text:"-"}),D&&g.push({text:"Add to Dictionary",onclick:function(){s(a,f)}}),g.push.apply(g,[{text:"Ignore",onclick:function(){t(a,f)}},{text:"Ignore all",onclick:function(){t(a,f,!0)}}]),C=new d({items:g,context:"contextmenu",onautohide:function(a){-1!=a.target.className.indexOf("spellchecker")&&a.preventDefault()},onhide:function(){C.remove(),C=null}}),C.renderTo(document.body);var i=e.DOM.getPos(b.getContentAreaContainer()),j=b.dom.getPos(f[0]),k=b.dom.getRoot();"BODY"==k.nodeName?(j.x-=k.ownerDocument.documentElement.scrollLeft||k.scrollLeft,j.y-=k.ownerDocument.documentElement.scrollTop||k.scrollTop):(j.x-=k.scrollLeft,j.y-=k.scrollTop),i.x+=j.x,i.y+=j.y,C.moveTo(i.x,i.y+f[0].offsetHeight)}function n(){return b.getParam("spellchecker_wordchar_pattern")||new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2003\u2009]+',"g")}function o(a,b,d,e){var j={method:a},k="";"spellcheck"==a&&(j.text=b,j.lang=F.spellchecker_language),"addToDictionary"==a&&(j.word=b),c.each(j,function(a,b){k&&(k+="&"),k+=b+"="+encodeURIComponent(a)}),f.send({url:new g(i).toAbsolute(F.spellchecker_rpc_url),type:"post",content_type:"application/x-www-form-urlencoded",data:k,success:function(a){a=h.parse(a),a?a.error?e(a.error):d(a):e("Sever response wasn't proper JSON.")},error:function(a,b){e("Spellchecker request error: "+b.status)}})}function p(a,b,c,d){var e=F.spellchecker_callback||o;e.call(E,a,b,c,d)}function q(){function a(a){b.windowManager.alert(a),b.setProgressState(!1),u()}return B?void u():(u(),b.setProgressState(!0),p("spellcheck",j().text,y,a),void b.focus())}function r(){b.dom.select("span.mce-spellchecker-word").length||u()}function s(a,c){b.setProgressState(!0),p("addToDictionary",a,function(){b.setProgressState(!1),b.dom.remove(c,!0),r()},function(a){b.windowManager.alert(a),b.setProgressState(!1)})}function t(a,d,e){b.selection.collapse(),e?c.each(b.dom.select("span.mce-spellchecker-word"),function(c){c.getAttribute("data-mce-word")==a&&b.dom.remove(c,!0)}):b.dom.remove(d,!0),r()}function u(){j().reset(),E.textMatcher=null,B&&(B=!1,b.fire("SpellcheckEnd"))}function v(a){var b=a.getAttribute("data-mce-index");return"number"==typeof b?""+b:b}function w(a){var d,e=[];if(d=c.toArray(b.getBody().getElementsByTagName("span")),d.length)for(var f=0;f<d.length;f++){var g=v(d[f]);null!==g&&g.length&&g===a.toString()&&e.push(d[f])}return e}function x(a){var b=F.spellchecker_language;a.control.items().each(function(a){a.active(a.settings.data===b)})}function y(a){var c;return a.words?(D=!!a.dictionary,c=a.words):c=a,b.setProgressState(!1),l(c)?(b.windowManager.alert("No misspellings found"),void(B=!1)):(A=c,j().find(n()).filter(function(a){return!!c[a.text]}).wrap(function(a){return b.dom.create("span",{"class":"mce-spellchecker-word","data-mce-bogus":1,"data-mce-word":a.text})}),B=!0,void b.fire("SpellcheckStart"))}var z,A,B,C,D,E=this,F=b.settings,G=F.spellchecker_languages||"English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv";z=k("Language",c.map(G.split(","),function(a){return a=a.split("="),{name:a[0],value:a[1]}})),b.on("click",function(a){var c=a.target;if("mce-spellchecker-word"==c.className){a.preventDefault();var d=w(v(c));if(d.length>0){var e=b.dom.createRng();e.setStartBefore(d[0]),e.setEndAfter(d[d.length-1]),b.selection.setRng(e),m(c.getAttribute("data-mce-word"),d)}}}),b.addMenuItem("spellchecker",{text:"Spellcheck",context:"tools",onclick:q,selectable:!0,onPostRender:function(){var a=this;a.active(B),b.on("SpellcheckStart SpellcheckEnd",function(){a.active(B)})}});var H={tooltip:"Spellcheck",onclick:q,onPostRender:function(){var a=this;b.on("SpellcheckStart SpellcheckEnd",function(){a.active(B)})}};z.length>1&&(H.type="splitbutton",H.menu=z,H.onshow=x,H.onselect=function(a){F.spellchecker_language=a.control.settings.data}),b.addButton("spellchecker",H),b.addCommand("mceSpellCheck",q),b.on("remove",function(){C&&(C.remove(),C=null)}),b.on("change",r),this.getTextMatcher=j,this.getWordCharPattern=n,this.markErrors=y,this.getLanguage=function(){return F.spellchecker_language},F.spellchecker_language=F.spellchecker_language||F.language||"en"})}),f(["tinymce/spellcheckerplugin/DomTextMatcher"])}(this);
@@ -1,120 +0,0 @@
1
- /**
2
- * plugin.js
3
- *
4
- * Copyright, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://www.tinymce.com/license
8
- * Contributing: http://www.tinymce.com/contributing
9
- */
10
-
11
- /*global tinymce:true */
12
-
13
- tinymce.PluginManager.add('tabfocus', function(editor) {
14
- var DOM = tinymce.DOM, each = tinymce.each, explode = tinymce.explode;
15
-
16
- function tabCancel(e) {
17
- if (e.keyCode === 9 && !e.ctrlKey && !e.altKey && !e.metaKey) {
18
- e.preventDefault();
19
- }
20
- }
21
-
22
- function tabHandler(e) {
23
- var x, el, v, i;
24
-
25
- if (e.keyCode !== 9 || e.ctrlKey || e.altKey || e.metaKey || e.isDefaultPrevented()) {
26
- return;
27
- }
28
-
29
- function find(direction) {
30
- el = DOM.select(':input:enabled,*[tabindex]:not(iframe)');
31
-
32
- function canSelectRecursive(e) {
33
- return e.nodeName === "BODY" || (e.type != 'hidden' &&
34
- e.style.display != "none" &&
35
- e.style.visibility != "hidden" && canSelectRecursive(e.parentNode));
36
- }
37
-
38
- function canSelect(el) {
39
- return /INPUT|TEXTAREA|BUTTON/.test(el.tagName) && tinymce.get(e.id) && el.tabIndex != -1 && canSelectRecursive(el);
40
- }
41
-
42
- each(el, function(e, i) {
43
- if (e.id == editor.id) {
44
- x = i;
45
- return false;
46
- }
47
- });
48
- if (direction > 0) {
49
- for (i = x + 1; i < el.length; i++) {
50
- if (canSelect(el[i])) {
51
- return el[i];
52
- }
53
- }
54
- } else {
55
- for (i = x - 1; i >= 0; i--) {
56
- if (canSelect(el[i])) {
57
- return el[i];
58
- }
59
- }
60
- }
61
-
62
- return null;
63
- }
64
-
65
- v = explode(editor.getParam('tab_focus', editor.getParam('tabfocus_elements', ':prev,:next')));
66
-
67
- if (v.length == 1) {
68
- v[1] = v[0];
69
- v[0] = ':prev';
70
- }
71
-
72
- // Find element to focus
73
- if (e.shiftKey) {
74
- if (v[0] == ':prev') {
75
- el = find(-1);
76
- } else {
77
- el = DOM.get(v[0]);
78
- }
79
- } else {
80
- if (v[1] == ':next') {
81
- el = find(1);
82
- } else {
83
- el = DOM.get(v[1]);
84
- }
85
- }
86
-
87
- if (el) {
88
- var focusEditor = tinymce.get(el.id || el.name);
89
-
90
- if (el.id && focusEditor) {
91
- focusEditor.focus();
92
- } else {
93
- window.setTimeout(function() {
94
- if (!tinymce.Env.webkit) {
95
- window.focus();
96
- }
97
-
98
- el.focus();
99
- }, 10);
100
- }
101
-
102
- e.preventDefault();
103
- }
104
- }
105
-
106
- editor.on('init', function() {
107
- if (editor.inline) {
108
- // Remove default tabIndex in inline mode
109
- tinymce.DOM.setAttrib(editor.getBody(), 'tabIndex', null);
110
- }
111
-
112
- editor.on('keyup', tabCancel);
113
-
114
- if (tinymce.Env.gecko) {
115
- editor.on('keypress keydown', tabHandler);
116
- } else {
117
- editor.on('keydown', tabHandler);
118
- }
119
- });
120
- });
@@ -1 +0,0 @@
1
- tinymce.PluginManager.add("tabfocus",function(a){function b(a){9!==a.keyCode||a.ctrlKey||a.altKey||a.metaKey||a.preventDefault()}function c(b){function c(c){function f(a){return"BODY"===a.nodeName||"hidden"!=a.type&&"none"!=a.style.display&&"hidden"!=a.style.visibility&&f(a.parentNode)}function i(a){return/INPUT|TEXTAREA|BUTTON/.test(a.tagName)&&tinymce.get(b.id)&&-1!=a.tabIndex&&f(a)}if(h=d.select(":input:enabled,*[tabindex]:not(iframe)"),e(h,function(b,c){return b.id==a.id?(g=c,!1):void 0}),c>0){for(j=g+1;j<h.length;j++)if(i(h[j]))return h[j]}else for(j=g-1;j>=0;j--)if(i(h[j]))return h[j];return null}var g,h,i,j;if(!(9!==b.keyCode||b.ctrlKey||b.altKey||b.metaKey||b.isDefaultPrevented())&&(i=f(a.getParam("tab_focus",a.getParam("tabfocus_elements",":prev,:next"))),1==i.length&&(i[1]=i[0],i[0]=":prev"),h=b.shiftKey?":prev"==i[0]?c(-1):d.get(i[0]):":next"==i[1]?c(1):d.get(i[1]))){var k=tinymce.get(h.id||h.name);h.id&&k?k.focus():window.setTimeout(function(){tinymce.Env.webkit||window.focus(),h.focus()},10),b.preventDefault()}}var d=tinymce.DOM,e=tinymce.each,f=tinymce.explode;a.on("init",function(){a.inline&&tinymce.DOM.setAttrib(a.getBody(),"tabIndex",null),a.on("keyup",b),tinymce.Env.gecko?a.on("keypress keydown",c):a.on("keydown",c)})});
@@ -1,176 +0,0 @@
1
- /**
2
- * CellSelection.js
3
- *
4
- * Copyright, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://www.tinymce.com/license
8
- * Contributing: http://www.tinymce.com/contributing
9
- */
10
-
11
- /**
12
- * This class handles table cell selection by faking it using a css class that gets applied
13
- * to cells when dragging the mouse from one cell to another.
14
- *
15
- * @class tinymce.tableplugin.CellSelection
16
- * @private
17
- */
18
- define("tinymce/tableplugin/CellSelection", [
19
- "tinymce/tableplugin/TableGrid",
20
- "tinymce/dom/TreeWalker",
21
- "tinymce/util/Tools"
22
- ], function(TableGrid, TreeWalker, Tools) {
23
- return function(editor) {
24
- var dom = editor.dom, tableGrid, startCell, startTable, hasCellSelection = true, resizing;
25
-
26
- function clear(force) {
27
- // Restore selection possibilities
28
- editor.getBody().style.webkitUserSelect = '';
29
-
30
- if (force || hasCellSelection) {
31
- editor.dom.removeClass(
32
- editor.dom.select('td.mce-item-selected,th.mce-item-selected'),
33
- 'mce-item-selected'
34
- );
35
-
36
- hasCellSelection = false;
37
- }
38
- }
39
-
40
- function cellSelectionHandler(e) {
41
- var sel, table, target = e.target;
42
-
43
- if (resizing) {
44
- return;
45
- }
46
-
47
- if (startCell && (tableGrid || target != startCell) && (target.nodeName == 'TD' || target.nodeName == 'TH')) {
48
- table = dom.getParent(target, 'table');
49
- if (table == startTable) {
50
- if (!tableGrid) {
51
- tableGrid = new TableGrid(editor, table);
52
- tableGrid.setStartCell(startCell);
53
-
54
- editor.getBody().style.webkitUserSelect = 'none';
55
- }
56
-
57
- tableGrid.setEndCell(target);
58
- hasCellSelection = true;
59
- }
60
-
61
- // Remove current selection
62
- sel = editor.selection.getSel();
63
-
64
- try {
65
- if (sel.removeAllRanges) {
66
- sel.removeAllRanges();
67
- } else {
68
- sel.empty();
69
- }
70
- } catch (ex) {
71
- // IE9 might throw errors here
72
- }
73
-
74
- e.preventDefault();
75
- }
76
- }
77
-
78
- // Add cell selection logic
79
- editor.on('MouseDown', function(e) {
80
- if (e.button != 2 && !resizing) {
81
- clear();
82
-
83
- startCell = dom.getParent(e.target, 'td,th');
84
- startTable = dom.getParent(startCell, 'table');
85
- }
86
- });
87
-
88
- editor.on('mouseover', cellSelectionHandler);
89
-
90
- editor.on('remove', function() {
91
- dom.unbind(editor.getDoc(), 'mouseover', cellSelectionHandler);
92
- });
93
-
94
- editor.on('MouseUp', function() {
95
- var rng, sel = editor.selection, selectedCells, walker, node, lastNode;
96
-
97
- function setPoint(node, start) {
98
- var walker = new TreeWalker(node, node);
99
-
100
- do {
101
- // Text node
102
- if (node.nodeType == 3 && Tools.trim(node.nodeValue).length !== 0) {
103
- if (start) {
104
- rng.setStart(node, 0);
105
- } else {
106
- rng.setEnd(node, node.nodeValue.length);
107
- }
108
-
109
- return;
110
- }
111
-
112
- // BR element
113
- if (node.nodeName == 'BR') {
114
- if (start) {
115
- rng.setStartBefore(node);
116
- } else {
117
- rng.setEndBefore(node);
118
- }
119
-
120
- return;
121
- }
122
- } while ((node = (start ? walker.next() : walker.prev())));
123
- }
124
-
125
- // Move selection to startCell
126
- if (startCell) {
127
- if (tableGrid) {
128
- editor.getBody().style.webkitUserSelect = '';
129
- }
130
-
131
- // Try to expand text selection as much as we can only Gecko supports cell selection
132
- selectedCells = dom.select('td.mce-item-selected,th.mce-item-selected');
133
- if (selectedCells.length > 0) {
134
- rng = dom.createRng();
135
- node = selectedCells[0];
136
- rng.setStartBefore(node);
137
- rng.setEndAfter(node);
138
-
139
- setPoint(node, 1);
140
- walker = new TreeWalker(node, dom.getParent(selectedCells[0], 'table'));
141
-
142
- do {
143
- if (node.nodeName == 'TD' || node.nodeName == 'TH') {
144
- if (!dom.hasClass(node, 'mce-item-selected')) {
145
- break;
146
- }
147
-
148
- lastNode = node;
149
- }
150
- } while ((node = walker.next()));
151
-
152
- setPoint(lastNode);
153
-
154
- sel.setRng(rng);
155
- }
156
-
157
- editor.nodeChanged();
158
- startCell = tableGrid = startTable = null;
159
- }
160
- });
161
-
162
- editor.on('KeyUp Drop SetContent', function(e) {
163
- clear(e.type == 'setcontent');
164
- startCell = tableGrid = startTable = null;
165
- resizing = false;
166
- });
167
-
168
- editor.on('ObjectResizeStart ObjectResized', function(e) {
169
- resizing = e.type != 'objectresized';
170
- });
171
-
172
- return {
173
- clear: clear
174
- };
175
- };
176
- });