Datenstand V1.0
This commit is contained in:
91
ckeditor/plugins/tokens_mahn2/plugin.js
Normal file
91
ckeditor/plugins/tokens_mahn2/plugin.js
Normal file
@@ -0,0 +1,91 @@
|
||||
CKEDITOR.plugins.add( 'tokens_mahn2',
|
||||
{
|
||||
requires : ['richcombo'], //, 'styles' ],
|
||||
init : function( editor )
|
||||
{
|
||||
var config = editor.config,
|
||||
lang = editor.lang.format;
|
||||
|
||||
// Gets the list of tags from the settings.
|
||||
var tags_k = []; //new Array();
|
||||
var tags_b = [];
|
||||
var tags_f = [];
|
||||
var tags_a = [];
|
||||
//this.add('value', 'drop_text', 'drop_label');
|
||||
tags_k[0]=["[Kunde_Briefanrede]", "Kunde_Briefanrede", "Kunde_Briefanrede"];
|
||||
tags_k[1]=["[Kunde_Anrede]", "Kunde_Anrede", "Kunde_Anrede"];
|
||||
tags_k[2]=["[Kunde_Nachname]", "Kunde_Nachname", "Kunde_Nachname"];
|
||||
tags_k[3]=["[Kunde_Vorname]", "Kunde_Vorname", "Kunde_Vorname"];
|
||||
|
||||
tags_b[0]=["[Bearbeiter_Nachname]", "Bearbeiter_Nachname", "Bearbeiter_Nachname"];
|
||||
tags_b[1]=["[Bearbeiter_Vorname]", "Bearbeiter_Vorname", "Bearbeiter_Vorname"];
|
||||
tags_b[2]=["[Bearbeiter_Telefon]", "Bearbeiter_Telefon", "Bearbeiter_Telefon"];
|
||||
tags_b[3]=["[Bearbeiter_Mobil]", "Bearbeiter_Mobil", "Bearbeiter_Mobil"];
|
||||
tags_b[4]=["[Bearbeiter_EMail]", "Bearbeiter_EMail", "Bearbeiter_EMail"];
|
||||
|
||||
tags_f[0]=["[Firma_Name]", "Firma_Name", "Firma_Name"];
|
||||
tags_f[1]=["[Firma_Vertreter]", "Firma_Vertreter", "Firma_Vertreter"];
|
||||
tags_f[2]=["[Firma_Telefon]", "Firma_Telefon", "Firma_Telefon"];
|
||||
tags_f[3]=["[Firma_Mobil]", "Firma_Mobil", "Firma_Mobil"];
|
||||
tags_f[4]=["[Firma_EMail]", "Firma_EMail", "Firma_EMail"];
|
||||
|
||||
tags_a[0]=["[Rechnung_Datum]", "Rechnung_Datum", "Rechnung_Datum"];
|
||||
tags_a[1]=["[Rechnung_Nummer]", "Rechnung_Nummer", "Rechnung_Nummer"];
|
||||
tags_a[2]=["[Rechnung_Betrag]", "Rechnung_Betrag", "Rechnung_Betrag"];
|
||||
tags_a[3]=["[Mahnung1_Datum]", "Mahnung1_Datum", "Mahnung1_Datum"];
|
||||
tags_a[4]=["[Mahnung1_Nummer]", "Mahnung1_Nummer", "Mahnung1_Nummer"];
|
||||
tags_a[5]=["[Mahnung2_Datum]", "Mahnung2_Datum", "Mahnung2_Datum"];
|
||||
tags_a[6]=["[Mahnung2_Nummer]", "Mahnung2_Nummer", "Mahnung2_Nummer"];
|
||||
tags_a[7]=["[Mahnung2_Betrag]", "Mahnung2_Betrag", "Mahnung2_Betrag"];
|
||||
tags_a[8]=["[Zahlbar_Bis]", "Zahlbar_Bis", "Zahlbar_Bis"];
|
||||
|
||||
// Create style objects for all defined styles.
|
||||
|
||||
editor.ui.addRichCombo( 'tokens_mahn2',
|
||||
{
|
||||
label : "Textbausteine",
|
||||
title : "Textbausteine einfügen",
|
||||
voiceLabel : "Textbausteine einfügen",
|
||||
className : 'cke_format',
|
||||
multiSelect : false,
|
||||
|
||||
panel :
|
||||
{
|
||||
css : [ config.contentsCss, CKEDITOR.getUrl( editor.skinPath + 'editor.css' ) ],
|
||||
voiceLabel : lang.panelvoiceLabel
|
||||
},
|
||||
|
||||
init : function()
|
||||
{
|
||||
this.startGroup( "Kunde" );
|
||||
//this.add('value', 'drop_text', 'drop_label');
|
||||
for (var this_tags_k in tags_k){
|
||||
this.add(tags_k[this_tags_k][0], tags_k[this_tags_k][1], tags_k[this_tags_k][2]);
|
||||
}
|
||||
this.startGroup( "Bearbeiter" );
|
||||
//this.add('value', 'drop_text', 'drop_label');
|
||||
for (var this_tags_b in tags_b){
|
||||
this.add(tags_b[this_tags_b][0], tags_b[this_tags_b][1], tags_b[this_tags_b][2]);
|
||||
}
|
||||
this.startGroup( "Firma" );
|
||||
//this.add('value', 'drop_text', 'drop_label');
|
||||
for (var this_tags_f in tags_f){
|
||||
this.add(tags_f[this_tags_f][0], tags_f[this_tags_f][1], tags_f[this_tags_f][2]);
|
||||
}
|
||||
this.startGroup( "Mahnung" );
|
||||
//this.add('value', 'drop_text', 'drop_label');
|
||||
for (var this_tags_a in tags_a){
|
||||
this.add(tags_a[this_tags_a][0], tags_a[this_tags_a][1], tags_a[this_tags_a][2]);
|
||||
}
|
||||
},
|
||||
|
||||
onClick : function( value )
|
||||
{
|
||||
editor.focus();
|
||||
editor.fire( 'saveSnapshot' );
|
||||
editor.insertHtml(value);
|
||||
editor.fire( 'saveSnapshot' );
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user