This commit is contained in:
2026-03-20 17:13:38 +01:00
parent 4c84735b75
commit c043ee9a52
1152 changed files with 317560 additions and 0 deletions
@@ -0,0 +1,87 @@
(function ($) {
'use strict';
// Adds the language variables
$.extend(true, $.trumbowyg, {
langs: {
// jshint camelcase:false
en: {
template: 'Template'
},
da: {
template: 'Skabelon'
},
de: {
template: 'Vorlage'
},
et: {
template: 'Mall'
},
fr: {
template: 'Patron'
},
hu: {
template: 'Sablon'
},
ja: {
template: 'テンプレート'
},
ko: {
template: '서식'
},
nl: {
template: 'Sjabloon'
},
pt_br: {
template: 'Modelo'
},
ru: {
template: 'Шаблон'
},
tr: {
template: 'Şablon'
},
zh_tw: {
template: '模板',
},
// jshint camelcase:true
}
});
// Adds the extra button definition
$.extend(true, $.trumbowyg, {
plugins: {
template: {
shouldInit: function (trumbowyg) {
return trumbowyg.o.plugins.hasOwnProperty('templates');
},
init: function (trumbowyg) {
trumbowyg.addBtnDef('template', {
dropdown: templateSelector(trumbowyg),
hasIcon: false,
text: trumbowyg.lang.template
});
}
}
}
});
// Creates the template-selector dropdown.
function templateSelector(trumbowyg) {
var available = trumbowyg.o.plugins.templates;
var templates = [];
$.each(available, function (index, template) {
trumbowyg.addBtnDef('template_' + index, {
fn: function () {
trumbowyg.html(template.html);
},
hasIcon: false,
title: template.name
});
templates.push('template_' + index);
});
return templates;
}
})(jQuery);
@@ -0,0 +1 @@
!function(t){"use strict";function e(e){var a=e.o.plugins.templates,l=[];return t.each(a,(function(t,a){e.addBtnDef("template_"+t,{fn:function(){e.html(a.html)},hasIcon:!1,title:a.name}),l.push("template_"+t)})),l}t.extend(!0,t.trumbowyg,{langs:{en:{template:"Template"},da:{template:"Skabelon"},de:{template:"Vorlage"},et:{template:"Mall"},fr:{template:"Patron"},hu:{template:"Sablon"},ja:{template:"テンプレート"},ko:{template:"서식"},nl:{template:"Sjabloon"},pt_br:{template:"Modelo"},ru:{template:"Шаблон"},tr:{template:"Şablon"},zh_tw:{template:"模板"}}}),t.extend(!0,t.trumbowyg,{plugins:{template:{shouldInit:function(t){return t.o.plugins.hasOwnProperty("templates")},init:function(t){t.addBtnDef("template",{dropdown:e(t),hasIcon:!1,text:t.lang.template})}}}})}(jQuery);