bedrock_sass 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/assets/_vendor/tinymce/plugins/advlist/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/advlist/plugin.js +428 -0
- data/assets/_vendor/tinymce/plugins/advlist/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/anchor/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/anchor/plugin.js +338 -0
- data/assets/_vendor/tinymce/plugins/anchor/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/autolink/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/autolink/plugin.js +404 -0
- data/assets/_vendor/tinymce/plugins/autolink/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/autoresize/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/autoresize/plugin.js +451 -0
- data/assets/_vendor/tinymce/plugins/autoresize/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/autosave/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/autosave/plugin.js +608 -0
- data/assets/_vendor/tinymce/plugins/autosave/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/bbcode/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/bbcode/plugin.js +264 -0
- data/assets/_vendor/tinymce/plugins/bbcode/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/charmap/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/charmap/plugin.js +850 -0
- data/assets/_vendor/tinymce/plugins/charmap/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/code/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/code/plugin.js +338 -0
- data/assets/_vendor/tinymce/plugins/code/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/codesample/css/prism.css +138 -0
- data/assets/_vendor/tinymce/plugins/codesample/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/codesample/plugin.js +1582 -0
- data/assets/_vendor/tinymce/plugins/codesample/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/colorpicker/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/colorpicker/plugin.js +272 -0
- data/assets/_vendor/tinymce/plugins/colorpicker/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/contextmenu/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/contextmenu/plugin.js +496 -0
- data/assets/_vendor/tinymce/plugins/contextmenu/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/directionality/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/directionality/plugin.js +270 -0
- data/assets/_vendor/tinymce/plugins/directionality/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-cool.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-cry.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-embarassed.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-frown.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-innocent.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-kiss.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-laughing.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-sealed.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-smile.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-surprised.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-undecided.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-wink.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-yell.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/emoticons/plugin.js +256 -0
- data/assets/_vendor/tinymce/plugins/emoticons/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/fullpage/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/fullpage/plugin.js +962 -0
- data/assets/_vendor/tinymce/plugins/fullpage/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/fullscreen/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/fullscreen/plugin.js +455 -0
- data/assets/_vendor/tinymce/plugins/fullscreen/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/help/img/logo.png +0 -0
- data/assets/_vendor/tinymce/plugins/help/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/help/plugin.js +1527 -0
- data/assets/_vendor/tinymce/plugins/help/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/hr/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/hr/plugin.js +195 -0
- data/assets/_vendor/tinymce/plugins/hr/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/image/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/image/plugin.js +1572 -0
- data/assets/_vendor/tinymce/plugins/image/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/imagetools/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/imagetools/plugin.js +4444 -0
- data/assets/_vendor/tinymce/plugins/imagetools/plugin.min.js +2 -0
- data/assets/_vendor/tinymce/plugins/importcss/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/importcss/plugin.js +577 -0
- data/assets/_vendor/tinymce/plugins/importcss/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/insertdatetime/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/insertdatetime/plugin.js +482 -0
- data/assets/_vendor/tinymce/plugins/insertdatetime/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/legacyoutput/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/legacyoutput/plugin.js +395 -0
- data/assets/_vendor/tinymce/plugins/legacyoutput/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/link/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/link/plugin.js +1231 -0
- data/assets/_vendor/tinymce/plugins/link/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/lists/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/lists/plugin.js +1985 -0
- data/assets/_vendor/tinymce/plugins/lists/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/media/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/media/plugin.js +2026 -0
- data/assets/_vendor/tinymce/plugins/media/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/nonbreaking/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/nonbreaking/plugin.js +313 -0
- data/assets/_vendor/tinymce/plugins/nonbreaking/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/noneditable/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/noneditable/plugin.js +316 -0
- data/assets/_vendor/tinymce/plugins/noneditable/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/pagebreak/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/pagebreak/plugin.js +354 -0
- data/assets/_vendor/tinymce/plugins/pagebreak/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/paste/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/paste/plugin.js +2935 -0
- data/assets/_vendor/tinymce/plugins/paste/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/preview/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/preview/plugin.js +410 -0
- data/assets/_vendor/tinymce/plugins/preview/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/print/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/print/plugin.js +194 -0
- data/assets/_vendor/tinymce/plugins/print/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/save/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/save/plugin.js +370 -0
- data/assets/_vendor/tinymce/plugins/save/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/searchreplace/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/searchreplace/plugin.js +977 -0
- data/assets/_vendor/tinymce/plugins/searchreplace/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/spellchecker/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/spellchecker/plugin.js +1419 -0
- data/assets/_vendor/tinymce/plugins/spellchecker/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/tabfocus/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/tabfocus/plugin.js +419 -0
- data/assets/_vendor/tinymce/plugins/tabfocus/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/table/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/table/plugin.js +15527 -0
- data/assets/_vendor/tinymce/plugins/table/plugin.min.js +5 -0
- data/assets/_vendor/tinymce/plugins/template/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/template/plugin.js +807 -0
- data/assets/_vendor/tinymce/plugins/template/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/textcolor/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/textcolor/plugin.js +619 -0
- data/assets/_vendor/tinymce/plugins/textcolor/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/textpattern/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/textpattern/plugin.js +718 -0
- data/assets/_vendor/tinymce/plugins/textpattern/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/toc/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/toc/plugin.js +559 -0
- data/assets/_vendor/tinymce/plugins/toc/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/visualblocks/css/visualblocks.css +154 -0
- data/assets/_vendor/tinymce/plugins/visualblocks/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/visualblocks/plugin.js +459 -0
- data/assets/_vendor/tinymce/plugins/visualblocks/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/visualchars/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/visualchars/plugin.js +1325 -0
- data/assets/_vendor/tinymce/plugins/visualchars/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/wordcount/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/wordcount/plugin.js +735 -0
- data/assets/_vendor/tinymce/plugins/wordcount/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/skins/lightgray/content.inline.min.css +1 -0
- data/assets/_vendor/tinymce/skins/lightgray/content.min.css +1 -0
- data/assets/_vendor/tinymce/skins/lightgray/content.mobile.min.css +1 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce-mobile.woff +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce-small.svg +63 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.svg +131 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/img/anchor.gif +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/img/loader.gif +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/img/object.gif +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/img/trans.gif +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/skin.min.css +1 -0
- data/assets/_vendor/tinymce/skins/lightgray/skin.mobile.min.css +2 -0
- data/assets/_vendor/tinymce/themes/inlite/index.js +7 -0
- data/assets/_vendor/tinymce/themes/inlite/theme.js +18787 -0
- data/assets/_vendor/tinymce/themes/inlite/theme.min.js +5 -0
- data/assets/_vendor/tinymce/themes/mobile/index.js +7 -0
- data/assets/_vendor/tinymce/themes/mobile/theme.js +23384 -0
- data/assets/_vendor/tinymce/themes/mobile/theme.min.js +8 -0
- data/assets/_vendor/tinymce/themes/modern/index.js +7 -0
- data/assets/_vendor/tinymce/themes/modern/theme.js +18311 -0
- data/assets/_vendor/tinymce/themes/modern/theme.min.js +5 -0
- data/assets/_vendor/tinymce/tinymce.js +44399 -0
- data/assets/bedrock/js/bedrock.js +16587 -6193
- data/assets/bedrock/scss/_bedrock-components.scss +16 -0
- data/assets/bedrock/scss/_bedrock-settings.scss +15 -0
- data/assets/bedrock/scss/components/attachments-grid.scss +138 -0
- data/assets/bedrock/scss/components/dropzone-upload.scss +158 -0
- data/assets/bedrock/scss/components/global.scss +16 -8
- data/assets/bedrock/scss/components/helper-classes.scss +59 -0
- data/assets/bedrock/scss/components/inline-edit-box.scss +80 -0
- data/assets/bedrock/scss/components/login-box.scss +48 -0
- data/assets/bedrock/scss/components/no-content.scss +31 -0
- data/assets/bedrock/scss/components/off-canvas-menu.scss +1 -1
- data/assets/bedrock/scss/components/page-content.scss +51 -0
- data/assets/bedrock/scss/components/reveal-panel.scss +89 -0
- data/assets/bedrock/scss/components/select-box.scss +332 -0
- data/assets/bedrock/scss/components/tiny-mce-editor.scss +14 -7
- data/lib/bedrock_sass.rb +6 -0
- data/lib/bedrock_sass/engine.rb +8 -0
- data/lib/bedrock_sass/version.rb +1 -1
- data/lib/tasks/before_assets_precompile.rake +11 -0
- metadata +188 -2
@@ -0,0 +1 @@
|
|
1
|
+
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e[f]=d(a[f]);b.apply(null,e)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("5",tinymce.util.Tools.resolve),g("1",["5"],function(a){return a("tinymce.PluginManager")}),h("c",Array),h("d",Error),g("6",["c","d"],function(a,b){var c=function(){},d=function(a){return function(){return a()}},e=function(a,b){return function(){return a(b.apply(null,arguments))}},f=function(a){return function(){return a}},g=function(a){return a},h=function(a,b){return a===b},i=function(b){for(var c=new a(arguments.length-1),d=1;d<arguments.length;d++)c[d-1]=arguments[d];return function(){for(var d=new a(arguments.length),e=0;e<d.length;e++)d[e]=arguments[e];var f=c.concat(d);return b.apply(null,f)}},j=function(a){return function(){return!a.apply(null,arguments)}},k=function(a){return function(){throw new b(a)}},l=function(a){return a()},m=function(a){a()},n=f(!1),o=f(!0);return{noop:c,noarg:d,compose:e,constant:f,identity:g,tripleEquals:h,curry:i,not:j,die:k,apply:l,call:m,never:n,always:o}}),g("8",["5"],function(a){return a("tinymce.util.Tools")}),g("e",["5"],function(a){return a("tinymce.util.XHR")}),g("f",["5"],function(a){return a("tinymce.dom.DOMUtils")}),g("9",["f"],function(a){var b=function(a){return a.getParam("template_cdate_classes","cdate")},c=function(a){return a.getParam("template_mdate_classes","mdate")},d=function(a){return a.getParam("template_selected_content_classes","selcontent")},e=function(a){return a.getParam("template_preview_replace_values")},f=function(a){return a.getParam("template_replace_values")},g=function(a){return a.templates},h=function(a){return a.getParam("template_cdate_format",a.getLang("template.cdate_format"))},i=function(a){return a.getParam("template_mdate_format",a.getLang("template.mdate_format"))},j=function(a){return a.getParam("template_popup_width",600)},k=function(b){return Math.min(a.DOM.getViewPort().h,b.getParam("template_popup_height",500))};return{getCreationDateClasses:b,getModificationDateClasses:c,getSelectedContentClasses:d,getPreviewReplaceValues:e,getTemplateReplaceValues:f,getTemplates:g,getCdateFormat:h,getMdateFormat:i,getDialogWidth:j,getDialogHeight:k}}),g("a",[],function(){var a=function(a,b){if(a=""+a,a.length<b)for(var c=0;c<b-a.length;c++)a="0"+a;return a},b=function(b,c,d){var e="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),f="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),g="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),h="January February March April May June July August September October November December".split(" ");return d=d||new Date,c=c.replace("%D","%m/%d/%Y"),c=c.replace("%r","%I:%M:%S %p"),c=c.replace("%Y",""+d.getFullYear()),c=c.replace("%y",""+d.getYear()),c=c.replace("%m",a(d.getMonth()+1,2)),c=c.replace("%d",a(d.getDate(),2)),c=c.replace("%H",""+a(d.getHours(),2)),c=c.replace("%M",""+a(d.getMinutes(),2)),c=c.replace("%S",""+a(d.getSeconds(),2)),c=c.replace("%I",""+((d.getHours()+11)%12+1)),c=c.replace("%p",""+(d.getHours()<12?"AM":"PM")),c=c.replace("%B",""+b.translate(h[d.getMonth()])),c=c.replace("%b",""+b.translate(g[d.getMonth()])),c=c.replace("%A",""+b.translate(f[d.getDay()])),c=c.replace("%a",""+b.translate(e[d.getDay()])),c=c.replace("%%","%")};return{getDateTime:b}}),g("7",["8","e","9","a"],function(a,b,c,d){var e=function(a,d){return function(){var e=c.getTemplates(a);return"function"==typeof e?void e(d):void("string"==typeof e?b.send({url:e,success:function(a){d(JSON.parse(a))}}):d(e))}},f=function(b,c,d){return a.each(d,function(a,b){"function"==typeof a&&(a=a(b)),c=c.replace(new RegExp("\\{\\$"+b+"\\}","g"),a)}),c},g=function(b,d){var e=b.dom,f=c.getTemplateReplaceValues(b);a.each(e.select("*",d),function(b){a.each(f,function(a,c){e.hasClass(b,c)&&"function"==typeof f[c]&&f[c](b)})})},h=function(a,b){return new RegExp("\\b"+b+"\\b","g").test(a.className)},i=function(b,e,i){var j,k,l=b.dom,m=b.selection.getContent();i=f(b,i,c.getTemplateReplaceValues(b)),j=l.create("div",null,i),k=l.select(".mceTmpl",j),k&&k.length>0&&(j=l.create("div",null),j.appendChild(k[0].cloneNode(!0))),a.each(l.select("*",j),function(a){h(a,c.getCreationDateClasses(b).replace(/\s+/g,"|"))&&(a.innerHTML=d.getDateTime(b,c.getCdateFormat(b))),h(a,c.getModificationDateClasses(b).replace(/\s+/g,"|"))&&(a.innerHTML=d.getDateTime(b,c.getMdateFormat(b))),h(a,c.getSelectedContentClasses(b).replace(/\s+/g,"|"))&&(a.innerHTML=m)}),g(b,j),b.execCommand("mceInsertContent",!1,j.innerHTML),b.addVisual()};return{createTemplateList:e,replaceTemplateValues:f,replaceVals:g,insertTemplate:i}}),g("2",["6","7"],function(a,b){var c=function(c){c.addCommand("mceInsertTemplate",a.curry(b.insertTemplate,c))};return{register:c}}),g("3",["8","9","a","7"],function(a,b,c,d){var e=function(e){e.on("PreProcess",function(f){var g=e.dom,h=b.getMdateFormat(e);a.each(g.select("div",f.node),function(b){g.hasClass(b,"mceTmpl")&&(a.each(g.select("*",b),function(a){g.hasClass(a,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(a.innerHTML=c.getDateTime(e,h))}),d.replaceVals(e,b))})})};return{setup:e}}),g("b",["f","8","e","9","7"],function(a,b,c,d,e){var f=function(a,c,f){if(f.indexOf("<html>")===-1){var g="";b.each(a.contentCSS,function(b){g+='<link type="text/css" rel="stylesheet" href="'+a.documentBaseURI.toAbsolute(b)+'">'});var h=a.settings.body_class||"";h.indexOf("=")!==-1&&(h=a.getParam("body_class","","hash"),h=h[a.id]||""),f="<!DOCTYPE html><html><head>"+g+'</head><body class="'+h+'">'+f+"</body></html>"}f=e.replaceTemplateValues(a,f,d.getPreviewReplaceValues(a));var i=c.find("iframe")[0].getEl().contentWindow.document;i.open(),i.write(f),i.close()},g=function(a,g){var h,i,j=[];if(!g||0===g.length){var k=a.translate("No templates defined.");return void a.notificationManager.open({text:k,type:"info"})}b.each(g,function(a){j.push({selected:!j.length,text:a.title,value:{url:a.url,content:a.content,description:a.description}})});var l=function(b){var d=b.control.value();d.url?c.send({url:d.url,success:function(b){i=b,f(a,h,i)}}):(i=d.content,f(a,h,i)),h.find("#description")[0].text(b.control.value().description)};h=a.windowManager.open({title:"Insert template",layout:"flex",direction:"column",align:"stretch",padding:15,spacing:10,items:[{type:"form",flex:0,padding:0,items:[{type:"container",label:"Templates",items:{type:"listbox",label:"Templates",name:"template",values:j,onselect:l}}]},{type:"label",name:"description",label:"Description",text:"\xa0"},{type:"iframe",flex:1,border:1}],onsubmit:function(){e.insertTemplate(a,!1,i)},minWidth:d.getDialogWidth(a),minHeight:d.getDialogHeight(a)}),h.find("listbox")[0].fire("select")};return{open:g}}),g("4",["7","b"],function(a,b){var c=function(a){return function(c){b.open(a,c)}},d=function(b){b.addButton("template",{title:"Insert template",onclick:a.createTemplateList(b.settings,c(b))}),b.addMenuItem("template",{text:"Template",onclick:a.createTemplateList(b.settings,c(b)),icon:"template",context:"insert"})};return{register:d}}),g("0",["1","2","3","4"],function(a,b,c,d){return a.add("template",function(a){d.register(a),b.register(a),c.setup(a)}),function(){}}),d("0")()}();
|
@@ -0,0 +1,619 @@
|
|
1
|
+
(function () {
|
2
|
+
|
3
|
+
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
4
|
+
|
5
|
+
// Used when there is no 'main' module.
|
6
|
+
// The name is probably (hopefully) unique so minification removes for releases.
|
7
|
+
var register_3795 = function (id) {
|
8
|
+
var module = dem(id);
|
9
|
+
var fragments = id.split('.');
|
10
|
+
var target = Function('return this;')();
|
11
|
+
for (var i = 0; i < fragments.length - 1; ++i) {
|
12
|
+
if (target[fragments[i]] === undefined)
|
13
|
+
target[fragments[i]] = {};
|
14
|
+
target = target[fragments[i]];
|
15
|
+
}
|
16
|
+
target[fragments[fragments.length - 1]] = module;
|
17
|
+
};
|
18
|
+
|
19
|
+
var instantiate = function (id) {
|
20
|
+
var actual = defs[id];
|
21
|
+
var dependencies = actual.deps;
|
22
|
+
var definition = actual.defn;
|
23
|
+
var len = dependencies.length;
|
24
|
+
var instances = new Array(len);
|
25
|
+
for (var i = 0; i < len; ++i)
|
26
|
+
instances[i] = dem(dependencies[i]);
|
27
|
+
var defResult = definition.apply(null, instances);
|
28
|
+
if (defResult === undefined)
|
29
|
+
throw 'module [' + id + '] returned undefined';
|
30
|
+
actual.instance = defResult;
|
31
|
+
};
|
32
|
+
|
33
|
+
var def = function (id, dependencies, definition) {
|
34
|
+
if (typeof id !== 'string')
|
35
|
+
throw 'module id must be a string';
|
36
|
+
else if (dependencies === undefined)
|
37
|
+
throw 'no dependencies for ' + id;
|
38
|
+
else if (definition === undefined)
|
39
|
+
throw 'no definition function for ' + id;
|
40
|
+
defs[id] = {
|
41
|
+
deps: dependencies,
|
42
|
+
defn: definition,
|
43
|
+
instance: undefined
|
44
|
+
};
|
45
|
+
};
|
46
|
+
|
47
|
+
var dem = function (id) {
|
48
|
+
var actual = defs[id];
|
49
|
+
if (actual === undefined)
|
50
|
+
throw 'module [' + id + '] was undefined';
|
51
|
+
else if (actual.instance === undefined)
|
52
|
+
instantiate(id);
|
53
|
+
return actual.instance;
|
54
|
+
};
|
55
|
+
|
56
|
+
var req = function (ids, callback) {
|
57
|
+
var len = ids.length;
|
58
|
+
var instances = new Array(len);
|
59
|
+
for (var i = 0; i < len; ++i)
|
60
|
+
instances[i] = dem(ids[i]);
|
61
|
+
callback.apply(null, instances);
|
62
|
+
};
|
63
|
+
|
64
|
+
var ephox = {};
|
65
|
+
|
66
|
+
ephox.bolt = {
|
67
|
+
module: {
|
68
|
+
api: {
|
69
|
+
define: def,
|
70
|
+
require: req,
|
71
|
+
demand: dem
|
72
|
+
}
|
73
|
+
}
|
74
|
+
};
|
75
|
+
|
76
|
+
var define = def;
|
77
|
+
var require = req;
|
78
|
+
var demand = dem;
|
79
|
+
// this helps with minification when using a lot of global references
|
80
|
+
var defineGlobal = function (id, ref) {
|
81
|
+
define(id, [], function () { return ref; });
|
82
|
+
};
|
83
|
+
/*jsc
|
84
|
+
["tinymce.plugins.textcolor.Plugin","tinymce.core.PluginManager","tinymce.plugins.textcolor.ui.Buttons","global!tinymce.util.Tools.resolve","tinymce.core.dom.DOMUtils","tinymce.core.util.Tools","tinymce.plugins.textcolor.api.Settings","tinymce.plugins.textcolor.core.TextColor","tinymce.plugins.textcolor.ui.ColorPickerHtml","tinymce.core.util.I18n"]
|
85
|
+
jsc*/
|
86
|
+
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
87
|
+
/**
|
88
|
+
* ResolveGlobal.js
|
89
|
+
*
|
90
|
+
* Released under LGPL License.
|
91
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
92
|
+
*
|
93
|
+
* License: http://www.tinymce.com/license
|
94
|
+
* Contributing: http://www.tinymce.com/contributing
|
95
|
+
*/
|
96
|
+
|
97
|
+
define(
|
98
|
+
'tinymce.core.PluginManager',
|
99
|
+
[
|
100
|
+
'global!tinymce.util.Tools.resolve'
|
101
|
+
],
|
102
|
+
function (resolve) {
|
103
|
+
return resolve('tinymce.PluginManager');
|
104
|
+
}
|
105
|
+
);
|
106
|
+
|
107
|
+
/**
|
108
|
+
* ResolveGlobal.js
|
109
|
+
*
|
110
|
+
* Released under LGPL License.
|
111
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
112
|
+
*
|
113
|
+
* License: http://www.tinymce.com/license
|
114
|
+
* Contributing: http://www.tinymce.com/contributing
|
115
|
+
*/
|
116
|
+
|
117
|
+
define(
|
118
|
+
'tinymce.core.dom.DOMUtils',
|
119
|
+
[
|
120
|
+
'global!tinymce.util.Tools.resolve'
|
121
|
+
],
|
122
|
+
function (resolve) {
|
123
|
+
return resolve('tinymce.dom.DOMUtils');
|
124
|
+
}
|
125
|
+
);
|
126
|
+
|
127
|
+
/**
|
128
|
+
* ResolveGlobal.js
|
129
|
+
*
|
130
|
+
* Released under LGPL License.
|
131
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
132
|
+
*
|
133
|
+
* License: http://www.tinymce.com/license
|
134
|
+
* Contributing: http://www.tinymce.com/contributing
|
135
|
+
*/
|
136
|
+
|
137
|
+
define(
|
138
|
+
'tinymce.core.util.Tools',
|
139
|
+
[
|
140
|
+
'global!tinymce.util.Tools.resolve'
|
141
|
+
],
|
142
|
+
function (resolve) {
|
143
|
+
return resolve('tinymce.util.Tools');
|
144
|
+
}
|
145
|
+
);
|
146
|
+
|
147
|
+
/**
|
148
|
+
* Settings.js
|
149
|
+
*
|
150
|
+
* Released under LGPL License.
|
151
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
152
|
+
*
|
153
|
+
* License: http://www.tinymce.com/license
|
154
|
+
* Contributing: http://www.tinymce.com/contributing
|
155
|
+
*/
|
156
|
+
|
157
|
+
define(
|
158
|
+
'tinymce.plugins.textcolor.api.Settings',
|
159
|
+
[
|
160
|
+
],
|
161
|
+
function () {
|
162
|
+
var defaultColorMap = [
|
163
|
+
"000000", "Black",
|
164
|
+
"993300", "Burnt orange",
|
165
|
+
"333300", "Dark olive",
|
166
|
+
"003300", "Dark green",
|
167
|
+
"003366", "Dark azure",
|
168
|
+
"000080", "Navy Blue",
|
169
|
+
"333399", "Indigo",
|
170
|
+
"333333", "Very dark gray",
|
171
|
+
"800000", "Maroon",
|
172
|
+
"FF6600", "Orange",
|
173
|
+
"808000", "Olive",
|
174
|
+
"008000", "Green",
|
175
|
+
"008080", "Teal",
|
176
|
+
"0000FF", "Blue",
|
177
|
+
"666699", "Grayish blue",
|
178
|
+
"808080", "Gray",
|
179
|
+
"FF0000", "Red",
|
180
|
+
"FF9900", "Amber",
|
181
|
+
"99CC00", "Yellow green",
|
182
|
+
"339966", "Sea green",
|
183
|
+
"33CCCC", "Turquoise",
|
184
|
+
"3366FF", "Royal blue",
|
185
|
+
"800080", "Purple",
|
186
|
+
"999999", "Medium gray",
|
187
|
+
"FF00FF", "Magenta",
|
188
|
+
"FFCC00", "Gold",
|
189
|
+
"FFFF00", "Yellow",
|
190
|
+
"00FF00", "Lime",
|
191
|
+
"00FFFF", "Aqua",
|
192
|
+
"00CCFF", "Sky blue",
|
193
|
+
"993366", "Red violet",
|
194
|
+
"FFFFFF", "White",
|
195
|
+
"FF99CC", "Pink",
|
196
|
+
"FFCC99", "Peach",
|
197
|
+
"FFFF99", "Light yellow",
|
198
|
+
"CCFFCC", "Pale green",
|
199
|
+
"CCFFFF", "Pale cyan",
|
200
|
+
"99CCFF", "Light sky blue",
|
201
|
+
"CC99FF", "Plum"
|
202
|
+
];
|
203
|
+
|
204
|
+
var getTextColorMap = function (editor) {
|
205
|
+
return editor.getParam('textcolor_map', defaultColorMap);
|
206
|
+
};
|
207
|
+
|
208
|
+
var getForeColorMap = function (editor) {
|
209
|
+
return editor.getParam('forecolor_map', getTextColorMap(editor));
|
210
|
+
};
|
211
|
+
|
212
|
+
var getBackColorMap = function (editor) {
|
213
|
+
return editor.getParam('backcolor_map', getTextColorMap(editor));
|
214
|
+
};
|
215
|
+
|
216
|
+
var getTextColorRows = function (editor) {
|
217
|
+
return editor.getParam('textcolor_rows', 5);
|
218
|
+
};
|
219
|
+
|
220
|
+
var getTextColorCols = function (editor) {
|
221
|
+
return editor.getParam('textcolor_cols', 8);
|
222
|
+
};
|
223
|
+
|
224
|
+
var getForeColorRows = function (editor) {
|
225
|
+
return editor.getParam('forecolor_rows', getTextColorRows(editor));
|
226
|
+
};
|
227
|
+
|
228
|
+
var getBackColorRows = function (editor) {
|
229
|
+
return editor.getParam('backcolor_rows', getTextColorRows(editor));
|
230
|
+
};
|
231
|
+
|
232
|
+
var getForeColorCols = function (editor) {
|
233
|
+
return editor.getParam('forecolor_cols', getTextColorCols(editor));
|
234
|
+
};
|
235
|
+
|
236
|
+
var getBackColorCols = function (editor) {
|
237
|
+
return editor.getParam('backcolor_cols', getTextColorCols(editor));
|
238
|
+
};
|
239
|
+
|
240
|
+
var getColorPickerCallback = function (editor) {
|
241
|
+
return editor.getParam('color_picker_callback', null);
|
242
|
+
};
|
243
|
+
|
244
|
+
var hasColorPicker = function (editor) {
|
245
|
+
return typeof getColorPickerCallback(editor) === 'function';
|
246
|
+
};
|
247
|
+
|
248
|
+
return {
|
249
|
+
getForeColorMap: getForeColorMap,
|
250
|
+
getBackColorMap: getBackColorMap,
|
251
|
+
getForeColorRows: getForeColorRows,
|
252
|
+
getBackColorRows: getBackColorRows,
|
253
|
+
getForeColorCols: getForeColorCols,
|
254
|
+
getBackColorCols: getBackColorCols,
|
255
|
+
getColorPickerCallback: getColorPickerCallback,
|
256
|
+
hasColorPicker: hasColorPicker
|
257
|
+
};
|
258
|
+
}
|
259
|
+
);
|
260
|
+
|
261
|
+
/**
|
262
|
+
* TextColor.js
|
263
|
+
*
|
264
|
+
* Released under LGPL License.
|
265
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
266
|
+
*
|
267
|
+
* License: http://www.tinymce.com/license
|
268
|
+
* Contributing: http://www.tinymce.com/contributing
|
269
|
+
*/
|
270
|
+
|
271
|
+
define(
|
272
|
+
'tinymce.plugins.textcolor.core.TextColor',
|
273
|
+
[
|
274
|
+
],
|
275
|
+
function () {
|
276
|
+
var getCurrentColor = function (editor, format) {
|
277
|
+
var color;
|
278
|
+
|
279
|
+
editor.dom.getParents(editor.selection.getStart(), function (elm) {
|
280
|
+
var value;
|
281
|
+
|
282
|
+
if ((value = elm.style[format === 'forecolor' ? 'color' : 'background-color'])) {
|
283
|
+
color = value;
|
284
|
+
}
|
285
|
+
});
|
286
|
+
|
287
|
+
return color;
|
288
|
+
};
|
289
|
+
|
290
|
+
var mapColors = function (colorMap) {
|
291
|
+
var i, colors = [];
|
292
|
+
|
293
|
+
for (i = 0; i < colorMap.length; i += 2) {
|
294
|
+
colors.push({
|
295
|
+
text: colorMap[i + 1],
|
296
|
+
color: '#' + colorMap[i]
|
297
|
+
});
|
298
|
+
}
|
299
|
+
|
300
|
+
return colors;
|
301
|
+
};
|
302
|
+
|
303
|
+
var applyFormat = function (editor, format, value) {
|
304
|
+
editor.undoManager.transact(function () {
|
305
|
+
editor.focus();
|
306
|
+
editor.formatter.apply(format, { value: value });
|
307
|
+
editor.nodeChanged();
|
308
|
+
});
|
309
|
+
};
|
310
|
+
|
311
|
+
var removeFormat = function (editor, format) {
|
312
|
+
editor.undoManager.transact(function () {
|
313
|
+
editor.focus();
|
314
|
+
editor.formatter.remove(format, { value: null }, null, true);
|
315
|
+
editor.nodeChanged();
|
316
|
+
});
|
317
|
+
};
|
318
|
+
|
319
|
+
return {
|
320
|
+
getCurrentColor: getCurrentColor,
|
321
|
+
mapColors: mapColors,
|
322
|
+
applyFormat: applyFormat,
|
323
|
+
removeFormat: removeFormat
|
324
|
+
};
|
325
|
+
}
|
326
|
+
);
|
327
|
+
/**
|
328
|
+
* ResolveGlobal.js
|
329
|
+
*
|
330
|
+
* Released under LGPL License.
|
331
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
332
|
+
*
|
333
|
+
* License: http://www.tinymce.com/license
|
334
|
+
* Contributing: http://www.tinymce.com/contributing
|
335
|
+
*/
|
336
|
+
|
337
|
+
define(
|
338
|
+
'tinymce.core.util.I18n',
|
339
|
+
[
|
340
|
+
'global!tinymce.util.Tools.resolve'
|
341
|
+
],
|
342
|
+
function (resolve) {
|
343
|
+
return resolve('tinymce.util.I18n');
|
344
|
+
}
|
345
|
+
);
|
346
|
+
|
347
|
+
/**
|
348
|
+
* ColorPickerHtml.js
|
349
|
+
*
|
350
|
+
* Released under LGPL License.
|
351
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
352
|
+
*
|
353
|
+
* License: http://www.tinymce.com/license
|
354
|
+
* Contributing: http://www.tinymce.com/contributing
|
355
|
+
*/
|
356
|
+
|
357
|
+
define(
|
358
|
+
'tinymce.plugins.textcolor.ui.ColorPickerHtml',
|
359
|
+
[
|
360
|
+
'tinymce.core.dom.DOMUtils',
|
361
|
+
'tinymce.core.util.I18n',
|
362
|
+
'tinymce.plugins.textcolor.api.Settings',
|
363
|
+
'tinymce.plugins.textcolor.core.TextColor'
|
364
|
+
],
|
365
|
+
function (DOMUtils, I18n, Settings, TextColor) {
|
366
|
+
var getHtml = function (cols, rows, colorMap, hasColorPicker) {
|
367
|
+
var colors, color, html, last, x, y, i, count = 0, id = DOMUtils.DOM.uniqueId('mcearia');
|
368
|
+
|
369
|
+
var getColorCellHtml = function (color, title) {
|
370
|
+
var isNoColor = color === 'transparent';
|
371
|
+
|
372
|
+
return (
|
373
|
+
'<td class="mce-grid-cell' + (isNoColor ? ' mce-colorbtn-trans' : '') + '">' +
|
374
|
+
'<div id="' + id + '-' + (count++) + '"' +
|
375
|
+
' data-mce-color="' + (color ? color : '') + '"' +
|
376
|
+
' role="option"' +
|
377
|
+
' tabIndex="-1"' +
|
378
|
+
' style="' + (color ? 'background-color: ' + color : '') + '"' +
|
379
|
+
' title="' + I18n.translate(title) + '">' +
|
380
|
+
(isNoColor ? '×' : '') +
|
381
|
+
'</div>' +
|
382
|
+
'</td>'
|
383
|
+
);
|
384
|
+
};
|
385
|
+
|
386
|
+
colors = TextColor.mapColors(colorMap);
|
387
|
+
colors.push({
|
388
|
+
text: I18n.translate("No color"),
|
389
|
+
color: "transparent"
|
390
|
+
});
|
391
|
+
|
392
|
+
html = '<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="list" cellspacing="0"><tbody>';
|
393
|
+
last = colors.length - 1;
|
394
|
+
|
395
|
+
for (y = 0; y < rows; y++) {
|
396
|
+
html += '<tr>';
|
397
|
+
|
398
|
+
for (x = 0; x < cols; x++) {
|
399
|
+
i = y * cols + x;
|
400
|
+
|
401
|
+
if (i > last) {
|
402
|
+
html += '<td></td>';
|
403
|
+
} else {
|
404
|
+
color = colors[i];
|
405
|
+
html += getColorCellHtml(color.color, color.text);
|
406
|
+
}
|
407
|
+
}
|
408
|
+
|
409
|
+
html += '</tr>';
|
410
|
+
}
|
411
|
+
|
412
|
+
if (hasColorPicker) {
|
413
|
+
html += (
|
414
|
+
'<tr>' +
|
415
|
+
'<td colspan="' + cols + '" class="mce-custom-color-btn">' +
|
416
|
+
'<div id="' + id + '-c" class="mce-widget mce-btn mce-btn-small mce-btn-flat" ' +
|
417
|
+
'role="button" tabindex="-1" aria-labelledby="' + id + '-c" style="width: 100%">' +
|
418
|
+
'<button type="button" role="presentation" tabindex="-1">' + I18n.translate('Custom...') + '</button>' +
|
419
|
+
'</div>' +
|
420
|
+
'</td>' +
|
421
|
+
'</tr>'
|
422
|
+
);
|
423
|
+
|
424
|
+
html += '<tr>';
|
425
|
+
|
426
|
+
for (x = 0; x < cols; x++) {
|
427
|
+
html += getColorCellHtml('', 'Custom color');
|
428
|
+
}
|
429
|
+
|
430
|
+
html += '</tr>';
|
431
|
+
}
|
432
|
+
|
433
|
+
html += '</tbody></table>';
|
434
|
+
|
435
|
+
return html;
|
436
|
+
};
|
437
|
+
|
438
|
+
return {
|
439
|
+
getHtml: getHtml
|
440
|
+
};
|
441
|
+
}
|
442
|
+
);
|
443
|
+
/**
|
444
|
+
* Buttons.js
|
445
|
+
*
|
446
|
+
* Released under LGPL License.
|
447
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
448
|
+
*
|
449
|
+
* License: http://www.tinymce.com/license
|
450
|
+
* Contributing: http://www.tinymce.com/contributing
|
451
|
+
*/
|
452
|
+
|
453
|
+
define(
|
454
|
+
'tinymce.plugins.textcolor.ui.Buttons',
|
455
|
+
[
|
456
|
+
'tinymce.core.dom.DOMUtils',
|
457
|
+
'tinymce.core.util.Tools',
|
458
|
+
'tinymce.plugins.textcolor.api.Settings',
|
459
|
+
'tinymce.plugins.textcolor.core.TextColor',
|
460
|
+
'tinymce.plugins.textcolor.ui.ColorPickerHtml'
|
461
|
+
],
|
462
|
+
function (DOMUtils, Tools, Settings, TextColor, ColorPickerHtml) {
|
463
|
+
var setDivColor = function setDivColor(div, value) {
|
464
|
+
div.style.background = value;
|
465
|
+
div.setAttribute('data-mce-color', value);
|
466
|
+
};
|
467
|
+
|
468
|
+
var onButtonClick = function (editor) {
|
469
|
+
return function (e) {
|
470
|
+
var ctrl = e.control;
|
471
|
+
|
472
|
+
if (ctrl._color) {
|
473
|
+
TextColor.applyFormat(editor, ctrl.settings.format, ctrl._color);
|
474
|
+
} else {
|
475
|
+
TextColor.removeFormat(editor, ctrl.settings.format);
|
476
|
+
}
|
477
|
+
};
|
478
|
+
};
|
479
|
+
|
480
|
+
var onPanelClick = function (editor, cols) {
|
481
|
+
return function (e) {
|
482
|
+
var buttonCtrl = this.parent(), value;
|
483
|
+
var currentColor = TextColor.getCurrentColor(editor, buttonCtrl.settings.format);
|
484
|
+
|
485
|
+
var selectColor = function (value) {
|
486
|
+
buttonCtrl.hidePanel();
|
487
|
+
buttonCtrl.color(value);
|
488
|
+
TextColor.applyFormat(editor, buttonCtrl.settings.format, value);
|
489
|
+
};
|
490
|
+
|
491
|
+
var resetColor = function () {
|
492
|
+
buttonCtrl.hidePanel();
|
493
|
+
buttonCtrl.resetColor();
|
494
|
+
TextColor.removeFormat(editor, buttonCtrl.settings.format);
|
495
|
+
};
|
496
|
+
|
497
|
+
if (DOMUtils.DOM.getParent(e.target, '.mce-custom-color-btn')) {
|
498
|
+
buttonCtrl.hidePanel();
|
499
|
+
|
500
|
+
var colorPickerCallback = Settings.getColorPickerCallback(editor);
|
501
|
+
|
502
|
+
colorPickerCallback.call(editor, function (value) {
|
503
|
+
var tableElm = buttonCtrl.panel.getEl().getElementsByTagName('table')[0];
|
504
|
+
var customColorCells, div, i;
|
505
|
+
|
506
|
+
customColorCells = Tools.map(tableElm.rows[tableElm.rows.length - 1].childNodes, function (elm) {
|
507
|
+
return elm.firstChild;
|
508
|
+
});
|
509
|
+
|
510
|
+
for (i = 0; i < customColorCells.length; i++) {
|
511
|
+
div = customColorCells[i];
|
512
|
+
if (!div.getAttribute('data-mce-color')) {
|
513
|
+
break;
|
514
|
+
}
|
515
|
+
}
|
516
|
+
|
517
|
+
// Shift colors to the right
|
518
|
+
// TODO: Might need to be the left on RTL
|
519
|
+
if (i === cols) {
|
520
|
+
for (i = 0; i < cols - 1; i++) {
|
521
|
+
setDivColor(customColorCells[i], customColorCells[i + 1].getAttribute('data-mce-color'));
|
522
|
+
}
|
523
|
+
}
|
524
|
+
|
525
|
+
setDivColor(div, value);
|
526
|
+
selectColor(value);
|
527
|
+
}, currentColor);
|
528
|
+
}
|
529
|
+
|
530
|
+
value = e.target.getAttribute('data-mce-color');
|
531
|
+
if (value) {
|
532
|
+
if (this.lastId) {
|
533
|
+
DOMUtils.DOM.get(this.lastId).setAttribute('aria-selected', false);
|
534
|
+
}
|
535
|
+
|
536
|
+
e.target.setAttribute('aria-selected', true);
|
537
|
+
this.lastId = e.target.id;
|
538
|
+
|
539
|
+
if (value === 'transparent') {
|
540
|
+
resetColor();
|
541
|
+
} else {
|
542
|
+
selectColor(value);
|
543
|
+
}
|
544
|
+
} else if (value !== null) {
|
545
|
+
buttonCtrl.hidePanel();
|
546
|
+
}
|
547
|
+
};
|
548
|
+
};
|
549
|
+
|
550
|
+
var renderColorPicker = function (editor, foreColor) {
|
551
|
+
return function () {
|
552
|
+
var cols = foreColor ? Settings.getForeColorCols(editor) : Settings.getBackColorCols(editor);
|
553
|
+
var rows = foreColor ? Settings.getForeColorRows(editor) : Settings.getBackColorRows(editor);
|
554
|
+
var colorMap = foreColor ? Settings.getForeColorMap(editor) : Settings.getBackColorMap(editor);
|
555
|
+
var hasColorPicker = Settings.hasColorPicker(editor);
|
556
|
+
|
557
|
+
return ColorPickerHtml.getHtml(cols, rows, colorMap, hasColorPicker);
|
558
|
+
};
|
559
|
+
};
|
560
|
+
|
561
|
+
var register = function (editor) {
|
562
|
+
editor.addButton('forecolor', {
|
563
|
+
type: 'colorbutton',
|
564
|
+
tooltip: 'Text color',
|
565
|
+
format: 'forecolor',
|
566
|
+
panel: {
|
567
|
+
role: 'application',
|
568
|
+
ariaRemember: true,
|
569
|
+
html: renderColorPicker(editor, true),
|
570
|
+
onclick: onPanelClick(editor, Settings.getForeColorCols(editor))
|
571
|
+
},
|
572
|
+
onclick: onButtonClick(editor)
|
573
|
+
});
|
574
|
+
|
575
|
+
editor.addButton('backcolor', {
|
576
|
+
type: 'colorbutton',
|
577
|
+
tooltip: 'Background color',
|
578
|
+
format: 'hilitecolor',
|
579
|
+
panel: {
|
580
|
+
role: 'application',
|
581
|
+
ariaRemember: true,
|
582
|
+
html: renderColorPicker(editor, false),
|
583
|
+
onclick: onPanelClick(editor, Settings.getBackColorCols(editor))
|
584
|
+
},
|
585
|
+
onclick: onButtonClick(editor)
|
586
|
+
});
|
587
|
+
};
|
588
|
+
|
589
|
+
return {
|
590
|
+
register: register
|
591
|
+
};
|
592
|
+
}
|
593
|
+
);
|
594
|
+
/**
|
595
|
+
* Plugin.js
|
596
|
+
*
|
597
|
+
* Released under LGPL License.
|
598
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
599
|
+
*
|
600
|
+
* License: http://www.tinymce.com/license
|
601
|
+
* Contributing: http://www.tinymce.com/contributing
|
602
|
+
*/
|
603
|
+
|
604
|
+
define(
|
605
|
+
'tinymce.plugins.textcolor.Plugin',
|
606
|
+
[
|
607
|
+
'tinymce.core.PluginManager',
|
608
|
+
'tinymce.plugins.textcolor.ui.Buttons'
|
609
|
+
],
|
610
|
+
function (PluginManager, Buttons) {
|
611
|
+
PluginManager.add('textcolor', function (editor) {
|
612
|
+
Buttons.register(editor);
|
613
|
+
});
|
614
|
+
|
615
|
+
return function () { };
|
616
|
+
}
|
617
|
+
);
|
618
|
+
dem('tinymce.plugins.textcolor.Plugin')();
|
619
|
+
})();
|