From 0597a88405522351c2ae08b40d4791444aa564fe Mon Sep 17 00:00:00 2001 From: josh18 Date: Fri, 16 May 2014 08:58:28 +1200 Subject: [PATCH] Update to FontAwesome v4.1.0 --- README.md | 6 +- fontawesome (uncompressed)/plugin.min.js | 81 ++++++++++++++++++++++-- fontawesome/plugin.min.js | 2 +- 3 files changed, 81 insertions(+), 8 deletions(-) mode change 100644 => 100755 fontawesome (uncompressed)/plugin.min.js mode change 100644 => 100755 fontawesome/plugin.min.js diff --git a/README.md b/README.md index 1bb05ad..804a148 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ TinyMCE FontAwesome Plugin =========================== -###### v1.0.0 +###### v1.1.0 -A plugin that lets you insert FontAwesome icons via TinyMCE. +A plugin that lets you insert FontAwesome icons via TinyMCE. Currently uses FontAwesome v4.1.0. ###Instructions @@ -18,7 +18,7 @@ A plugin that lets you insert FontAwesome icons via TinyMCE. ... extended_valid_elements: 'span[class]' ... - content_css: '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css'; + content_css: '//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css'; ... toolbar: 'fontawesome'; ... diff --git a/fontawesome (uncompressed)/plugin.min.js b/fontawesome (uncompressed)/plugin.min.js old mode 100644 new mode 100755 index 059fd94..78516a0 --- a/fontawesome (uncompressed)/plugin.min.js +++ b/fontawesome (uncompressed)/plugin.min.js @@ -156,7 +156,7 @@ tinymce.PluginManager.add('fontawesome', function (editor, url) { [''], [''], [''], - [''], + [''], [''], [''], [''], @@ -220,7 +220,7 @@ tinymce.PluginManager.add('fontawesome', function (editor, url) { [''], [''], [''], - [''], + [''], [''], [''], [''], @@ -371,7 +371,78 @@ tinymce.PluginManager.add('fontawesome', function (editor, url) { [''], [''], [''], - [''] + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''], + [''] ]; function showDialog() { @@ -401,7 +472,9 @@ tinymce.PluginManager.add('fontawesome', function (editor, url) { gridHtml += ''; for (x = 0; x < width; x++) { - gridHtml += '' + iconlist[y * width + x] + '' + if (iconlist[y * width + x]) { + gridHtml += '' + iconlist[y * width + x] + ''; + } } gridHtml += ''; diff --git a/fontawesome/plugin.min.js b/fontawesome/plugin.min.js old mode 100644 new mode 100755 index a8d201f..cb2a0e7 --- a/fontawesome/plugin.min.js +++ b/fontawesome/plugin.min.js @@ -1 +1 @@ -tinymce.PluginManager.add("fontawesome",function(e,t){function r(){function i(e){while(e){if(e.nodeName=="TD"){return e}e=e.parentNode}}var t,r;t='';var s=23;for(y=0;y'+n[y*s+x]+""}t+=""}t+="";var o={type:"container",html:t,onclick:function(t){var n=t.target;if(n.nodeName=="SPAN"){e.execCommand("mceInsertContent",false,n.outerHTML);r.close()}}};r=e.windowManager.open({title:"Icons",spacing:20,padding:10,classes:"fontawesome-panel",items:[o,{type:"label",text:" "}],buttons:[{text:"Close",onclick:function(){r.close()}}]})}var n=[[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""]];e.on("init",function(){csslink=e.dom.create("link",{rel:"stylesheet",href:t+"/css/fontawesome.css"});document.getElementsByTagName("head")[0].appendChild(csslink)});e.addButton("fontawesome",{icon:"flag",text:"Icons",tooltip:"Icons",onclick:r});e.addMenuItem("fontawesome",{icon:"flag",text:"Icons",onclick:r,context:"insert"})}) \ No newline at end of file +tinymce.PluginManager.add("fontawesome",function(e,t){function r(){function i(e){while(e){if(e.nodeName=="TD"){return e}e=e.parentNode}}var t,r;t='';var s=23;for(y=0;y'+n[y*s+x]+""}}t+=""}t+="";var o={type:"container",html:t,onclick:function(t){var n=t.target;if(n.nodeName=="SPAN"){e.execCommand("mceInsertContent",false,n.outerHTML);r.close()}}};r=e.windowManager.open({title:"Icons",spacing:20,padding:10,classes:"fontawesome-panel",items:[o,{type:"label",text:" "}],buttons:[{text:"Close",onclick:function(){r.close()}}]})}var n=[[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""],[""]];e.on("init",function(){csslink=e.dom.create("link",{rel:"stylesheet",href:t+"/css/fontawesome.css"});document.getElementsByTagName("head")[0].appendChild(csslink)});e.addButton("fontawesome",{icon:"flag",text:"Icons",tooltip:"Icons",onclick:r});e.addMenuItem("fontawesome",{icon:"flag",text:"Icons",onclick:r,context:"insert"})}) \ No newline at end of file