Receipt create. Part 1
This commit is contained in:
3
public/js/plugins/test/css/test.css
Executable file
3
public/js/plugins/test/css/test.css
Executable file
@@ -0,0 +1,3 @@
|
||||
select#test_select{
|
||||
background-color: #FF0000;
|
||||
}
|
||||
BIN
public/js/plugins/test/images/Thumbs.db
Executable file
BIN
public/js/plugins/test/images/Thumbs.db
Executable file
Binary file not shown.
BIN
public/js/plugins/test/images/test.gif
Executable file
BIN
public/js/plugins/test/images/test.gif
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 87 B |
10
public/js/plugins/test/langs/bg.js
Executable file
10
public/js/plugins/test/langs/bg.js
Executable 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
public/js/plugins/test/langs/cs.js
Executable file
4
public/js/plugins/test/langs/cs.js
Executable file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("cs",{
|
||||
test_select: "select tag",
|
||||
test_but: "test button"
|
||||
});
|
||||
4
public/js/plugins/test/langs/de.js
Executable file
4
public/js/plugins/test/langs/de.js
Executable file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("de",{
|
||||
test_select: "Tag auswählen",
|
||||
test_but: "Test Button"
|
||||
});
|
||||
4
public/js/plugins/test/langs/dk.js
Executable file
4
public/js/plugins/test/langs/dk.js
Executable file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("dk",{
|
||||
test_select: "select tag",
|
||||
test_but: "test button"
|
||||
});
|
||||
4
public/js/plugins/test/langs/en.js
Executable file
4
public/js/plugins/test/langs/en.js
Executable file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("en",{
|
||||
test_select: "select tag",
|
||||
test_but: "test button"
|
||||
});
|
||||
4
public/js/plugins/test/langs/eo.js
Executable file
4
public/js/plugins/test/langs/eo.js
Executable file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("eo",{
|
||||
test_select:"elekto de marko",
|
||||
test_but: "provo-butono"
|
||||
});
|
||||
4
public/js/plugins/test/langs/es.js
Executable file
4
public/js/plugins/test/langs/es.js
Executable file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("es",{
|
||||
test_select: "select tag",
|
||||
test_but: "test button"
|
||||
});
|
||||
4
public/js/plugins/test/langs/fr.js
Executable file
4
public/js/plugins/test/langs/fr.js
Executable file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("fr",{
|
||||
test_select:"choix balise",
|
||||
test_but: "bouton de test"
|
||||
});
|
||||
4
public/js/plugins/test/langs/hr.js
Executable file
4
public/js/plugins/test/langs/hr.js
Executable file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("hr",{
|
||||
test_select: "Odaberi tag",
|
||||
test_but: "Probna tipka"
|
||||
});
|
||||
4
public/js/plugins/test/langs/it.js
Executable file
4
public/js/plugins/test/langs/it.js
Executable file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("it",{
|
||||
test_select: "seleziona tag",
|
||||
test_but: "pulsante di test"
|
||||
});
|
||||
4
public/js/plugins/test/langs/ja.js
Executable file
4
public/js/plugins/test/langs/ja.js
Executable file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("ja",{
|
||||
test_select: "select tag",
|
||||
test_but: "test button"
|
||||
});
|
||||
4
public/js/plugins/test/langs/mk.js
Executable file
4
public/js/plugins/test/langs/mk.js
Executable file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("mk",{
|
||||
test_select: "select tag",
|
||||
test_but: "test button"
|
||||
});
|
||||
4
public/js/plugins/test/langs/nl.js
Executable file
4
public/js/plugins/test/langs/nl.js
Executable file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("nl",{
|
||||
test_select: "select tag",
|
||||
test_but: "test button"
|
||||
});
|
||||
4
public/js/plugins/test/langs/pl.js
Executable file
4
public/js/plugins/test/langs/pl.js
Executable file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("pl",{
|
||||
test_select: "wybierz tag",
|
||||
test_but: "test"
|
||||
});
|
||||
4
public/js/plugins/test/langs/pt.js
Executable file
4
public/js/plugins/test/langs/pt.js
Executable file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("pt",{
|
||||
test_select: "select tag",
|
||||
test_but: "test button"
|
||||
});
|
||||
4
public/js/plugins/test/langs/ru.js
Executable file
4
public/js/plugins/test/langs/ru.js
Executable file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("ru",{
|
||||
test_select: "выбрать тэг",
|
||||
test_but: "тестировать кнопку"
|
||||
});
|
||||
4
public/js/plugins/test/langs/sk.js
Executable file
4
public/js/plugins/test/langs/sk.js
Executable file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("sk",{
|
||||
test_select: "vyber tag",
|
||||
test_but: "testovacie tlačidlo"
|
||||
});
|
||||
4
public/js/plugins/test/langs/zh.js
Executable file
4
public/js/plugins/test/langs/zh.js
Executable file
@@ -0,0 +1,4 @@
|
||||
editArea.add_lang("zh",{
|
||||
test_select: "选择标签",
|
||||
test_but: "测试按钮"
|
||||
});
|
||||
110
public/js/plugins/test/test.js
Executable file
110
public/js/plugins/test/test.js
Executable 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
public/js/plugins/test/test2.js
Executable file
1
public/js/plugins/test/test2.js
Executable file
@@ -0,0 +1 @@
|
||||
alert("test2.js is loaded from test plugin");
|
||||
Reference in New Issue
Block a user