From c401deffac09ba60adbea4188a45ad114732a862 Mon Sep 17 00:00:00 2001 From: Daniel Thies Date: Thu, 14 Aug 2014 08:50:27 -0500 Subject: [PATCH] Release 1.0 Stable --- .../moodle-tinymce_mathslate-editor-debug.js | 2 +- .../moodle-tinymce_mathslate-editor-min.js | 2 +- .../moodle-tinymce_mathslate-editor.js | 2 +- yui/src/editor/js/editor.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/yui/build/moodle-tinymce_mathslate-editor/moodle-tinymce_mathslate-editor-debug.js b/yui/build/moodle-tinymce_mathslate-editor/moodle-tinymce_mathslate-editor-debug.js index a931442..9425343 100644 --- a/yui/build/moodle-tinymce_mathslate-editor/moodle-tinymce_mathslate-editor-debug.js +++ b/yui/build/moodle-tinymce_mathslate-editor/moodle-tinymce_mathslate-editor-debug.js @@ -48,7 +48,7 @@ NS.Editor=function(editorID,config){ //Place math editor on page this.node.setHTML('
' + '

Mathslate Mathematics Editor
' - + 'v. 1.0RC1
' + + 'Version 1.0 ' + '
'); var tbox={tools: [], diff --git a/yui/build/moodle-tinymce_mathslate-editor/moodle-tinymce_mathslate-editor-min.js b/yui/build/moodle-tinymce_mathslate-editor/moodle-tinymce_mathslate-editor-min.js index 833f82c..e766f98 100644 --- a/yui/build/moodle-tinymce_mathslate-editor/moodle-tinymce_mathslate-editor-min.js +++ b/yui/build/moodle-tinymce_mathslate-editor/moodle-tinymce_mathslate-editor-min.js @@ -1 +1 @@ -YUI.add("moodle-tinymce_mathslate-editor",function(e,t){M&&(M.tinymce_mathslate=M.tinymce_mathslate||{});var n=M&&M.tinymce_mathslate||{},r={EDITOR:"mathslate-tinymce",TOOLBOX:"mathslate-toolbox",DRAGNODE:"mathslate-toolbox-drag",UNDO:"mathslate-undo-button",REDO:"mathslate-redo-button",CLEAR:"mathslate-clear-button",HELP:"mathslate-help-button"};n.Editor=function(t,i){var s=this;this.node=e.one(t),this.node.setHTML(M.util.get_string("nomathjax","tinymce_mathslate"));if(typeof MathJax=="undefined")return;MathJax.Hub.setRenderer("HTML-CSS");var o=e.guid(),u=e.guid();this.node.addClass(r.EDITOR),this.node.setHTML('
'+'

Mathslate Mathematics Editor
'+'v. 1.0RC1
'+'
');var a={tools:[],fillToolBox:function(t){function i(t){function n(t){Array.isArray(t[2])&&t[2].forEach(function(r){Array.isArray(r)?n(r):r==="[]"&&(newID=e.guid(),t[2][t[2].indexOf(r)]=["mn",{},"[]"])})}function r(e){if(typeof e=="string")return e;if(e[1]==="undefined")return"";var t="";return typeof e[1].tex!="undefined"?(e[1].tex.forEach(function(n){typeof n=="string"?t+=n:t+=r(e[2][n])}),t):typeof e[2]=="string"?e[2]:typeof e[2]=="undefined"?"":(e[2].forEach(function(e){t+=r(e)}),t)}this.id=e.guid(),this.json=JSON.stringify(t),this.HTMLsnippet=[["span",{id:this.id,title:r(t)},[["math",{},[t]]]]],n(t),a.tools.push(this)}var f={children:[]};MathJax.Hub.Register.StartupHook("TeX Jax Config",function(){MathJax.Ajax.Require("[MathJax]/extensions/toMathML.js"),f.children.push({label:'TE X ',content:""})}),MathJax.Hub.Register.StartupHook("End",function(){function h(){a.tools.forEach(function(t){e.one("#"+t.id).on("click",function(){c.addMath(t.json)});var n=new e.DD.Drag({node:"#"+t.id});n.set("data",t.json),n.on("drag:start",function(){this.get("dragNode").addClass(r.DRAGNODE)}),n.on("drag:end",function(){this.get("node").setStyle("top","0"),this.get("node").setStyle("left","0"),this.get("node").removeClass(r.DRAGNODE)})})}t.forEach(function(t){var n=e.Node.create("

");t.tools.forEach(function(e){var t=new i(e);MathJax.HTML.addElement(n.getDOMNode(),"span",{},t.HTMLsnippet),e[0]&&e[0]!=="br"&&n.append("   ")}),f.children.push({label:t.label,content:n.getHTML()})});var l=new e.TabView(f),c=new n.MathJaxEditor("#"+u);s.output=function(e){return c.output(e)},c.canvas.on("drop:hit",function(e){e.drag.get("data")&&c.addMath(e.drag.get("data"))}),e.one("#"+o)&&(e.one("#"+o).setHTML(""),l.render("#"+o),e.one("#latex-input")&&new n.TeXTool("#latex-input",function(e){c.addMath(e)})),MathJax.Hub.Queue(["Typeset",MathJax.Hub,o]),MathJax.Hub.Queue(h)})},getToolByID:function(e){var t;return this.tools.forEach(function(n){n.id&&n.id===e&&(t=n)}),t}};MathJax.Hub.Queue(["Typeset",MathJax.Hub,o]),e.on("io:success",function(t,n){a.tools.length===0&&MathJax.Hub.Queue(["fillToolBox",a,e.JSON.parse(n.response)])}),i===undefined?e.io(n.config):e.io(i)}},"@VERSION@",{requires:["dd-drag","dd-proxy","dd-drop","event","tabview","io-base","json","moodle-tinymce_mathslate-textool","moodle-tinymce_mathslate-mathjaxeditor"]}); +YUI.add("moodle-tinymce_mathslate-editor",function(e,t){M&&(M.tinymce_mathslate=M.tinymce_mathslate||{});var n=M&&M.tinymce_mathslate||{},r={EDITOR:"mathslate-tinymce",TOOLBOX:"mathslate-toolbox",DRAGNODE:"mathslate-toolbox-drag",UNDO:"mathslate-undo-button",REDO:"mathslate-redo-button",CLEAR:"mathslate-clear-button",HELP:"mathslate-help-button"};n.Editor=function(t,i){var s=this;this.node=e.one(t),this.node.setHTML(M.util.get_string("nomathjax","tinymce_mathslate"));if(typeof MathJax=="undefined")return;MathJax.Hub.setRenderer("HTML-CSS");var o=e.guid(),u=e.guid();this.node.addClass(r.EDITOR),this.node.setHTML('
'+'

Mathslate Mathematics Editor
'+'Version 1.0
'+'
');var a={tools:[],fillToolBox:function(t){function i(t){function n(t){Array.isArray(t[2])&&t[2].forEach(function(r){Array.isArray(r)?n(r):r==="[]"&&(newID=e.guid(),t[2][t[2].indexOf(r)]=["mn",{},"[]"])})}function r(e){if(typeof e=="string")return e;if(e[1]==="undefined")return"";var t="";return typeof e[1].tex!="undefined"?(e[1].tex.forEach(function(n){typeof n=="string"?t+=n:t+=r(e[2][n])}),t):typeof e[2]=="string"?e[2]:typeof e[2]=="undefined"?"":(e[2].forEach(function(e){t+=r(e)}),t)}this.id=e.guid(),this.json=JSON.stringify(t),this.HTMLsnippet=[["span",{id:this.id,title:r(t)},[["math",{},[t]]]]],n(t),a.tools.push(this)}var f={children:[]};MathJax.Hub.Register.StartupHook("TeX Jax Config",function(){MathJax.Ajax.Require("[MathJax]/extensions/toMathML.js"),f.children.push({label:'TE X ',content:""})}),MathJax.Hub.Register.StartupHook("End",function(){function h(){a.tools.forEach(function(t){e.one("#"+t.id).on("click",function(){c.addMath(t.json)});var n=new e.DD.Drag({node:"#"+t.id});n.set("data",t.json),n.on("drag:start",function(){this.get("dragNode").addClass(r.DRAGNODE)}),n.on("drag:end",function(){this.get("node").setStyle("top","0"),this.get("node").setStyle("left","0"),this.get("node").removeClass(r.DRAGNODE)})})}t.forEach(function(t){var n=e.Node.create("

");t.tools.forEach(function(e){var t=new i(e);MathJax.HTML.addElement(n.getDOMNode(),"span",{},t.HTMLsnippet),e[0]&&e[0]!=="br"&&n.append("   ")}),f.children.push({label:t.label,content:n.getHTML()})});var l=new e.TabView(f),c=new n.MathJaxEditor("#"+u);s.output=function(e){return c.output(e)},c.canvas.on("drop:hit",function(e){e.drag.get("data")&&c.addMath(e.drag.get("data"))}),e.one("#"+o)&&(e.one("#"+o).setHTML(""),l.render("#"+o),e.one("#latex-input")&&new n.TeXTool("#latex-input",function(e){c.addMath(e)})),MathJax.Hub.Queue(["Typeset",MathJax.Hub,o]),MathJax.Hub.Queue(h)})},getToolByID:function(e){var t;return this.tools.forEach(function(n){n.id&&n.id===e&&(t=n)}),t}};MathJax.Hub.Queue(["Typeset",MathJax.Hub,o]),e.on("io:success",function(t,n){a.tools.length===0&&MathJax.Hub.Queue(["fillToolBox",a,e.JSON.parse(n.response)])}),i===undefined?e.io(n.config):e.io(i)}},"@VERSION@",{requires:["dd-drag","dd-proxy","dd-drop","event","tabview","io-base","json","moodle-tinymce_mathslate-textool","moodle-tinymce_mathslate-mathjaxeditor"]}); diff --git a/yui/build/moodle-tinymce_mathslate-editor/moodle-tinymce_mathslate-editor.js b/yui/build/moodle-tinymce_mathslate-editor/moodle-tinymce_mathslate-editor.js index a931442..9425343 100644 --- a/yui/build/moodle-tinymce_mathslate-editor/moodle-tinymce_mathslate-editor.js +++ b/yui/build/moodle-tinymce_mathslate-editor/moodle-tinymce_mathslate-editor.js @@ -48,7 +48,7 @@ NS.Editor=function(editorID,config){ //Place math editor on page this.node.setHTML('
' + '

Mathslate Mathematics Editor
' - + 'v. 1.0RC1
' + + 'Version 1.0 ' + '
'); var tbox={tools: [], diff --git a/yui/src/editor/js/editor.js b/yui/src/editor/js/editor.js index fa50520..eeb1f65 100644 --- a/yui/src/editor/js/editor.js +++ b/yui/src/editor/js/editor.js @@ -46,7 +46,7 @@ NS.Editor=function(editorID,config){ //Place math editor on page this.node.setHTML('
' + '

Mathslate Mathematics Editor
' - + 'v. 1.0RC1
' + + 'Version 1.0 ' + '
'); var tbox={tools: [],