mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-22 02:46:30 +00:00
Move includes/edit_area to resources/edit_area.
This commit is contained in:
90
resources/edit_area/plugins/charmap/charmap.js
Normal file
90
resources/edit_area/plugins/charmap/charmap.js
Normal file
@@ -0,0 +1,90 @@
|
||||
/**
|
||||
* Charmap plugin
|
||||
* by Christophe Dolivet
|
||||
* v0.1 (2006/09/22)
|
||||
*
|
||||
*
|
||||
* This plugin allow to use a visual keyboard allowing to insert any UTF-8 characters in the text.
|
||||
*
|
||||
* - plugin name to add to the plugin list: "charmap"
|
||||
* - plugin name to add to the toolbar list: "charmap"
|
||||
* - possible parameters to add to EditAreaLoader.init():
|
||||
* "charmap_default": (String) define the name of the default character range displayed on popup display
|
||||
* (default: "arrows")
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
var EditArea_charmap= {
|
||||
/**
|
||||
* Get called once this file is loaded (editArea still not initialized)
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
init: function(){
|
||||
this.default_language="Arrows";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the HTML code for a specific control string or false if this plugin doesn't have that control.
|
||||
* A control can be a button, select list or any other HTML item to present in the EditArea user interface.
|
||||
* Language variables such as {$lang_somekey} will also be replaced with contents from
|
||||
* the language packs.
|
||||
*
|
||||
* @param {string} ctrl_name: the name of the control to add
|
||||
* @return HTML code for a specific control or false.
|
||||
* @type string or boolean
|
||||
*/
|
||||
,get_control_html: function(ctrl_name){
|
||||
switch(ctrl_name){
|
||||
case "charmap":
|
||||
// Control id, button img, command
|
||||
return parent.editAreaLoader.get_button_html('charmap_but', 'charmap.gif', 'charmap_press', false, this.baseURL);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Get called once EditArea is fully loaded and initialised
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
,onload: function(){
|
||||
if(editArea.settings["charmap_default"] && editArea.settings["charmap_default"].length>0)
|
||||
this.default_language= editArea.settings["charmap_default"];
|
||||
}
|
||||
|
||||
/**
|
||||
* Is called each time the user touch a keyboard key.
|
||||
*
|
||||
* @param (event) e: the keydown event
|
||||
* @return true - pass to next handler in chain, false - stop chain execution
|
||||
* @type boolean
|
||||
*/
|
||||
,onkeydown: function(e){
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes a specific command, this function handles plugin commands.
|
||||
*
|
||||
* @param {string} cmd: the name of the command being executed
|
||||
* @param {unknown} param: the parameter of the command
|
||||
* @return true - pass to next handler in chain, false - stop chain execution
|
||||
* @type boolean
|
||||
*/
|
||||
,execCommand: function(cmd, param){
|
||||
// Handle commands
|
||||
switch(cmd){
|
||||
case "charmap_press":
|
||||
win= window.open(this.baseURL+"popup.html", "charmap", "width=500,height=270,scrollbars=yes,resizable=yes");
|
||||
win.focus();
|
||||
return false;
|
||||
}
|
||||
// Pass to next handler in chain
|
||||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Adds the plugin class to the list of available EditArea plugins
|
||||
editArea.add_plugin("charmap", EditArea_charmap);
|
||||
64
resources/edit_area/plugins/charmap/css/charmap.css
Normal file
64
resources/edit_area/plugins/charmap/css/charmap.css
Normal file
@@ -0,0 +1,64 @@
|
||||
body{
|
||||
background-color: #F0F0EE;
|
||||
font: 12px monospace, sans-serif;
|
||||
}
|
||||
|
||||
select{
|
||||
background-color: #F9F9F9;
|
||||
border: solid 1px #888888;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: #2B6FB6;
|
||||
}
|
||||
|
||||
h1{
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
div#char_list{
|
||||
height: 200px;
|
||||
overflow: auto;
|
||||
padding: 1px;
|
||||
border: 1px solid #0A246A;
|
||||
background-color: #F9F9F9;
|
||||
clear: both;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
a.char{
|
||||
display: block;
|
||||
float: left;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px;
|
||||
border: solid 1px #888888;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
a.char:hover{
|
||||
background-color: #CCCCCC;
|
||||
}
|
||||
|
||||
.preview{
|
||||
border: solid 1px #888888;
|
||||
width: 50px;
|
||||
padding: 2px 5px;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
text-align:center;
|
||||
background-color: #CCCCCC;
|
||||
font-size: 2em;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
margin: 0 0 5px 5px;
|
||||
}
|
||||
|
||||
#preview_code{
|
||||
font-size: 1.1em;
|
||||
width: 70px;
|
||||
}
|
||||
BIN
resources/edit_area/plugins/charmap/images/charmap.gif
Normal file
BIN
resources/edit_area/plugins/charmap/images/charmap.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 245 B |
373
resources/edit_area/plugins/charmap/jscripts/map.js
Normal file
373
resources/edit_area/plugins/charmap/jscripts/map.js
Normal file
@@ -0,0 +1,373 @@
|
||||
var editArea;
|
||||
|
||||
|
||||
/**
|
||||
* UTF-8 list taken from http://www.utf8-chartable.de/unicode-utf8-table.pl?utf8=dec
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
var char_range_list={
|
||||
"Basic Latin":"0021,007F",
|
||||
"Latin-1 Supplement":"0080,00FF",
|
||||
"Latin Extended-A":"0100,017F",
|
||||
"Latin Extended-B":"0180,024F",
|
||||
"IPA Extensions":"0250,02AF",
|
||||
"Spacing Modifier Letters":"02B0,02FF",
|
||||
|
||||
"Combining Diacritical Marks":"0300,036F",
|
||||
"Greek and Coptic":"0370,03FF",
|
||||
"Cyrillic":"0400,04FF",
|
||||
"Cyrillic Supplement":"0500,052F",
|
||||
"Armenian":"0530,058F",
|
||||
"Hebrew":"0590,05FF",
|
||||
"Arabic":"0600,06FF",
|
||||
"Syriac":"0700,074F",
|
||||
"Arabic Supplement":"0750,077F",
|
||||
|
||||
"Thaana":"0780,07BF",
|
||||
"Devanagari":"0900,097F",
|
||||
"Bengali":"0980,09FF",
|
||||
"Gurmukhi":"0A00,0A7F",
|
||||
"Gujarati":"0A80,0AFF",
|
||||
"Oriya":"0B00,0B7F",
|
||||
"Tamil":"0B80,0BFF",
|
||||
"Telugu":"0C00,0C7F",
|
||||
"Kannada":"0C80,0CFF",
|
||||
|
||||
"Malayalam":"0D00,0D7F",
|
||||
"Sinhala":"0D80,0DFF",
|
||||
"Thai":"0E00,0E7F",
|
||||
"Lao":"0E80,0EFF",
|
||||
"Tibetan":"0F00,0FFF",
|
||||
"Myanmar":"1000,109F",
|
||||
"Georgian":"10A0,10FF",
|
||||
"Hangul Jamo":"1100,11FF",
|
||||
"Ethiopic":"1200,137F",
|
||||
|
||||
"Ethiopic Supplement":"1380,139F",
|
||||
"Cherokee":"13A0,13FF",
|
||||
"Unified Canadian Aboriginal Syllabics":"1400,167F",
|
||||
"Ogham":"1680,169F",
|
||||
"Runic":"16A0,16FF",
|
||||
"Tagalog":"1700,171F",
|
||||
"Hanunoo":"1720,173F",
|
||||
"Buhid":"1740,175F",
|
||||
"Tagbanwa":"1760,177F",
|
||||
|
||||
"Khmer":"1780,17FF",
|
||||
"Mongolian":"1800,18AF",
|
||||
"Limbu":"1900,194F",
|
||||
"Tai Le":"1950,197F",
|
||||
"New Tai Lue":"1980,19DF",
|
||||
"Khmer Symbols":"19E0,19FF",
|
||||
"Buginese":"1A00,1A1F",
|
||||
"Phonetic Extensions":"1D00,1D7F",
|
||||
"Phonetic Extensions Supplement":"1D80,1DBF",
|
||||
|
||||
"Combining Diacritical Marks Supplement":"1DC0,1DFF",
|
||||
"Latin Extended Additional":"1E00,1EFF",
|
||||
"Greek Extended":"1F00,1FFF",
|
||||
"General Punctuation":"2000,206F",
|
||||
"Superscripts and Subscripts":"2070,209F",
|
||||
"Currency Symbols":"20A0,20CF",
|
||||
"Combining Diacritical Marks for Symbols":"20D0,20FF",
|
||||
"Letterlike Symbols":"2100,214F",
|
||||
"Number Forms":"2150,218F",
|
||||
|
||||
"Arrows":"2190,21FF",
|
||||
"Mathematical Operators":"2200,22FF",
|
||||
"Miscellaneous Technical":"2300,23FF",
|
||||
"Control Pictures":"2400,243F",
|
||||
"Optical Character Recognition":"2440,245F",
|
||||
"Enclosed Alphanumerics":"2460,24FF",
|
||||
"Box Drawing":"2500,257F",
|
||||
"Block Elements":"2580,259F",
|
||||
"Geometric Shapes":"25A0,25FF",
|
||||
|
||||
"Miscellaneous Symbols":"2600,26FF",
|
||||
"Dingbats":"2700,27BF",
|
||||
"Miscellaneous Mathematical Symbols-A":"27C0,27EF",
|
||||
"Supplemental Arrows-A":"27F0,27FF",
|
||||
"Braille Patterns":"2800,28FF",
|
||||
"Supplemental Arrows-B":"2900,297F",
|
||||
"Miscellaneous Mathematical Symbols-B":"2980,29FF",
|
||||
"Supplemental Mathematical Operators":"2A00,2AFF",
|
||||
"Miscellaneous Symbols and Arrows":"2B00,2BFF",
|
||||
|
||||
"Glagolitic":"2C00,2C5F",
|
||||
"Coptic":"2C80,2CFF",
|
||||
"Georgian Supplement":"2D00,2D2F",
|
||||
"Tifinagh":"2D30,2D7F",
|
||||
"Ethiopic Extended":"2D80,2DDF",
|
||||
"Supplemental Punctuation":"2E00,2E7F",
|
||||
"CJK Radicals Supplement":"2E80,2EFF",
|
||||
"Kangxi Radicals":"2F00,2FDF",
|
||||
"Ideographic Description Characters":"2FF0,2FFF",
|
||||
|
||||
"CJK Symbols and Punctuation":"3000,303F",
|
||||
"Hiragana":"3040,309F",
|
||||
"Katakana":"30A0,30FF",
|
||||
"Bopomofo":"3100,312F",
|
||||
"Hangul Compatibility Jamo":"3130,318F",
|
||||
"Kanbun":"3190,319F",
|
||||
"Bopomofo Extended":"31A0,31BF",
|
||||
"CJK Strokes":"31C0,31EF",
|
||||
"Katakana Phonetic Extensions":"31F0,31FF",
|
||||
|
||||
"Enclosed CJK Letters and Months":"3200,32FF",
|
||||
"CJK Compatibility":"3300,33FF",
|
||||
"CJK Unified Ideographs Extension A":"3400,4DBF",
|
||||
"Yijing Hexagram Symbols":"4DC0,4DFF",
|
||||
"CJK Unified Ideographs":"4E00,9FFF",
|
||||
"Yi Syllables":"A000,A48F",
|
||||
"Yi Radicals":"A490,A4CF",
|
||||
"Modifier Tone Letters":"A700,A71F",
|
||||
"Syloti Nagri":"A800,A82F",
|
||||
|
||||
"Hangul Syllables":"AC00,D7AF",
|
||||
"High Surrogates":"D800,DB7F",
|
||||
"High Private Use Surrogates":"DB80,DBFF",
|
||||
"Low Surrogates":"DC00,DFFF",
|
||||
"Private Use Area":"E000,F8FF",
|
||||
"CJK Compatibility Ideographs":"F900,FAFF",
|
||||
"Alphabetic Presentation Forms":"FB00,FB4F",
|
||||
"Arabic Presentation Forms-A":"FB50,FDFF",
|
||||
"Variation Selectors":"FE00,FE0F",
|
||||
|
||||
"Vertical Forms":"FE10,FE1F",
|
||||
"Combining Half Marks":"FE20,FE2F",
|
||||
"CJK Compatibility Forms":"FE30,FE4F",
|
||||
"Small Form Variants":"FE50,FE6F",
|
||||
"Arabic Presentation Forms-B":"FE70,FEFF",
|
||||
"Halfwidth and Fullwidth Forms":"FF00,FFEF",
|
||||
"Specials":"FFF0,FFFF",
|
||||
"Linear B Syllabary":"10000,1007F",
|
||||
"Linear B Ideograms":"10080,100FF",
|
||||
|
||||
"Aegean Numbers":"10100,1013F",
|
||||
"Ancient Greek Numbers":"10140,1018F",
|
||||
"Old Italic":"10300,1032F",
|
||||
"Gothic":"10330,1034F",
|
||||
"Ugaritic":"10380,1039F",
|
||||
"Old Persian":"103A0,103DF",
|
||||
"Deseret":"10400,1044F",
|
||||
"Shavian":"10450,1047F",
|
||||
"Osmanya":"10480,104AF",
|
||||
|
||||
"Cypriot Syllabary":"10800,1083F",
|
||||
"Kharoshthi":"10A00,10A5F",
|
||||
"Byzantine Musical Symbols":"1D000,1D0FF",
|
||||
"Musical Symbols":"1D100,1D1FF",
|
||||
"Ancient Greek Musical Notation":"1D200,1D24F",
|
||||
"Tai Xuan Jing Symbols":"1D300,1D35F",
|
||||
"Mathematical Alphanumeric Symbols":"1D400,1D7FF",
|
||||
"CJK Unified Ideographs Extension B":"20000,2A6DF",
|
||||
"CJK Compatibility Ideographs Supplement":"2F800,2FA1F",
|
||||
"Tags":"E0000,E007F",
|
||||
"Variation Selectors Supplement":"E0100,E01EF"
|
||||
};
|
||||
*/
|
||||
var char_range_list={
|
||||
"Aegean Numbers":"10100,1013F",
|
||||
"Alphabetic Presentation Forms":"FB00,FB4F",
|
||||
"Ancient Greek Musical Notation":"1D200,1D24F",
|
||||
"Ancient Greek Numbers":"10140,1018F",
|
||||
"Arabic":"0600,06FF",
|
||||
"Arabic Presentation Forms-A":"FB50,FDFF",
|
||||
"Arabic Presentation Forms-B":"FE70,FEFF",
|
||||
"Arabic Supplement":"0750,077F",
|
||||
"Armenian":"0530,058F",
|
||||
"Arrows":"2190,21FF",
|
||||
"Basic Latin":"0020,007F",
|
||||
"Bengali":"0980,09FF",
|
||||
"Block Elements":"2580,259F",
|
||||
"Bopomofo Extended":"31A0,31BF",
|
||||
"Bopomofo":"3100,312F",
|
||||
"Box Drawing":"2500,257F",
|
||||
"Braille Patterns":"2800,28FF",
|
||||
"Buginese":"1A00,1A1F",
|
||||
"Buhid":"1740,175F",
|
||||
"Byzantine Musical Symbols":"1D000,1D0FF",
|
||||
"CJK Compatibility Forms":"FE30,FE4F",
|
||||
"CJK Compatibility Ideographs Supplement":"2F800,2FA1F",
|
||||
"CJK Compatibility Ideographs":"F900,FAFF",
|
||||
"CJK Compatibility":"3300,33FF",
|
||||
"CJK Radicals Supplement":"2E80,2EFF",
|
||||
"CJK Strokes":"31C0,31EF",
|
||||
"CJK Symbols and Punctuation":"3000,303F",
|
||||
"CJK Unified Ideographs Extension A":"3400,4DBF",
|
||||
"CJK Unified Ideographs Extension B":"20000,2A6DF",
|
||||
"CJK Unified Ideographs":"4E00,9FFF",
|
||||
"Cherokee":"13A0,13FF",
|
||||
"Combining Diacritical Marks Supplement":"1DC0,1DFF",
|
||||
"Combining Diacritical Marks for Symbols":"20D0,20FF",
|
||||
"Combining Diacritical Marks":"0300,036F",
|
||||
"Combining Half Marks":"FE20,FE2F",
|
||||
"Control Pictures":"2400,243F",
|
||||
"Coptic":"2C80,2CFF",
|
||||
"Currency Symbols":"20A0,20CF",
|
||||
"Cypriot Syllabary":"10800,1083F",
|
||||
"Cyrillic Supplement":"0500,052F",
|
||||
"Cyrillic":"0400,04FF",
|
||||
"Deseret":"10400,1044F",
|
||||
"Devanagari":"0900,097F",
|
||||
"Dingbats":"2700,27BF",
|
||||
"Enclosed Alphanumerics":"2460,24FF",
|
||||
"Enclosed CJK Letters and Months":"3200,32FF",
|
||||
"Ethiopic Extended":"2D80,2DDF",
|
||||
"Ethiopic Supplement":"1380,139F",
|
||||
"Ethiopic":"1200,137F",
|
||||
"General Punctuation":"2000,206F",
|
||||
"Geometric Shapes":"25A0,25FF",
|
||||
"Georgian Supplement":"2D00,2D2F",
|
||||
"Georgian":"10A0,10FF",
|
||||
"Glagolitic":"2C00,2C5F",
|
||||
"Gothic":"10330,1034F",
|
||||
"Greek Extended":"1F00,1FFF",
|
||||
"Greek and Coptic":"0370,03FF",
|
||||
"Gujarati":"0A80,0AFF",
|
||||
"Gurmukhi":"0A00,0A7F",
|
||||
"Halfwidth and Fullwidth Forms":"FF00,FFEF",
|
||||
"Hangul Compatibility Jamo":"3130,318F",
|
||||
"Hangul Jamo":"1100,11FF",
|
||||
"Hangul Syllables":"AC00,D7AF",
|
||||
"Hanunoo":"1720,173F",
|
||||
"Hebrew":"0590,05FF",
|
||||
"High Private Use Surrogates":"DB80,DBFF",
|
||||
"High Surrogates":"D800,DB7F",
|
||||
"Hiragana":"3040,309F",
|
||||
"IPA Extensions":"0250,02AF",
|
||||
"Ideographic Description Characters":"2FF0,2FFF",
|
||||
"Kanbun":"3190,319F",
|
||||
"Kangxi Radicals":"2F00,2FDF",
|
||||
"Kannada":"0C80,0CFF",
|
||||
"Katakana Phonetic Extensions":"31F0,31FF",
|
||||
"Katakana":"30A0,30FF",
|
||||
"Kharoshthi":"10A00,10A5F",
|
||||
"Khmer Symbols":"19E0,19FF",
|
||||
"Khmer":"1780,17FF",
|
||||
"Lao":"0E80,0EFF",
|
||||
"Latin Extended Additional":"1E00,1EFF",
|
||||
"Latin Extended-A":"0100,017F",
|
||||
"Latin Extended-B":"0180,024F",
|
||||
"Latin-1 Supplement":"0080,00FF",
|
||||
"Letterlike Symbols":"2100,214F",
|
||||
"Limbu":"1900,194F",
|
||||
"Linear B Ideograms":"10080,100FF",
|
||||
"Linear B Syllabary":"10000,1007F",
|
||||
"Low Surrogates":"DC00,DFFF",
|
||||
"Malayalam":"0D00,0D7F",
|
||||
"Mathematical Alphanumeric Symbols":"1D400,1D7FF",
|
||||
"Mathematical Operators":"2200,22FF",
|
||||
"Miscellaneous Mathematical Symbols-A":"27C0,27EF",
|
||||
"Miscellaneous Mathematical Symbols-B":"2980,29FF",
|
||||
"Miscellaneous Symbols and Arrows":"2B00,2BFF",
|
||||
"Miscellaneous Symbols":"2600,26FF",
|
||||
"Miscellaneous Technical":"2300,23FF",
|
||||
"Modifier Tone Letters":"A700,A71F",
|
||||
"Mongolian":"1800,18AF",
|
||||
"Musical Symbols":"1D100,1D1FF",
|
||||
"Myanmar":"1000,109F",
|
||||
"New Tai Lue":"1980,19DF",
|
||||
"Number Forms":"2150,218F",
|
||||
"Ogham":"1680,169F",
|
||||
"Old Italic":"10300,1032F",
|
||||
"Old Persian":"103A0,103DF",
|
||||
"Optical Character Recognition":"2440,245F",
|
||||
"Oriya":"0B00,0B7F",
|
||||
"Osmanya":"10480,104AF",
|
||||
"Phonetic Extensions Supplement":"1D80,1DBF",
|
||||
"Phonetic Extensions":"1D00,1D7F",
|
||||
"Private Use Area":"E000,F8FF",
|
||||
"Runic":"16A0,16FF",
|
||||
"Shavian":"10450,1047F",
|
||||
"Sinhala":"0D80,0DFF",
|
||||
"Small Form Variants":"FE50,FE6F",
|
||||
"Spacing Modifier Letters":"02B0,02FF",
|
||||
"Specials":"FFF0,FFFF",
|
||||
"Superscripts and Subscripts":"2070,209F",
|
||||
"Supplemental Arrows-A":"27F0,27FF",
|
||||
"Supplemental Arrows-B":"2900,297F",
|
||||
"Supplemental Mathematical Operators":"2A00,2AFF",
|
||||
"Supplemental Punctuation":"2E00,2E7F",
|
||||
"Syloti Nagri":"A800,A82F",
|
||||
"Syriac":"0700,074F",
|
||||
"Tagalog":"1700,171F",
|
||||
"Tagbanwa":"1760,177F",
|
||||
"Tags":"E0000,E007F",
|
||||
"Tai Le":"1950,197F",
|
||||
"Tai Xuan Jing Symbols":"1D300,1D35F",
|
||||
"Tamil":"0B80,0BFF",
|
||||
"Telugu":"0C00,0C7F",
|
||||
"Thaana":"0780,07BF",
|
||||
"Thai":"0E00,0E7F",
|
||||
"Tibetan":"0F00,0FFF",
|
||||
"Tifinagh":"2D30,2D7F",
|
||||
"Ugaritic":"10380,1039F",
|
||||
"Unified Canadian Aboriginal Syllabics":"1400,167F",
|
||||
"Variation Selectors Supplement":"E0100,E01EF",
|
||||
"Variation Selectors":"FE00,FE0F",
|
||||
"Vertical Forms":"FE10,FE1F",
|
||||
"Yi Radicals":"A490,A4CF",
|
||||
"Yi Syllables":"A000,A48F",
|
||||
"Yijing Hexagram Symbols":"4DC0,4DFF"
|
||||
};
|
||||
|
||||
var insert="charmap_insert";
|
||||
|
||||
function map_load(){
|
||||
editArea=opener.editArea;
|
||||
// translate the document
|
||||
insert= editArea.get_translation(insert, "word");
|
||||
//alert(document.title);
|
||||
document.title= editArea.get_translation(document.title, "template");
|
||||
document.body.innerHTML= editArea.get_translation(document.body.innerHTML, "template");
|
||||
//document.title= editArea.get_translation(document.getElementBytitle, "template");
|
||||
|
||||
var selected_lang=opener.EditArea_charmap.default_language.toLowerCase();
|
||||
var selected=0;
|
||||
|
||||
var select= document.getElementById("select_range")
|
||||
for(var i in char_range_list){
|
||||
if(i.toLowerCase()==selected_lang)
|
||||
selected=select.options.length;
|
||||
select.options[select.options.length]=new Option(i, char_range_list[i]);
|
||||
}
|
||||
select.options[selected].selected=true;
|
||||
/* start=0;
|
||||
end=127;
|
||||
content="";
|
||||
for(var i=start; i<end; i++){
|
||||
content+="&#"+i+"; ";
|
||||
}
|
||||
document.getElementById("char_list").innerHTML=content;*/
|
||||
renderCharMapHTML();
|
||||
}
|
||||
|
||||
|
||||
function renderCharMapHTML() {
|
||||
range= document.getElementById("select_range").value.split(",");
|
||||
|
||||
start= parseInt(range[0],16);
|
||||
end= parseInt(range[1],16);
|
||||
var charsPerRow = 20, tdWidth=20, tdHeight=20;
|
||||
html="";
|
||||
for (var i=start; i<end; i++) {
|
||||
html+="<a class='char' onmouseover='previewChar(\""+ i + "\");' onclick='insertChar(\""+ i + "\");' title='"+ insert +"'>"+ String.fromCharCode(i) +"</a>";
|
||||
}
|
||||
document.getElementById("char_list").innerHTML= html;
|
||||
document.getElementById("preview_char").innerHTML="";
|
||||
}
|
||||
|
||||
function previewChar(i){
|
||||
document.getElementById("preview_char").innerHTML= String.fromCharCode(i);
|
||||
document.getElementById("preview_code").innerHTML= "&#"+ i +";";
|
||||
}
|
||||
|
||||
function insertChar(i){
|
||||
opener.parent.editAreaLoader.setSelectedText(editArea.id, String.fromCharCode( i));
|
||||
range= opener.parent.editAreaLoader.getSelectionRange(editArea.id);
|
||||
opener.parent.editAreaLoader.setSelectionRange(editArea.id, range["end"], range["end"]);
|
||||
window.focus();
|
||||
}
|
||||
12
resources/edit_area/plugins/charmap/langs/bg.js
Normal file
12
resources/edit_area/plugins/charmap/langs/bg.js
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
* Bulgarian translation
|
||||
* Author: Valentin Hristov
|
||||
* Company: SOFTKIT Bulgarian
|
||||
* Site: http://www.softkit-bg.com
|
||||
*/
|
||||
editArea.add_lang("bg",{
|
||||
charmap_but: "Виртуална клавиатура",
|
||||
charmap_title: "Виртуална клавиатура",
|
||||
charmap_choose_block: "избери езиков блок",
|
||||
charmap_insert:"постави този символ"
|
||||
});
|
||||
6
resources/edit_area/plugins/charmap/langs/cs.js
Normal file
6
resources/edit_area/plugins/charmap/langs/cs.js
Normal file
@@ -0,0 +1,6 @@
|
||||
editArea.add_lang("cs",{
|
||||
charmap_but: "Visual keyboard",
|
||||
charmap_title: "Visual keyboard",
|
||||
charmap_choose_block: "select language block",
|
||||
charmap_insert:"insert this character"
|
||||
});
|
||||
6
resources/edit_area/plugins/charmap/langs/de.js
Normal file
6
resources/edit_area/plugins/charmap/langs/de.js
Normal file
@@ -0,0 +1,6 @@
|
||||
editArea.add_lang("de",{
|
||||
charmap_but: "Sonderzeichen",
|
||||
charmap_title: "Sonderzeichen",
|
||||
charmap_choose_block: "Bereich auswählen",
|
||||
charmap_insert: "dieses Zeichen einfügen"
|
||||
});
|
||||
6
resources/edit_area/plugins/charmap/langs/dk.js
Normal file
6
resources/edit_area/plugins/charmap/langs/dk.js
Normal file
@@ -0,0 +1,6 @@
|
||||
editArea.add_lang("dk",{
|
||||
charmap_but: "Visual keyboard",
|
||||
charmap_title: "Visual keyboard",
|
||||
charmap_choose_block: "select language block",
|
||||
charmap_insert:"insert this character"
|
||||
});
|
||||
6
resources/edit_area/plugins/charmap/langs/en.js
Normal file
6
resources/edit_area/plugins/charmap/langs/en.js
Normal file
@@ -0,0 +1,6 @@
|
||||
editArea.add_lang("en",{
|
||||
charmap_but: "Visual keyboard",
|
||||
charmap_title: "Visual keyboard",
|
||||
charmap_choose_block: "select language block",
|
||||
charmap_insert:"insert this character"
|
||||
});
|
||||
6
resources/edit_area/plugins/charmap/langs/eo.js
Normal file
6
resources/edit_area/plugins/charmap/langs/eo.js
Normal file
@@ -0,0 +1,6 @@
|
||||
editArea.add_lang("eo",{
|
||||
charmap_but: "Ekranklavaro",
|
||||
charmap_title: "Ekranklavaro",
|
||||
charmap_choose_block: "Elekto de lingvo",
|
||||
charmap_insert:"enmeti tiun signaron"
|
||||
});
|
||||
6
resources/edit_area/plugins/charmap/langs/es.js
Normal file
6
resources/edit_area/plugins/charmap/langs/es.js
Normal file
@@ -0,0 +1,6 @@
|
||||
editArea.add_lang("es",{
|
||||
charmap_but: "Visual keyboard",
|
||||
charmap_title: "Visual keyboard",
|
||||
charmap_choose_block: "select language block",
|
||||
charmap_insert:"insert this character"
|
||||
});
|
||||
6
resources/edit_area/plugins/charmap/langs/fr.js
Normal file
6
resources/edit_area/plugins/charmap/langs/fr.js
Normal file
@@ -0,0 +1,6 @@
|
||||
editArea.add_lang("fr",{
|
||||
charmap_but: "Clavier visuel",
|
||||
charmap_title: "Clavier visuel",
|
||||
charmap_choose_block: "choix du language",
|
||||
charmap_insert:"insérer ce caractère"
|
||||
});
|
||||
6
resources/edit_area/plugins/charmap/langs/hr.js
Normal file
6
resources/edit_area/plugins/charmap/langs/hr.js
Normal file
@@ -0,0 +1,6 @@
|
||||
editArea.add_lang("hr",{
|
||||
charmap_but: "Virtualna tipkovnica",
|
||||
charmap_title: "Virtualna tipkovnica",
|
||||
charmap_choose_block: "Odaberi blok s jezikom",
|
||||
charmap_insert:"Ubaci taj znak"
|
||||
});
|
||||
6
resources/edit_area/plugins/charmap/langs/it.js
Normal file
6
resources/edit_area/plugins/charmap/langs/it.js
Normal file
@@ -0,0 +1,6 @@
|
||||
editArea.add_lang("it",{
|
||||
charmap_but: "Tastiera visuale",
|
||||
charmap_title: "Tastiera visuale",
|
||||
charmap_choose_block: "seleziona blocco",
|
||||
charmap_insert:"inserisci questo carattere"
|
||||
});
|
||||
6
resources/edit_area/plugins/charmap/langs/ja.js
Normal file
6
resources/edit_area/plugins/charmap/langs/ja.js
Normal file
@@ -0,0 +1,6 @@
|
||||
editArea.add_lang("ja",{
|
||||
charmap_but: "Visual keyboard",
|
||||
charmap_title: "Visual keyboard",
|
||||
charmap_choose_block: "select language block",
|
||||
charmap_insert:"insert this character"
|
||||
});
|
||||
6
resources/edit_area/plugins/charmap/langs/mk.js
Normal file
6
resources/edit_area/plugins/charmap/langs/mk.js
Normal file
@@ -0,0 +1,6 @@
|
||||
editArea.add_lang("mkn",{
|
||||
charmap_but: "Visual keyboard",
|
||||
charmap_title: "Visual keyboard",
|
||||
charmap_choose_block: "select language block",
|
||||
charmap_insert:"insert this character"
|
||||
});
|
||||
6
resources/edit_area/plugins/charmap/langs/nl.js
Normal file
6
resources/edit_area/plugins/charmap/langs/nl.js
Normal file
@@ -0,0 +1,6 @@
|
||||
editArea.add_lang("nl",{
|
||||
charmap_but: "Visueel toetsenbord",
|
||||
charmap_title: "Visueel toetsenbord",
|
||||
charmap_choose_block: "Kies een taal blok",
|
||||
charmap_insert:"Voeg dit symbool in"
|
||||
});
|
||||
6
resources/edit_area/plugins/charmap/langs/pl.js
Normal file
6
resources/edit_area/plugins/charmap/langs/pl.js
Normal file
@@ -0,0 +1,6 @@
|
||||
editArea.add_lang("pl",{
|
||||
charmap_but: "Klawiatura ekranowa",
|
||||
charmap_title: "Klawiatura ekranowa",
|
||||
charmap_choose_block: "wybierz grupę znaków",
|
||||
charmap_insert:"wstaw ten znak"
|
||||
});
|
||||
6
resources/edit_area/plugins/charmap/langs/pt.js
Normal file
6
resources/edit_area/plugins/charmap/langs/pt.js
Normal file
@@ -0,0 +1,6 @@
|
||||
editArea.add_lang("pt",{
|
||||
charmap_but: "Visual keyboard",
|
||||
charmap_title: "Visual keyboard",
|
||||
charmap_choose_block: "select language block",
|
||||
charmap_insert:"insert this character"
|
||||
});
|
||||
6
resources/edit_area/plugins/charmap/langs/ru.js
Normal file
6
resources/edit_area/plugins/charmap/langs/ru.js
Normal file
@@ -0,0 +1,6 @@
|
||||
editArea.add_lang("ru",{
|
||||
charmap_but: "Визуальная клавиатура",
|
||||
charmap_title: "Визуальная клавиатура",
|
||||
charmap_choose_block: "выбрать языковой блок",
|
||||
charmap_insert:"вставить этот символ"
|
||||
});
|
||||
6
resources/edit_area/plugins/charmap/langs/sk.js
Normal file
6
resources/edit_area/plugins/charmap/langs/sk.js
Normal file
@@ -0,0 +1,6 @@
|
||||
editArea.add_lang("sk",{
|
||||
charmap_but: "Vizuálna klávesnica",
|
||||
charmap_title: "Vizuálna klávesnica",
|
||||
charmap_choose_block: "vyber jazykový blok",
|
||||
charmap_insert: "vlož tento znak"
|
||||
});
|
||||
6
resources/edit_area/plugins/charmap/langs/zh.js
Normal file
6
resources/edit_area/plugins/charmap/langs/zh.js
Normal file
@@ -0,0 +1,6 @@
|
||||
editArea.add_lang("zh",{
|
||||
charmap_but: "软键盘",
|
||||
charmap_title: "软键盘",
|
||||
charmap_choose_block: "选择一个语言块",
|
||||
charmap_insert:"插入此字符"
|
||||
});
|
||||
24
resources/edit_area/plugins/charmap/popup.html
Normal file
24
resources/edit_area/plugins/charmap/popup.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
|
||||
<head>
|
||||
<title>{$charmap_title}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" type="text/css" href="css/charmap.css" />
|
||||
<script language="Javascript" type="text/javascript" src="jscripts/map.js">
|
||||
</script>
|
||||
</head>
|
||||
<body onload='map_load()'>
|
||||
<div id='preview_code' class='preview'></div>
|
||||
<div id='preview_char' class='preview'></div>
|
||||
<h1>{$charmap_title}:</h1>
|
||||
<select id='select_range' onchange='renderCharMapHTML()' title='{$charmap_choose_block}'>
|
||||
</select>
|
||||
<div id='char_list'>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
3
resources/edit_area/plugins/test/css/test.css
Normal file
3
resources/edit_area/plugins/test/css/test.css
Normal file
@@ -0,0 +1,3 @@
|
||||
select#test_select{
|
||||
background-color: #FF0000;
|
||||
}
|
||||
BIN
resources/edit_area/plugins/test/images/Thumbs.db
Normal file
BIN
resources/edit_area/plugins/test/images/Thumbs.db
Normal file
Binary file not shown.
BIN
resources/edit_area/plugins/test/images/test.gif
Normal file
BIN
resources/edit_area/plugins/test/images/test.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 87 B |
10
resources/edit_area/plugins/test/langs/bg.js
Normal file
10
resources/edit_area/plugins/test/langs/bg.js
Normal file
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
* Bulgarian translation
|
||||
* Author: Valentin Hristov
|
||||
* Company: SOFTKIT Bulgarian
|
||||
* Site: http://www.softkit-bg.com
|
||||
*/
|
||||
editArea.add_lang("bg",{
|
||||
test_select: "избери таг",
|
||||
test_but: "тествай копието"
|
||||
});
|
||||
4
resources/edit_area/plugins/test/langs/cs.js
Normal file
4
resources/edit_area/plugins/test/langs/cs.js
Normal file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("cs",{
|
||||
test_select: "select tag",
|
||||
test_but: "test button"
|
||||
});
|
||||
4
resources/edit_area/plugins/test/langs/de.js
Normal file
4
resources/edit_area/plugins/test/langs/de.js
Normal file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("de",{
|
||||
test_select: "Tag auswählen",
|
||||
test_but: "Test Button"
|
||||
});
|
||||
4
resources/edit_area/plugins/test/langs/dk.js
Normal file
4
resources/edit_area/plugins/test/langs/dk.js
Normal file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("dk",{
|
||||
test_select: "select tag",
|
||||
test_but: "test button"
|
||||
});
|
||||
4
resources/edit_area/plugins/test/langs/en.js
Normal file
4
resources/edit_area/plugins/test/langs/en.js
Normal file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("en",{
|
||||
test_select: "select tag",
|
||||
test_but: "test button"
|
||||
});
|
||||
4
resources/edit_area/plugins/test/langs/eo.js
Normal file
4
resources/edit_area/plugins/test/langs/eo.js
Normal file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("eo",{
|
||||
test_select:"elekto de marko",
|
||||
test_but: "provo-butono"
|
||||
});
|
||||
4
resources/edit_area/plugins/test/langs/es.js
Normal file
4
resources/edit_area/plugins/test/langs/es.js
Normal file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("es",{
|
||||
test_select: "select tag",
|
||||
test_but: "test button"
|
||||
});
|
||||
4
resources/edit_area/plugins/test/langs/fr.js
Normal file
4
resources/edit_area/plugins/test/langs/fr.js
Normal file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("fr",{
|
||||
test_select:"choix balise",
|
||||
test_but: "bouton de test"
|
||||
});
|
||||
4
resources/edit_area/plugins/test/langs/hr.js
Normal file
4
resources/edit_area/plugins/test/langs/hr.js
Normal file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("hr",{
|
||||
test_select: "Odaberi tag",
|
||||
test_but: "Probna tipka"
|
||||
});
|
||||
4
resources/edit_area/plugins/test/langs/it.js
Normal file
4
resources/edit_area/plugins/test/langs/it.js
Normal file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("it",{
|
||||
test_select: "seleziona tag",
|
||||
test_but: "pulsante di test"
|
||||
});
|
||||
4
resources/edit_area/plugins/test/langs/ja.js
Normal file
4
resources/edit_area/plugins/test/langs/ja.js
Normal file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("ja",{
|
||||
test_select: "select tag",
|
||||
test_but: "test button"
|
||||
});
|
||||
4
resources/edit_area/plugins/test/langs/mk.js
Normal file
4
resources/edit_area/plugins/test/langs/mk.js
Normal file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("mk",{
|
||||
test_select: "select tag",
|
||||
test_but: "test button"
|
||||
});
|
||||
4
resources/edit_area/plugins/test/langs/nl.js
Normal file
4
resources/edit_area/plugins/test/langs/nl.js
Normal file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("nl",{
|
||||
test_select: "select tag",
|
||||
test_but: "test button"
|
||||
});
|
||||
4
resources/edit_area/plugins/test/langs/pl.js
Normal file
4
resources/edit_area/plugins/test/langs/pl.js
Normal file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("pl",{
|
||||
test_select: "wybierz tag",
|
||||
test_but: "test"
|
||||
});
|
||||
4
resources/edit_area/plugins/test/langs/pt.js
Normal file
4
resources/edit_area/plugins/test/langs/pt.js
Normal file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("pt",{
|
||||
test_select: "select tag",
|
||||
test_but: "test button"
|
||||
});
|
||||
4
resources/edit_area/plugins/test/langs/ru.js
Normal file
4
resources/edit_area/plugins/test/langs/ru.js
Normal file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("ru",{
|
||||
test_select: "выбрать тэг",
|
||||
test_but: "тестировать кнопку"
|
||||
});
|
||||
4
resources/edit_area/plugins/test/langs/sk.js
Normal file
4
resources/edit_area/plugins/test/langs/sk.js
Normal file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("sk",{
|
||||
test_select: "vyber tag",
|
||||
test_but: "testovacie tlačidlo"
|
||||
});
|
||||
4
resources/edit_area/plugins/test/langs/zh.js
Normal file
4
resources/edit_area/plugins/test/langs/zh.js
Normal file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("zh",{
|
||||
test_select: "选择标签",
|
||||
test_but: "测试按钮"
|
||||
});
|
||||
110
resources/edit_area/plugins/test/test.js
Normal file
110
resources/edit_area/plugins/test/test.js
Normal file
@@ -0,0 +1,110 @@
|
||||
/**
|
||||
* Plugin designed for test prupose. It add a button (that manage an alert) and a select (that allow to insert tags) in the toolbar.
|
||||
* This plugin also disable the "f" key in the editarea, and load a CSS and a JS file
|
||||
*/
|
||||
var EditArea_test= {
|
||||
/**
|
||||
* Get called once this file is loaded (editArea still not initialized)
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
init: function(){
|
||||
// alert("test init: "+ this._someInternalFunction(2, 3));
|
||||
editArea.load_css(this.baseURL+"css/test.css");
|
||||
editArea.load_script(this.baseURL+"test2.js");
|
||||
}
|
||||
/**
|
||||
* Returns the HTML code for a specific control string or false if this plugin doesn't have that control.
|
||||
* A control can be a button, select list or any other HTML item to present in the EditArea user interface.
|
||||
* Language variables such as {$lang_somekey} will also be replaced with contents from
|
||||
* the language packs.
|
||||
*
|
||||
* @param {string} ctrl_name: the name of the control to add
|
||||
* @return HTML code for a specific control or false.
|
||||
* @type string or boolean
|
||||
*/
|
||||
,get_control_html: function(ctrl_name){
|
||||
switch(ctrl_name){
|
||||
case "test_but":
|
||||
// Control id, button img, command
|
||||
return parent.editAreaLoader.get_button_html('test_but', 'test.gif', 'test_cmd', false, this.baseURL);
|
||||
case "test_select":
|
||||
html= "<select id='test_select' onchange='javascript:editArea.execCommand(\"test_select_change\")' fileSpecific='no'>"
|
||||
+" <option value='-1'>{$test_select}</option>"
|
||||
+" <option value='h1'>h1</option>"
|
||||
+" <option value='h2'>h2</option>"
|
||||
+" <option value='h3'>h3</option>"
|
||||
+" <option value='h4'>h4</option>"
|
||||
+" <option value='h5'>h5</option>"
|
||||
+" <option value='h6'>h6</option>"
|
||||
+" </select>";
|
||||
return html;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Get called once EditArea is fully loaded and initialised
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
,onload: function(){
|
||||
alert("test load");
|
||||
}
|
||||
|
||||
/**
|
||||
* Is called each time the user touch a keyboard key.
|
||||
*
|
||||
* @param (event) e: the keydown event
|
||||
* @return true - pass to next handler in chain, false - stop chain execution
|
||||
* @type boolean
|
||||
*/
|
||||
,onkeydown: function(e){
|
||||
var str= String.fromCharCode(e.keyCode);
|
||||
// desactivate the "f" character
|
||||
if(str.toLowerCase()=="f"){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes a specific command, this function handles plugin commands.
|
||||
*
|
||||
* @param {string} cmd: the name of the command being executed
|
||||
* @param {unknown} param: the parameter of the command
|
||||
* @return true - pass to next handler in chain, false - stop chain execution
|
||||
* @type boolean
|
||||
*/
|
||||
,execCommand: function(cmd, param){
|
||||
// Handle commands
|
||||
switch(cmd){
|
||||
case "test_select_change":
|
||||
var val= document.getElementById("test_select").value;
|
||||
if(val!=-1)
|
||||
parent.editAreaLoader.insertTags(editArea.id, "<"+val+">", "</"+val+">");
|
||||
document.getElementById("test_select").options[0].selected=true;
|
||||
return false;
|
||||
case "test_cmd":
|
||||
alert("user clicked on test_cmd");
|
||||
return false;
|
||||
}
|
||||
// Pass to next handler in chain
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* This is just an internal plugin method, prefix all internal methods with a _ character.
|
||||
* The prefix is needed so they doesn't collide with future EditArea callback functions.
|
||||
*
|
||||
* @param {string} a Some arg1.
|
||||
* @param {string} b Some arg2.
|
||||
* @return Some return.
|
||||
* @type unknown
|
||||
*/
|
||||
,_someInternalFunction : function(a, b) {
|
||||
return a+b;
|
||||
}
|
||||
};
|
||||
|
||||
// Adds the plugin class to the list of available EditArea plugins
|
||||
editArea.add_plugin("test", EditArea_test);
|
||||
1
resources/edit_area/plugins/test/test2.js
Normal file
1
resources/edit_area/plugins/test/test2.js
Normal file
@@ -0,0 +1 @@
|
||||
alert("test2.js is loaded from test plugin");
|
||||
Reference in New Issue
Block a user