Add consultation module assets and libraries
This commit is contained in:
@@ -0,0 +1,95 @@
|
||||
(function ($) {
|
||||
'use strict';
|
||||
|
||||
$.extend(true, $.trumbowyg, {
|
||||
langs: {
|
||||
// jshint camelcase:false
|
||||
en: {
|
||||
fontFamily: 'Font'
|
||||
},
|
||||
es: {
|
||||
fontFamily: 'Fuente'
|
||||
},
|
||||
da: {
|
||||
fontFamily: 'Skrifttype'
|
||||
},
|
||||
fr: {
|
||||
fontFamily: 'Police'
|
||||
},
|
||||
de: {
|
||||
fontFamily: 'Schriftart'
|
||||
},
|
||||
nl: {
|
||||
fontFamily: 'Lettertype'
|
||||
},
|
||||
tr: {
|
||||
fontFamily: 'Yazı Tipi'
|
||||
},
|
||||
zh_tw: {
|
||||
fontFamily: '字體',
|
||||
},
|
||||
pt_br: {
|
||||
fontFamily: 'Fonte',
|
||||
},
|
||||
ko: {
|
||||
fontFamily: '글꼴'
|
||||
},
|
||||
}
|
||||
});
|
||||
// jshint camelcase:true
|
||||
|
||||
var defaultOptions = {
|
||||
fontList: [
|
||||
{name: 'Arial', family: 'Arial, Helvetica, sans-serif'},
|
||||
{name: 'Arial Black', family: 'Arial Black, Gadget, sans-serif'},
|
||||
{name: 'Comic Sans', family: 'Comic Sans MS, Textile, cursive, sans-serif'},
|
||||
{name: 'Courier New', family: 'Courier New, Courier, monospace'},
|
||||
{name: 'Georgia', family: 'Georgia, serif'},
|
||||
{name: 'Impact', family: 'Impact, Charcoal, sans-serif'},
|
||||
{name: 'Lucida Console', family: 'Lucida Console, Monaco, monospace'},
|
||||
{name: 'Lucida Sans', family: 'Lucida Sans Uncide, Lucida Grande, sans-serif'},
|
||||
{name: 'Palatino', family: 'Palatino Linotype, Book Antiqua, Palatino, serif'},
|
||||
{name: 'Tahoma', family: 'Tahoma, Geneva, sans-serif'},
|
||||
{name: 'Times New Roman', family: 'Times New Roman, Times, serif'},
|
||||
{name: 'Trebuchet', family: 'Trebuchet MS, Helvetica, sans-serif'},
|
||||
{name: 'Verdana', family: 'Verdana, Geneva, sans-serif'}
|
||||
]
|
||||
};
|
||||
|
||||
// Add dropdown with web safe fonts
|
||||
$.extend(true, $.trumbowyg, {
|
||||
plugins: {
|
||||
fontfamily: {
|
||||
init: function (trumbowyg) {
|
||||
trumbowyg.o.plugins.fontfamily = $.extend({},
|
||||
defaultOptions,
|
||||
trumbowyg.o.plugins.fontfamily || {}
|
||||
);
|
||||
|
||||
trumbowyg.addBtnDef('fontfamily', {
|
||||
dropdown: buildDropdown(trumbowyg),
|
||||
hasIcon: false,
|
||||
text: trumbowyg.lang.fontFamily
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function buildDropdown(trumbowyg) {
|
||||
var dropdown = [];
|
||||
|
||||
$.each(trumbowyg.o.plugins.fontfamily.fontList, function (index, font) {
|
||||
trumbowyg.addBtnDef('fontfamily_' + index, {
|
||||
title: '<span style="font-family: ' + font.family + ';">' + font.name + '</span>',
|
||||
hasIcon: false,
|
||||
fn: function () {
|
||||
trumbowyg.execCmd('fontName', font.family, true);
|
||||
}
|
||||
});
|
||||
dropdown.push('fontfamily_' + index);
|
||||
});
|
||||
|
||||
return dropdown;
|
||||
}
|
||||
})(jQuery);
|
||||
1
konsultasi/libs/Trumbowyg/plugins/fontfamily/trumbowyg.fontfamily.min.js
vendored
Normal file
1
konsultasi/libs/Trumbowyg/plugins/fontfamily/trumbowyg.fontfamily.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(a){"use strict";function n(n){var i=[];return a.each(n.o.plugins.fontfamily.fontList,function(a,e){n.addBtnDef("fontfamily_"+a,{title:'<span style="font-family: '+e.family+';">'+e.name+"</span>",hasIcon:!1,fn:function(){n.execCmd("fontName",e.family,!0)}}),i.push("fontfamily_"+a)}),i}a.extend(!0,a.trumbowyg,{langs:{en:{fontFamily:"Font"},es:{fontFamily:"Fuente"},da:{fontFamily:"Skrifttype"},fr:{fontFamily:"Police"},de:{fontFamily:"Schriftart"},nl:{fontFamily:"Lettertype"},tr:{fontFamily:"Yazı Tipi"},zh_tw:{fontFamily:"字體"},pt_br:{fontFamily:"Fonte"},ko:{fontFamily:"글꼴"}}});var i={fontList:[{name:"Arial",family:"Arial, Helvetica, sans-serif"},{name:"Arial Black",family:"Arial Black, Gadget, sans-serif"},{name:"Comic Sans",family:"Comic Sans MS, Textile, cursive, sans-serif"},{name:"Courier New",family:"Courier New, Courier, monospace"},{name:"Georgia",family:"Georgia, serif"},{name:"Impact",family:"Impact, Charcoal, sans-serif"},{name:"Lucida Console",family:"Lucida Console, Monaco, monospace"},{name:"Lucida Sans",family:"Lucida Sans Uncide, Lucida Grande, sans-serif"},{name:"Palatino",family:"Palatino Linotype, Book Antiqua, Palatino, serif"},{name:"Tahoma",family:"Tahoma, Geneva, sans-serif"},{name:"Times New Roman",family:"Times New Roman, Times, serif"},{name:"Trebuchet",family:"Trebuchet MS, Helvetica, sans-serif"},{name:"Verdana",family:"Verdana, Geneva, sans-serif"}]};a.extend(!0,a.trumbowyg,{plugins:{fontfamily:{init:function(e){e.o.plugins.fontfamily=a.extend({},i,e.o.plugins.fontfamily||{}),e.addBtnDef("fontfamily",{dropdown:n(e),hasIcon:!1,text:e.lang.fontFamily})}}}})}(jQuery);
|
||||
Reference in New Issue
Block a user