mirador_rails 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (206) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +12 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +5 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE.txt +13 -0
  7. data/README.md +97 -0
  8. data/Rakefile +6 -0
  9. data/bin/console +14 -0
  10. data/bin/setup +8 -0
  11. data/lib/mirador_rails.rb +16 -0
  12. data/lib/mirador_rails/version.rb +3 -0
  13. data/lib/mirador_rails/view_helpers.rb +30 -0
  14. data/mirador_rails.gemspec +30 -0
  15. data/vendor/assets/images/border_type_1.png +0 -0
  16. data/vendor/assets/images/border_type_2.png +0 -0
  17. data/vendor/assets/images/border_type_3.png +0 -0
  18. data/vendor/assets/images/debut_dark.png +0 -0
  19. data/vendor/assets/javascripts/mirador.js +1 -0
  20. data/vendor/assets/javascripts/mirador.min.js +88 -0
  21. data/vendor/assets/javascripts/mirador.min.js.map +1 -0
  22. data/vendor/assets/locales/ar/translation.json +42 -0
  23. data/vendor/assets/locales/de/translation.json +77 -0
  24. data/vendor/assets/locales/en/translation.json +82 -0
  25. data/vendor/assets/locales/es/translation.json +35 -0
  26. data/vendor/assets/locales/fr/translation.json +77 -0
  27. data/vendor/assets/locales/ga/translation.json +39 -0
  28. data/vendor/assets/locales/ja/translation.json +82 -0
  29. data/vendor/assets/locales/ko/translation.json +74 -0
  30. data/vendor/assets/locales/nl/translation.json +39 -0
  31. data/vendor/assets/locales/zh-CN/translation.json +74 -0
  32. data/vendor/assets/locales/zh-TW/translation.json +74 -0
  33. data/vendor/assets/locales/zh/translation.json +74 -0
  34. data/vendor/assets/plugins/plugins/advlist/plugin.js +97 -0
  35. data/vendor/assets/plugins/plugins/advlist/plugin.min.js +1 -0
  36. data/vendor/assets/plugins/plugins/anchor/plugin.js +45 -0
  37. data/vendor/assets/plugins/plugins/anchor/plugin.min.js +1 -0
  38. data/vendor/assets/plugins/plugins/autolink/plugin.js +194 -0
  39. data/vendor/assets/plugins/plugins/autolink/plugin.min.js +1 -0
  40. data/vendor/assets/plugins/plugins/autoresize/plugin.js +152 -0
  41. data/vendor/assets/plugins/plugins/autoresize/plugin.min.js +1 -0
  42. data/vendor/assets/plugins/plugins/autosave/plugin.js +165 -0
  43. data/vendor/assets/plugins/plugins/autosave/plugin.min.js +1 -0
  44. data/vendor/assets/plugins/plugins/bbcode/plugin.js +123 -0
  45. data/vendor/assets/plugins/plugins/bbcode/plugin.min.js +1 -0
  46. data/vendor/assets/plugins/plugins/charmap/plugin.js +370 -0
  47. data/vendor/assets/plugins/plugins/charmap/plugin.min.js +1 -0
  48. data/vendor/assets/plugins/plugins/code/plugin.js +60 -0
  49. data/vendor/assets/plugins/plugins/code/plugin.min.js +1 -0
  50. data/vendor/assets/plugins/plugins/colorpicker/plugin.js +112 -0
  51. data/vendor/assets/plugins/plugins/colorpicker/plugin.min.js +1 -0
  52. data/vendor/assets/plugins/plugins/compat3x/css/dialog.css +118 -0
  53. data/vendor/assets/plugins/plugins/compat3x/img/buttons.png +0 -0
  54. data/vendor/assets/plugins/plugins/compat3x/img/icons.gif +0 -0
  55. data/vendor/assets/plugins/plugins/compat3x/img/items.gif +0 -0
  56. data/vendor/assets/plugins/plugins/compat3x/img/menu_arrow.gif +0 -0
  57. data/vendor/assets/plugins/plugins/compat3x/img/menu_check.gif +0 -0
  58. data/vendor/assets/plugins/plugins/compat3x/img/progress.gif +0 -0
  59. data/vendor/assets/plugins/plugins/compat3x/img/tabs.gif +0 -0
  60. data/vendor/assets/plugins/plugins/compat3x/plugin.js +297 -0
  61. data/vendor/assets/plugins/plugins/compat3x/plugin.min.js +1 -0
  62. data/vendor/assets/plugins/plugins/compat3x/tiny_mce_popup.js +542 -0
  63. data/vendor/assets/plugins/plugins/compat3x/utils/editable_selects.js +70 -0
  64. data/vendor/assets/plugins/plugins/compat3x/utils/form_utils.js +210 -0
  65. data/vendor/assets/plugins/plugins/compat3x/utils/mctabs.js +164 -0
  66. data/vendor/assets/plugins/plugins/compat3x/utils/validate.js +252 -0
  67. data/vendor/assets/plugins/plugins/contextmenu/plugin.js +87 -0
  68. data/vendor/assets/plugins/plugins/contextmenu/plugin.min.js +1 -0
  69. data/vendor/assets/plugins/plugins/directionality/plugin.js +64 -0
  70. data/vendor/assets/plugins/plugins/directionality/plugin.min.js +1 -0
  71. data/vendor/assets/plugins/plugins/emoticons/img/smiley-cool.gif +0 -0
  72. data/vendor/assets/plugins/plugins/emoticons/img/smiley-cry.gif +0 -0
  73. data/vendor/assets/plugins/plugins/emoticons/img/smiley-embarassed.gif +0 -0
  74. data/vendor/assets/plugins/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
  75. data/vendor/assets/plugins/plugins/emoticons/img/smiley-frown.gif +0 -0
  76. data/vendor/assets/plugins/plugins/emoticons/img/smiley-innocent.gif +0 -0
  77. data/vendor/assets/plugins/plugins/emoticons/img/smiley-kiss.gif +0 -0
  78. data/vendor/assets/plugins/plugins/emoticons/img/smiley-laughing.gif +0 -0
  79. data/vendor/assets/plugins/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
  80. data/vendor/assets/plugins/plugins/emoticons/img/smiley-sealed.gif +0 -0
  81. data/vendor/assets/plugins/plugins/emoticons/img/smiley-smile.gif +0 -0
  82. data/vendor/assets/plugins/plugins/emoticons/img/smiley-surprised.gif +0 -0
  83. data/vendor/assets/plugins/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
  84. data/vendor/assets/plugins/plugins/emoticons/img/smiley-undecided.gif +0 -0
  85. data/vendor/assets/plugins/plugins/emoticons/img/smiley-wink.gif +0 -0
  86. data/vendor/assets/plugins/plugins/emoticons/img/smiley-yell.gif +0 -0
  87. data/vendor/assets/plugins/plugins/emoticons/plugin.js +65 -0
  88. data/vendor/assets/plugins/plugins/emoticons/plugin.min.js +1 -0
  89. data/vendor/assets/plugins/plugins/example/dialog.html +8 -0
  90. data/vendor/assets/plugins/plugins/example/plugin.js +68 -0
  91. data/vendor/assets/plugins/plugins/example/plugin.min.js +1 -0
  92. data/vendor/assets/plugins/plugins/example_dependency/plugin.js +22 -0
  93. data/vendor/assets/plugins/plugins/example_dependency/plugin.min.js +1 -0
  94. data/vendor/assets/plugins/plugins/fullpage/plugin.js +490 -0
  95. data/vendor/assets/plugins/plugins/fullpage/plugin.min.js +1 -0
  96. data/vendor/assets/plugins/plugins/fullscreen/plugin.js +136 -0
  97. data/vendor/assets/plugins/plugins/fullscreen/plugin.min.js +1 -0
  98. data/vendor/assets/plugins/plugins/hr/plugin.js +30 -0
  99. data/vendor/assets/plugins/plugins/hr/plugin.min.js +1 -0
  100. data/vendor/assets/plugins/plugins/image/plugin.js +439 -0
  101. data/vendor/assets/plugins/plugins/image/plugin.min.js +1 -0
  102. data/vendor/assets/plugins/plugins/importcss/plugin.js +195 -0
  103. data/vendor/assets/plugins/plugins/importcss/plugin.min.js +1 -0
  104. data/vendor/assets/plugins/plugins/insertdatetime/plugin.js +121 -0
  105. data/vendor/assets/plugins/plugins/insertdatetime/plugin.min.js +1 -0
  106. data/vendor/assets/plugins/plugins/layer/plugin.js +225 -0
  107. data/vendor/assets/plugins/plugins/layer/plugin.min.js +1 -0
  108. data/vendor/assets/plugins/plugins/legacyoutput/plugin.js +211 -0
  109. data/vendor/assets/plugins/plugins/legacyoutput/plugin.min.js +1 -0
  110. data/vendor/assets/plugins/plugins/link/plugin.js +400 -0
  111. data/vendor/assets/plugins/plugins/link/plugin.min.js +1 -0
  112. data/vendor/assets/plugins/plugins/lists/plugin.js +791 -0
  113. data/vendor/assets/plugins/plugins/lists/plugin.min.js +1 -0
  114. data/vendor/assets/plugins/plugins/media/moxieplayer.swf +0 -0
  115. data/vendor/assets/plugins/plugins/media/plugin.js +774 -0
  116. data/vendor/assets/plugins/plugins/media/plugin.min.js +1 -0
  117. data/vendor/assets/plugins/plugins/nonbreaking/plugin.js +53 -0
  118. data/vendor/assets/plugins/plugins/nonbreaking/plugin.min.js +1 -0
  119. data/vendor/assets/plugins/plugins/noneditable/plugin.js +540 -0
  120. data/vendor/assets/plugins/plugins/noneditable/plugin.min.js +1 -0
  121. data/vendor/assets/plugins/plugins/pagebreak/plugin.js +88 -0
  122. data/vendor/assets/plugins/plugins/pagebreak/plugin.min.js +1 -0
  123. data/vendor/assets/plugins/plugins/paste/classes/Clipboard.js +634 -0
  124. data/vendor/assets/plugins/plugins/paste/classes/Plugin.js +110 -0
  125. data/vendor/assets/plugins/plugins/paste/classes/Quirks.js +159 -0
  126. data/vendor/assets/plugins/plugins/paste/classes/Utils.js +130 -0
  127. data/vendor/assets/plugins/plugins/paste/classes/WordFilter.js +493 -0
  128. data/vendor/assets/plugins/plugins/paste/plugin.dev.js +120 -0
  129. data/vendor/assets/plugins/plugins/paste/plugin.js +1625 -0
  130. data/vendor/assets/plugins/plugins/paste/plugin.min.js +1 -0
  131. data/vendor/assets/plugins/plugins/preview/plugin.js +88 -0
  132. data/vendor/assets/plugins/plugins/preview/plugin.min.js +1 -0
  133. data/vendor/assets/plugins/plugins/print/plugin.js +32 -0
  134. data/vendor/assets/plugins/plugins/print/plugin.min.js +1 -0
  135. data/vendor/assets/plugins/plugins/save/plugin.js +94 -0
  136. data/vendor/assets/plugins/plugins/save/plugin.min.js +1 -0
  137. data/vendor/assets/plugins/plugins/searchreplace/plugin.js +594 -0
  138. data/vendor/assets/plugins/plugins/searchreplace/plugin.min.js +1 -0
  139. data/vendor/assets/plugins/plugins/spellchecker/classes/DomTextMatcher.js +470 -0
  140. data/vendor/assets/plugins/plugins/spellchecker/classes/Plugin.js +436 -0
  141. data/vendor/assets/plugins/plugins/spellchecker/plugin.dev.js +117 -0
  142. data/vendor/assets/plugins/plugins/spellchecker/plugin.js +996 -0
  143. data/vendor/assets/plugins/plugins/spellchecker/plugin.min.js +1 -0
  144. data/vendor/assets/plugins/plugins/tabfocus/plugin.js +120 -0
  145. data/vendor/assets/plugins/plugins/tabfocus/plugin.min.js +1 -0
  146. data/vendor/assets/plugins/plugins/table/classes/CellSelection.js +176 -0
  147. data/vendor/assets/plugins/plugins/table/classes/Dialogs.js +749 -0
  148. data/vendor/assets/plugins/plugins/table/classes/Plugin.js +422 -0
  149. data/vendor/assets/plugins/plugins/table/classes/Quirks.js +372 -0
  150. data/vendor/assets/plugins/plugins/table/classes/TableGrid.js +864 -0
  151. data/vendor/assets/plugins/plugins/table/plugin.dev.js +118 -0
  152. data/vendor/assets/plugins/plugins/table/plugin.js +2680 -0
  153. data/vendor/assets/plugins/plugins/table/plugin.min.js +1 -0
  154. data/vendor/assets/plugins/plugins/template/plugin.js +262 -0
  155. data/vendor/assets/plugins/plugins/template/plugin.min.js +1 -0
  156. data/vendor/assets/plugins/plugins/textcolor/plugin.js +272 -0
  157. data/vendor/assets/plugins/plugins/textcolor/plugin.min.js +1 -0
  158. data/vendor/assets/plugins/plugins/textpattern/plugin.js +268 -0
  159. data/vendor/assets/plugins/plugins/textpattern/plugin.min.js +1 -0
  160. data/vendor/assets/plugins/plugins/visualblocks/css/visualblocks.css +135 -0
  161. data/vendor/assets/plugins/plugins/visualblocks/img/address.gif +0 -0
  162. data/vendor/assets/plugins/plugins/visualblocks/img/article.gif +0 -0
  163. data/vendor/assets/plugins/plugins/visualblocks/img/aside.gif +0 -0
  164. data/vendor/assets/plugins/plugins/visualblocks/img/blockquote.gif +0 -0
  165. data/vendor/assets/plugins/plugins/visualblocks/img/div.gif +0 -0
  166. data/vendor/assets/plugins/plugins/visualblocks/img/dl.gif +0 -0
  167. data/vendor/assets/plugins/plugins/visualblocks/img/figure.gif +0 -0
  168. data/vendor/assets/plugins/plugins/visualblocks/img/h1.gif +0 -0
  169. data/vendor/assets/plugins/plugins/visualblocks/img/h2.gif +0 -0
  170. data/vendor/assets/plugins/plugins/visualblocks/img/h3.gif +0 -0
  171. data/vendor/assets/plugins/plugins/visualblocks/img/h4.gif +0 -0
  172. data/vendor/assets/plugins/plugins/visualblocks/img/h5.gif +0 -0
  173. data/vendor/assets/plugins/plugins/visualblocks/img/h6.gif +0 -0
  174. data/vendor/assets/plugins/plugins/visualblocks/img/hgroup.gif +0 -0
  175. data/vendor/assets/plugins/plugins/visualblocks/img/ol.gif +0 -0
  176. data/vendor/assets/plugins/plugins/visualblocks/img/p.gif +0 -0
  177. data/vendor/assets/plugins/plugins/visualblocks/img/pre.gif +0 -0
  178. data/vendor/assets/plugins/plugins/visualblocks/img/section.gif +0 -0
  179. data/vendor/assets/plugins/plugins/visualblocks/img/ul.gif +0 -0
  180. data/vendor/assets/plugins/plugins/visualblocks/plugin.js +86 -0
  181. data/vendor/assets/plugins/plugins/visualblocks/plugin.min.js +1 -0
  182. data/vendor/assets/plugins/plugins/visualchars/plugin.js +88 -0
  183. data/vendor/assets/plugins/plugins/visualchars/plugin.min.js +1 -0
  184. data/vendor/assets/plugins/plugins/wordcount/plugin.js +69 -0
  185. data/vendor/assets/plugins/plugins/wordcount/plugin.min.js +1 -0
  186. data/vendor/assets/skins/skins/lightgray/content.inline.min.css +1 -0
  187. data/vendor/assets/skins/skins/lightgray/content.min.css +1 -0
  188. data/vendor/assets/skins/skins/lightgray/fonts/tinymce-small.eot +0 -0
  189. data/vendor/assets/skins/skins/lightgray/fonts/tinymce-small.svg +62 -0
  190. data/vendor/assets/skins/skins/lightgray/fonts/tinymce-small.ttf +0 -0
  191. data/vendor/assets/skins/skins/lightgray/fonts/tinymce-small.woff +0 -0
  192. data/vendor/assets/skins/skins/lightgray/fonts/tinymce.eot +0 -0
  193. data/vendor/assets/skins/skins/lightgray/fonts/tinymce.svg +63 -0
  194. data/vendor/assets/skins/skins/lightgray/fonts/tinymce.ttf +0 -0
  195. data/vendor/assets/skins/skins/lightgray/fonts/tinymce.woff +0 -0
  196. data/vendor/assets/skins/skins/lightgray/img/anchor.gif +0 -0
  197. data/vendor/assets/skins/skins/lightgray/img/loader.gif +0 -0
  198. data/vendor/assets/skins/skins/lightgray/img/object.gif +0 -0
  199. data/vendor/assets/skins/skins/lightgray/img/trans.gif +0 -0
  200. data/vendor/assets/skins/skins/lightgray/skin.ie7.min.css +1 -0
  201. data/vendor/assets/skins/skins/lightgray/skin.min.css +1 -0
  202. data/vendor/assets/stylesheets/mirador-combined.css +3969 -0
  203. data/vendor/assets/stylesheets/mirador.css +11 -0
  204. data/vendor/assets/themes/themes/modern/theme.js +617 -0
  205. data/vendor/assets/themes/themes/modern/theme.min.js +1 -0
  206. metadata +318 -0
@@ -0,0 +1 @@
1
+ tinymce.PluginManager.add("fullpage",function(a){function b(){var b=c();a.windowManager.open({title:"Document properties",data:b,defaults:{type:"textbox",size:40},body:[{name:"title",label:"Title"},{name:"keywords",label:"Keywords"},{name:"description",label:"Description"},{name:"robots",label:"Robots"},{name:"author",label:"Author"},{name:"docencoding",label:"Encoding"}],onSubmit:function(a){d(tinymce.extend(b,a.data))}})}function c(){function b(a,b){var c=a.attr(b);return c||""}var c,d,f=e(),g={};return g.fontface=a.getParam("fullpage_default_fontface",""),g.fontsize=a.getParam("fullpage_default_fontsize",""),c=f.firstChild,7==c.type&&(g.xml_pi=!0,d=/encoding="([^"]+)"/.exec(c.value),d&&(g.docencoding=d[1])),c=f.getAll("#doctype")[0],c&&(g.doctype="<!DOCTYPE"+c.value+">"),c=f.getAll("title")[0],c&&c.firstChild&&(g.title=c.firstChild.value),k(f.getAll("meta"),function(a){var b,c=a.attr("name"),d=a.attr("http-equiv");c?g[c.toLowerCase()]=a.attr("content"):"Content-Type"==d&&(b=/charset\s*=\s*(.*)\s*/gi.exec(a.attr("content")),b&&(g.docencoding=b[1]))}),c=f.getAll("html")[0],c&&(g.langcode=b(c,"lang")||b(c,"xml:lang")),g.stylesheets=[],tinymce.each(f.getAll("link"),function(a){"stylesheet"==a.attr("rel")&&g.stylesheets.push(a.attr("href"))}),c=f.getAll("body")[0],c&&(g.langdir=b(c,"dir"),g.style=b(c,"style"),g.visited_color=b(c,"vlink"),g.link_color=b(c,"link"),g.active_color=b(c,"alink")),g}function d(b){function c(a,b,c){a.attr(b,c?c:void 0)}function d(a){g.firstChild?g.insert(a,g.firstChild):g.append(a)}var f,g,h,j,m,n=a.dom;f=e(),g=f.getAll("head")[0],g||(j=f.getAll("html")[0],g=new l("head",1),j.firstChild?j.insert(g,j.firstChild,!0):j.append(g)),j=f.firstChild,b.xml_pi?(m='version="1.0"',b.docencoding&&(m+=' encoding="'+b.docencoding+'"'),7!=j.type&&(j=new l("xml",7),f.insert(j,f.firstChild,!0)),j.value=m):j&&7==j.type&&j.remove(),j=f.getAll("#doctype")[0],b.doctype?(j||(j=new l("#doctype",10),b.xml_pi?f.insert(j,f.firstChild):d(j)),j.value=b.doctype.substring(9,b.doctype.length-1)):j&&j.remove(),j=null,k(f.getAll("meta"),function(a){"Content-Type"==a.attr("http-equiv")&&(j=a)}),b.docencoding?(j||(j=new l("meta",1),j.attr("http-equiv","Content-Type"),j.shortEnded=!0,d(j)),j.attr("content","text/html; charset="+b.docencoding)):j&&j.remove(),j=f.getAll("title")[0],b.title?(j?j.empty():(j=new l("title",1),d(j)),j.append(new l("#text",3)).value=b.title):j&&j.remove(),k("keywords,description,author,copyright,robots".split(","),function(a){var c,e,g=f.getAll("meta"),h=b[a];for(c=0;c<g.length;c++)if(e=g[c],e.attr("name")==a)return void(h?e.attr("content",h):e.remove());h&&(j=new l("meta",1),j.attr("name",a),j.attr("content",h),j.shortEnded=!0,d(j))});var o={};tinymce.each(f.getAll("link"),function(a){"stylesheet"==a.attr("rel")&&(o[a.attr("href")]=a)}),tinymce.each(b.stylesheets,function(a){o[a]||(j=new l("link",1),j.attr({rel:"stylesheet",text:"text/css",href:a}),j.shortEnded=!0,d(j)),delete o[a]}),tinymce.each(o,function(a){a.remove()}),j=f.getAll("body")[0],j&&(c(j,"dir",b.langdir),c(j,"style",b.style),c(j,"vlink",b.visited_color),c(j,"link",b.link_color),c(j,"alink",b.active_color),n.setAttribs(a.getBody(),{style:b.style,dir:b.dir,vLink:b.visited_color,link:b.link_color,aLink:b.active_color})),j=f.getAll("html")[0],j&&(c(j,"lang",b.langcode),c(j,"xml:lang",b.langcode)),g.firstChild||g.remove(),h=new tinymce.html.Serializer({validate:!1,indent:!0,apply_source_formatting:!0,indent_before:"head,html,body,meta,title,script,link,style",indent_after:"head,html,body,meta,title,script,link,style"}).serialize(f),i=h.substring(0,h.indexOf("</body>"))}function e(){return new tinymce.html.DomParser({validate:!1,root_name:"#document"}).parse(i)}function f(b){function c(a){return a.replace(/<\/?[A-Z]+/g,function(a){return a.toLowerCase()})}var d,f,h,l,m=b.content,n="",o=a.dom;if(!b.selection&&!("raw"==b.format&&i||b.source_view&&a.getParam("fullpage_hide_in_source_view"))){0!==m.length||b.source_view||(m=tinymce.trim(i)+"\n"+tinymce.trim(m)+"\n"+tinymce.trim(j)),m=m.replace(/<(\/?)BODY/gi,"<$1body"),d=m.indexOf("<body"),-1!=d?(d=m.indexOf(">",d),i=c(m.substring(0,d+1)),f=m.indexOf("</body",d),-1==f&&(f=m.length),b.content=m.substring(d+1,f),j=c(m.substring(f))):(i=g(),j="\n</body>\n</html>"),h=e(),k(h.getAll("style"),function(a){a.firstChild&&(n+=a.firstChild.value)}),l=h.getAll("body")[0],l&&o.setAttribs(a.getBody(),{style:l.attr("style")||"",dir:l.attr("dir")||"",vLink:l.attr("vlink")||"",link:l.attr("link")||"",aLink:l.attr("alink")||""}),o.remove("fullpage_styles");var p=a.getDoc().getElementsByTagName("head")[0];n&&(o.add(p,"style",{id:"fullpage_styles"},n),l=o.get("fullpage_styles"),l.styleSheet&&(l.styleSheet.cssText=n));var q={};tinymce.each(p.getElementsByTagName("link"),function(a){"stylesheet"==a.rel&&a.getAttribute("data-mce-fullpage")&&(q[a.href]=a)}),tinymce.each(h.getAll("link"),function(a){var b=a.attr("href");q[b]||"stylesheet"!=a.attr("rel")||o.add(p,"link",{rel:"stylesheet",text:"text/css",href:b,"data-mce-fullpage":"1"}),delete q[b]}),tinymce.each(q,function(a){a.parentNode.removeChild(a)})}}function g(){var b,c="",d="";return a.getParam("fullpage_default_xml_pi")&&(c+='<?xml version="1.0" encoding="'+a.getParam("fullpage_default_encoding","ISO-8859-1")+'" ?>\n'),c+=a.getParam("fullpage_default_doctype","<!DOCTYPE html>"),c+="\n<html>\n<head>\n",(b=a.getParam("fullpage_default_title"))&&(c+="<title>"+b+"</title>\n"),(b=a.getParam("fullpage_default_encoding"))&&(c+='<meta http-equiv="Content-Type" content="text/html; charset='+b+'" />\n'),(b=a.getParam("fullpage_default_font_family"))&&(d+="font-family: "+b+";"),(b=a.getParam("fullpage_default_font_size"))&&(d+="font-size: "+b+";"),(b=a.getParam("fullpage_default_text_color"))&&(d+="color: "+b+";"),c+="</head>\n<body"+(d?' style="'+d+'"':"")+">\n"}function h(b){b.selection||b.source_view&&a.getParam("fullpage_hide_in_source_view")||(b.content=tinymce.trim(i)+"\n"+tinymce.trim(b.content)+"\n"+tinymce.trim(j))}var i,j,k=tinymce.each,l=tinymce.html.Node;a.addCommand("mceFullPageProperties",b),a.addButton("fullpage",{title:"Document properties",cmd:"mceFullPageProperties"}),a.addMenuItem("fullpage",{text:"Document properties",cmd:"mceFullPageProperties",context:"file"}),a.on("BeforeSetContent",f),a.on("GetContent",h)});
@@ -0,0 +1,136 @@
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('fullscreen', function(editor) {
14
+ var fullscreenState = false, DOM = tinymce.DOM, iframeWidth, iframeHeight, resizeHandler;
15
+ var containerWidth, containerHeight;
16
+
17
+ if (editor.settings.inline) {
18
+ return;
19
+ }
20
+
21
+ function getWindowSize() {
22
+ var w, h, win = window, doc = document;
23
+ var body = doc.body;
24
+
25
+ // Old IE
26
+ if (body.offsetWidth) {
27
+ w = body.offsetWidth;
28
+ h = body.offsetHeight;
29
+ }
30
+
31
+ // Modern browsers
32
+ if (win.innerWidth && win.innerHeight) {
33
+ w = win.innerWidth;
34
+ h = win.innerHeight;
35
+ }
36
+
37
+ return {w: w, h: h};
38
+ }
39
+
40
+ function toggleFullscreen() {
41
+ var body = document.body, documentElement = document.documentElement, editorContainerStyle;
42
+ var editorContainer, iframe, iframeStyle;
43
+
44
+ function resize() {
45
+ DOM.setStyle(iframe, 'height', getWindowSize().h - (editorContainer.clientHeight - iframe.clientHeight));
46
+ }
47
+
48
+ fullscreenState = !fullscreenState;
49
+
50
+ editorContainer = editor.getContainer();
51
+ editorContainerStyle = editorContainer.style;
52
+ iframe = editor.getContentAreaContainer().firstChild;
53
+ iframeStyle = iframe.style;
54
+
55
+ if (fullscreenState) {
56
+ iframeWidth = iframeStyle.width;
57
+ iframeHeight = iframeStyle.height;
58
+ iframeStyle.width = iframeStyle.height = '100%';
59
+ containerWidth = editorContainerStyle.width;
60
+ containerHeight = editorContainerStyle.height;
61
+ editorContainerStyle.width = editorContainerStyle.height = '';
62
+
63
+ DOM.addClass(body, 'mce-fullscreen');
64
+ DOM.addClass(documentElement, 'mce-fullscreen');
65
+ DOM.addClass(editorContainer, 'mce-fullscreen');
66
+
67
+ DOM.bind(window, 'resize', resize);
68
+ resize();
69
+ resizeHandler = resize;
70
+ } else {
71
+ iframeStyle.width = iframeWidth;
72
+ iframeStyle.height = iframeHeight;
73
+
74
+ if (containerWidth) {
75
+ editorContainerStyle.width = containerWidth;
76
+ }
77
+
78
+ if (containerHeight) {
79
+ editorContainerStyle.height = containerHeight;
80
+ }
81
+
82
+ DOM.removeClass(body, 'mce-fullscreen');
83
+ DOM.removeClass(documentElement, 'mce-fullscreen');
84
+ DOM.removeClass(editorContainer, 'mce-fullscreen');
85
+ DOM.unbind(window, 'resize', resizeHandler);
86
+ }
87
+
88
+ editor.fire('FullscreenStateChanged', {state: fullscreenState});
89
+ }
90
+
91
+ editor.on('init', function() {
92
+ editor.addShortcut('Ctrl+Alt+F', '', toggleFullscreen);
93
+ });
94
+
95
+ editor.on('remove', function() {
96
+ if (resizeHandler) {
97
+ DOM.unbind(window, 'resize', resizeHandler);
98
+ }
99
+ });
100
+
101
+ editor.addCommand('mceFullScreen', toggleFullscreen);
102
+
103
+ editor.addMenuItem('fullscreen', {
104
+ text: 'Fullscreen',
105
+ shortcut: 'Ctrl+Alt+F',
106
+ selectable: true,
107
+ onClick: toggleFullscreen,
108
+ onPostRender: function() {
109
+ var self = this;
110
+
111
+ editor.on('FullscreenStateChanged', function(e) {
112
+ self.active(e.state);
113
+ });
114
+ },
115
+ context: 'view'
116
+ });
117
+
118
+ editor.addButton('fullscreen', {
119
+ tooltip: 'Fullscreen',
120
+ shortcut: 'Ctrl+Alt+F',
121
+ onClick: toggleFullscreen,
122
+ onPostRender: function() {
123
+ var self = this;
124
+
125
+ editor.on('FullscreenStateChanged', function(e) {
126
+ self.active(e.state);
127
+ });
128
+ }
129
+ });
130
+
131
+ return {
132
+ isFullscreen: function() {
133
+ return fullscreenState;
134
+ }
135
+ };
136
+ });
@@ -0,0 +1 @@
1
+ tinymce.PluginManager.add("fullscreen",function(a){function b(){var a,b,c=window,d=document,e=d.body;return e.offsetWidth&&(a=e.offsetWidth,b=e.offsetHeight),c.innerWidth&&c.innerHeight&&(a=c.innerWidth,b=c.innerHeight),{w:a,h:b}}function c(){function c(){j.setStyle(m,"height",b().h-(l.clientHeight-m.clientHeight))}var k,l,m,n,o=document.body,p=document.documentElement;i=!i,l=a.getContainer(),k=l.style,m=a.getContentAreaContainer().firstChild,n=m.style,i?(d=n.width,e=n.height,n.width=n.height="100%",g=k.width,h=k.height,k.width=k.height="",j.addClass(o,"mce-fullscreen"),j.addClass(p,"mce-fullscreen"),j.addClass(l,"mce-fullscreen"),j.bind(window,"resize",c),c(),f=c):(n.width=d,n.height=e,g&&(k.width=g),h&&(k.height=h),j.removeClass(o,"mce-fullscreen"),j.removeClass(p,"mce-fullscreen"),j.removeClass(l,"mce-fullscreen"),j.unbind(window,"resize",f)),a.fire("FullscreenStateChanged",{state:i})}var d,e,f,g,h,i=!1,j=tinymce.DOM;return a.settings.inline?void 0:(a.on("init",function(){a.addShortcut("Ctrl+Alt+F","",c)}),a.on("remove",function(){f&&j.unbind(window,"resize",f)}),a.addCommand("mceFullScreen",c),a.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Alt+F",selectable:!0,onClick:c,onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})},context:"view"}),a.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Ctrl+Alt+F",onClick:c,onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})}}),{isFullscreen:function(){return i}})});
@@ -0,0 +1,30 @@
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('hr', function(editor) {
14
+ editor.addCommand('InsertHorizontalRule', function() {
15
+ editor.execCommand('mceInsertContent', false, '<hr />');
16
+ });
17
+
18
+ editor.addButton('hr', {
19
+ icon: 'hr',
20
+ tooltip: 'Horizontal line',
21
+ cmd: 'InsertHorizontalRule'
22
+ });
23
+
24
+ editor.addMenuItem('hr', {
25
+ icon: 'hr',
26
+ text: 'Horizontal line',
27
+ cmd: 'InsertHorizontalRule',
28
+ context: 'insert'
29
+ });
30
+ });
@@ -0,0 +1 @@
1
+ tinymce.PluginManager.add("hr",function(a){a.addCommand("InsertHorizontalRule",function(){a.execCommand("mceInsertContent",!1,"<hr />")}),a.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),a.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})});
@@ -0,0 +1,439 @@
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('image', function(editor) {
14
+ function getImageSize(url, callback) {
15
+ var img = document.createElement('img');
16
+
17
+ function done(width, height) {
18
+ if (img.parentNode) {
19
+ img.parentNode.removeChild(img);
20
+ }
21
+
22
+ callback({width: width, height: height});
23
+ }
24
+
25
+ img.onload = function() {
26
+ done(img.clientWidth, img.clientHeight);
27
+ };
28
+
29
+ img.onerror = function() {
30
+ done();
31
+ };
32
+
33
+ var style = img.style;
34
+ style.visibility = 'hidden';
35
+ style.position = 'fixed';
36
+ style.bottom = style.left = 0;
37
+ style.width = style.height = 'auto';
38
+
39
+ document.body.appendChild(img);
40
+ img.src = url;
41
+ }
42
+
43
+ function buildListItems(inputList, itemCallback, startItems) {
44
+ function appendItems(values, output) {
45
+ output = output || [];
46
+
47
+ tinymce.each(values, function(item) {
48
+ var menuItem = {text: item.text || item.title};
49
+
50
+ if (item.menu) {
51
+ menuItem.menu = appendItems(item.menu);
52
+ } else {
53
+ menuItem.value = item.value;
54
+ itemCallback(menuItem);
55
+ }
56
+
57
+ output.push(menuItem);
58
+ });
59
+
60
+ return output;
61
+ }
62
+
63
+ return appendItems(inputList, startItems || []);
64
+ }
65
+
66
+ function createImageList(callback) {
67
+ return function() {
68
+ var imageList = editor.settings.image_list;
69
+
70
+ if (typeof(imageList) == "string") {
71
+ tinymce.util.XHR.send({
72
+ url: imageList,
73
+ success: function(text) {
74
+ callback(tinymce.util.JSON.parse(text));
75
+ }
76
+ });
77
+ } else if (typeof(imageList) == "function") {
78
+ imageList(callback);
79
+ } else {
80
+ callback(imageList);
81
+ }
82
+ };
83
+ }
84
+
85
+ function showDialog(imageList) {
86
+ var win, data = {}, dom = editor.dom, imgElm = editor.selection.getNode();
87
+ var width, height, imageListCtrl, classListCtrl, imageDimensions = editor.settings.image_dimensions !== false;
88
+
89
+ function recalcSize() {
90
+ var widthCtrl, heightCtrl, newWidth, newHeight;
91
+
92
+ widthCtrl = win.find('#width')[0];
93
+ heightCtrl = win.find('#height')[0];
94
+
95
+ if (!widthCtrl || !heightCtrl) {
96
+ return;
97
+ }
98
+
99
+ newWidth = widthCtrl.value();
100
+ newHeight = heightCtrl.value();
101
+
102
+ if (win.find('#constrain')[0].checked() && width && height && newWidth && newHeight) {
103
+ if (width != newWidth) {
104
+ newHeight = Math.round((newWidth / width) * newHeight);
105
+ heightCtrl.value(newHeight);
106
+ } else {
107
+ newWidth = Math.round((newHeight / height) * newWidth);
108
+ widthCtrl.value(newWidth);
109
+ }
110
+ }
111
+
112
+ width = newWidth;
113
+ height = newHeight;
114
+ }
115
+
116
+ function onSubmitForm() {
117
+ function waitLoad(imgElm) {
118
+ function selectImage() {
119
+ imgElm.onload = imgElm.onerror = null;
120
+
121
+ if (editor.selection) {
122
+ editor.selection.select(imgElm);
123
+ editor.nodeChanged();
124
+ }
125
+ }
126
+
127
+ imgElm.onload = function() {
128
+ if (!data.width && !data.height && imageDimensions) {
129
+ dom.setAttribs(imgElm, {
130
+ width: imgElm.clientWidth,
131
+ height: imgElm.clientHeight
132
+ });
133
+ }
134
+
135
+ selectImage();
136
+ };
137
+
138
+ imgElm.onerror = selectImage;
139
+ }
140
+
141
+ updateStyle();
142
+ recalcSize();
143
+
144
+ data = tinymce.extend(data, win.toJSON());
145
+
146
+ if (!data.alt) {
147
+ data.alt = '';
148
+ }
149
+
150
+ if (data.width === '') {
151
+ data.width = null;
152
+ }
153
+
154
+ if (data.height === '') {
155
+ data.height = null;
156
+ }
157
+
158
+ if (!data.style) {
159
+ data.style = null;
160
+ }
161
+
162
+ // Setup new data excluding style properties
163
+ data = {
164
+ src: data.src,
165
+ alt: data.alt,
166
+ width: data.width,
167
+ height: data.height,
168
+ style: data.style,
169
+ "class": data["class"]
170
+ };
171
+
172
+ editor.undoManager.transact(function() {
173
+ if (!data.src) {
174
+ if (imgElm) {
175
+ dom.remove(imgElm);
176
+ editor.focus();
177
+ editor.nodeChanged();
178
+ }
179
+
180
+ return;
181
+ }
182
+
183
+ if (!imgElm) {
184
+ data.id = '__mcenew';
185
+ editor.focus();
186
+ editor.selection.setContent(dom.createHTML('img', data));
187
+ imgElm = dom.get('__mcenew');
188
+ dom.setAttrib(imgElm, 'id', null);
189
+ } else {
190
+ dom.setAttribs(imgElm, data);
191
+ }
192
+
193
+ waitLoad(imgElm);
194
+ });
195
+ }
196
+
197
+ function removePixelSuffix(value) {
198
+ if (value) {
199
+ value = value.replace(/px$/, '');
200
+ }
201
+
202
+ return value;
203
+ }
204
+
205
+ function srcChange(e) {
206
+ var meta = e.meta || {};
207
+
208
+ if (imageListCtrl) {
209
+ imageListCtrl.value(editor.convertURL(this.value(), 'src'));
210
+ }
211
+
212
+ tinymce.each(meta, function(value, key) {
213
+ win.find('#' + key).value(value);
214
+ });
215
+
216
+ if (!meta.width && !meta.height) {
217
+ var srcURL = this.value(),
218
+ absoluteURLPattern = new RegExp('^(?:[a-z]+:)?//', 'i'),
219
+ baseURL = editor.settings.document_base_url;
220
+
221
+ //Pattern test the src url and make sure we haven't already prepended the url
222
+ if (baseURL && !absoluteURLPattern.test(srcURL) && srcURL.substring(0, baseURL.length) !== baseURL) {
223
+ this.value(baseURL + srcURL);
224
+ }
225
+
226
+ getImageSize(this.value(), function(data) {
227
+ if (data.width && data.height && imageDimensions) {
228
+ width = data.width;
229
+ height = data.height;
230
+
231
+ win.find('#width').value(width);
232
+ win.find('#height').value(height);
233
+ }
234
+ });
235
+ }
236
+ }
237
+
238
+ width = dom.getAttrib(imgElm, 'width');
239
+ height = dom.getAttrib(imgElm, 'height');
240
+
241
+ if (imgElm.nodeName == 'IMG' && !imgElm.getAttribute('data-mce-object') && !imgElm.getAttribute('data-mce-placeholder')) {
242
+ data = {
243
+ src: dom.getAttrib(imgElm, 'src'),
244
+ alt: dom.getAttrib(imgElm, 'alt'),
245
+ "class": dom.getAttrib(imgElm, 'class'),
246
+ width: width,
247
+ height: height
248
+ };
249
+ } else {
250
+ imgElm = null;
251
+ }
252
+
253
+ if (imageList) {
254
+ imageListCtrl = {
255
+ type: 'listbox',
256
+ label: 'Image list',
257
+ values: buildListItems(
258
+ imageList,
259
+ function(item) {
260
+ item.value = editor.convertURL(item.value || item.url, 'src');
261
+ },
262
+ [{text: 'None', value: ''}]
263
+ ),
264
+ value: data.src && editor.convertURL(data.src, 'src'),
265
+ onselect: function(e) {
266
+ var altCtrl = win.find('#alt');
267
+
268
+ if (!altCtrl.value() || (e.lastControl && altCtrl.value() == e.lastControl.text())) {
269
+ altCtrl.value(e.control.text());
270
+ }
271
+
272
+ win.find('#src').value(e.control.value()).fire('change');
273
+ },
274
+ onPostRender: function() {
275
+ imageListCtrl = this;
276
+ }
277
+ };
278
+ }
279
+
280
+ if (editor.settings.image_class_list) {
281
+ classListCtrl = {
282
+ name: 'class',
283
+ type: 'listbox',
284
+ label: 'Class',
285
+ values: buildListItems(
286
+ editor.settings.image_class_list,
287
+ function(item) {
288
+ if (item.value) {
289
+ item.textStyle = function() {
290
+ return editor.formatter.getCssText({inline: 'img', classes: [item.value]});
291
+ };
292
+ }
293
+ }
294
+ )
295
+ };
296
+ }
297
+
298
+ // General settings shared between simple and advanced dialogs
299
+ var generalFormItems = [
300
+ {
301
+ name: 'src',
302
+ type: 'filepicker',
303
+ filetype: 'image',
304
+ label: 'Source',
305
+ autofocus: true,
306
+ onchange: srcChange
307
+ },
308
+ imageListCtrl
309
+ ];
310
+
311
+ if (editor.settings.image_description !== false) {
312
+ generalFormItems.push({name: 'alt', type: 'textbox', label: 'Image description'});
313
+ }
314
+
315
+ if (imageDimensions) {
316
+ generalFormItems.push({
317
+ type: 'container',
318
+ label: 'Dimensions',
319
+ layout: 'flex',
320
+ direction: 'row',
321
+ align: 'center',
322
+ spacing: 5,
323
+ items: [
324
+ {name: 'width', type: 'textbox', maxLength: 5, size: 3, onchange: recalcSize, ariaLabel: 'Width'},
325
+ {type: 'label', text: 'x'},
326
+ {name: 'height', type: 'textbox', maxLength: 5, size: 3, onchange: recalcSize, ariaLabel: 'Height'},
327
+ {name: 'constrain', type: 'checkbox', checked: true, text: 'Constrain proportions'}
328
+ ]
329
+ });
330
+ }
331
+
332
+ generalFormItems.push(classListCtrl);
333
+
334
+ function updateStyle() {
335
+ function addPixelSuffix(value) {
336
+ if (value.length > 0 && /^[0-9]+$/.test(value)) {
337
+ value += 'px';
338
+ }
339
+
340
+ return value;
341
+ }
342
+
343
+ if (!editor.settings.image_advtab) {
344
+ return;
345
+ }
346
+
347
+ var data = win.toJSON();
348
+ var css = dom.parseStyle(data.style);
349
+
350
+ delete css.margin;
351
+ css['margin-top'] = css['margin-bottom'] = addPixelSuffix(data.vspace);
352
+ css['margin-left'] = css['margin-right'] = addPixelSuffix(data.hspace);
353
+ css['border-width'] = addPixelSuffix(data.border);
354
+
355
+ win.find('#style').value(dom.serializeStyle(dom.parseStyle(dom.serializeStyle(css))));
356
+ }
357
+
358
+ if (editor.settings.image_advtab) {
359
+ // Parse styles from img
360
+ if (imgElm) {
361
+ data.hspace = removePixelSuffix(imgElm.style.marginLeft || imgElm.style.marginRight);
362
+ data.vspace = removePixelSuffix(imgElm.style.marginTop || imgElm.style.marginBottom);
363
+ data.border = removePixelSuffix(imgElm.style.borderWidth);
364
+ data.style = editor.dom.serializeStyle(editor.dom.parseStyle(editor.dom.getAttrib(imgElm, 'style')));
365
+ }
366
+
367
+ // Advanced dialog shows general+advanced tabs
368
+ win = editor.windowManager.open({
369
+ title: 'Insert/edit image',
370
+ data: data,
371
+ bodyType: 'tabpanel',
372
+ body: [
373
+ {
374
+ title: 'General',
375
+ type: 'form',
376
+ items: generalFormItems
377
+ },
378
+
379
+ {
380
+ title: 'Advanced',
381
+ type: 'form',
382
+ pack: 'start',
383
+ items: [
384
+ {
385
+ label: 'Style',
386
+ name: 'style',
387
+ type: 'textbox'
388
+ },
389
+ {
390
+ type: 'form',
391
+ layout: 'grid',
392
+ packV: 'start',
393
+ columns: 2,
394
+ padding: 0,
395
+ alignH: ['left', 'right'],
396
+ defaults: {
397
+ type: 'textbox',
398
+ maxWidth: 50,
399
+ onchange: updateStyle
400
+ },
401
+ items: [
402
+ {label: 'Vertical space', name: 'vspace'},
403
+ {label: 'Horizontal space', name: 'hspace'},
404
+ {label: 'Border', name: 'border'}
405
+ ]
406
+ }
407
+ ]
408
+ }
409
+ ],
410
+ onSubmit: onSubmitForm
411
+ });
412
+ } else {
413
+ // Simple default dialog
414
+ win = editor.windowManager.open({
415
+ title: 'Insert/edit image',
416
+ data: data,
417
+ body: generalFormItems,
418
+ onSubmit: onSubmitForm
419
+ });
420
+ }
421
+ }
422
+
423
+ editor.addButton('image', {
424
+ icon: 'image',
425
+ tooltip: 'Insert/edit image',
426
+ onclick: createImageList(showDialog),
427
+ stateSelector: 'img:not([data-mce-object],[data-mce-placeholder])'
428
+ });
429
+
430
+ editor.addMenuItem('image', {
431
+ icon: 'image',
432
+ text: 'Insert image',
433
+ onclick: createImageList(showDialog),
434
+ context: 'insert',
435
+ prependToContext: true
436
+ });
437
+
438
+ editor.addCommand('mceImage', createImageList(showDialog));
439
+ });