diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 90e97afc66..1c357a0588 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -12,10 +12,6 @@ Studio: Support for viewing built-in tabs on the Pages page. STUD-1193 Blades: Fixed bug when image mapped input's Show Answer multiplies rectangles on many inputtypes. BLD-810. -Studio and LMS: Upgrade version of TinyMCE to 4.0.16. Switch from tabbed Visual/HTML -Editor for HTML modules to showing the code editor as a plugin within TinyMCE (triggered -from toolbar). STUD-1422 - LMS: Enabled screen reader feedback of problem responses. LMS-2158 diff --git a/cms/djangoapps/contentstore/features/common.py b/cms/djangoapps/contentstore/features/common.py index 33030e57e5..270a395648 100644 --- a/cms/djangoapps/contentstore/features/common.py +++ b/cms/djangoapps/contentstore/features/common.py @@ -318,23 +318,19 @@ def i_am_shown_a_notification(step): assert world.is_css_present('.wrapper-prompt') -def type_in_codemirror(index, text, find_prefix="$"): +def type_in_codemirror(index, text): script = """ - var cm = {find_prefix}('div.CodeMirror:eq({index})').get(0).CodeMirror; + var cm = $('div.CodeMirror:eq({})').get(0).CodeMirror; cm.getInputField().focus(); cm.setValue(arguments[0]); - cm.getInputField().blur();""".format(index=index, find_prefix=find_prefix) + cm.getInputField().blur();""".format(index) world.browser.driver.execute_script(script, str(text)) world.wait_for_ajax_complete() - -def get_codemirror_value(index=0, find_prefix="$"): - return world.browser.driver.execute_script( - """ - return {find_prefix}('div.CodeMirror:eq({index})').get(0).CodeMirror.getValue(); - """.format(index=index, find_prefix=find_prefix) - ) - +def get_codemirror_value(index=0): + return world.browser.driver.execute_script(""" + return $('div.CodeMirror:eq({})').get(0).CodeMirror.getValue(); + """.format(index)) def upload_file(filename): path = os.path.join(TEST_ROOT, filename) diff --git a/cms/djangoapps/contentstore/features/html-editor.feature b/cms/djangoapps/contentstore/features/html-editor.feature index a23bc4650d..6472f367b7 100644 --- a/cms/djangoapps/contentstore/features/html-editor.feature +++ b/cms/djangoapps/contentstore/features/html-editor.feature @@ -22,50 +22,6 @@ Feature: CMS.HTML Editor Scenario: TinyMCE image plugin sets urls correctly Given I have created a Blank HTML Page - When I edit the page - And I add an image with static link "/static/image.jpg" via the Image Plugin Icon - Then the src link is rewritten to "c4x/MITx/999/asset/image.jpg" - And the link is shown as "/static/image.jpg" in the Image Plugin - - Scenario: TinyMCE link plugin sets urls correctly - Given I have created a Blank HTML Page - When I edit the page - And I add a link with static link "/static/image.jpg" via the Link Plugin Icon - Then the href link is rewritten to "c4x/MITx/999/asset/image.jpg" - And the link is shown as "/static/image.jpg" in the Link Plugin - - Scenario: TinyMCE and CodeMirror preserve style tags - Given I have created a Blank HTML Page - When I edit the page - And type "
pages
" in the code editor and press OK - And I save the page - Then the page text contains: - """ -pages
- - """ - - Scenario: TinyMCE toolbar buttons are as expected - Given I have created a Blank HTML Page - When I edit the page - Then the expected toolbar buttons are displayed - - Scenario: Static links are converted when switching between code editor and WYSIWYG views - Given I have created a Blank HTML Page - When I edit the page - And type "
" in the code editor and press OK
- Then the src link is rewritten to "c4x/MITx/999/asset/image.jpg"
- And the code editor displays "
display as code
<problem> + <p></p>+
]*>/gi,"[quote]");b(/<\/blockquote>/gi,"[/quote]");b(/
/gi,"\n");b(/
/gi,"\n");b(/
/gi,"\n");b(//gi,"");b(/<\/p>/gi,"\n");b(/ |\u00a0/gi," ");b(/"/gi,'"');b(/</gi,"<");b(/>/gi,">");b(/&/gi,"&");return a},_punbb_bbcode2html:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/\n/gi,"
");b(/\[b\]/gi,"");b(/\[\/b\]/gi,"");b(/\[i\]/gi,"");b(/\[\/i\]/gi,"");b(/\[u\]/gi,"");b(/\[\/u\]/gi,"");b(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'$2');b(/\[url\](.*?)\[\/url\]/gi,'$1');b(/\[img\](.*?)\[\/img\]/gi,'');b(/\[color=(.*?)\](.*?)\[\/color\]/gi,'$2');b(/\[code\](.*?)\[\/code\]/gi,'$1 ');b(/\[quote.*?\](.*?)\[\/quote\]/gi,'$1 ');return a}});tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)})(); \ No newline at end of file diff --git a/common/static/js/vendor/tiny_mce/plugins/bbcode/editor_plugin_src.js b/common/static/js/vendor/tiny_mce/plugins/bbcode/editor_plugin_src.js new file mode 100644 index 0000000000..12cdacaa58 --- /dev/null +++ b/common/static/js/vendor/tiny_mce/plugins/bbcode/editor_plugin_src.js @@ -0,0 +1,120 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.BBCodePlugin', { + init : function(ed, url) { + var t = this, dialect = ed.getParam('bbcode_dialect', 'punbb').toLowerCase(); + + ed.onBeforeSetContent.add(function(ed, o) { + o.content = t['_' + dialect + '_bbcode2html'](o.content); + }); + + ed.onPostProcess.add(function(ed, o) { + if (o.set) + o.content = t['_' + dialect + '_bbcode2html'](o.content); + + if (o.get) + o.content = t['_' + dialect + '_html2bbcode'](o.content); + }); + }, + + getInfo : function() { + return { + longname : 'BBCode Plugin', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private methods + + // HTML -> BBCode in PunBB dialect + _punbb_html2bbcode : function(s) { + s = tinymce.trim(s); + + function rep(re, str) { + s = s.replace(re, str); + }; + + // example: to [b] + rep(/
(.*?)<\/a>/gi,"[url=$1]$2[/url]"); + rep(/ (.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"); + rep(/ (.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"); + rep(/ (.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"); + rep(/ (.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"); + rep(/(.*?)<\/span>/gi,"[color=$1]$2[/color]"); + rep(/ (.*?)<\/font>/gi,"[color=$1]$2[/color]"); + rep(/(.*?)<\/span>/gi,"[size=$1]$2[/size]"); + rep(/(.*?)<\/font>/gi,"$1"); + rep(/ /gi,"[img]$1[/img]"); + rep(/(.*?)<\/span>/gi,"[code]$1[/code]"); + rep(/(.*?)<\/span>/gi,"[quote]$1[/quote]"); + rep(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"); + rep(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"); + rep(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"); + rep(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"); + rep(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"); + rep(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"); + rep(/<\/(strong|b)>/gi,"[/b]"); + rep(/<(strong|b)>/gi,"[b]"); + rep(/<\/(em|i)>/gi,"[/i]"); + rep(/<(em|i)>/gi,"[i]"); + rep(/<\/u>/gi,"[/u]"); + rep(/(.*?)<\/span>/gi,"[u]$1[/u]"); + rep(//gi,"[u]"); + rep(/ ]*>/gi,"[quote]"); + rep(/<\/blockquote>/gi,"[/quote]"); + rep(/
/gi,"\n"); + rep(/
/gi,"\n"); + rep(/
/gi,"\n"); + rep(//gi,""); + rep(/<\/p>/gi,"\n"); + rep(/ |\u00a0/gi," "); + rep(/"/gi,"\""); + rep(/</gi,"<"); + rep(/>/gi,">"); + rep(/&/gi,"&"); + + return s; + }, + + // BBCode -> HTML from PunBB dialect + _punbb_bbcode2html : function(s) { + s = tinymce.trim(s); + + function rep(re, str) { + s = s.replace(re, str); + }; + + // example: [b] to + rep(/\n/gi,"
"); + rep(/\[b\]/gi,""); + rep(/\[\/b\]/gi,""); + rep(/\[i\]/gi,""); + rep(/\[\/i\]/gi,""); + rep(/\[u\]/gi,""); + rep(/\[\/u\]/gi,""); + rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"$2"); + rep(/\[url\](.*?)\[\/url\]/gi,"$1"); + rep(/\[img\](.*?)\[\/img\]/gi,""); + rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"$2"); + rep(/\[code\](.*?)\[\/code\]/gi,"$1 "); + rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"$1 "); + + return s; + } + }); + + // Register plugin + tinymce.PluginManager.add('bbcode', tinymce.plugins.BBCodePlugin); +})(); \ No newline at end of file diff --git a/common/static/js/vendor/tiny_mce/plugins/bbcode/plugin.min.js b/common/static/js/vendor/tiny_mce/plugins/bbcode/plugin.min.js deleted file mode 100644 index 70a88a7d69..0000000000 --- a/common/static/js/vendor/tiny_mce/plugins/bbcode/plugin.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(e){var t=this,n=e.getParam("bbcode_dialect","punbb").toLowerCase();e.on("beforeSetContent",function(e){e.content=t["_"+n+"_bbcode2html"](e.content)}),e.on("postProcess",function(e){e.set&&(e.content=t["_"+n+"_bbcode2html"](e.content)),e.get&&(e.content=t["_"+n+"_html2bbcode"](e.content))})},getInfo:function(){return{longname:"BBCode Plugin",author:"Moxiecode Systems AB",authorurl:"http://www.tinymce.com",infourl:"http://www.tinymce.com/wiki.php/Plugin:bbcode"}},_punbb_html2bbcode:function(e){function t(t,n){e=e.replace(t,n)}return e=tinymce.trim(e),t(/
(.*?)<\/a>/gi,"[url=$1]$2[/url]"),t(/ (.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),t(/ (.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),t(/ (.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),t(/ (.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),t(/(.*?)<\/span>/gi,"[color=$1]$2[/color]"),t(/ (.*?)<\/font>/gi,"[color=$1]$2[/color]"),t(/(.*?)<\/span>/gi,"[size=$1]$2[/size]"),t(/(.*?)<\/font>/gi,"$1"),t(/ /gi,"[img]$1[/img]"),t(/(.*?)<\/span>/gi,"[code]$1[/code]"),t(/(.*?)<\/span>/gi,"[quote]$1[/quote]"),t(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),t(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),t(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),t(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),t(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),t(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),t(/<\/(strong|b)>/gi,"[/b]"),t(/<(strong|b)>/gi,"[b]"),t(/<\/(em|i)>/gi,"[/i]"),t(/<(em|i)>/gi,"[i]"),t(/<\/u>/gi,"[/u]"),t(/(.*?)<\/span>/gi,"[u]$1[/u]"),t(//gi,"[u]"),t(/ ]*>/gi,"[quote]"),t(/<\/blockquote>/gi,"[/quote]"),t(/
/gi,"\n"),t(/
/gi,"\n"),t(/
/gi,"\n"),t(//gi,""),t(/<\/p>/gi,"\n"),t(/ |\u00a0/gi," "),t(/"/gi,'"'),t(/</gi,"<"),t(/>/gi,">"),t(/&/gi,"&"),e},_punbb_bbcode2html:function(e){function t(t,n){e=e.replace(t,n)}return e=tinymce.trim(e),t(/\n/gi,"
"),t(/\[b\]/gi,""),t(/\[\/b\]/gi,""),t(/\[i\]/gi,""),t(/\[\/i\]/gi,""),t(/\[u\]/gi,""),t(/\[\/u\]/gi,""),t(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'$2'),t(/\[url\](.*?)\[\/url\]/gi,'$1'),t(/\[img\](.*?)\[\/img\]/gi,''),t(/\[color=(.*?)\](.*?)\[\/color\]/gi,'$2'),t(/\[code\](.*?)\[\/code\]/gi,'$1 '),t(/\[quote.*?\](.*?)\[\/quote\]/gi,'$1 '),e}}),tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)}(); \ No newline at end of file diff --git a/common/static/js/vendor/tiny_mce/plugins/charmap/plugin.min.js b/common/static/js/vendor/tiny_mce/plugins/charmap/plugin.min.js deleted file mode 100644 index dff18e6e55..0000000000 --- a/common/static/js/vendor/tiny_mce/plugins/charmap/plugin.min.js +++ /dev/null @@ -1 +0,0 @@ -tinymce.PluginManager.add("charmap",function(e){function t(){function t(e){for(;e;){if("TD"==e.nodeName)return e;e=e.parentNode}}var i,a,r,o;i='
';var s=25;for(r=0;10>r;r++){for(i+="
";var u={type:"container",html:i,onclick:function(t){var n=t.target;"DIV"==n.nodeName&&e.execCommand("mceInsertContent",!1,n.firstChild.nodeValue)},onmouseover:function(e){var n=t(e.target);n&&o.find("#preview").text(n.firstChild.firstChild.data)}};o=e.windowManager.open({title:"Special character",spacing:10,padding:10,items:[u,{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:100,minHeight:80}],buttons:[{text:"Close",onclick:function(){o.close()}}]})}var n=[["160","no-break space"],["38","ampersand"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["221","Y - acute"],["376","Y - diaeresis"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"],["173","soft hyphen"]];e.addButton("charmap",{icon:"charmap",tooltip:"Special character",onclick:t}),e.addMenuItem("charmap",{icon:"charmap",text:"Special character",onclick:t,context:"insert"})}); \ No newline at end of file diff --git a/common/static/js/vendor/tiny_mce/plugins/code/plugin.min.js b/common/static/js/vendor/tiny_mce/plugins/code/plugin.min.js deleted file mode 100644 index 9e7e89895e..0000000000 --- a/common/static/js/vendor/tiny_mce/plugins/code/plugin.min.js +++ /dev/null @@ -1 +0,0 @@ -tinymce.PluginManager.add("code",function(e){function o(){e.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:e.getParam("code_dialog_width",600),minHeight:e.getParam("code_dialog_height",Math.min(tinymce.DOM.getViewPort().h-200,500)),value:e.getContent({source_view:!0}),spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(o){e.focus(),e.undoManager.transact(function(){e.setContent(o.data.code)}),e.selection.setCursorLocation(),e.nodeChanged()}})}e.addCommand("mceCodeEditor",o),e.addButton("code",{icon:"code",tooltip:"Source code",onclick:o}),e.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:o})}); \ No newline at end of file diff --git a/common/static/js/vendor/tiny_mce/plugins/codemirror/LICENSE.txt b/common/static/js/vendor/tiny_mce/plugins/codemirror/LICENSE.txt deleted file mode 100644 index 0075380be8..0000000000 --- a/common/static/js/vendor/tiny_mce/plugins/codemirror/LICENSE.txt +++ /dev/null @@ -1,193 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - Copyright 2013 Arjan Haverkamp (arjan@avoid.org) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/common/static/js/vendor/tiny_mce/plugins/codemirror/README.txt b/common/static/js/vendor/tiny_mce/plugins/codemirror/README.txt deleted file mode 100644 index 038dd804d1..0000000000 --- a/common/static/js/vendor/tiny_mce/plugins/codemirror/README.txt +++ /dev/null @@ -1,26 +0,0 @@ -+=========================+ -| CodeMirror for TinyMCE4 | -+=========================+ - -(c) 2013-2014 Arjan Haverkamp (arjan@avoid.org) -Download: http://www.avoid.org/codemirror-for-tinymce4/ -Version: 1.3 (2014-03-04) -License: see LICENSE.txt - -Changelog -========= -Version 1.3 - 2014-03-04 -- Bugfix: If any text was highlighted in CodeMirror and the code dialog is closed and saved, - the selected text was removed from TinyMCE. -- Macintosh users now see Macintosh keyboard shortcuts. - -Version 1.2 - 2013-09-04 -- Dirty state of CodeMirror now passed on to TinyMCE. -- When submitting CodeMirror code to TinyMCE, cursor position is retained. - Note: this only works when the cursor is *not* inside a",a=0;s>a;a++){var l=n[r*s+a],c="g"+(r*s+a);i+=' "}i+=""}i+=" '+(l?String.fromCharCode(parseInt(l[0],10)):" ")+". - -Version 1.1 - 2013-07-19 -- New options jsFiles and cssFiles. - -Version 1.0 - 2013-06-29 -- Initial release. diff --git a/common/static/js/vendor/tiny_mce/plugins/codemirror/langs/en.js b/common/static/js/vendor/tiny_mce/plugins/codemirror/langs/en.js deleted file mode 100644 index d5e0bbde43..0000000000 --- a/common/static/js/vendor/tiny_mce/plugins/codemirror/langs/en.js +++ /dev/null @@ -1,8 +0,0 @@ -tinymce.addI18n('en',{ - 'HTML source code': 'HTML source code', - 'Start search': 'Start search', - 'Find next': 'Find next', - 'Find previous': 'Find previous', - 'Replace': 'Replace', - 'Replace all': 'Replace all' -}); diff --git a/common/static/js/vendor/tiny_mce/plugins/codemirror/langs/nl.js b/common/static/js/vendor/tiny_mce/plugins/codemirror/langs/nl.js deleted file mode 100644 index 1c23c232af..0000000000 --- a/common/static/js/vendor/tiny_mce/plugins/codemirror/langs/nl.js +++ /dev/null @@ -1,8 +0,0 @@ -tinymce.addI18n('nl',{ - 'HTML source code': 'HTML broncode', - 'Start search': 'Start zoeken', - 'Find next': 'Zoek volgende', - 'Find previous': 'Zoek vorige', - 'Replace': 'Vervang', - 'Replace all': 'Vervang alle' -}); diff --git a/common/static/js/vendor/tiny_mce/plugins/codemirror/plugin.js b/common/static/js/vendor/tiny_mce/plugins/codemirror/plugin.js deleted file mode 100644 index 9c58127f27..0000000000 --- a/common/static/js/vendor/tiny_mce/plugins/codemirror/plugin.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * plugin.js - * - * Copyright 2013 Web Power, www.webpower.nl - * @author Arjan Haverkamp - */ - -/*jshint unused:false */ -/*global tinymce:true */ - -tinymce.PluginManager.requireLangPack('codemirror'); - -tinymce.PluginManager.add('codemirror', function(editor, url) { - - function showSourceEditor() { - // Insert caret marker - editor.focus(); - editor.selection.collapse(true); - editor.selection.setContent(''); - - // Open editor window - var win = editor.windowManager.open({ - title: 'HTML source code', - url: url + '/source.html', - width: 800, - height: 550, - resizable : true, - maximizable : true, - buttons: [ - { text: 'Ok', subtype: 'primary', onclick: function(){ - var doc = document.querySelectorAll('.mce-container-body>iframe')[0]; - doc.contentWindow.submit(); - win.close(); - }}, - { text: 'Cancel', onclick: 'close' } - ] - }); - }; - - // Add a button to the button bar - // EDX changed to show "HTML" on toolbar button - editor.addButton('code', { - title: 'Edit HTML', - text: 'HTML', - icon: false, - onclick: showSourceEditor - }); - - // Add a menu item to the tools menu - editor.addMenuItem('code', { - icon: 'code', - text: 'Edit HTML', - context: 'tools', - onclick: showSourceEditor - }); -}); diff --git a/common/static/js/vendor/tiny_mce/plugins/codemirror/plugin.min.js b/common/static/js/vendor/tiny_mce/plugins/codemirror/plugin.min.js deleted file mode 100644 index 05ad0a5597..0000000000 --- a/common/static/js/vendor/tiny_mce/plugins/codemirror/plugin.min.js +++ /dev/null @@ -1,3 +0,0 @@ -tinymce.PluginManager.requireLangPack("codemirror"); -tinymce.PluginManager.add("codemirror",function(a,c){function b(){a.focus();a.selection.collapse(!0);a.selection.setContent('');var b=a.windowManager.open({title:"HTML source code",url:c+"/source.html",width:800,height:550,resizable:!0,maximizable:!0,buttons:[{text:"Ok",subtype:"primary",onclick:function(){document.querySelectorAll(".mce-container-body>iframe")[0].contentWindow.submit();b.close()}},{text:"Cancel",onclick:"close"}]})}a.addButton("code", -{title:"Edit HTML",text:"HTML",icon:false,onclick:b});a.addMenuItem("code",{icon:"code",text:"Edit HTML",context:"tools",onclick:b})}); diff --git a/common/static/js/vendor/tiny_mce/plugins/codemirror/source.html b/common/static/js/vendor/tiny_mce/plugins/codemirror/source.html deleted file mode 100644 index 15de3748ab..0000000000 --- a/common/static/js/vendor/tiny_mce/plugins/codemirror/source.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - - diff --git a/common/static/js/vendor/tiny_mce/plugins/contextmenu/editor_plugin.js b/common/static/js/vendor/tiny_mce/plugins/contextmenu/editor_plugin.js new file mode 100644 index 0000000000..2ed042c3ae --- /dev/null +++ b/common/static/js/vendor/tiny_mce/plugins/contextmenu/editor_plugin.js @@ -0,0 +1 @@ +(function(){var a=tinymce.dom.Event,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.ContextMenu",{init:function(f){var i=this,g,d,j,e;i.editor=f;d=f.settings.contextmenu_never_use_native;i.onContextMenu=new tinymce.util.Dispatcher(this);e=function(k){h(f,k)};g=f.onContextMenu.add(function(k,l){if((j!==0?j:l.ctrlKey)&&!d){return}a.cancel(l);if(l.target.nodeName=="IMG"){k.selection.select(l.target)}i._getMenu(k).showMenu(l.clientX||l.pageX,l.clientY||l.pageY);a.add(k.getDoc(),"click",e);k.nodeChanged()});f.onRemove.add(function(){if(i._menu){i._menu.removeAll()}});function h(k,l){j=0;if(l&&l.button==2){j=l.ctrlKey;return}if(i._menu){i._menu.removeAll();i._menu.destroy();a.remove(k.getDoc(),"click",e);i._menu=null}}f.onMouseDown.add(h);f.onKeyDown.add(h);f.onKeyDown.add(function(k,l){if(l.shiftKey&&!l.ctrlKey&&!l.altKey&&l.keyCode===121){a.cancel(l);g(k,l)}})},getInfo:function(){return{longname:"Contextmenu",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getMenu:function(e){var g=this,d=g._menu,j=e.selection,f=j.isCollapsed(),h=j.getNode()||e.getBody(),i,k;if(d){d.removeAll();d.destroy()}k=b.getPos(e.getContentAreaContainer());d=e.controlManager.createDropMenu("contextmenu",{offset_x:k.x+e.getParam("contextmenu_offset_x",0),offset_y:k.y+e.getParam("contextmenu_offset_y",0),constrain:1,keyboard_focus:true});g._menu=d;d.add({title:"advanced.cut_desc",icon:"cut",cmd:"Cut"}).setDisabled(f);d.add({title:"advanced.copy_desc",icon:"copy",cmd:"Copy"}).setDisabled(f);d.add({title:"advanced.paste_desc",icon:"paste",cmd:"Paste"});if((h.nodeName=="A"&&!e.dom.getAttrib(h,"name"))||!f){d.addSeparator();d.add({title:"advanced.link_desc",icon:"link",cmd:e.plugins.advlink?"mceAdvLink":"mceLink",ui:true});d.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"})}d.addSeparator();d.add({title:"advanced.image_desc",icon:"image",cmd:e.plugins.advimage?"mceAdvImage":"mceImage",ui:true});d.addSeparator();i=d.addMenu({title:"contextmenu.align"});i.add({title:"contextmenu.left",icon:"justifyleft",cmd:"JustifyLeft"});i.add({title:"contextmenu.center",icon:"justifycenter",cmd:"JustifyCenter"});i.add({title:"contextmenu.right",icon:"justifyright",cmd:"JustifyRight"});i.add({title:"contextmenu.full",icon:"justifyfull",cmd:"JustifyFull"});g.onContextMenu.dispatch(g,d,h,f);return d}});tinymce.PluginManager.add("contextmenu",tinymce.plugins.ContextMenu)})(); \ No newline at end of file diff --git a/common/static/js/vendor/tiny_mce/plugins/contextmenu/editor_plugin_src.js b/common/static/js/vendor/tiny_mce/plugins/contextmenu/editor_plugin_src.js new file mode 100644 index 0000000000..237cbf5b0a --- /dev/null +++ b/common/static/js/vendor/tiny_mce/plugins/contextmenu/editor_plugin_src.js @@ -0,0 +1,163 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var Event = tinymce.dom.Event, each = tinymce.each, DOM = tinymce.DOM; + + /** + * This plugin a context menu to TinyMCE editor instances. + * + * @class tinymce.plugins.ContextMenu + */ + tinymce.create('tinymce.plugins.ContextMenu', { + /** + * Initializes the plugin, this will be executed after the plugin has been created. + * This call is done before the editor instance has finished it's initialization so use the onInit event + * of the editor instance to intercept that event. + * + * @method init + * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. + * @param {string} url Absolute URL to where the plugin is located. + */ + init : function(ed) { + var t = this, showMenu, contextmenuNeverUseNative, realCtrlKey, hideMenu; + + t.editor = ed; + + contextmenuNeverUseNative = ed.settings.contextmenu_never_use_native; + + /** + * This event gets fired when the context menu is shown. + * + * @event onContextMenu + * @param {tinymce.plugins.ContextMenu} sender Plugin instance sending the event. + * @param {tinymce.ui.DropMenu} menu Drop down menu to fill with more items if needed. + */ + t.onContextMenu = new tinymce.util.Dispatcher(this); + + hideMenu = function(e) { + hide(ed, e); + }; + + showMenu = ed.onContextMenu.add(function(ed, e) { + // Block TinyMCE menu on ctrlKey and work around Safari issue + if ((realCtrlKey !== 0 ? realCtrlKey : e.ctrlKey) && !contextmenuNeverUseNative) + return; + + Event.cancel(e); + + // Select the image if it's clicked. WebKit would other wise expand the selection + if (e.target.nodeName == 'IMG') + ed.selection.select(e.target); + + t._getMenu(ed).showMenu(e.clientX || e.pageX, e.clientY || e.pageY); + Event.add(ed.getDoc(), 'click', hideMenu); + + ed.nodeChanged(); + }); + + ed.onRemove.add(function() { + if (t._menu) + t._menu.removeAll(); + }); + + function hide(ed, e) { + realCtrlKey = 0; + + // Since the contextmenu event moves + // the selection we need to store it away + if (e && e.button == 2) { + realCtrlKey = e.ctrlKey; + return; + } + + if (t._menu) { + t._menu.removeAll(); + t._menu.destroy(); + Event.remove(ed.getDoc(), 'click', hideMenu); + t._menu = null; + } + }; + + ed.onMouseDown.add(hide); + ed.onKeyDown.add(hide); + ed.onKeyDown.add(function(ed, e) { + if (e.shiftKey && !e.ctrlKey && !e.altKey && e.keyCode === 121) { + Event.cancel(e); + showMenu(ed, e); + } + }); + }, + + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @method getInfo + * @return {Object} Name/value array containing information about the plugin. + */ + getInfo : function() { + return { + longname : 'Contextmenu', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + _getMenu : function(ed) { + var t = this, m = t._menu, se = ed.selection, col = se.isCollapsed(), el = se.getNode() || ed.getBody(), am, p; + + if (m) { + m.removeAll(); + m.destroy(); + } + + p = DOM.getPos(ed.getContentAreaContainer()); + + m = ed.controlManager.createDropMenu('contextmenu', { + offset_x : p.x + ed.getParam('contextmenu_offset_x', 0), + offset_y : p.y + ed.getParam('contextmenu_offset_y', 0), + constrain : 1, + keyboard_focus: true + }); + + t._menu = m; + + m.add({title : 'advanced.cut_desc', icon : 'cut', cmd : 'Cut'}).setDisabled(col); + m.add({title : 'advanced.copy_desc', icon : 'copy', cmd : 'Copy'}).setDisabled(col); + m.add({title : 'advanced.paste_desc', icon : 'paste', cmd : 'Paste'}); + + if ((el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) || !col) { + m.addSeparator(); + m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true}); + m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'}); + } + + m.addSeparator(); + m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true}); + + m.addSeparator(); + am = m.addMenu({title : 'contextmenu.align'}); + am.add({title : 'contextmenu.left', icon : 'justifyleft', cmd : 'JustifyLeft'}); + am.add({title : 'contextmenu.center', icon : 'justifycenter', cmd : 'JustifyCenter'}); + am.add({title : 'contextmenu.right', icon : 'justifyright', cmd : 'JustifyRight'}); + am.add({title : 'contextmenu.full', icon : 'justifyfull', cmd : 'JustifyFull'}); + + t.onContextMenu.dispatch(t, m, el, col); + + return m; + } + }); + + // Register plugin + tinymce.PluginManager.add('contextmenu', tinymce.plugins.ContextMenu); +})(); diff --git a/common/static/js/vendor/tiny_mce/plugins/contextmenu/plugin.min.js b/common/static/js/vendor/tiny_mce/plugins/contextmenu/plugin.min.js deleted file mode 100644 index f4c664a065..0000000000 --- a/common/static/js/vendor/tiny_mce/plugins/contextmenu/plugin.min.js +++ /dev/null @@ -1 +0,0 @@ -tinymce.PluginManager.add("contextmenu",function(e){var n,t=e.settings.contextmenu_never_use_native;e.on("contextmenu",function(o){var i;if(!o.ctrlKey||t){if(o.preventDefault(),i=e.settings.contextmenu||"link image inserttable | cell row column deletetable",n)n.show();else{var c=[];tinymce.each(i.split(/[ ,]/),function(n){var t=e.menuItems[n];"|"==n&&(t={text:n}),t&&(t.shortcut="",c.push(t))});for(var a=0;a ",tinymce.each(n,function(n){var i=e+"/img/smiley-"+n+".gif";t+=' '}),t+=""}),t+=""}var i=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]];t.addButton("emoticons",{type:"panelbutton",panel:{autohide:!0,html:n,onclick:function(e){var n=t.dom.getParent(e.target,"a");n&&(t.insertContent(' '),this.hide())}},tooltip:"Emoticons"})}); \ No newline at end of file diff --git a/common/static/js/vendor/tiny_mce/plugins/emotions/editor_plugin.js b/common/static/js/vendor/tiny_mce/plugins/emotions/editor_plugin.js new file mode 100644 index 0000000000..dbdd8ffb58 --- /dev/null +++ b/common/static/js/vendor/tiny_mce/plugins/emotions/editor_plugin.js @@ -0,0 +1 @@ +(function(a){a.create("tinymce.plugins.EmotionsPlugin",{init:function(b,c){b.addCommand("mceEmotion",function(){b.windowManager.open({file:c+"/emotions.htm",width:250+parseInt(b.getLang("emotions.delta_width",0)),height:160+parseInt(b.getLang("emotions.delta_height",0)),inline:1},{plugin_url:c})});b.addButton("emotions",{title:"emotions.emotions_desc",cmd:"mceEmotion"})},getInfo:function(){return{longname:"Emotions",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("emotions",a.plugins.EmotionsPlugin)})(tinymce); \ No newline at end of file diff --git a/common/static/js/vendor/tiny_mce/plugins/emotions/editor_plugin_src.js b/common/static/js/vendor/tiny_mce/plugins/emotions/editor_plugin_src.js new file mode 100644 index 0000000000..aeee199d24 --- /dev/null +++ b/common/static/js/vendor/tiny_mce/plugins/emotions/editor_plugin_src.js @@ -0,0 +1,43 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + tinymce.create('tinymce.plugins.EmotionsPlugin', { + init : function(ed, url) { + // Register commands + ed.addCommand('mceEmotion', function() { + ed.windowManager.open({ + file : url + '/emotions.htm', + width : 250 + parseInt(ed.getLang('emotions.delta_width', 0)), + height : 160 + parseInt(ed.getLang('emotions.delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + // Register buttons + ed.addButton('emotions', {title : 'emotions.emotions_desc', cmd : 'mceEmotion'}); + }, + + getInfo : function() { + return { + longname : 'Emotions', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('emotions', tinymce.plugins.EmotionsPlugin); +})(tinymce); \ No newline at end of file diff --git a/common/static/js/vendor/tiny_mce/plugins/emotions/emotions.htm b/common/static/js/vendor/tiny_mce/plugins/emotions/emotions.htm new file mode 100644 index 0000000000..eb7a6b2714 --- /dev/null +++ b/common/static/js/vendor/tiny_mce/plugins/emotions/emotions.htm @@ -0,0 +1,42 @@ + + + +
{#emotions_dlg.title} + + + + + +++ + diff --git a/common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-cool.gif b/common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-cool.gif similarity index 100% rename from common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-cool.gif rename to common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-cool.gif diff --git a/common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-cry.gif b/common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-cry.gif similarity index 100% rename from common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-cry.gif rename to common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-cry.gif diff --git a/common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-embarassed.gif b/common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-embarassed.gif similarity index 100% rename from common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-embarassed.gif rename to common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-embarassed.gif diff --git a/common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-foot-in-mouth.gif b/common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif similarity index 100% rename from common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-foot-in-mouth.gif rename to common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif diff --git a/common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-frown.gif b/common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-frown.gif similarity index 100% rename from common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-frown.gif rename to common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-frown.gif diff --git a/common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-innocent.gif b/common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-innocent.gif similarity index 100% rename from common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-innocent.gif rename to common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-innocent.gif diff --git a/common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-kiss.gif b/common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-kiss.gif similarity index 100% rename from common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-kiss.gif rename to common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-kiss.gif diff --git a/common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-laughing.gif b/common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-laughing.gif similarity index 100% rename from common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-laughing.gif rename to common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-laughing.gif diff --git a/common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-money-mouth.gif b/common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif similarity index 100% rename from common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-money-mouth.gif rename to common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif diff --git a/common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-sealed.gif b/common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-sealed.gif similarity index 100% rename from common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-sealed.gif rename to common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-sealed.gif diff --git a/common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-smile.gif b/common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-smile.gif similarity index 100% rename from common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-smile.gif rename to common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-smile.gif diff --git a/common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-surprised.gif b/common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-surprised.gif similarity index 100% rename from common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-surprised.gif rename to common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-surprised.gif diff --git a/common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-tongue-out.gif b/common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif similarity index 100% rename from common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-tongue-out.gif rename to common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif diff --git a/common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-undecided.gif b/common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-undecided.gif similarity index 100% rename from common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-undecided.gif rename to common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-undecided.gif diff --git a/common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-wink.gif b/common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-wink.gif similarity index 100% rename from common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-wink.gif rename to common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-wink.gif diff --git a/common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-yell.gif b/common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-yell.gif similarity index 100% rename from common/static/js/vendor/tiny_mce/plugins/emoticons/img/smiley-yell.gif rename to common/static/js/vendor/tiny_mce/plugins/emotions/img/smiley-yell.gif diff --git a/common/static/js/vendor/tiny_mce/plugins/emotions/js/emotions.js b/common/static/js/vendor/tiny_mce/plugins/emotions/js/emotions.js new file mode 100644 index 0000000000..f73516c833 --- /dev/null +++ b/common/static/js/vendor/tiny_mce/plugins/emotions/js/emotions.js @@ -0,0 +1,43 @@ +tinyMCEPopup.requireLangPack(); + +var EmotionsDialog = { + addKeyboardNavigation: function(){ + var tableElm, cells, settings; + + cells = tinyMCEPopup.dom.select("a.emoticon_link", "emoticon_table"); + + settings ={ + root: "emoticon_table", + items: cells + }; + cells[0].tabindex=0; + tinyMCEPopup.dom.addClass(cells[0], "mceFocus"); + if (tinymce.isGecko) { + cells[0].focus(); + } else { + setTimeout(function(){ + cells[0].focus(); + }, 100); + } + tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', settings, tinyMCEPopup.dom); + }, + init : function(ed) { + tinyMCEPopup.resizeToInnerSize(); + this.addKeyboardNavigation(); + }, + + insert : function(file, title) { + var ed = tinyMCEPopup.editor, dom = ed.dom; + + tinyMCEPopup.execCommand('mceInsertContent', false, dom.createHTML('img', { + src : tinyMCEPopup.getWindowArg('plugin_url') + '/img/' + file, + alt : ed.getLang(title), + title : ed.getLang(title), + border : 0 + })); + + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(EmotionsDialog.init, EmotionsDialog); diff --git a/common/static/js/vendor/tiny_mce/plugins/emotions/langs/en_dlg.js b/common/static/js/vendor/tiny_mce/plugins/emotions/langs/en_dlg.js new file mode 100644 index 0000000000..037c4b5883 --- /dev/null +++ b/common/static/js/vendor/tiny_mce/plugins/emotions/langs/en_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en.emotions_dlg',{cry:"Cry",cool:"Cool",desc:"Emotions",title:"Insert Emotion",usage:"Use left and right arrows to navigate.",yell:"Yell",wink:"Wink",undecided:"Undecided","tongue_out":"Tongue Out",surprised:"Surprised",smile:"Smile",sealed:"Sealed","money_mouth":"Money Mouth",laughing:"Laughing",kiss:"Kiss",innocent:"Innocent",frown:"Frown","foot_in_mouth":"Foot in Mouth",embarassed:"Embarassed"}); diff --git a/common/static/js/vendor/tiny_mce/plugins/example/dialog.htm b/common/static/js/vendor/tiny_mce/plugins/example/dialog.htm new file mode 100644 index 0000000000..d6f2856aa0 --- /dev/null +++ b/common/static/js/vendor/tiny_mce/plugins/example/dialog.htm @@ -0,0 +1,22 @@ + + + +{#emotions_dlg.title}:+ ++
++ ++ + + + + ++ + + + + ++ + + + + ++ + + + {#emotions_dlg.usage}+{#example_dlg.title} + + + + + + + + + diff --git a/common/static/js/vendor/tiny_mce/plugins/example/editor_plugin.js b/common/static/js/vendor/tiny_mce/plugins/example/editor_plugin.js new file mode 100644 index 0000000000..ec1f81ea40 --- /dev/null +++ b/common/static/js/vendor/tiny_mce/plugins/example/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.PluginManager.requireLangPack("example");tinymce.create("tinymce.plugins.ExamplePlugin",{init:function(a,b){a.addCommand("mceExample",function(){a.windowManager.open({file:b+"/dialog.htm",width:320+parseInt(a.getLang("example.delta_width",0)),height:120+parseInt(a.getLang("example.delta_height",0)),inline:1},{plugin_url:b,some_custom_arg:"custom arg"})});a.addButton("example",{title:"example.desc",cmd:"mceExample",image:b+"/img/example.gif"});a.onNodeChange.add(function(d,c,e){c.setActive("example",e.nodeName=="IMG")})},createControl:function(b,a){return null},getInfo:function(){return{longname:"Example plugin",author:"Some author",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example",version:"1.0"}}});tinymce.PluginManager.add("example",tinymce.plugins.ExamplePlugin)})(); \ No newline at end of file diff --git a/common/static/js/vendor/tiny_mce/plugins/example/editor_plugin_src.js b/common/static/js/vendor/tiny_mce/plugins/example/editor_plugin_src.js new file mode 100644 index 0000000000..edc1e776e5 --- /dev/null +++ b/common/static/js/vendor/tiny_mce/plugins/example/editor_plugin_src.js @@ -0,0 +1,84 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + // Load plugin specific language pack + tinymce.PluginManager.requireLangPack('example'); + + tinymce.create('tinymce.plugins.ExamplePlugin', { + /** + * Initializes the plugin, this will be executed after the plugin has been created. + * This call is done before the editor instance has finished it's initialization so use the onInit event + * of the editor instance to intercept that event. + * + * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. + * @param {string} url Absolute URL to where the plugin is located. + */ + init : function(ed, url) { + // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample'); + ed.addCommand('mceExample', function() { + ed.windowManager.open({ + file : url + '/dialog.htm', + width : 320 + parseInt(ed.getLang('example.delta_width', 0)), + height : 120 + parseInt(ed.getLang('example.delta_height', 0)), + inline : 1 + }, { + plugin_url : url, // Plugin absolute URL + some_custom_arg : 'custom arg' // Custom argument + }); + }); + + // Register example button + ed.addButton('example', { + title : 'example.desc', + cmd : 'mceExample', + image : url + '/img/example.gif' + }); + + // Add a node change handler, selects the button in the UI when a image is selected + ed.onNodeChange.add(function(ed, cm, n) { + cm.setActive('example', n.nodeName == 'IMG'); + }); + }, + + /** + * Creates control instances based in the incomming name. This method is normally not + * needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons + * but you sometimes need to create more complex controls like listboxes, split buttons etc then this + * method can be used to create those. + * + * @param {String} n Name of the control to create. + * @param {tinymce.ControlManager} cm Control manager to use inorder to create new control. + * @return {tinymce.ui.Control} New control instance or null if no control was created. + */ + createControl : function(n, cm) { + return null; + }, + + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @return {Object} Name/value array containing information about the plugin. + */ + getInfo : function() { + return { + longname : 'Example plugin', + author : 'Some author', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example', + version : "1.0" + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('example', tinymce.plugins.ExamplePlugin); +})(); \ No newline at end of file diff --git a/common/static/js/vendor/tiny_mce/plugins/example/img/example.gif b/common/static/js/vendor/tiny_mce/plugins/example/img/example.gif new file mode 100644 index 0000000000..1ab5da4461 Binary files /dev/null and b/common/static/js/vendor/tiny_mce/plugins/example/img/example.gif differ diff --git a/common/static/js/vendor/tiny_mce/plugins/example/js/dialog.js b/common/static/js/vendor/tiny_mce/plugins/example/js/dialog.js new file mode 100644 index 0000000000..a7ee507e06 --- /dev/null +++ b/common/static/js/vendor/tiny_mce/plugins/example/js/dialog.js @@ -0,0 +1,19 @@ +tinyMCEPopup.requireLangPack(); + +var ExampleDialog = { + init : function() { + var f = document.forms[0]; + + // Get the selected contents as text and place it in the input + f.someval.value = tinyMCEPopup.editor.selection.getContent({format : 'text'}); + f.somearg.value = tinyMCEPopup.getWindowArg('some_custom_arg'); + }, + + insert : function() { + // Insert the contents from the input into the document + tinyMCEPopup.editor.execCommand('mceInsertContent', false, document.forms[0].someval.value); + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(ExampleDialog.init, ExampleDialog); diff --git a/common/static/js/vendor/tiny_mce/plugins/example/langs/en.js b/common/static/js/vendor/tiny_mce/plugins/example/langs/en.js new file mode 100644 index 0000000000..f3721d3a31 --- /dev/null +++ b/common/static/js/vendor/tiny_mce/plugins/example/langs/en.js @@ -0,0 +1,3 @@ +tinyMCE.addI18n('en.example',{ + desc : 'This is just a template button' +}); diff --git a/common/static/js/vendor/tiny_mce/plugins/example/langs/en_dlg.js b/common/static/js/vendor/tiny_mce/plugins/example/langs/en_dlg.js new file mode 100644 index 0000000000..a9cd65f8c0 --- /dev/null +++ b/common/static/js/vendor/tiny_mce/plugins/example/langs/en_dlg.js @@ -0,0 +1,3 @@ +tinyMCE.addI18n('en.example_dlg',{ + title : 'This is just a example title' +}); diff --git a/common/static/js/vendor/tiny_mce/plugins/example/plugin.min.js b/common/static/js/vendor/tiny_mce/plugins/example/plugin.min.js deleted file mode 100644 index 1ff20b46b9..0000000000 --- a/common/static/js/vendor/tiny_mce/plugins/example/plugin.min.js +++ /dev/null @@ -1 +0,0 @@ -tinymce.PluginManager.add("example",function(t){t.addButton("example",{text:"My button",icon:!1,onclick:function(){t.windowManager.open({title:"Example plugin",body:[{type:"textbox",name:"title",label:"Title"}],onsubmit:function(e){t.insertContent("Title: "+e.data.title)}})}}),t.addMenuItem("example",{text:"Example plugin",context:"tools",onclick:function(){t.windowManager.open({title:"TinyMCE site",url:"http://www.tinymce.com",width:800,height:600,buttons:[{text:"Close",onclick:"close"}]})}})}); \ No newline at end of file diff --git a/common/static/js/vendor/tiny_mce/plugins/example_dependency/editor_plugin.js b/common/static/js/vendor/tiny_mce/plugins/example_dependency/editor_plugin.js new file mode 100644 index 0000000000..0a4551d380 --- /dev/null +++ b/common/static/js/vendor/tiny_mce/plugins/example_dependency/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.ExampleDependencyPlugin",{init:function(a,b){},getInfo:function(){return{longname:"Example Dependency plugin",author:"Some author",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example_dependency",version:"1.0"}}});tinymce.PluginManager.add("example_dependency",tinymce.plugins.ExampleDependencyPlugin,["example"])})(); \ No newline at end of file diff --git a/common/static/js/vendor/tiny_mce/plugins/example_dependency/editor_plugin_src.js b/common/static/js/vendor/tiny_mce/plugins/example_dependency/editor_plugin_src.js new file mode 100644 index 0000000000..e1c55e41bc --- /dev/null +++ b/common/static/js/vendor/tiny_mce/plugins/example_dependency/editor_plugin_src.js @@ -0,0 +1,50 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + + tinymce.create('tinymce.plugins.ExampleDependencyPlugin', { + /** + * Initializes the plugin, this will be executed after the plugin has been created. + * This call is done before the editor instance has finished it's initialization so use the onInit event + * of the editor instance to intercept that event. + * + * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. + * @param {string} url Absolute URL to where the plugin is located. + */ + init : function(ed, url) { + }, + + + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @return {Object} Name/value array containing information about the plugin. + */ + getInfo : function() { + return { + longname : 'Example Dependency plugin', + author : 'Some author', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example_dependency', + version : "1.0" + }; + } + }); + + /** + * Register the plugin, specifying the list of the plugins that this plugin depends on. They are specified in a list, with the list loaded in order. + * plugins in this list will be initialised when this plugin is initialized. (before the init method is called). + * plugins in a depends list should typically be specified using the short name). If neccesary this can be done + * with an object which has the url to the plugin and the shortname. + */ + tinymce.PluginManager.add('example_dependency', tinymce.plugins.ExampleDependencyPlugin, ['example']); +})(); diff --git a/common/static/js/vendor/tiny_mce/plugins/example_dependency/plugin.min.js b/common/static/js/vendor/tiny_mce/plugins/example_dependency/plugin.min.js deleted file mode 100644 index e61bf473ad..0000000000 --- a/common/static/js/vendor/tiny_mce/plugins/example_dependency/plugin.min.js +++ /dev/null @@ -1 +0,0 @@ -tinymce.PluginManager.add("example_dependency",function(){},["example"]); \ No newline at end of file diff --git a/common/static/js/vendor/tiny_mce/plugins/fullpage/css/fullpage.css b/common/static/js/vendor/tiny_mce/plugins/fullpage/css/fullpage.css new file mode 100644 index 0000000000..28b721f9b3 --- /dev/null +++ b/common/static/js/vendor/tiny_mce/plugins/fullpage/css/fullpage.css @@ -0,0 +1,143 @@ +/* Hide the advanced tab */ +#advanced_tab { + display: none; +} + +#metatitle, #metakeywords, #metadescription, #metaauthor, #metacopyright { + width: 280px; +} + +#doctype, #docencoding { + width: 200px; +} + +#langcode { + width: 30px; +} + +#bgimage { + width: 220px; +} + +#fontface { + width: 240px; +} + +#leftmargin, #rightmargin, #topmargin, #bottommargin { + width: 50px; +} + +.panel_wrapper div.current { + height: 400px; +} + +#stylesheet, #style { + width: 240px; +} + +#doctypes { + width: 200px; +} + +/* Head list classes */ + +.headlistwrapper { + width: 100%; +} + +.selected { + border: 1px solid #0A246A; + background-color: #B6BDD2; +} + +.toolbar { + width: 100%; +} + +#headlist { + width: 100%; + margin-top: 3px; + font-size: 11px; +} + +#info, #title_element, #meta_element, #script_element, #style_element, #base_element, #link_element, #comment_element, #unknown_element { + display: none; +} + +#addmenu { + position: absolute; + border: 1px solid gray; + display: none; + z-index: 100; + background-color: white; +} + +#addmenu a { + display: block; + width: 100%; + line-height: 20px; + text-decoration: none; + background-color: white; +} + +#addmenu a:hover { + background-color: #B6BDD2; + color: black; +} + +#addmenu span { + padding-left: 10px; + padding-right: 10px; +} + +#updateElementPanel { + display: none; +} + +#script_element .panel_wrapper div.current { + height: 108px; +} + +#style_element .panel_wrapper div.current { + height: 108px; +} + +#link_element .panel_wrapper div.current { + height: 140px; +} + +#element_script_value { + width: 100%; + height: 100px; +} + +#element_comment_value { + width: 100%; + height: 120px; +} + +#element_style_value { + width: 100%; + height: 100px; +} + +#element_title, #element_script_src, #element_meta_name, #element_meta_content, #element_base_href, #element_link_href, #element_link_title { + width: 250px; +} + +.updateElementButton { + margin-top: 3px; +} + +/* MSIE specific styles */ + +* html .addbutton, * html .removebutton, * html .moveupbutton, * html .movedownbutton { + width: 22px; + height: 22px; +} + +textarea { + height: 55px; +} + +.panel_wrapper div.current {height:420px;} \ No newline at end of file diff --git a/common/static/js/vendor/tiny_mce/plugins/fullpage/editor_plugin.js b/common/static/js/vendor/tiny_mce/plugins/fullpage/editor_plugin.js new file mode 100644 index 0000000000..dcf76024dd --- /dev/null +++ b/common/static/js/vendor/tiny_mce/plugins/fullpage/editor_plugin.js @@ -0,0 +1 @@ +(function(){var b=tinymce.each,a=tinymce.html.Node;tinymce.create("tinymce.plugins.FullPagePlugin",{init:function(c,d){var e=this;e.editor=c;c.addCommand("mceFullPageProperties",function(){c.windowManager.open({file:d+"/fullpage.htm",width:430+parseInt(c.getLang("fullpage.delta_width",0)),height:495+parseInt(c.getLang("fullpage.delta_height",0)),inline:1},{plugin_url:d,data:e._htmlToData()})});c.addButton("fullpage",{title:"fullpage.desc",cmd:"mceFullPageProperties"});c.onBeforeSetContent.add(e._setContent,e);c.onGetContent.add(e._getContent,e)},getInfo:function(){return{longname:"Fullpage",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_htmlToData:function(){var f=this._parseHeader(),h={},c,i,g,e=this.editor;function d(l,j){var k=l.attr(j);return k||""}h.fontface=e.getParam("fullpage_default_fontface","");h.fontsize=e.getParam("fullpage_default_fontsize","");i=f.firstChild;if(i.type==7){h.xml_pi=true;g=/encoding="([^"]+)"/.exec(i.value);if(g){h.docencoding=g[1]}}i=f.getAll("#doctype")[0];if(i){h.doctype=""}i=f.getAll("title")[0];if(i&&i.firstChild){h.metatitle=i.firstChild.value}b(f.getAll("meta"),function(m){var k=m.attr("name"),j=m.attr("http-equiv"),l;if(k){h["meta"+k.toLowerCase()]=m.attr("content")}else{if(j=="Content-Type"){l=/charset\s*=\s*(.*)\s*/gi.exec(m.attr("content"));if(l){h.docencoding=l[1]}}}});i=f.getAll("html")[0];if(i){h.langcode=d(i,"lang")||d(i,"xml:lang")}i=f.getAll("link")[0];if(i&&i.attr("rel")=="stylesheet"){h.stylesheet=i.attr("href")}i=f.getAll("body")[0];if(i){h.langdir=d(i,"dir");h.style=d(i,"style");h.visited_color=d(i,"vlink");h.link_color=d(i,"link");h.active_color=d(i,"alink")}return h},_dataToHtml:function(g){var f,d,h,j,k,e=this.editor.dom;function c(n,l,m){n.attr(l,m?m:undefined)}function i(l){if(d.firstChild){d.insert(l,d.firstChild)}else{d.append(l)}}f=this._parseHeader();d=f.getAll("head")[0];if(!d){j=f.getAll("html")[0];d=new a("head",1);if(j.firstChild){j.insert(d,j.firstChild,true)}else{j.append(d)}}j=f.firstChild;if(g.xml_pi){k='version="1.0"';if(g.docencoding){k+=' encoding="'+g.docencoding+'"'}if(j.type!=7){j=new a("xml",7);f.insert(j,f.firstChild,true)}j.value=k}else{if(j&&j.type==7){j.remove()}}j=f.getAll("#doctype")[0];if(g.doctype){if(!j){j=new a("#doctype",10);if(g.xml_pi){f.insert(j,f.firstChild)}else{i(j)}}j.value=g.doctype.substring(9,g.doctype.length-1)}else{if(j){j.remove()}}j=f.getAll("title")[0];if(g.metatitle){if(!j){j=new a("title",1);j.append(new a("#text",3)).value=g.metatitle;i(j)}}if(g.docencoding){j=null;b(f.getAll("meta"),function(l){if(l.attr("http-equiv")=="Content-Type"){j=l}});if(!j){j=new a("meta",1);j.attr("http-equiv","Content-Type");j.shortEnded=true;i(j)}j.attr("content","text/html; charset="+g.docencoding)}b("keywords,description,author,copyright,robots".split(","),function(m){var l=f.getAll("meta"),n,p,o=g["meta"+m];for(n=0;n"))},_parseHeader:function(){return new tinymce.html.DomParser({validate:false,root_name:"#document"}).parse(this.head)},_setContent:function(g,d){var m=this,i,c,h=d.content,f,l="",e=m.editor.dom,j;function k(n){return n.replace(/<\/?[A-Z]+/g,function(o){return o.toLowerCase()})}if(d.format=="raw"&&m.head){return}if(d.source_view&&g.getParam("fullpage_hide_in_source_view")){return}h=h.replace(/<(\/?)BODY/gi,"<$1body");i=h.indexOf("",i);m.head=k(h.substring(0,i+1));c=h.indexOf("\n