diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt
index a352105ab..471f6e353 100644
--- a/docs/changelog/7.x.x.txt
+++ b/docs/changelog/7.x.x.txt
@@ -46,6 +46,8 @@
- fixed #8807: _NewAsset.skeleton out of date
- added: "Duplicate this template and edit" now updates the asset we came from, if any
- fixed #8818: Visitor sends a welcome message
+ - added: "EditArea" code highlighter and editing tool for WebGUI::Form::Codearea, used
+ in Template, Snippet, SQLReport, and more
7.6.0
- added: users may now customize the post received page for the CS
diff --git a/lib/WebGUI/Asset/Template.pm b/lib/WebGUI/Asset/Template.pm
index 5a4568c53..e24a5ac15 100644
--- a/lib/WebGUI/Asset/Template.pm
+++ b/lib/WebGUI/Asset/Template.pm
@@ -69,6 +69,7 @@ sub definition {
properties => {
template => {
fieldType => 'codearea',
+ syntax => "html",
defaultValue => undef,
},
isEditable => {
@@ -165,6 +166,7 @@ sub getEditForm {
-name=>"template",
-label=>$i18n->get('assetName'),
-hoverHelp=>$i18n->get('template description'),
+ -syntax => "html",
-value=>$self->getValue("template")
);
$tabform->getTab("properties")->codearea(
diff --git a/lib/WebGUI/Asset/Wobject/SQLReport.pm b/lib/WebGUI/Asset/Wobject/SQLReport.pm
index 6ac5c868c..bdb1394dc 100644
--- a/lib/WebGUI/Asset/Wobject/SQLReport.pm
+++ b/lib/WebGUI/Asset/Wobject/SQLReport.pm
@@ -52,10 +52,12 @@ sub definition {
},
dbQuery1=>{
fieldType=>"codearea",
- defaultValue=>undef
+ syntax => "sql",
+ defaultValue=>undef,
},
prequeryStatements1=>{
fieldType=>"codearea",
+ syntax => "sql",
defaultValue=>undef
},
preprocessMacros1=>{
@@ -72,10 +74,12 @@ sub definition {
},
dbQuery2=>{
fieldType=>"codearea",
+ syntax => "sql",
defaultValue=>undef
},
prequeryStatements2=>{
fieldType=>"codearea",
+ syntax => "sql",
defaultValue=>undef
},
preprocessMacros2=>{
@@ -92,10 +96,12 @@ sub definition {
},
dbQuery3=>{
fieldType=>"codearea",
+ syntax => "sql",
defaultValue=>undef
},
prequeryStatements3=>{
fieldType=>"codearea",
+ syntax => "sql",
defaultValue=>undef
},
preprocessMacros3=>{
@@ -112,10 +118,12 @@ sub definition {
},
dbQuery4=>{
fieldType=>"codearea",
+ syntax => "sql",
defaultValue=>undef
},
prequeryStatements4=>{
fieldType=>"codearea",
+ syntax => "sql",
defaultValue=>undef
},
preprocessMacros4=>{
@@ -132,10 +140,12 @@ sub definition {
},
dbQuery5=>{
fieldType=>"codearea",
+ syntax => "sql",
defaultValue=>undef
},
prequeryStatements5=>{
fieldType=>"codearea",
+ syntax => "sql",
defaultValue=>undef
},
preprocessMacros5=>{
@@ -324,12 +334,14 @@ sub getEditForm {
-name => "prequeryStatements".$nr,
-label => $i18n->get('Prequery statements'),
-hoverHelp => $i18n->get('Prequery statements description'),
+ -syntax => "sql",
-value => $self->getValue("prequeryStatements".$nr),
);
$tabform->getTab("properties")->codearea(
-name=>"dbQuery".$nr,
-label=>$i18n->get(4),
-hoverHelp=>$i18n->get('4 description'),
+ -syntax => "sql",
-value=>$self->getValue("dbQuery".$nr)
);
$tabform->getTab("properties")->databaseLink(
diff --git a/lib/WebGUI/Form/Codearea.pm b/lib/WebGUI/Form/Codearea.pm
index bf4c7dc50..0e19ce0d4 100644
--- a/lib/WebGUI/Form/Codearea.pm
+++ b/lib/WebGUI/Form/Codearea.pm
@@ -59,6 +59,11 @@ Style attributes besides width and height which should be specified using the ab
The following additional parameters have been added via this sub class.
+=head4 syntax
+
+The type of syntax highlighting to use by default. The types available are located at
+$WEBGUI_ROOT/www/extras/editarea/edit_area/reg_syntax
+
=cut
sub definition {
@@ -75,8 +80,11 @@ sub definition {
style=>{
defaultValue => undef,
},
- });
- return $class->SUPER::definition($session, $definition);
+ syntax => {
+ defaultValue => "html",
+ },
+ });
+ return $class->SUPER::definition($session, $definition);
}
#-------------------------------------------------------------------
@@ -125,10 +133,36 @@ Renders a code area field.
=cut
sub toHtml {
- my $self = shift;
- $self->session->style->setScript($self->session->url->extras('TabFix.js'),{type=>"text/javascript"});
- $self->set("extras", $self->get('extras').' onkeypress="return TabFix_keyPress(event)" onkeydown="return TabFix_keyDown(event)"');
- return $self->SUPER::toHtml;
+ my $self = shift;
+ my $output = "";
+
+ # Do our superclass's job
+ my $value = $self->fixMacros($self->fixTags($self->fixSpecialCharacters($self->getOriginalValue)));
+ my $width = $self->get('width') || 400;
+ my $height = $self->get('height') || 150;
+ my ($style, $url) = $self->session->quick(qw(style url));
+ my $styleAttribute = "width: ".$width."px; height: ".$height."px; ".$self->get("style");
+ $style->setRawHeadTags(qq||);
+ $output = '';
+
+ # Vars for JS below
+ my $id = $self->get( "id" );
+ my $syntax = $self->get( "syntax" );
+ my $editareaPath = $self->session->url->extras( 'editarea' );
+
+ $self->session->style->setScript($editareaPath . '/edit_area/edit_area_full.js',{type=>"text/javascript"});
+ $output .= qq~
+
+ ~;
+
+ return $output;
}
diff --git a/www/extras/editarea/change_log.txt b/www/extras/editarea/change_log.txt
new file mode 100755
index 000000000..e2699d5d5
--- /dev/null
+++ b/www/extras/editarea/change_log.txt
@@ -0,0 +1,234 @@
+**** v 0.7.2.2 ****
+- Fix bug regression introduced in 0.7.2 that make IE7 not working
+- add Esperento translation (thanks to Olivier)
+- add Coldfusion syntax (thanks to Max Leynov)
+
+**** v 0.7.2.1 ****
+- fix bug for firefox rendering of highlighted lines that doesn't begin with a tab
+- support for browser with grandParadisio agent instead of firefox
+
+**** v 0.7.2 ****
+- add Chrome support
+- add show_line_colors init() option for enabling syntax color display and update on the currently edited line (disable the blue bar) (default to false)
+- Add Perl syntax definition file (thanks to Christoph Pinkel)
+- Bug fix: there allways was an horizontal scrollbar even if the content fit in the area.
+
+**** v 0.7.1.3 ****
+- Fix a bug introduced in Firefox 3.0.1 => the browser is no more able to render properly "pre" element with left padding...
+- Add Robots.txt (thanks to Pavle Ggardijan) and T-SQL syntax definition files (thanks to Miladin Joksic)
+
+**** v 0.7.1.2 ****
+- Fix a bug on the full screen mode (regression added on 0.7.1.1)
+
+**** v 0.7.1.1 ****
+- Firefox 3 RC1 compatibility
+- Code size reduction: 120Ko => 107Ko for edit_area_full.js
+
+**** v 0.7.1 ****
+- released under both LGPL and Apache license (you can use the one you prefer)
+- it's now possible to get a readonly mode:
+ * new EditAreaLoader.init()'s option: "is_editable": true/false
+ * Possibility to switch edition mode by using the execCommand function: editAreaLoader.execCommand('editor_id', 'set_editable', !editAreaLoader.execCommand('editor_id', 'is_editable'));
+- Added Ruby syntax (thanks to Patrice De Saint Steban)
+- Fix a bug where the textarea lose the focus under firefox for Mac
+- Minor other bug fixes
+
+**** v 0.7.0.2 ****
+- Fixed a bug with translation files containing non-latin caracters. Translations files must be in UTF-8.
+- Added Czech, Macedionian and Russian translations
+
+
+**** v 0.7.0.1 ****
+- in multiple file mode, it's now possible to cancel the 'EA_file_close_callback' function. if the callback return false, the edited file won't be closed
+- bug fix: if no syntax was defined in the main init() function in multifile mode, the first time the text was not highlighted
+
+
+**** v 0.7 ****
+- it's now possible to edit multiple files into one instance of EditArea. This (sponsored by Jupiter) feature comes with:
+ * new EditAreaLoader.init()'s option: "is_multi_files": true
+ * new editAreaLoader's functions: editAreaLoader.getCurrentFile(editArea_id), editAreaLoader.getFile(editArea_id, file_id), editAreaLoader.getAllFiles(editArea_id), editAreaLoader.openFile(editArea_id, file_infos), editAreaLoader.closeFile(editArea_id, file_id), editAreaLoader.setFileEditedMode(editArea_id, file_id, edited_mode)
+ * new callabacks: EA_file_switch_on_callback, EA_file_switch_off_callback, EA_file_close_callback
+- look likes Safari 3 is working with EditArea
+- add spanish translation (thanks Garito)
+- add slovak translation (thanks Gabriel Schwardy)
+- add SQL syntax definition file (thanks to Philippe Lewicki)
+- the syntax selection plugin has been integrated to editarea core and load only needed files (the plugins was loading all the possible syntax files...). Toolbar button name: "syntax_selection", comma separated available syntax list: "syntax_selection_allow"
+- add a 'compression' option in edit_area_compressor.php that allow to set where the code should be compressed or just packed (simple packed mode usefull for debugging)
+- the yellow area that indicate the current edited line is now blue
+- bug fix: parenthesis matching was not working correctly if there where an "<" between parenthesis
+
+**** v 0.6.7 ****
+- add a new plugin that allow the user to change the syntax definition in use. It adds a select in the toolbar. - plugin name to add to the plugin list: "syntax_selection". - plugin name to add to the toolbar list: "syntax_selection". - possible parameter to add to EditAreaLoader.init():
+"syntax_selection_allow": (String) define a list separated by "," of possible language syntax to use (eg: "php,js,python,html")
+- add Croatian translation (HR) (thanks to Ivan Vucica and Davor Cihlar)
+- add BASIC, Brainf*ck, C, C++ and Pascal syntax definition files (thanks to Ivan Vucica and Davor Cihlar)
+- add Iceweasel as a known working navigator (its a clone of Firefox)
+- improved the php syntax by highlighting the variables ($...)
+- reactivate gzip compression for IE7 (was desactivate for IE as it sometimes failed). (Let me know if you see that the load fails under IE7)
+- pressing "enter" while being in the search box now perform a search.
+- add Camino as a supported browser
+- bug fix: when clicking between the bottom toolbar and the textarea (when there is only few lines of text), the textarea didn't get the focus
+- bug fix: under IE the delete_instance() method was throwing an error
+- bug fix: if the textarea to convert in an EditArea was in a frame (or iframe) getting back from fullscreen to normal display was not restoring the correct settings to the frame containing the textarea.
+- bug fix (at least I hope): in IE if the textarea to convert in an EditArea was in a frame, resizing the frame was not correctly resizing the editor if it was in fullscreen.
+- bug fix: in Opera the selectionned line was not rendered correctly if containing \t caracters (bug introduced in one of the latest version...)
+- bug fix: "altgr+f" was openning the searchbox and avoid to write "[" and "]" in croatian keyboards.
+- bug fix: in Firefox "ctrl+tab" was inserting a tabulation while switching active tab (window)
+
+Note: v 0.6.5 and v 0.6.6 have been private release (change log is regrouped in v 0.6.7)
+
+**** v 0.6.4 ****
+- add replace_tab_by_spaces init() option which allow to replace all tabulation caracters typped in the text by a given number of spaces
+- add min_width and min_height init() option for the minimum size in pixel for the editor
+- add dutch translation files (NL) (thanks to Bart Bosma)
+- pressing Shift+Tab when no text is selected now delete the tabulation before the cursor (if a tabulation is present directly behing the cursor)
+- improve Python syntax (thanks to Andre Roberge)
+- bug fix: the fullpage plugin was not working correctly when the Editor was placed inside several divs that have positioning of there own
+- bug fix: one regexp used in edit_area_compressor.php was not compatible with latest PCRE version
+
+- fix the my_load and my_save functions of the 'exemple_full.html' page
+
+**** v 0.6.3.1 ****
+- regression: restore monospace as default font
+- add little improvements to the PHP compressor: allow to win 7 Ko on edit_area_full.js
+- add the version number in the about popup
+- bug fix: fix a regexp that was not compliant with newer version of PCRE
+- bug fix: fix some bug with the fullscreen mode (still not perfect in Opera)
+- bug fix: the close button of the help popup was not correctly translated
+- bug fix: when deleting an instance of editArea toggle_off was called even if the editArea was not displayed
+
+
+**** v 0.6.3 ****
+- allow to use non monospace font using the font_family init option. Firefox get smaller tabulation with non monospace fonts. IE doesn't change the tabulation width and Opera doesn't take this option into account... new default font-familly: 'verdana,monospace'
+- add fullscreen option in the toolbar and as an init() option.
+- if the based textarea has a width (or height) in '%', EditArea will get the same '%' width (or height), allowing EditArea to be resized in the same time than the window.
+- add many callback possibility: submit_callback, EA_load_callback, EA_unload_callback, EA_init_callback, EA_toggle_on_callback, EA_toggle_off_callback, EA_delete_callback (see documentation for more information)
+- bug fix: when toggling from textarea to editarea, IE was almost of the time not keeping the selection
+- bug fix: the brackets where still highlighted in red when being deleted
+- bug fix: brackets where not placed correctly when the line contains html entitites (& " etc....)
+
+
+**** v 0.6.2 ****
+WARNING => POSSIBLE BREAK COMPATIBILITY:
+- the load_callback now receive the 'id' of the textarea and no more a reference to the textarea. Developpers should use editAreaLoder methods rather than modfying directly the textarea.
+- the save_callback now receive the 'id' of the textarea as first argument, and it's content in the second argument.
+
+- EditArea is now compatible with javascript libraries like "prototype" (1.5) and "mootools" (release 83)
+- add two function to EditAreaLoader: hide(id) and show(id), that will allow to completly hide/restore both EditArea and normal textarea (usefull when EditArea is included in tabs).
+- it's no more possible to move the search window out of the frame.
+- gecko_spellcheck option is now set to false by default.
+- add a onchange_callback option (cf doc)
+- bug fix: in IE when syntax highlight was on, clicking on the textarea outside the range of the text, the click wasn't taking into account.
+- bug fix: references to the orginal textarea could be lost while using EditArea.
+- bug fix: using insertTags, getSelectionRange when editArea was not focused, IE failed
+- bug fix: main script could fail to load additionnal files in certain specific cases
+
+**** v 0.6.1 ****
+- compatiblity with Firefox 2 checked (was already compatible before).
+- compatiblity with IE7 checked (was already compatible before).
+- added possibility to call the editAreaLoader.init() function at any moment (no more limited to window load). Allow to replace an EditArea instance by a new one with other options.
+- added new gecko_spellcheck option, this enables you to disable/enable the FF 2.0 spellchecker.
+- added editAreaLoader.delete_instance(id) to allow to delete an EditArea instance
+- Fix a bug where "Ctrl+G" wasn't openning anymore the go to line prompt box.
+
+
+**** v 0.6.0.1 ****
+- add italian translation (thanks to Luciano Vernaschi)
+- add polish translation (thanks to Piotr Furman)
+- improve deutsh translation (thanks to Felix Riesterer)
+- add a little style improvement for buttons in search popup. they can't be splited in two line anymore
+- change color for tags in html and xml syntax due to visibility problems
+
+
+**** v 0.6 ****
+- add plugins possibilies
+- add editAreaLoader.insertTags function to allow easy tags insertion.
+- improve undo & redo functionnality
+- improve php compression: "edit_area_full.js" is 9 Ko smaller
+- improve syntax highlight regexp for quotted string. \\" or \\' (or \\\\", etc...) will now effectively close quotted string
+- add scrollbars to the popups when the popup's height is smaller than the editor's height
+- add japanese translation file (thanks to ISHITOYA Kentaro)
+- add possibility to add line-break in toolbar ("*")
+- disable gzip compression for IE (see: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q312496)
+- bug fix: when submitting form while editarea toggled off, the post value was equals to the old content of editarea and not the visible textarea
+- bug fix: under IE the editor was scrolling when pressing enter
+- bug fix: when insterting text on first line there was an highlight desynchronization
+
+
+
+**** v 0.5.3 ****
+WARNING => POSSIBLE BREAK COMPATIBILITY:
+- correct a spelling error: "toogle" become "toggle" in the whole code. This can perturb the initialization with the "allow_toggle" init parameters
+
+- add a case sensitive option in syntax definition files
+- improve html syntax definition file
+- add xml syntax definition file
+- add vb syntax definition file (thanks to Martin Gottlieb)
+- add some function that will allow dynamic EditArea content management, taking into account if the editor is displayed or toggled off (editAreaLodaer.getValue(), editAreaLoader.setValue(), editAreaLoader.getSelectedText(), editAreaLoader.setSelectedText(), editAreaLoader.getSelectionRange and editAreaLoader.setSelectionRange()). See "javascript functions" documentation for more informations
+- add a generic function (editaAreaLoader.execCommand) to allow to access EditArea's functions and datas
+- add portuguese translation file (thanks to Leonardo Sapucaia)
+- add compatibility to IE7 RC1
+
+
+**** v 0.5.2 ****
+- Opera improvement: text indentation is now working, and "go to line" is now working as in other browsers
+- Bug fix: It was still possible to select text in search popup
+- Bug fix: the "go to line" popup wasn't displaying anymore
+- There was still some hard codded word in the search field => added them to translation files
+- Bug fix: when multiple languages were used in the same page, there could have translation exchange between the different editors
+
+
+**** v 0.5.1 ****
+- Bug fix: the highlighted bracket was displayed on line 1 when it should be in line 2
+- Bug fix: the highlighted bracket were bad displayed in IE
+- Bug fix: their was some error in the optimisation process of the highlight mode
+- Bug fix: their was a bug when moving the search popup on IE
+
+**** v 0.5 ****
+- Now released under LGPL
+- Rewrite nearly from scratch
+- Added Danish translation file (thanks to Peter Klein)
+- Add python syntax
+
+
+WARNING => BREAK COMPATIBILITY:
+- the whole loading process (javascript include and init function call) is changed (but it's similar to the old version)
+- the languages translation files are not stored in the same variable
+
+
+IMPROVEMENTS:
+- The whole code is more stable
+- Allow several instance on the same page
+- Faster to load
+- The highlight process is more stable and there is nearly no more to use the "re sync" button
+- Add support of Opera 9 (even if its still not perfect)
+- Add the possibility to load a new compressed script of only 20Ko for the whole core script even if PHP is not installed
+- The textarea can be toggled to an EditArea on window load or later
+- The EditArea is loaded in a iframe => there is no more interaction with user css
+- Support the reset action of a form
+- Add support for "page up" & "page down" button
+- There is now a waiting screen when toggling on the highlight syntax (but it can't be an animated one, even gif are not animated due to CPU load)
+- All supported browsers can now change font-size
+
+BUG FIXES:
+- Sometimes while using the "toggle editor" button to turn of the editor, the standard textarea was expanded to the full size of the textarea content.
+- When resizing the area the selection was lost
+- Allow translation for some forgotten hard-coded word (the "move" button for search popup, and "font size", and keys word in help panel).
+- It was possible to "drag" the buttons from the Search/Replace popup into the content of the textarea.
+- On first display (when the files are not in cache) or with xhtml doctype there is a display bug (the content of the textarea exceed of 4px)
+- when the cursor was at the beginning of the 1st line of the textarea, the caracter position was set to 0 instead of 1
+
+
+
+***v 0.4****
+- Increases syntax highlight proccess speed by 5 => allow a better live editing mode with syntax highlight.
+- Now syntax highlight has a real language syntax. Text is parsing with rules depending of the language definition file. (limitation: there is only one language on the same time > doesn't allow to parse html and php on the same page).
+- Syntax highlight can be easily extended with new code languages (there is currently: php, css, js, html).
+- Add german language file (thanks to Olaf Brambrink).
+- Fix some little bugs.
+
+
+
+
+***v0.33***
+- First release.
diff --git a/www/extras/editarea/docs/about.html b/www/extras/editarea/docs/about.html
new file mode 100755
index 000000000..5df27abec
--- /dev/null
+++ b/www/extras/editarea/docs/about.html
@@ -0,0 +1,48 @@
+
+
+
+
+ EditArea documentation
+
+
+
+
+
+
About
+
+
+
General information
+
EditArea is a free javascript editor for source code. It allow to write
+ well formated source code. That's no way a WYSIWYG editor.
+
+
+ EditArea is developed by Christophe Dolivet
+ (contact)
+ and is currently released
+ under the "LGPL" license, read the license agreement for details.
+
+
Features
+
+
Easy to integrate, takes only a couple lines of code.
EditArea uses advanced JavaScript and tries to be as smart as possible when it comes to
+ different browsers. But as every browser (and every version of thoses browser) manage
+ css and javascript implementation with some little change, it will probably be bad
+ displayed on other browser.
+ The table was reset to only show the browsers I take care of.
+
+
+
Since I have no mac, I can't make test for safari, neither testing multi-plateform browsers.
+ Let me know if you constat that such browsers are working.
+
+
+
+
+
+
Windows XP
+
Linux
+
MacOS X
+
+
+
MSIE 7 & 6
+
OK
+
+
+
+
+
Firefox 3 & 2 & 1.5
+
OK
+
OK
+
OK
+
+
+
Safari 3.0 & 3.1
+
OK
+
+
OK
+
+
+
Chrome
+
OK
+
???
+
???
+
+
+
Opera 9 & 9.5
+
OK
+
OK
+
OK
+
+
+
Camino 1.2
+
+
+
OK
+
+
+
+
+ (1) - Partialy working
+ (2) - Buggy browser version
+
+
+ Notices:
+
+
The Opera 9 full compatibility is nearly impossible due to some javascript implementation bugs in Opera.
+
Iceweasel is considered to be the same as Firefox.
+
As Mozilla is replaced by Firefox, I don't include it in my testcase.
+
As Netscape 8 is not a world release I also don't include it in my testcase.
This document is the index/reference page for all available core configuration
+ options in EditArea.
+
+
+
Configuration options
+
All configuration options below is to be placed within the init JavaScript call.
+
+
Needed option
+
+
id: should contain the id of the textarea that should be converted into an editor
+ Type: String
+ Default: null
+
+
+
+
General
+
+
language: should contain a code of the language pack to be used for translation. If EditArea doesn't have a language pack for your language you could always write your own and contribute this back to this project by uploading it as a Patch at SourceForge.
+ Type: String
+ Default: "en"
+
+
syntax: should contain a code of the syntax definition file that must be used for the highlight mode.
+ Type: String
+ Default: ""
+
+
start_highlight: set if the editor should start with highlighted syntax displayed.
+ Type: Boolean
+ Default: false
+
+
is_multi_files: determine if the editor load the content of the textarea (false) or if it wait for an openFile() call for allowing file editing.
+ Type: Boolean
+ Default: false
+
+
min_width: define the minimum width of the editor
+ Type: Integer
+ Default: 400
+
+
min_height: define the minimum height of the editor
+ Type: Integer
+ Default: 100
+
+
allow_resize: define one with axis the editor can be resized by the user.
+ Type: String ("no" (no resize allowed), "both" (x and y axis), "x", "y")
+ Default: "both"
+
+
allow_toggle: define if a toggle button must be added under the editor in order to allow to toggle between the editor and the orginal textarea.
+ Type: Boolean
+ Default: true
+
+
plugins: a comma separated list of plugins to load.
+ Type: String
+ Default: ""
+
+
browsers: define if the editor must be loaded only when the user navigotr is known to be a working one, or if it will be loaded for all navigators.
+ Type: String ("all" or "known")
+ Default: "known"
+
+
display: specify when the textarea will be converted into an editor. If set to "later", the toogle button will be displayed to allow later conversion.
+ Type: String ("onload" or "later")
+ Default: "onload"
+
+
toolbar: define the toolbar that will be displayed, each element being separated by a ",".
+ Type: String (combinaison of: "|", "*", "search", "go_to_line", "undo", "redo", "change_smooth_selection", "reset_highlight", "highlight", "help", "save", "load", "new_document", "syntax_selection")
+ "|" or "separator" make appears a separator in the toolbar.
+ "*" or "return" make appears a line-break in the toolbar
+ Default: "search, go_to_line, fullscreen, |, undo, redo, |, select_font,|, change_smooth_selection, highlight, reset_highlight, |, help"
+
+
begin_toolbar: toolbar button list to add before the toolbar defined by the "toolbar" option.
+ Type: String (cf. "toolbar" option)
+ Default: ""
+
+
end_toolbar: toolbar button list to add after the toolbar defined by the "toolbar" option.
+ Type: String (cf. "toolbar" option)
+ Default: ""
+
+
font_size: define the font-size used to display the text in the editor.
+ Type: Integer
+ Default: 10
+
+
font_family: define the font-familly used to display the text in the editor. (eg: "monospace" or "verdana,monospace"). Opera will always use "monospace".
+ Type: String
+ Default: "monospace"
+
+
+
gecko_spellcheck: allow to disable/enable the Firefox 2 spellchecker
+ Type: Boolean
+ Default: false
+
+
max_undo: number of undo action allowed
+ Type: Integer
+ Default: 20
+
+
fullscreen: determine if EditArea start in fullscreen mode or not
+ Type: Boolean
+ Default: false
+
+
is_editable: determine if EditArea display only the highlighted syntax (no edition possiblities, no toolbars).
+ It's possible to switch the editable mode whenever you want (code example for a toggle edit mode: editAreaLoader.execCommand('editor_id', 'set_editable', !editAreaLoader.execCommand('editor_id', 'is_editable'));).
+ Type: Boolean
+ Default: true
+
+
replace_tab_by_spaces: define the number of spaces that will replace tabulations (\t) in text. If tabulation should stay tabulation, set this option to false.
+ Type: Integer (or false)
+ Default: false
+
+
debug: used to display some debug information into a newly created textarea. Can be usefull to display trace info in it if you want to modify the code.
+ Type: Boolean
+ Default: false
+
+
+
+
+
Callback
+
+
load_callback: the function name that will be called when the user will press the "load" button in the toolbar. This function will reveice one parameter that will be the id of the textarea. You can update the content of the textarea by using "editAreaLoader.setValue(the_id, new_value);".
+ Type: String
+ Default: ""
+
+
save_callback: the function name that will be called when the user will press the "save" button in the toolbar. This function will reveice two parameters, the first being the id of the textarea and the second containing the content of the textarea.
+ Type: String
+ Default: ""
+
+
change_callback: the function name that will be called when the onchange event of the textarea of EditArea will be triggered. This function will reveice one parameter that will be the id of the textarea. Will be triggered only is EditArea is displayed.
+ Type: String
+ Default: ""
+
+
submit_callback: the function name that will be called when the form containing the EditArea will be submitted. This function will reveice one parameter that will be the id of the textarea. Will be triggered regardless the state of EditArea (displayed or not).
+ Type: String
+ Default: ""
+
+
EA_init_callback: the function name that will be called just after the editAreaLoader.init() function, once EditAreaLoader will be initalized but still not displayed. This function will receive one parameter that will be the id of the textarea.
+ Type: String
+ Default: ""
+
+
EA_delete_callback: the function name that will be called when EditArea will be destroyed regardless the fact that it has been displayed or not. This function will reveice one parameter that will be the id of the textarea.
+ Type: String
+ Default: ""
+
+
EA_toggle_on_callback: the function name that will be called when EditArea will be toogled on for. This function will reveice one parameter that will be the id of the textarea.
+ Type: String
+ Default: ""
+
+
EA_toggle_off_callback: the function name that will be called when EditArea will be toggled off. This function will reveice one parameter that will be the id of the textarea.
+ Type: String
+ Default: ""
+
+
EA_load_callback: the function name that will be called when EditArea will be displayed for the first time. This function will reveice one parameter that will be the id of the textarea.
+ Type: String
+ Default: ""
+
+
EA_unload_callback: the function name that will be called when EditArea will be destroyed (if it have been displayed at least one time). This function will reveice one parameter that will be the id of the textarea.
+ Type: String
+ Default: ""
+
+
EA_file_switch_on_callback: the function name that will be called when the tabulation of the file will be selected. This function will reveice one parameter that will be an associative array containing all file's infos.
+ Type: String
+ Default: ""
+
+
EA_file_switch_off_callback: the function name that will be called when the tabulation of the file will be blur (the file was selected, and another file receive focus). This function will reveice one parameter that will be an associative array containing all file infos.
+ Type: String
+ Default: ""
+
+
EA_file_close_callback: the function name that will be called when the tabulation of a file will be closed. This function will reveice one parameter that will be an associative array containing all file infos. If the callback function return false, the file won't be closed.
+ Type: String
+ Default: ""
+
+
+
+
+
+
+
+
Initialization of EditArea
+
In order to initialize EditArea the following code must be placed within HEAD element
+ of a document. The following example is configurated to convert the TEXTAREA element
+ which has "textarea_1" as id into editor when the page loads. The "id"
+ option is the only obligatory option.
+
+<html>
+<head>
+<script language="javascript" type="text/javascript" src="/editarea/edit_area/edit_area_full.js"></script>
+<script language="javascript" type="text/javascript">
+editAreaLoader.init({
+ id : "textarea_1" // textarea id
+ ,syntax: "css" // syntax to be uses for highgliting
+ ,start_highlight: true // to display with highlight mode on start-up
+});
+</script>
+</head>
+
+
+
See the include document to learn more about the way to use the best script include.
+
+
If you want to convert several textarea on your webpage, just call several time the init function with a different id parameter.
+ I would like to make a special thanks to TinyMCE
+ developpers. I have taken some of their WYSIWYG editor functions
+ (managing the toolbar buttons),
+ and it give me inspiration for some point (gzip compression, translation, documentation)
+ of my project.
+
+
Contributors
+
These are the people that have contributed in some way to the EditArea project.
+ If you feel we are missing someone please inform me right away and I will correct this
+ in future versions of EditArea.
+
+
+
Global help
+
+
Gildas Noël
+
+
+
Languages translation
+
+
Olaf Brambrink & Felix Riesterer & Christoph Pinkel (deutsh)
+
Peter Klein (danish)
+
Leonardo Sapucaia (portuguese)
+
Ishitoya Kentaro (japanese)
+
Piotr Furman (polish)
+
Luciano Vernaschi (italian)
+
Ivan Vucica and Davor Cihlar (croatian)
+
Garito (spanish)
+
Gabriel Schwardy (slovak)
+
Olivier (esperento)
+
+
+
Syntax definitions
+
+
Martin Gottlieb (VB)
+
Ivan Vucica and Davor Cihlar (Basic, C, CPP, Pascal and Brainfuck)
Language packs are simply JavaScript name/value arrays placed in the ".js"
+ files in the "lang" directory. Notice there are two kinds of language packs.
+
+
The first one is the general one located at "edit_area/langs/" and used by the EditArea core.
+ The example below shows how the search and replace texts are lang packed.
The second ones are plugins specific language packs. These are contained in
+ "edit_area/plugins/<plugin_name>/langs/". Here is the example of the test plugin.
For creating a new plugin, remember to always use the "<plugin_name>"
+ prefix for these value names so that they don't override other variables in the templates.
+
+
+
+
+ Remember, the last translation line should not have a , character at the end.
+
+
+
Files to edit
+
+
+ When translating EditArea, these are the files that currently needs to be translated:
+
+ Creating you own plugins for EditArea is fairly easy if you know the basics of HTML, CSS and Javascript.
+ The most easy way is to copy the "test" directory and work from there. The "test"
+ directory is a tutorial plugin that shows how to create a plugin. After you copy the template you need to
+ change the red sections marked below to the name of your plugin this is needed so that plugins don't
+ overlap in other words it gives the plugin a unique name. Notice that when you write a new plugin,
+ you have to end each javascript instructions by ";", even if it's optionnal in javascript.
+
+
+
If you want you may add plugin specific options/settings but remember to namespace them in the
+ following format "<your plugin>_<option>" for example "yourplugin_someoption".
+
+
Specific callback functions that you don't need or doesn't do anything can be removed.
+
+
If you want you can try the test plugin by adding the following parameters to the EditAreaLoader.init command.
+ The example below shows a simple empty plugin and all possible callbacks.
+
+
+
+
+
/**
+ * 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, isFileSpecific, 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\")'>"
+ +" <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);
Creating you own syntax definition file for EditArea is fairly easy. You just have to know the language syntax,
+ it's kewords, and then fill a javascript array with thoses values.
+
If your want to create a new syntax file for a given language, choose a language abbreviation for it
+ (<language_abbr>) in lowercase. Then create the file "edit_area/reg_syntax/<language_abbr>.js".
+
Here is a "css" example:
+
editAreaLoader.load_syntax["css"] = { // here <language_abbr> is "css" so the file is "css.js"
+ 'COMMENT_SINGLE' : ['@'] // Array: possible single line comments
+ ,'COMMENT_MULTI' : {'/*' : '*/'} // associated Array: possible multiple line comments
+ // ("open_mark1" : "close mark1", "open_mark2" : "close_mark2"}
+ ,'QUOTEMARKS' : ['"', "'"] // Array: the different possible quotemarks that delimitate strings
+ ,'KEYWORD_CASE_SENSITIVE' : false // Boolean: define if the language is case-sensitive
+ ,'KEYWORDS' : { // Array: an array of array containing the different keywords class
+ 'attributes' : [ // the name 'attribute' can be changed with no problem. I
+ // it's only used to define the matching style class
+ 'aqua', 'azimuth', 'background-attachment', 'background-color' // etc...
+ ]
+ ,'values' : [
+ 'absolute', 'block', 'bold', 'bolder', 'both' // etc...
+ ]
+ ,'specials' : [
+ 'important'
+ ]
+ }
+ ,'OPERATORS' :[ // Array: the operators to highlight (eg, can also contain: +, -, * or / in other languages).
+ ':', ';', '!', '.', '#'
+ ]
+ ,'DELIMITERS' :[ // Array: the block code delimiters to highlight
+ '{', '}'
+ ]
+ ,'STYLES' : { // Array: an array of array, containing all style to apply for categories defined before.
+ // Better to define color style only.
+ 'COMMENTS': 'color: #AAAAAA;'
+ ,'QUOTESMARKS': 'color: #6381F8;'
+ ,'KEYWORDS' : { // contain the associated style foreach keywords categories
+ 'attributes' : 'color: #48BDDF;'
+ ,'values' : 'color: #2B60FF;'
+ ,'specials' : 'color: #FF0000;'
+ }
+ ,'OPERATORS' : 'color: #FF00FF;'
+ ,'DELIMITERS' : 'color: #60CA00;'
+
+ }
+};
+
After reading this example you should be able to create your own syntax file.
Well, as you can see in this example, the syntax highlight for xml is not based on keywords but on regexp.
+ The text that will be highlighted, is the one between the second parentheses. The search parameter should always
+ be like this:
+
As you have seen it before in installation and
+ configuration, in order to make EditArea work on a
+ webpage, you must include one external javascript file and call an init
+ function for each textarea you want to convert.
+ In thoses examples the file "edit_area_full.js" whas the file included,
+ but in fact there are 5 possible files to include EditArea scripts
+ into your webpage. All thoses files are in the same directory,
+ and they all have advantage and inconvenient.
+
+
+
edit_area_full.js
+
+
This is the easier file to use for script integration. The file is nearly 100Kb length.
+
This php file send in a gzipped file the whole core script to the brower (if the browser
+ has not already an updated version in cache).
+
+ If the source core script files have changed, it take thoses files and merge them into one file.
+ Then it remove all comments, white-spaces, etc... and save it in
+ "edit_area_full.js". It also save a gzip version in
+ "edit_area_full.gz". Then it send the gzip content to the browser (except for IE for which it is not gzipped due to IE bug with compression).
+
The script is very small if gzip is supported (~25Ko).
+
Designed to allow core script modification.
+
Load the core script in one call to server.
+
+
Inconvient:
+
+
Need PHP to be installed on the server (and allowed to write in editarea directory for disk caching).
+
Need to make additional server calls for plugins.
+
+
+
+
If you plan to use "edit_area_compressor.php" be sure that PHP scripts are allowed
+ to write in editarea directory (at the same level than the file "edit_area_compressor.php")
+ for disk caching.
+
+
+
+
+
+
edit_area_compressor.php?plugins
+
recommanded version
+
+
This include is very similar to "edit_area_compressor.php". The difference is that
+ with "plugins" parameter, the compressor also include the main script of all the plugins
+ in the merged file and also compress them. This will avoid later server calls for plugin main script.
+
+ In this case, the saved files are "edit_area_full_with_plugins.js" and "edit_area_full_with_plugins.gz".
+
Need PHP to be installed on the server (and allowed to write in editarea directory for disk caching).
+
+
+
+
If you plan to use "edit_area_compressor.php" be sure that PHP scripts are allowed
+ to write in editarea directory (at the same level than the file "edit_area_compressor.php")
+ for disk caching.
+
+
+
+
+
+
edit_area_full.gz
+
+
This is the smaller file to use for script integration. The file is gzipped and is only 20Kb
+ length.
+
Is server dependant: It will work only on servers that will return a
+ "Content-Encoding: gzip" for *.gz files (can work with Apache).
+ So you must test if it work on your server.
+
Not designed to allow core script modification.
+
Need to make additional server calls for plugins.
+
+
+
+
+
+
+
+
edit_area_loader.js
+
+
This is the original loading script of EditArea. Use this one only if you can't use
+ any of the 3 other loading files. There is no code epuration nor gzip compression.
+
EditArea has no direct requirements except for browser
+ compatibility and of course JavaScript needs to be turned on.
+ For developpers there is also a PHP compressor that is included in the release.
+
On windows you could use WinZip or something similar.
+ And on other operating systems such as Linux you simply extract the archive with
+ the tar command.
+
+
+ You should extract EditArea somewhere in your website. Notice that EditArea loads additionnal files
+ while being used (language translation, syntax definition and images), so don't delete any of the
+ file in the archive, and be sure that any files can be accessed.
+
+
+ If you plan to use "edit_area_compressor.php" be sure that PHP scripts are allowed
+ to write in editarea repertory (at the same level than the file "edit_area_compressor.php")
+ in order to allow disk caching.
+
+
+
+
Making changes on your web site
+
Once you have extracted the archive you will need to edit the pages
+ to include the configuration and javascript for EditArea.
+ Please note that you should probably only include the EditArea javascript on the pages
+ that need it, not all the pages of the web site. Remember to change the URL to
+ the .js below to match your installation path.
+
+
The most basic page integration (converts one textarea into editor):
+
+
+<html>
+<head>
+<title>EditArea Test</title>
+<script language="javascript" type="text/javascript" src="/editarea/edit_area/edit_area_full.js"></script>
+<script language="javascript" type="text/javascript">
+editAreaLoader.init({
+ id : "textarea_1" // textarea id
+ ,syntax: "css" // syntax to be uses for highgliting
+ ,start_highlight: true // to display with highlight mode on start-up
+});
+</script>
+</head>
+<body>
+<form method="post">
+ <textarea id="textarea_1" name="content" cols="80" rows="15">
+/*This is some css that will be editable with EditArea.*/
+body, html{
+ margin: 0;
+ padding: 0;
+ height: 100%;
+ border: none;
+ overflow: hidden;
+}</textarea>
+
+</form>
+</body>
+</html>
+
+
+
+ See the configuration help to learn about
+ initialization options,
+ and the include help to learn more about the way
+ to use the best script include (there is 4 possible files for EditArea loading).
+
+
+ Here is an example of EditArea possibilities: Full exemple.
+
+
+ If you have any problems, you could contact me on
+ my website.
+ Just be sure you've read the documentation before...
+
This is for advanced users. The object editAreaLoader has some public functions that can be called from the page in order to manage the EditArea editors.
editAreaLoader.getValue(editor_id)
This method return the content text of the editor. Works on normal textarea if the EditArea is toggled off.
Parameters
editor_id
The id of the converted textarea
Returns: the content text of the editor. String
editAreaLoader.setValue(editor_id, new_text)
This method allow to update the content text of an editor. Works on normal textarea if the EditArea is toggled off.
Parameters
editor_id
The id of the converted textarea
new_text
The new text that will replace the Editor content.
This method allow to insert tags at the current position. If no text was selected, the cursor is then
displayed between the open and the close tags. Otherwise, the cursor is positionned after the close tag.
Works on normal textarea if the EditArea is toggled off.
Parameters
editor_id
The id of the converted textarea
open_tag
The open tag string.
close_tag
The close tag string.
Returns: Nothing.
editAreaLoader.getSelectedText(editor_id)
This method return the text contained in the the selection range.
Works on normal textarea if the EditArea is toggled off.
Parameters
editor_id
The id of the converted textarea
Returns: The text contained in the the selection range. String
This method allow to replace the text contained in the selection range with a given string.
The selection range will then contain the new string.
Works on normal textarea if the EditArea is toggled off.
Parameters
editor_id
The id of the converted textarea
new_text
The string that will replace the current selected text.
Returns: Nothing.
editAreaLoader.getSelectionRange(editor_id)
This method return the position start and position end of the selection range in the editor.
Works on normal textarea if the EditArea is toggled off.
Parameters
editor_id
The id of the converted textarea
Returns: An array containing the index of the selection start and end.
Array("start", "end")
Delete an instance of EditArea and restore simple textarea.
Parameters
editor_id
The id of the converted textarea on which the command should be executed.
Returns: Nothing.
editAreaLoader.hide(editor_id)
Hide a textarea and it's related EditArea.
Parameters
editor_id
The id of the converted textarea on which the command should be executed.
Returns: Nothing.
editAreaLoader.show(editor_id)
Restore a textarea and it's related EditArea hidden with the hide() function.
Parameters
editor_id
The id of the converted textarea on which the command should be executed.
Returns: Nothing.
editAreaLoader.openFile(editor_id, file_infos)
Parameters
editor_id
The id of the converted textarea on which the command should be executed.
file_infos
An object containing datas of the file that will be openned. Here are the main fields (for the other possible fields see the returned Object of the getFile function):
id : (required) A string that will identify the file. it's the only required field.
Type: String
title : (optionnal) The title that will be displayed in the tab area.
Type: String
Default: set with the id field value
text : (optionnal) The text content of the file.
Type: String
Default: ""
syntax : (optionnal) The syntax to use for this file.
Type: String
Default: ""
do_highlight : (optionnal) Set if the file should start highlighted or not
Type: String
Default: ""
Returns: Nothing.
editAreaLoader.getCurrentFile(editor_id)
Return datas of the currently selected file (for multi file editing mode).
Parameters
editor_id
The id of the converted textarea on which the command should be executed.
Returns: An object containing datas related to the file.Object
editAreaLoader.getFile(editor_id, file_id)
Return datas of the file identified by file_id (for multi file editing mode).
Parameters
editor_id
The id of the converted textarea on which the command should be executed.
file_id
The id of the file to close.
Returns: An object containing datas related to the file.Object
editAreaLoader.getAllFiles(editor_id)
Return datas of all the currently openned files (for multi file editing mode).
Parameters
editor_id
The id of the converted textarea on which the command should be executed.
Returns: An object containing datas of each files.Object
editAreaLoader.closeFile(editor_id, file_id)
Close the file identified by file_id (for multi file editing mode).
Parameters
editor_id
The id of the converted textarea on which the command should be executed.
Define is the file should appears as edited or not.
Parameters
editor_id
The id of the converted textarea on which the command should be executed.
file_id
The id of the file to close.
edited_mode
A boolean that indicate if the file should be set edited or not edited.
Returns: Nothing.
\ No newline at end of file
diff --git a/www/extras/editarea/docs/license.html b/www/extras/editarea/docs/license.html
new file mode 100755
index 000000000..3f5fcbe01
--- /dev/null
+++ b/www/extras/editarea/docs/license.html
@@ -0,0 +1,484 @@
+
+
+
+
+ EditArea documentation
+
+
+
+
+
+
EditArea license (LGPL)
+
+
+
+ Visit http://www.fsf.org for more information about Open-Source licenses.
+
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+
+
+
+
diff --git a/www/extras/editarea/edit_area/autocompletion.js b/www/extras/editarea/edit_area/autocompletion.js
new file mode 100755
index 000000000..29e3fb1eb
--- /dev/null
+++ b/www/extras/editarea/edit_area/autocompletion.js
@@ -0,0 +1,493 @@
+/**
+ * Autocompletion class
+ *
+ * An auto completion box appear while you're writing. It's possible to force it to appear with Ctrl+Space short cut
+ *
+ * Loaded as a plugin inside editArea (everything made here could have been made in the plugin directory)
+ * But is definitly linked to syntax selection (no need to do 2 different files for color and auto complete for each syntax language)
+ * and add a too important feature that many people would miss if included as a plugin
+ *
+ * - init param: autocompletion_start
+ * - Button name: "autocompletion"
+ */
+
+var EditArea_autocompletion= {
+
+ /**
+ * Get called once this file is loaded (editArea still not initialized)
+ *
+ * @return nothing
+ */
+ init: function(){
+ // alert("test init: "+ this._someInternalFunction(2, 3));
+
+ if(editArea.settings["autocompletion"])
+ this.enabled= true;
+ else
+ this.enabled= false;
+ this.current_word = false;
+ this.shown = false;
+ this.selectIndex = -1;
+ this.forceDisplay = false;
+ this.isInMiddleWord = false;
+ this.autoSelectIfOneResult = false;
+ this.delayBeforeDisplay = 100;
+ this.checkDelayTimer = false;
+ this.curr_syntax_str = '';
+
+ this.file_syntax_datas = {};
+ }
+ /**
+ * 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 'autocompletion':
+ // Control id, button img, command
+ return parent.editAreaLoader.get_button_html('autocompletion_but', 'autocompletion.gif', 'toggle_autocompletion', false, this.baseURL);
+ break;
+ }
+ return false;
+ }*/
+ /**
+ * Get called once EditArea is fully loaded and initialised
+ *
+ * @return nothing
+ */
+ ,onload: function(){
+ if(this.enabled)
+ {
+ var icon= document.getElementById("autocompletion");
+ if(icon)
+ editArea.switchClassSticky(icon, 'editAreaButtonSelected', true);
+ }
+
+ this.container = document.createElement('div');
+ this.container.id = "auto_completion_area";
+ editArea.container.insertBefore( this.container, editArea.container.firstChild );
+
+ // add event detection for hiding suggestion box
+ editArea.add_event( document, "click", function(){ editArea.plugins['autocompletion']._hide();} );
+ editArea.add_event( editArea.textarea, "blur", function(){ editArea.plugins['autocompletion']._hide();} );
+
+ }
+
+ /**
+ * 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){
+ if(!this.enabled)
+ return true;
+
+ if (EA_keys[e.keyCode])
+ letter=EA_keys[e.keyCode];
+ else
+ letter=String.fromCharCode(e.keyCode);
+ // shown
+ if( this._isShown() )
+ {
+ // if escape, hide the box
+ if(letter=="Esc")
+ {
+ this._hide();
+ return false;
+ }
+ // Enter
+ else if( letter=="Entrer")
+ {
+ var as = this.container.getElementsByTagName('A');
+ // select a suggested entry
+ if( this.selectIndex >= 0 && this.selectIndex < as.length )
+ {
+ as[ this.selectIndex ].onmousedown();
+ return false
+ }
+ // simply add an enter in the code
+ else
+ {
+ this._hide();
+ return true;
+ }
+ }
+ else if( letter=="Tab" || letter=="Down")
+ {
+ this._selectNext();
+ return false;
+ }
+ else if( letter=="Up")
+ {
+ this._selectBefore();
+ return false;
+ }
+ }
+ // hidden
+ else
+ {
+
+ }
+
+ // show current suggestion list and do autoSelect if possible (no matter it's shown or hidden)
+ if( letter=="Space" && CtrlPressed(e) )
+ {
+ parent.console.log('SHOW SUGGEST');
+ this.forceDisplay = true;
+ this.autoSelectIfOneResult = true;
+ this._checkLetter();
+ return false;
+ }
+
+ // wait a short period for check that the cursor isn't moving
+ setTimeout("editArea.plugins['autocompletion']._checkDelayAndCursorBeforeDisplay();", editArea.check_line_selection_timer +5 );
+ this.checkDelayTimer = false;
+ return true;
+ }
+ /**
+ * 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){
+ switch( cmd ){
+ case 'toggle_autocompletion':
+ var icon= document.getElementById("autocompletion");
+ if(!this.enabled)
+ {
+ if(icon != null){
+ editArea.restoreClass(icon);
+ editArea.switchClassSticky(icon, 'editAreaButtonSelected', true);
+ }
+ this.enabled= true;
+ }
+ else
+ {
+ this.enabled= false;
+ if(icon != null)
+ editArea.switchClassSticky(icon, 'editAreaButtonNormal', false);
+ }
+ return true;
+ }
+ return true;
+ }
+ ,_checkDelayAndCursorBeforeDisplay: function()
+ {
+ this.checkDelayTimer = setTimeout("if(editArea.textarea.selectionStart == "+ editArea.textarea.selectionStart +") EditArea_autocompletion._checkLetter();", this.delayBeforeDisplay - editArea.check_line_selection_timer - 5 );
+ }
+ // hide the suggested box
+ ,_hide: function(){
+ this.container.style.display="none";
+ this.selectIndex = -1;
+ this.shown = false;
+ this.forceDisplay = false;
+ this.autoSelectIfOneResult = false;
+ }
+ // display the suggested box
+ ,_show: function(){
+ if( !this._isShown() )
+ {
+ this.container.style.display="block";
+ this.selectIndex = -1;
+ this.shown = true;
+ }
+ }
+ // is the suggested box displayed?
+ ,_isShown: function(){
+ return this.shown;
+ }
+ // setter and getter
+ ,_isInMiddleWord: function( new_value ){
+ if( typeof( new_value ) == "undefined" )
+ return this.isInMiddleWord;
+ else
+ this.isInMiddleWord = new_value;
+ }
+ // select the next element in the suggested box
+ ,_selectNext: function()
+ {
+ var as = this.container.getElementsByTagName('A');
+
+ // clean existing elements
+ for( var i=0; i= as.length || this.selectIndex < 0 ) ? 0 : this.selectIndex;
+ as[ this.selectIndex ].className += " focus";
+ }
+ // select the previous element in the suggested box
+ ,_selectBefore: function()
+ {
+ var as = this.container.getElementsByTagName('A');
+
+ // clean existing elements
+ for( var i=0; i= as.length || this.selectIndex < 0 ) ? as.length-1 : this.selectIndex;
+ as[ this.selectIndex ].className += " focus";
+ }
+ ,_select: function( content )
+ {
+ cursor_forced_position = content.indexOf( '{@}' );
+ content = content.replace(/{@}/g, '' );
+ if(editArea.nav['isIE'])
+ editArea.getIESelection();
+
+ // retrive the number of matching characters
+ var start_index = Math.max( 0, editArea.textarea.selectionEnd - content.length );
+
+ line_string = editArea.textarea.value.substring( start_index, editArea.textarea.selectionEnd + 1);
+ limit = line_string.length -1;
+ nbMatch = 0;
+ for( i =0; i 0 )
+ parent.editAreaLoader.setSelectionRange(editArea.id, editArea.textarea.selectionStart - nbMatch , editArea.textarea.selectionEnd);
+
+ parent.editAreaLoader.setSelectedText(editArea.id, content );
+ range= parent.editAreaLoader.getSelectionRange(editArea.id);
+
+ if( cursor_forced_position != -1 )
+ new_pos = range["end"] - ( content.length-cursor_forced_position );
+ else
+ new_pos = range["end"];
+ parent.editAreaLoader.setSelectionRange(editArea.id, new_pos, new_pos);
+ this._hide();
+ }
+
+
+ /**
+ * Parse the AUTO_COMPLETION part of syntax definition files
+ */
+ ,_parseSyntaxAutoCompletionDatas: function(){
+ //foreach syntax loaded
+ for(var lang in parent.editAreaLoader.load_syntax)
+ {
+ if(!parent.editAreaLoader.syntax[lang]['autocompletion']) // init the regexp if not already initialized
+ {
+ parent.editAreaLoader.syntax[lang]['autocompletion']= {};
+ // the file has auto completion datas
+ if(parent.editAreaLoader.load_syntax[lang]['AUTO_COMPLETION'])
+ {
+ // parse them
+ for(var i in parent.editAreaLoader.load_syntax[lang]['AUTO_COMPLETION'])
+ {
+ datas = parent.editAreaLoader.load_syntax[lang]['AUTO_COMPLETION'][i];
+ tmp = {};
+ if(datas["CASE_SENSITIVE"]!="undefined" && datas["CASE_SENSITIVE"]==false)
+ tmp["modifiers"]="i";
+ else
+ tmp["modifiers"]="";
+ tmp["prefix_separator"]= datas["REGEXP"]["prefix_separator"];
+ tmp["match_prefix_separator"]= new RegExp( datas["REGEXP"]["prefix_separator"] +"$", tmp["modifiers"]);
+ tmp["match_word"]= new RegExp("(?:"+ datas["REGEXP"]["before_word"] +")("+ datas["REGEXP"]["possible_words_letters"] +")$", tmp["modifiers"]);
+ tmp["match_next_letter"]= new RegExp("^("+ datas["REGEXP"]["letter_after_word_must_match"] +")$", tmp["modifiers"]);
+ tmp["keywords"]= {};
+ console.log( datas["KEYWORDS"] );
+ for( var prefix in datas["KEYWORDS"] )
+ {
+ tmp["keywords"][prefix]= {
+ prefix: prefix,
+ prefix_name: prefix,
+ prefix_reg: new RegExp("(?:"+ parent.editAreaLoader.get_escaped_regexp( prefix ) +")(?:"+ tmp["prefix_separator"] +")$", tmp["modifiers"] ),
+ datas: []
+ };
+ for( var j=0; j it's valid
+ if( !match_prefix_separator && this.curr_syntax[i]["keywords"][prefix]['prefix'].length == 0 )
+ {
+ if( ! before.match( this.curr_syntax[i]["keywords"][prefix]['prefix_reg'] ) )
+ hasMatch = true;
+ }
+ // we still need to check the prefix if there is one
+ else if( this.curr_syntax[i]["keywords"][prefix]['prefix'].length > 0 )
+ {
+ if( before.match( this.curr_syntax[i]["keywords"][prefix]['prefix_reg'] ) )
+ hasMatch = true;
+ }
+
+ if( hasMatch )
+ results[results.length]= [ this.curr_syntax[i]["keywords"][prefix], this.curr_syntax[i]["keywords"][prefix]['datas'][j] ];
+ }
+ }
+ }
+ }
+ // it doesn't match any possible word but we want to display something
+ // we'll display to list of all available words
+ else if( this.forceDisplay || match_prefix_separator )
+ {
+ for(var prefix in this.curr_syntax[i]["keywords"])
+ {
+ for(var j=0; j it's valid
+ if( !match_prefix_separator && this.curr_syntax[i]["keywords"][prefix]['prefix'].length == 0 )
+ {
+ hasMatch = true;
+ }
+ // we still need to check the prefix if there is one
+ else if( match_prefix_separator && this.curr_syntax[i]["keywords"][prefix]['prefix'].length > 0 )
+ {
+ var before = last_chars; //.substr( 0, last_chars.length );
+ if( before.match( this.curr_syntax[i]["keywords"][prefix]['prefix_reg'] ) )
+ hasMatch = true;
+ }
+
+ if( hasMatch )
+ results[results.length]= [ this.curr_syntax[i]["keywords"][prefix], this.curr_syntax[i]["keywords"][prefix]['datas'][j] ];
+ }
+ }
+ }
+ }
+ }
+
+ // there is only one result, and we can select it automatically
+ if( results.length == 1 && this.autoSelectIfOneResult )
+ {
+ console.log( results );
+ this._select( results[0][1]['replace_with'] );
+ }
+ else if( results.length == 0 )
+ {
+ this._hide();
+ }
+ else
+ {
+ // build the suggestion box content
+ var lines=[];
+ for(var i=0; i"+ results[i][1]['comment'];
+ if(results[i][0]['prefix_name'].length>0)
+ line+=''+ results[i][0]['prefix_name'] +'';
+ line+='';
+ lines[lines.length]=line;
+ }
+ // sort results
+ this.container.innerHTML = '
";
+ }
+ if(editAreas[id]["settings"]["debug"])
+ html+=" ";
+ html= editAreaLoader.translate(html, editAreas[id]["settings"]["language"]);
+ span.innerHTML= html;
+ var father= document.getElementById(id).parentNode;
+ var next= document.getElementById(id).nextSibling;
+ if(next==null)
+ father.appendChild(span);
+ else
+ father.insertBefore(span, next);
+ }
+
+ if(!editAreas[id]["initialized"])
+ {
+ this.execCommand(id, "EA_init"); // ini callback
+ if(editAreas[id]["settings"]["display"]=="later"){
+ editAreas[id]["initialized"]= true;
+ return;
+ }
+ }
+
+ if(this.nav['isIE']){ // launch IE selection checkup
+ editAreaLoader.init_ie_textarea(id);
+ }
+
+ // get toolbar content
+ var html_toolbar_content="";
+ area=editAreas[id];
+
+ for(var i=0; i';
+ }
+
+ // add plugins scripts if not already loaded by the compressor (but need to load language in all the case)
+ for(var i=0; i';
+ this.iframe_script+='';
+ }
+
+
+ // create css link for the iframe if the whole css text has not been already loaded by the compressor
+ if(!this.iframe_css){
+ this.iframe_css="";
+ }
+
+
+ // create template
+ var template= this.template.replace(/\[__BASEURL__\]/g, this.baseURL);
+ template= template.replace("[__TOOLBAR__]",html_toolbar_content);
+
+
+ // fill template with good language sentences
+ template= this.translate(template, area["settings"]["language"], "template");
+
+ // add css_code
+ template= template.replace("[__CSSRULES__]", this.iframe_css);
+ // add js_code
+ template= template.replace("[__JSCODE__]", this.iframe_script);
+
+ // add version_code
+ template= template.replace("[__EA_VERSION__]", this.version);
+ //template=template.replace(/\{\$([^\}]+)\}/gm, this.traduc_template);
+
+ //editAreas[area["settings"]["id"]]["template"]= template;
+
+ area.textarea=document.getElementById(area["settings"]["id"]);
+ editAreas[area["settings"]["id"]]["textarea"]=area.textarea;
+
+ // if removing previous instances from DOM before (fix from Marcin)
+ if(typeof(window.frames["frame_"+area["settings"]["id"]])!='undefined')
+ delete window.frames["frame_"+area["settings"]["id"]];
+
+ // insert template in the document after the textarea
+ var father= area.textarea.parentNode;
+ /* var container= document.createElement("div");
+ container.id= "EditArea_frame_container_"+area["settings"]["id"];
+ */
+ var content= document.createElement("iframe");
+ content.name= "frame_"+area["settings"]["id"];
+ content.id= "frame_"+area["settings"]["id"];
+ content.style.borderWidth= "0px";
+ setAttribute(content, "frameBorder", "0"); // IE
+ content.style.overflow="hidden";
+ content.style.display="none";
+
+ /* container.appendChild(content);
+ var next= area.textarea.nextSibling;
+ if(next==null)
+ father.appendChild(container);
+ else
+ father.insertBefore(container, next) ;*/
+
+ var next= area.textarea.nextSibling;
+ if(next==null)
+ father.appendChild(content);
+ else
+ father.insertBefore(content, next) ;
+ var frame=window.frames["frame_"+area["settings"]["id"]];
+
+ frame.document.open();
+ frame.editAreas=editAreas;
+ frame.area_id= area["settings"]["id"];
+ frame.document.area_id= area["settings"]["id"];
+ frame.document.write(template);
+ frame.document.close();
+
+ // frame.editAreaLoader=this;
+ //editAreas[area["settings"]["id"]]["displayed"]=true;
+
+ },
+
+ toggle : function(id, toggle_to){
+
+ /* if((editAreas[id]["displayed"]==true && toggle_to!="on") || toggle_to=="off"){
+ this.toggle_off(id);
+ }else if((editAreas[id]["displayed"]==false && toggle_to!="off") || toggle_to=="on"){
+ this.toggle_on(id);
+ }*/
+ if(!toggle_to)
+ toggle_to= (editAreas[id]["displayed"]==true)?"off":"on";
+ if(editAreas[id]["displayed"]==true && toggle_to=="off"){
+ this.toggle_off(id);
+ }else if(editAreas[id]["displayed"]==false && toggle_to=="on"){
+ this.toggle_on(id);
+ }
+
+ return false;
+ },
+
+ toggle_off : function(id){
+ if(window.frames["frame_"+id])
+ {
+ var frame=window.frames["frame_"+id];
+ if(frame.editArea.fullscreen['isFull'])
+ frame.editArea.toggle_full_screen(false);
+ editAreas[id]["displayed"]=false;
+
+ // set wrap to off to keep same display mode (some browser get problem with this, so it need more complex operation
+
+ editAreas[id]["textarea"].wrap = "off"; // for IE
+ setAttribute(editAreas[id]["textarea"], "wrap", "off"); // for Firefox
+ var parNod = editAreas[id]["textarea"].parentNode;
+ var nxtSib = editAreas[id]["textarea"].nextSibling;
+ parNod.removeChild(editAreas[id]["textarea"]);
+ parNod.insertBefore(editAreas[id]["textarea"], nxtSib);
+
+ // restore values
+ editAreas[id]["textarea"].value= frame.editArea.textarea.value;
+ var selStart= frame.editArea.last_selection["selectionStart"];
+ var selEnd= frame.editArea.last_selection["selectionEnd"];
+ var scrollTop= frame.document.getElementById("result").scrollTop;
+ var scrollLeft= frame.document.getElementById("result").scrollLeft;
+
+
+ document.getElementById("frame_"+id).style.display='none';
+
+ editAreas[id]["textarea"].style.display="inline";
+
+
+ editAreas[id]["textarea"].focus();
+ if(this.nav['isIE']){
+ editAreas[id]["textarea"].selectionStart= selStart;
+ editAreas[id]["textarea"].selectionEnd= selEnd;
+ editAreas[id]["textarea"].focused=true;
+ set_IE_selection(editAreas[id]["textarea"]);
+ }else{
+ if(this.nav['isOpera']){ // Opera bug when moving selection start and selection end
+ editAreas[id]["textarea"].setSelectionRange(0, 0);
+ }
+ try{
+ editAreas[id]["textarea"].setSelectionRange(selStart, selEnd);
+ } catch(e) {
+ };
+ }
+ editAreas[id]["textarea"].scrollTop= scrollTop;
+ editAreas[id]["textarea"].scrollLeft= scrollLeft;
+ frame.editArea.execCommand("toggle_off");
+
+ }
+ },
+
+ toggle_on : function(id){
+ /*if(!editAreas[area["settings"]["id"]]["started"])
+ editAreaLoader.start(id);*/
+
+ if(window.frames["frame_"+id])
+ {
+ var frame=window.frames["frame_"+id];
+ area= window.frames["frame_"+id].editArea;
+ area.textarea.value= editAreas[id]["textarea"].value;
+
+ // store display values;
+ var selStart= 0;
+ var selEnd= 0;
+ var scrollTop= 0;
+ var scrollLeft= 0;
+
+ if(editAreas[id]["textarea"].use_last==true)
+ {
+ var selStart= editAreas[id]["textarea"].last_selectionStart;
+ var selEnd= editAreas[id]["textarea"].last_selectionEnd;
+ var scrollTop= editAreas[id]["textarea"].last_scrollTop;
+ var scrollLeft= editAreas[id]["textarea"].last_scrollLeft;
+ editAreas[id]["textarea"].use_last=false;
+ }
+ else
+ {
+ try{
+ var selStart= editAreas[id]["textarea"].selectionStart;
+ var selEnd= editAreas[id]["textarea"].selectionEnd;
+ var scrollTop= editAreas[id]["textarea"].scrollTop;
+ var scrollLeft= editAreas[id]["textarea"].scrollLeft;
+ //alert(scrollTop);
+ }catch(ex){}
+ }
+
+ // set to good size
+ this.set_editarea_size_from_textarea(id, document.getElementById("frame_"+id));
+ editAreas[id]["textarea"].style.display="none";
+ document.getElementById("frame_"+id).style.display="inline";
+ area.execCommand("focus"); // without this focus opera doesn't manage well the iframe body height
+
+
+ // restore display values
+ editAreas[id]["displayed"]=true;
+ area.execCommand("update_size");
+
+ window.frames["frame_"+id].document.getElementById("result").scrollTop= scrollTop;
+ window.frames["frame_"+id].document.getElementById("result").scrollLeft= scrollLeft;
+ area.area_select(selStart, selEnd-selStart);
+ area.execCommand("toggle_on");
+
+ /*date= new Date();
+ end_time=date.getTime();
+ alert("load time: "+ (end_time-this.start_time));*/
+
+ }
+ else
+ {
+ /* if(this.nav['isIE'])
+ get_IE_selection(document.getElementById(id)); */
+ var elem= document.getElementById(id);
+ elem.last_selectionStart= elem.selectionStart;
+ elem.last_selectionEnd= elem.selectionEnd;
+ elem.last_scrollTop= elem.scrollTop;
+ elem.last_scrollLeft= elem.scrollLeft;
+ elem.use_last=true;
+ editAreaLoader.start(id);
+ }
+ },
+
+ set_editarea_size_from_textarea : function(id, frame){
+ var elem= document.getElementById(id);
+ //var width= elem.offsetWidth+"px";
+ //var height= elem.offsetHeight+"px";
+ var width=Math.max(editAreas[id]["settings"]["min_width"], elem.offsetWidth)+"px";
+ var height=Math.max(editAreas[id]["settings"]["min_height"], elem.offsetHeight)+"px";
+ if(elem.style.width.indexOf("%")!=-1)
+ width= elem.style.width;
+ if(elem.style.height.indexOf("%")!=-1)
+ height= elem.style.height;
+ //alert("h: "+height+" w: "+width);
+
+ frame.style.width= width;
+ frame.style.height= height;
+ },
+
+ set_base_url : function(){
+ //this.baseURL="";
+ if (!this.baseURL) {
+ var elements = document.getElementsByTagName('script');
+
+ for (var i=0; i';
+ html+= '';
+ return html;
+ },
+
+ get_control_html : function(button_name, lang) {
+
+ for (var i=0; i";
+ case "|":
+ case "separator":
+ return '';
+ case "select_font":
+ html= "";
+ return html;
+ case "syntax_selection":
+ var html= "";
+ return html;
+ }
+
+ return "["+button_name+"]";
+ },
+
+
+ get_template : function(){
+ if(this.template=="")
+ {
+ var xhr_object = null;
+ if(window.XMLHttpRequest) // Firefox
+ xhr_object = new XMLHttpRequest();
+ else if(window.ActiveXObject) // Internet Explorer
+ xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
+ else { // XMLHttpRequest not supported
+ alert("XMLHTTPRequest not supported. EditArea not loaded");
+ return;
+ }
+
+ xhr_object.open("GET", this.baseURL+"template.html", false);
+ xhr_object.send(null);
+ if(xhr_object.readyState == 4)
+ this.template=xhr_object.responseText;
+ else
+ this.has_error();
+ }
+ },
+
+ // translate text
+ translate : function(text, lang, mode){
+
+ if(mode=="word")
+ text=editAreaLoader.get_word_translation(text, lang);
+ else if(mode="template"){
+ editAreaLoader.current_language= lang;
+ text=text.replace(/\{\$([^\}]+)\}/gm, editAreaLoader.translate_template);
+ }
+ return text;
+ },
+
+ translate_template : function(){
+ return editAreaLoader.get_word_translation(EditAreaLoader.prototype.translate_template.arguments[1], editAreaLoader.current_language);
+ },
+
+ get_word_translation : function(val, lang){
+ for(var i in editAreaLoader.lang[lang]){
+ if(i == val)
+ return editAreaLoader.lang[lang][i];
+ }
+ return "_"+val;
+ },
+
+ load_script : function(url){
+ if (this.loadedFiles[url])
+ return;
+ //alert("load: "+url);
+ try{
+ var script= document.createElement("script");
+ script.type= "text/javascript";
+ script.src= url;
+ script.charset= "UTF-8";
+ var head= document.getElementsByTagName("head");
+ head[0].appendChild(script);
+ }catch(e){
+ document.write('');
+ }
+ //var filename= url.replace(/^.*?\/?([a-z\.\_\-]+)$/i, "$1");
+ this.loadedFiles[url] = true;
+ },
+
+ add_event : function(obj, name, handler) {
+ if (obj.attachEvent) {
+ obj.attachEvent("on" + name, handler);
+ } else{
+ obj.addEventListener(name, handler, false);
+ }
+ },
+
+ remove_event : function(obj, name, handler){
+ if (obj.detachEvent)
+ obj.detachEvent("on" + name, handler);
+ else
+ obj.removeEventListener(name, handler, false);
+ },
+
+
+ // reset all the editareas in the form that have been reseted
+ reset : function(e){
+ var formObj = editAreaLoader.nav['isIE'] ? window.event.srcElement : e.target;
+ if(formObj.tagName!='FORM')
+ formObj= formObj.form;
+
+ for(var i in editAreas){
+ var is_child= false;
+ for (var x=0;x old_sel["start"]) // if text was selected, cursor at the end
+ this.setSelectionRange(id, new_sel["end"], new_sel["end"]);
+ else // cursor in the middle
+ this.setSelectionRange(id, old_sel["start"]+open_tag.length, old_sel["start"]+open_tag.length);
+ },
+
+ // hide both EditArea and normal textarea
+ hide : function(id){
+ if(document.getElementById(id) && !this.hidden[id])
+ {
+ this.hidden[id]= new Object();
+ this.hidden[id]["selectionRange"]= this.getSelectionRange(id);
+ if(document.getElementById(id).style.display!="none")
+ {
+ this.hidden[id]["scrollTop"]= document.getElementById(id).scrollTop;
+ this.hidden[id]["scrollLeft"]= document.getElementById(id).scrollLeft;
+ }
+
+ if(window.frames["frame_"+id])
+ {
+ this.hidden[id]["toggle"]= editAreas[id]["displayed"];
+
+ if(window.frames["frame_"+id] && editAreas[id]["displayed"]==true){
+ var scrollTop= window.frames["frame_"+ id].document.getElementById("result").scrollTop;
+ var scrollLeft= window.frames["frame_"+ id].document.getElementById("result").scrollLeft;
+ }else{
+ var scrollTop= document.getElementById(id).scrollTop;
+ var scrollLeft= document.getElementById(id).scrollLeft;
+ }
+ this.hidden[id]["scrollTop"]= scrollTop;
+ this.hidden[id]["scrollLeft"]= scrollLeft;
+
+ if(editAreas[id]["displayed"]==true)
+ editAreaLoader.toggle_off(id);
+ }
+
+ // hide toggle button and debug box
+ var span= document.getElementById("EditAreaArroundInfos_"+id);
+ if(span){
+ span.style.display='none';
+ }
+
+ // hide textarea
+ document.getElementById(id).style.display= "none";
+ }
+ },
+
+ // restore hidden EditArea and normal textarea
+ show : function(id){
+ if((elem=document.getElementById(id)) && this.hidden[id])
+ {
+ elem.style.display= "inline";
+ elem.scrollTop= this.hidden[id]["scrollTop"];
+ elem.scrollLeft= this.hidden[id]["scrollLeft"];
+ var span= document.getElementById("EditAreaArroundInfos_"+id);
+ if(span){
+ span.style.display='inline';
+ }
+
+ if(window.frames["frame_"+id])
+ {
+
+ // restore toggle button and debug box
+
+
+ // restore textarea
+ elem.style.display= "inline";
+
+ // restore EditArea
+ if(this.hidden[id]["toggle"]==true)
+ editAreaLoader.toggle_on(id);
+
+ scrollTop= this.hidden[id]["scrollTop"];
+ scrollLeft= this.hidden[id]["scrollLeft"];
+
+ if(window.frames["frame_"+id] && editAreas[id]["displayed"]==true){
+ window.frames["frame_"+ id].document.getElementById("result").scrollTop= scrollTop;
+ window.frames["frame_"+ id].document.getElementById("result").scrollLeft= scrollLeft;
+ }else{
+ elem.scrollTop= scrollTop;
+ elem.scrollLeft= scrollLeft;
+ }
+
+ }
+ // restore selection
+ sel= this.hidden[id]["selectionRange"];
+ this.setSelectionRange(id, sel["start"], sel["end"]);
+ delete this.hidden[id];
+ }
+ },
+
+ // get the current file datas (for multi file editing mode)
+ getCurrentFile : function(id){
+ return this.execCommand(id, 'get_file', this.execCommand(id, 'curr_file'));
+ },
+
+ // get the given file datas (for multi file editing mode)
+ getFile : function(id, file_id){
+ return this.execCommand(id, 'get_file', file_id);
+ },
+
+ // get all the openned files datas (for multi file editing mode)
+ getAllFiles : function(id){
+ return this.execCommand(id, 'get_all_files()');
+ },
+
+ // open a file (for multi file editing mode)
+ openFile : function(id, file_infos){
+ return this.execCommand(id, 'open_file', file_infos);
+ },
+
+ // close the given file (for multi file editing mode)
+ closeFile : function(id, file_id){
+ return this.execCommand(id, 'close_file', file_id);
+ },
+
+ // close the given file (for multi file editing mode)
+ setFileEditedMode : function(id, file_id, to){
+ var reg1= new RegExp('\\\\', 'g');
+ var reg2= new RegExp('"', 'g');
+ return this.execCommand(id, 'set_file_edited_mode("'+ file_id.replace(reg1, '\\\\').replace(reg2, '\\"') +'", '+ to +')');
+ },
+
+
+ // allow to access to editarea functions and datas (for advanced users only)
+ execCommand : function(id, cmd, fct_param){
+ switch(cmd){
+ case "EA_init":
+ if(editAreas[id]['settings']["EA_init_callback"].length>0)
+ eval(editAreas[id]['settings']["EA_init_callback"]+"('"+ id +"');");
+ break;
+ case "EA_delete":
+ if(editAreas[id]['settings']["EA_delete_callback"].length>0)
+ eval(editAreas[id]['settings']["EA_delete_callback"]+"('"+ id +"');");
+ break;
+ case "EA_submit":
+ if(editAreas[id]['settings']["submit_callback"].length>0)
+ eval(editAreas[id]['settings']["submit_callback"]+"('"+ id +"');");
+ break;
+ }
+ if(window.frames["frame_"+id] && window.frames["frame_"+ id].editArea){
+ if(fct_param!=undefined)
+ return eval('window.frames["frame_'+ id +'"].editArea.'+ cmd +'(fct_param);');
+ else
+ return eval('window.frames["frame_'+ id +'"].editArea.'+ cmd +';');
+ }
+ return false;
+ }
+};
+
+ var editAreaLoader= new EditAreaLoader();
+ var editAreas= new Object();
+
diff --git a/www/extras/editarea/edit_area/elements_functions.js b/www/extras/editarea/edit_area/elements_functions.js
new file mode 100755
index 000000000..a265f216f
--- /dev/null
+++ b/www/extras/editarea/edit_area/elements_functions.js
@@ -0,0 +1,337 @@
+/****
+ * This page contains some general usefull functions for javascript
+ *
+ ****/
+
+
+ // need to redefine this functiondue to IE problem
+ function getAttribute( elm, aname ) {
+ try{
+ var avalue = elm.getAttribute( aname );
+ }catch(exept){
+
+ }
+ if ( ! avalue ) {
+ for ( var i = 0; i < elm.attributes.length; i ++ ) {
+ var taName = elm.attributes [i] .name.toLowerCase();
+ if ( taName == aname ) {
+ avalue = elm.attributes [i] .value;
+ return avalue;
+ }
+ }
+ }
+ return avalue;
+ };
+
+ // need to redefine this function due to IE problem
+ function setAttribute( elm, attr, val ) {
+ if(attr=="class"){
+ elm.setAttribute("className", val);
+ elm.setAttribute("class", val);
+ }else{
+ elm.setAttribute(attr, val);
+ }
+ };
+
+ /* return a child element
+ elem: element we are searching in
+ elem_type: type of the eleemnt we are searching (DIV, A, etc...)
+ elem_attribute: attribute of the searched element that must match
+ elem_attribute_match: value that elem_attribute must match
+ option: "all" if must return an array of all children, otherwise return the first match element
+ depth: depth of search (-1 or no set => unlimited)
+ */
+ function getChildren(elem, elem_type, elem_attribute, elem_attribute_match, option, depth)
+ {
+ if(!option)
+ var option="single";
+ if(!depth)
+ var depth=-1;
+ if(elem){
+ var children= elem.childNodes;
+ var result=null;
+ var results= new Array();
+ for (var x=0;x0){
+ results= results.concat(result);
+ }
+ }else if(result!=null){
+ return result;
+ }
+ }
+ }
+ }
+ if(option=="all")
+ return results;
+ }
+ return null;
+ };
+
+ function isChildOf(elem, parent){
+ if(elem){
+ if(elem==parent)
+ return true;
+ while(elem.parentNode != 'undefined'){
+ return isChildOf(elem.parentNode, parent);
+ }
+ }
+ return false;
+ };
+
+ function getMouseX(e){
+ /*if(document.all)
+ return event.x + document.body.scrollLeft;
+ else
+ return e.pageX;*/
+ if(e!=null && typeof(e.pageX)!="undefined"){
+ return e.pageX;
+ }else{
+ return (e!=null?e.x:event.x)+ document.documentElement.scrollLeft;
+ }
+ //return (e!=null) ? e.pageX : event.x + document.documentElement.scrollLeft;
+ };
+
+ function getMouseY(e){
+ /*if(document.all)
+ return event.y + document.body.scrollTop;
+ else
+ return e.pageY;*/
+ if(e!=null && typeof(e.pageY)!="undefined"){
+ return e.pageY;
+ }else{
+ return (e!=null?e.y:event.y)+ document.documentElement.scrollTop;
+ }
+ //return (e!=null) ? e.pageY : event.y + document.documentElement.scrollTop;
+ };
+
+ function calculeOffsetLeft(r){
+ return calculeOffset(r,"offsetLeft")
+ };
+
+ function calculeOffsetTop(r){
+ return calculeOffset(r,"offsetTop")
+ };
+
+ function calculeOffset(element,attr){
+ var offset=0;
+ while(element){
+ offset+=element[attr];
+ element=element.offsetParent
+ }
+ return offset;
+ };
+
+ /** return the computed style
+ * @param: elem: the reference to the element
+ * @param: prop: the name of the css property
+ */
+ function get_css_property(elem, prop)
+ {
+ if(document.defaultView)
+ {
+ return document.defaultView.getComputedStyle(elem, null).getPropertyValue(prop);
+ }
+ else if(elem.currentStyle)
+ {
+ var prop = prop.replace(/-\D/gi, function(sMatch)
+ {
+ return sMatch.charAt(sMatch.length - 1).toUpperCase();
+ });
+ return elem.currentStyle[prop];
+ }
+ else return null;
+ }
+
+/****
+ * Moving an element
+ ***/
+
+ var move_current_element;
+ /* allow to move an element in a window
+ e: the event
+ id: the id of the element
+ frame: the frame of the element
+ ex of use:
+ in html:
+ or
+ in javascript: document.getElementById("my_div").onmousedown= start_move_element
+ */
+ function start_move_element(e, id, frame){
+ var elem_id=(e.target || e.srcElement).id;
+ if(id)
+ elem_id=id;
+ if(!frame)
+ frame=window;
+ if(frame.event)
+ e=frame.event;
+
+ move_current_element= frame.document.getElementById(elem_id);
+ move_current_element.frame=frame;
+ frame.document.onmousemove= move_element;
+ frame.document.onmouseup= end_move_element;
+ /*move_current_element.onmousemove= move_element;
+ move_current_element.onmouseup= end_move_element;*/
+
+ //alert(move_current_element.frame.document.body.offsetHeight);
+
+ mouse_x= getMouseX(e);
+ mouse_y= getMouseY(e);
+ //window.status=frame+ " elem: "+elem_id+" elem: "+ move_current_element + " mouse_x: "+mouse_x;
+ move_current_element.start_pos_x = mouse_x - (move_current_element.style.left.replace("px","") || calculeOffsetLeft(move_current_element));
+ move_current_element.start_pos_y = mouse_y - (move_current_element.style.top.replace("px","") || calculeOffsetTop(move_current_element));
+ return false;
+ };
+
+ function end_move_element(e){
+ move_current_element.frame.document.onmousemove= "";
+ move_current_element.frame.document.onmouseup= "";
+ move_current_element=null;
+ };
+
+ function move_element(e){
+ /*window.status="move"+frame;
+ window.status="move2"+frame.event;*/
+ if(move_current_element.frame && move_current_element.frame.event)
+ e=move_current_element.frame.event;
+ var mouse_x=getMouseX(e);
+ var mouse_y=getMouseY(e);
+ var new_top= mouse_y - move_current_element.start_pos_y;
+ var new_left= mouse_x - move_current_element.start_pos_x;
+
+ var max_left= move_current_element.frame.document.body.offsetWidth- move_current_element.offsetWidth;
+ max_top= move_current_element.frame.document.body.offsetHeight- move_current_element.offsetHeight;
+ new_top= Math.min(Math.max(0, new_top), max_top);
+ new_left= Math.min(Math.max(0, new_left), max_left);
+
+ move_current_element.style.top= new_top+"px";
+ move_current_element.style.left= new_left+"px";
+ return false;
+ };
+
+/***
+ * Managing a textarea (this part need the navigator infos from editAreaLoader
+ ***/
+
+ var nav= editAreaLoader.nav;
+
+ // allow to get infos on the selection: array(start, end)
+ function getSelectionRange(textarea){
+ //if(nav['isIE'])
+ // get_IE_selection(textarea);
+ return {"start": textarea.selectionStart, "end": textarea.selectionEnd};
+ };
+
+ // allow to set the selection
+ function setSelectionRange(textarea, start, end){
+ textarea.focus();
+
+ start= Math.max(0, Math.min(textarea.value.length, start));
+ end= Math.max(start, Math.min(textarea.value.length, end));
+
+ if(nav['isOpera']){ // Opera bug when moving selection start and selection end
+ textarea.selectionEnd = 1;
+ textarea.selectionStart = 0;
+ textarea.selectionEnd = 1;
+ textarea.selectionStart = 0;
+ }
+ textarea.selectionStart = start;
+ textarea.selectionEnd = end;
+ //textarea.setSelectionRange(start, end);
+
+ if(nav['isIE'])
+ set_IE_selection(textarea);
+ };
+
+
+ // set IE position in Firefox mode (textarea.selectionStart and textarea.selectionEnd). should work as a repeated task
+ function get_IE_selection(textarea){
+
+ if(textarea && textarea.focused)
+ {
+ if(!textarea.ea_line_height)
+ { // calculate the lineHeight
+ var div= document.createElement("div");
+ div.style.fontFamily= get_css_property(textarea, "font-family");
+ div.style.fontSize= get_css_property(textarea, "font-size");
+ div.style.visibility= "hidden";
+ div.innerHTML="0";
+ document.body.appendChild(div);
+ textarea.ea_line_height= div.offsetHeight;
+ document.body.removeChild(div);
+ }
+ //textarea.focus();
+ var range = document.selection.createRange();
+ var stored_range = range.duplicate();
+ stored_range.moveToElementText( textarea );
+ stored_range.setEndPoint( 'EndToEnd', range );
+ if(stored_range.parentElement()==textarea){
+ // the range don't take care of empty lines in the end of the selection
+ var elem= textarea;
+ var scrollTop= 0;
+ while(elem.parentNode){
+ scrollTop+= elem.scrollTop;
+ elem= elem.parentNode;
+ }
+
+ // var scrollTop= textarea.scrollTop + document.body.scrollTop;
+
+ // var relative_top= range.offsetTop - calculeOffsetTop(textarea) + scrollTop;
+ var relative_top= range.offsetTop - calculeOffsetTop(textarea)+ scrollTop;
+ // alert("rangeoffset: "+ range.offsetTop +"\ncalcoffsetTop: "+ calculeOffsetTop(textarea) +"\nrelativeTop: "+ relative_top);
+ var line_start = Math.round((relative_top / textarea.ea_line_height) +1);
+
+ var line_nb= Math.round(range.boundingHeight / textarea.ea_line_height);
+
+ // alert("store_range: "+ stored_range.text.length+"\nrange: "+range.text.length+"\nrange_text: "+ range.text);
+ var range_start= stored_range.text.length - range.text.length;
+ var tab= textarea.value.substr(0, range_start).split("\n");
+ range_start+= (line_start - tab.length)*2; // add missing empty lines to the selection
+ textarea.selectionStart = range_start;
+
+ var range_end= textarea.selectionStart + range.text.length;
+ tab= textarea.value.substr(0, range_start + range.text.length).split("\n");
+ range_end+= (line_start + line_nb - 1 - tab.length)*2;
+ textarea.selectionEnd = range_end;
+ }
+ }
+ setTimeout("get_IE_selection(document.getElementById('"+ textarea.id +"'));", 50);
+ };
+
+ function IE_textarea_focus(){
+ event.srcElement.focused= true;
+ }
+
+ function IE_textarea_blur(){
+ event.srcElement.focused= false;
+ }
+
+ // select the text for IE (take into account the \r difference)
+ function set_IE_selection(textarea){
+ if(!window.closed){
+ var nbLineStart=textarea.value.substr(0, textarea.selectionStart).split("\n").length - 1;
+ var nbLineEnd=textarea.value.substr(0, textarea.selectionEnd).split("\n").length - 1;
+ var range = document.selection.createRange();
+ range.moveToElementText( textarea );
+ range.setEndPoint( 'EndToStart', range );
+ range.moveStart('character', textarea.selectionStart - nbLineStart);
+ range.moveEnd('character', textarea.selectionEnd - nbLineEnd - (textarea.selectionStart - nbLineStart) );
+ range.select();
+ }
+ };
+
+
+ editAreaLoader.waiting_loading["elements_functions.js"]= "loaded";
diff --git a/www/extras/editarea/edit_area/highlight.js b/www/extras/editarea/edit_area/highlight.js
new file mode 100755
index 000000000..eeac6ae53
--- /dev/null
+++ b/www/extras/editarea/edit_area/highlight.js
@@ -0,0 +1,283 @@
+ // change_to: "on" or "off"
+ EditArea.prototype.change_highlight= function(change_to){
+ if(this.settings["syntax"].length==0 && change_to==false){
+ this.switchClassSticky($("highlight"), 'editAreaButtonDisabled', true);
+ this.switchClassSticky($("reset_highlight"), 'editAreaButtonDisabled', true);
+ return false;
+ }
+
+ if(this.do_highlight==change_to)
+ return false;
+
+
+ if(this.nav['isIE'])
+ this.getIESelection();
+ var pos_start= this.textarea.selectionStart;
+ var pos_end= this.textarea.selectionEnd;
+
+ if(this.do_highlight===true || change_to==false)
+ this.disable_highlight();
+ else
+ this.enable_highlight();
+ this.textarea.focus();
+ this.textarea.selectionStart = pos_start;
+ this.textarea.selectionEnd = pos_end;
+ if(this.nav['isIE'])
+ this.setIESelection();
+
+ };
+
+ EditArea.prototype.disable_highlight= function(displayOnly){
+ this.selection_field.innerHTML="";
+ this.content_highlight.style.visibility="hidden";
+ // replacing the node is far more faster than deleting it's content in firefox
+ var new_Obj= this.content_highlight.cloneNode(false);
+ new_Obj.innerHTML= "";
+ this.content_highlight.parentNode.insertBefore(new_Obj, this.content_highlight);
+ this.content_highlight.parentNode.removeChild(this.content_highlight);
+ this.content_highlight= new_Obj;
+ var old_class= parent.getAttribute(this.textarea,"class");
+ if(old_class){
+ var new_class= old_class.replace("hidden","");
+ parent.setAttribute(this.textarea, "class", new_class);
+ }
+
+ this.textarea.style.backgroundColor="transparent"; // needed in order to see the bracket finders
+
+ //var icon= document.getElementById("highlight");
+ //setAttribute(icon, "class", getAttribute(icon, "class").replace(/ selected/g, "") );
+ //this.restoreClass(icon);
+ //this.switchClass(icon,'editAreaButtonNormal');
+ this.switchClassSticky($("highlight"), 'editAreaButtonNormal', true);
+ this.switchClassSticky($("reset_highlight"), 'editAreaButtonDisabled', true);
+
+ this.do_highlight=false;
+
+ this.switchClassSticky($("change_smooth_selection"), 'editAreaButtonSelected', true);
+ if(typeof(this.smooth_selection_before_highlight)!="undefined" && this.smooth_selection_before_highlight===false){
+ this.change_smooth_selection_mode(false);
+ }
+
+ // this.textarea.style.backgroundColor="#FFFFFF";
+ };
+
+ EditArea.prototype.enable_highlight= function(){
+ this.show_waiting_screen();
+
+ this.content_highlight.style.visibility="visible";
+ var new_class=parent.getAttribute(this.textarea,"class")+" hidden";
+ parent.setAttribute(this.textarea, "class", new_class);
+
+ if(this.nav['isIE'])
+ this.textarea.style.backgroundColor="#FFFFFF"; // IE can't manage mouse click outside text range without this
+
+ //var icon= document.getElementById("highlight");
+ //setAttribute(icon, "class", getAttribute(icon, "class") + " selected");
+ //this.switchClass(icon,'editAreaButtonSelected');
+ //this.switchClassSticky($("highlight"), 'editAreaButtonNormal', false);
+ this.switchClassSticky($("highlight"), 'editAreaButtonSelected', false);
+ this.switchClassSticky($("reset_highlight"), 'editAreaButtonNormal', false);
+
+ this.smooth_selection_before_highlight=this.smooth_selection;
+ if(!this.smooth_selection)
+ this.change_smooth_selection_mode(true);
+ this.switchClassSticky($("change_smooth_selection"), 'editAreaButtonDisabled', true);
+
+
+ this.do_highlight=true;
+ this.resync_highlight();
+
+ this.hide_waiting_screen();
+ //area.onkeyup="";
+ /*if(!displayOnly){
+ this.do_highlight=true;
+ this.reSync();
+ if(this.state=="loaded")
+ this.textarea.focus();
+ }*/
+
+ };
+
+
+ EditArea.prototype.maj_highlight= function(infos){
+ if(this.last_highlight_base_text==infos["full_text"] && this.resync_highlight!==true)
+ return;
+
+ //var infos= this.getSelectionInfos();
+ if(infos["full_text"].indexOf("\r")!=-1)
+ text_to_highlight= infos["full_text"].replace(/\r/g, "");
+ else
+ text_to_highlight= infos["full_text"];
+
+ // for optimisation process
+ var start_line_pb=-1;
+ var end_line_pb=-1;
+
+ var stay_begin="";
+ var stay_end="";
+
+
+ var debug_opti="";
+
+ // for speed mesure
+ var date= new Date();
+ var tps_start=date.getTime();
+ var tps_middle_opti=date.getTime();
+
+
+ // OPTIMISATION: will search to update only changed lines
+ if(this.reload_highlight===true){
+ this.reload_highlight=false;
+ }else if(text_to_highlight.length==0){
+ text_to_highlight="\n ";
+ }else{
+ var base_step=200;
+
+ var cpt= 0;
+ var end= Math.min(text_to_highlight.length, this.last_text_to_highlight.length);
+ var step= base_step;
+ // find how many chars are similar at the begin of the text
+ while(cpt=1){
+ if(this.last_text_to_highlight.substr(cpt, step) == text_to_highlight.substr(cpt, step)){
+ cpt+= step;
+ }else{
+ step= Math.floor(step/2);
+ }
+ }
+ var pos_start_change=cpt;
+ var line_start_change= text_to_highlight.substr(0, pos_start_change).split("\n").length -1;
+
+ cpt_last= this.last_text_to_highlight.length;
+ cpt= text_to_highlight.length;
+ step= base_step;
+ // find how many chars are similar at the end of the text
+ while(cpt>=0 && cpt_last>=0 && step>=1){
+ if(this.last_text_to_highlight.substr(cpt_last-step, step) == text_to_highlight.substr(cpt-step, step)){
+ cpt-= step;
+ cpt_last-= step;
+ }else{
+ step= Math.floor(step/2);
+ }
+ }
+ //cpt_last=Math.max(0, cpt_last);
+ var pos_new_end_change= cpt;
+ var pos_last_end_change= cpt_last;
+ if(pos_new_end_change<=pos_start_change){
+ if(this.last_text_to_highlight.length < text_to_highlight.length){
+ pos_new_end_change= pos_start_change + text_to_highlight.length - this.last_text_to_highlight.length;
+ pos_last_end_change= pos_start_change;
+ }else{
+ pos_last_end_change= pos_start_change + this.last_text_to_highlight.length - text_to_highlight.length;
+ pos_new_end_change= pos_start_change;
+ }
+ }
+ var change_new_text= text_to_highlight.substring(pos_start_change, pos_new_end_change);
+ var change_last_text= this.last_text_to_highlight.substring(pos_start_change, pos_last_end_change);
+
+ var line_new_end_change= text_to_highlight.substr(0, pos_new_end_change).split("\n").length -1;
+ var line_last_end_change= this.last_text_to_highlight.substr(0, pos_last_end_change).split("\n").length -1;
+
+ var change_new_text_line= text_to_highlight.split("\n").slice(line_start_change, line_new_end_change+1).join("\n");
+ var change_last_text_line= this.last_text_to_highlight.split("\n").slice(line_start_change, line_last_end_change+1).join("\n");
+
+ // check if it can only reparse the changed text
+ var trace_new= this.get_syntax_trace(change_new_text_line);
+ var trace_last= this.get_syntax_trace(change_last_text_line);
+ if(trace_new == trace_last){
+
+
+
+ date= new Date();
+ tps_middle_opti=date.getTime();
+
+ stay_begin= this.last_hightlighted_text.split("\n").slice(0, line_start_change).join("\n");
+ if(line_start_change>0)
+ stay_begin+= "\n";
+ stay_end= this.last_hightlighted_text.split("\n").slice(line_last_end_change+1).join("\n");
+ if(stay_end.length>0)
+ stay_end= "\n"+stay_end;
+
+
+ if(stay_begin.length==0 && pos_last_end_change==-1)
+ change_new_text_line+="\n";
+ text_to_highlight=change_new_text_line;
+
+ }
+ if(this.settings["debug"]){
+ debug_opti= (trace_new == trace_last)?"Optimisation": "No optimisation";
+ debug_opti+= " start: "+pos_start_change +"("+line_start_change+")";
+ debug_opti+=" end_new: "+ pos_new_end_change+"("+line_new_end_change+")";
+ debug_opti+=" end_last: "+ pos_last_end_change+"("+line_last_end_change+")";
+ debug_opti+="\nchanged_text: "+change_new_text+" => trace: "+trace_new;
+ debug_opti+="\nchanged_last_text: "+change_last_text+" => trace: "+trace_last;
+ //debug_opti+= "\nchanged: "+ infos["full_text"].substring(pos_start_change, pos_new_end_change);
+ debug_opti+= "\nchanged_line: "+change_new_text_line;
+ debug_opti+= "\nlast_changed_line: "+change_last_text_line;
+ debug_opti+="\nstay_begin: "+ stay_begin.slice(-200);
+ debug_opti+="\nstay_end: "+ stay_end;
+ //debug_opti="start: "+stay_begin_len+ "("+nb_line_start_unchanged+") end: "+ (stay_end_len)+ "("+(splited.length-nb_line_end_unchanged)+") ";
+ //debug_opti+="changed: "+ text_to_highlight.substring(stay_begin_len, text_to_highlight.length-stay_end_len)+" \n";
+
+ //debug_opti+="changed: "+ stay_begin.substr(stay_begin.length-200)+ "----------"+ text_to_highlight+"------------------"+ stay_end.substr(0,200) +"\n";
+ debug_opti+="\n";
+ }
+
+
+ // END OPTIMISATION
+ }
+ date= new Date();
+ tps_end_opti=date.getTime();
+
+ // apply highlight
+ var updated_highlight= this.colorize_text(text_to_highlight);
+
+ // get the new highlight content
+
+ date= new Date();
+ tps2=date.getTime();
+ //updated_highlight= "
"+updated_highlight+"
";
+ var hightlighted_text= stay_begin + updated_highlight + stay_end;
+ //this.previous_hightlight_content= tab_text.join(" ");
+
+ date= new Date();
+ inner1=date.getTime();
+
+ // update the content of the highlight div by first updating a clone node (as there is no display in the same time for this node it's quite faster (5*))
+ var new_Obj= this.content_highlight.cloneNode(false);
+ if(this.nav['isIE'] || this.nav['isOpera'] || this.nav['isFirefox'] >= 3 )
+ new_Obj.innerHTML= "
" + hightlighted_text.replace("\n", " ") + "
";
+ else
+ new_Obj.innerHTML= ""+ hightlighted_text +"";
+ this.content_highlight.parentNode.replaceChild(new_Obj, this.content_highlight);
+ this.content_highlight= new_Obj;
+ if(infos["full_text"].indexOf("\r")!=-1)
+ this.last_text_to_highlight= infos["full_text"].replace(/\r/g, "");
+ else
+ this.last_text_to_highlight= infos["full_text"];
+ this.last_hightlighted_text= hightlighted_text;
+ date= new Date();
+ tps3=date.getTime();
+
+ if(this.settings["debug"]){
+ tot1=tps_end_opti-tps_start;
+ tot_middle=tps_end_opti- tps_middle_opti;
+ tot2=tps2-tps_end_opti;
+ tps_join=inner1-tps2;
+ tps_td2=tps3-inner1;
+ //lineNumber=tab_text.length;
+ //this.debug.value+=" \nNB char: "+$("src").value.length+" Nb line: "+ lineNumber;
+ this.debug.value= "Tps optimisation "+tot1+" (second part: "+tot_middle+") | tps reg exp: "+tot2+" | tps join: "+tps_join;
+ this.debug.value+= " | tps update highlight content: "+tps_td2+"("+tps3+")\n";
+ this.debug.value+=debug_opti;
+ // this.debug.value+= "highlight\n"+hightlighted_text;
+ }
+
+ };
+
+ EditArea.prototype.resync_highlight= function(reload_now){
+ this.reload_highlight=true;
+ this.last_highlight_base_text="";
+ this.focus();
+ if(reload_now)
+ this.check_line_selection(false);
+ };
diff --git a/www/extras/editarea/edit_area/images/Thumbs.db b/www/extras/editarea/edit_area/images/Thumbs.db
new file mode 100755
index 000000000..e5c446f46
Binary files /dev/null and b/www/extras/editarea/edit_area/images/Thumbs.db differ
diff --git a/www/extras/editarea/edit_area/images/autocompletion.gif b/www/extras/editarea/edit_area/images/autocompletion.gif
new file mode 100755
index 000000000..f3dfc2e3a
Binary files /dev/null and b/www/extras/editarea/edit_area/images/autocompletion.gif differ
diff --git a/www/extras/editarea/edit_area/images/close.gif b/www/extras/editarea/edit_area/images/close.gif
new file mode 100755
index 000000000..679ca2aa4
Binary files /dev/null and b/www/extras/editarea/edit_area/images/close.gif differ
diff --git a/www/extras/editarea/edit_area/images/fullscreen.gif b/www/extras/editarea/edit_area/images/fullscreen.gif
new file mode 100755
index 000000000..66fa6d921
Binary files /dev/null and b/www/extras/editarea/edit_area/images/fullscreen.gif differ
diff --git a/www/extras/editarea/edit_area/images/go_to_line.gif b/www/extras/editarea/edit_area/images/go_to_line.gif
new file mode 100755
index 000000000..06042ec9a
Binary files /dev/null and b/www/extras/editarea/edit_area/images/go_to_line.gif differ
diff --git a/www/extras/editarea/edit_area/images/help.gif b/www/extras/editarea/edit_area/images/help.gif
new file mode 100755
index 000000000..51a1ee420
Binary files /dev/null and b/www/extras/editarea/edit_area/images/help.gif differ
diff --git a/www/extras/editarea/edit_area/images/highlight.gif b/www/extras/editarea/edit_area/images/highlight.gif
new file mode 100755
index 000000000..16491f6cf
Binary files /dev/null and b/www/extras/editarea/edit_area/images/highlight.gif differ
diff --git a/www/extras/editarea/edit_area/images/load.gif b/www/extras/editarea/edit_area/images/load.gif
new file mode 100755
index 000000000..461698f56
Binary files /dev/null and b/www/extras/editarea/edit_area/images/load.gif differ
diff --git a/www/extras/editarea/edit_area/images/move.gif b/www/extras/editarea/edit_area/images/move.gif
new file mode 100755
index 000000000..d15f9f542
Binary files /dev/null and b/www/extras/editarea/edit_area/images/move.gif differ
diff --git a/www/extras/editarea/edit_area/images/newdocument.gif b/www/extras/editarea/edit_area/images/newdocument.gif
new file mode 100755
index 000000000..a9d293842
Binary files /dev/null and b/www/extras/editarea/edit_area/images/newdocument.gif differ
diff --git a/www/extras/editarea/edit_area/images/opacity.png b/www/extras/editarea/edit_area/images/opacity.png
new file mode 100755
index 000000000..b4217cb21
Binary files /dev/null and b/www/extras/editarea/edit_area/images/opacity.png differ
diff --git a/www/extras/editarea/edit_area/images/processing.gif b/www/extras/editarea/edit_area/images/processing.gif
new file mode 100755
index 000000000..cce32f20f
Binary files /dev/null and b/www/extras/editarea/edit_area/images/processing.gif differ
diff --git a/www/extras/editarea/edit_area/images/redo.gif b/www/extras/editarea/edit_area/images/redo.gif
new file mode 100755
index 000000000..3af90697f
Binary files /dev/null and b/www/extras/editarea/edit_area/images/redo.gif differ
diff --git a/www/extras/editarea/edit_area/images/reset_highlight.gif b/www/extras/editarea/edit_area/images/reset_highlight.gif
new file mode 100755
index 000000000..0fa3cb797
Binary files /dev/null and b/www/extras/editarea/edit_area/images/reset_highlight.gif differ
diff --git a/www/extras/editarea/edit_area/images/save.gif b/www/extras/editarea/edit_area/images/save.gif
new file mode 100755
index 000000000..2777bebfe
Binary files /dev/null and b/www/extras/editarea/edit_area/images/save.gif differ
diff --git a/www/extras/editarea/edit_area/images/search.gif b/www/extras/editarea/edit_area/images/search.gif
new file mode 100755
index 000000000..cfe76b5d5
Binary files /dev/null and b/www/extras/editarea/edit_area/images/search.gif differ
diff --git a/www/extras/editarea/edit_area/images/smooth_selection.gif b/www/extras/editarea/edit_area/images/smooth_selection.gif
new file mode 100755
index 000000000..8a532e5e6
Binary files /dev/null and b/www/extras/editarea/edit_area/images/smooth_selection.gif differ
diff --git a/www/extras/editarea/edit_area/images/spacer.gif b/www/extras/editarea/edit_area/images/spacer.gif
new file mode 100755
index 000000000..388486517
Binary files /dev/null and b/www/extras/editarea/edit_area/images/spacer.gif differ
diff --git a/www/extras/editarea/edit_area/images/statusbar_resize.gif b/www/extras/editarea/edit_area/images/statusbar_resize.gif
new file mode 100755
index 000000000..af89d803f
Binary files /dev/null and b/www/extras/editarea/edit_area/images/statusbar_resize.gif differ
diff --git a/www/extras/editarea/edit_area/images/undo.gif b/www/extras/editarea/edit_area/images/undo.gif
new file mode 100755
index 000000000..520796d69
Binary files /dev/null and b/www/extras/editarea/edit_area/images/undo.gif differ
diff --git a/www/extras/editarea/edit_area/keyboard.js b/www/extras/editarea/edit_area/keyboard.js
new file mode 100755
index 000000000..bed93bd7f
--- /dev/null
+++ b/www/extras/editarea/edit_area/keyboard.js
@@ -0,0 +1,145 @@
+var EA_keys = {8:"Retour arriere",9:"Tabulation",12:"Milieu (pave numerique)",13:"Entrer",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"Verr Maj",27:"Esc",32:"Space",33:"Page up",34:"Page down",35:"End",36:"Begin",37:"Left",38:"Up",39:"Right",40:"Down",44:"Impr ecran",45:"Inser",46:"Suppr",91:"Menu Demarrer Windows / touche pomme Mac",92:"Menu Demarrer Windows",93:"Menu contextuel Windows",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Verr Num",145:"Arret defil"};
+
+
+
+function keyDown(e){
+ if(!e){ // if IE
+ e=event;
+ }
+
+ // send the event to the plugins
+ for(var i in editArea.plugins){
+ if(typeof(editArea.plugins[i].onkeydown)=="function"){
+ if(editArea.plugins[i].onkeydown(e)===false){ // stop propaging
+ if(editArea.nav['isIE'])
+ e.keyCode=0;
+ return false;
+ }
+ }
+ }
+
+ var target_id=(e.target || e.srcElement).id;
+ var use=false;
+ if (EA_keys[e.keyCode])
+ letter=EA_keys[e.keyCode];
+ else
+ letter=String.fromCharCode(e.keyCode);
+
+ var low_letter= letter.toLowerCase();
+
+ if(letter=="Page up" && !editArea.nav['isOpera']){
+ editArea.execCommand("scroll_page", {"dir": "up", "shift": ShiftPressed(e)});
+ use=true;
+ }else if(letter=="Page down" && !editArea.nav['isOpera']){
+ editArea.execCommand("scroll_page", {"dir": "down", "shift": ShiftPressed(e)});
+ use=true;
+ }else if(editArea.is_editable==false){
+ // do nothing but also do nothing else (allow to navigate with page up and page down)
+ return true;
+ }else if(letter=="Tabulation" && target_id=="textarea" && !CtrlPressed(e) && !AltPressed(e)){
+ if(ShiftPressed(e))
+ editArea.execCommand("invert_tab_selection");
+ else
+ editArea.execCommand("tab_selection");
+
+ use=true;
+ if(editArea.nav['isOpera'] || (editArea.nav['isFirefox'] && editArea.nav['isMacOS']) ) // opera && firefox mac can't cancel tabulation events...
+ setTimeout("editArea.execCommand('focus');", 1);
+ }else if(letter=="Entrer" && target_id=="textarea"){
+ if(editArea.press_enter())
+ use=true;
+ }else if(letter=="Entrer" && target_id=="area_search"){
+ editArea.execCommand("area_search");
+ use=true;
+ }else if(letter=="Esc"){
+ editArea.execCommand("close_all_inline_popup", e);
+ use=true;
+ }else if(CtrlPressed(e) && !AltPressed(e) && !ShiftPressed(e)){
+ switch(low_letter){
+ case "f":
+ editArea.execCommand("area_search");
+ use=true;
+ break;
+ case "r":
+ editArea.execCommand("area_replace");
+ use=true;
+ break;
+ case "q":
+ editArea.execCommand("close_all_inline_popup", e);
+ use=true;
+ break;
+ case "h":
+ editArea.execCommand("change_highlight");
+ use=true;
+ break;
+ case "g":
+ setTimeout("editArea.execCommand('go_to_line');", 5); // the prompt stop the return false otherwise
+ use=true;
+ break;
+ case "e":
+ editArea.execCommand("show_help");
+ use=true;
+ break;
+ case "z":
+ use=true;
+ editArea.execCommand("undo");
+ break;
+ case "y":
+ use=true;
+ editArea.execCommand("redo");
+ break;
+ default:
+ break;
+ }
+ }
+
+ // check to disable the redo possibility if the textarea content change
+ if(editArea.next.length > 0){
+ setTimeout("editArea.check_redo();", 10);
+ }
+
+ setTimeout("editArea.check_file_changes();", 10);
+
+
+ if(use){
+ // in case of a control that sould'nt be used by IE but that is used => THROW a javascript error that will stop key action
+ if(editArea.nav['isIE'])
+ e.keyCode=0;
+ return false;
+ }
+ //alert("Test: "+ letter + " ("+e.keyCode+") ALT: "+ AltPressed(e) + " CTRL "+ CtrlPressed(e) + " SHIFT "+ ShiftPressed(e));
+
+ return true;
+
+};
+
+
+// return true if Alt key is pressed
+function AltPressed(e) {
+ if (window.event) {
+ return (window.event.altKey);
+ } else {
+ if(e.modifiers)
+ return (e.altKey || (e.modifiers % 2));
+ else
+ return e.altKey;
+ }
+};
+
+// return true if Ctrl key is pressed
+function CtrlPressed(e) {
+ if (window.event) {
+ return (window.event.ctrlKey);
+ } else {
+ return (e.ctrlKey || (e.modifiers==2) || (e.modifiers==3) || (e.modifiers>5));
+ }
+};
+
+// return true if Shift key is pressed
+function ShiftPressed(e) {
+ if (window.event) {
+ return (window.event.shiftKey);
+ } else {
+ return (e.shiftKey || (e.modifiers>3));
+ }
+};
diff --git a/www/extras/editarea/edit_area/langs/cs.js b/www/extras/editarea/edit_area/langs/cs.js
new file mode 100755
index 000000000..3edda9872
--- /dev/null
+++ b/www/extras/editarea/edit_area/langs/cs.js
@@ -0,0 +1,65 @@
+editAreaLoader.lang["cs"]={
+new_document: "Nový dokument",
+search_button: "Najdi a nahraď",
+search_command: "Hledej další / otevři vyhledávací pole",
+search: "Hledej",
+replace: "Nahraď",
+replace_command: "Nahraď / otevři vyhledávací pole",
+find_next: "Najdi další",
+replace_all: "Nahraď vše",
+reg_exp: "platné výrazy",
+match_case: "vyhodnocené výrazy",
+not_found: "nenalezené.",
+occurrence_replaced: "výskyty nahrazené.",
+search_field_empty: "Pole vyhledávání je prázdné",
+restart_search_at_begin: "Dosažen konec souboru, začínám od začátku.",
+move_popup: "Přesuň vyhledávací okno",
+font_size: "--Velikost textu--",
+go_to_line: "Přejdi na řádek",
+go_to_line_prompt: "Přejdi na řádek:",
+undo: "krok zpět",
+redo: "znovu",
+change_smooth_selection: "Povolit nebo zakázat některé ze zobrazených funkcí (účelnější zobrazení požaduje větší zatížení procesoru)",
+highlight: "Zvýrazňování syntaxe zap./vyp.",
+reset_highlight: "Obnovit zvýraznění (v případě nesrovnalostí)",
+help: "O programu",
+save: "Uložit",
+load: "Otevřít",
+line_abbr: "Ř.",
+char_abbr: "S.",
+position: "Pozice",
+total: "Celkem",
+close_popup: "Zavřít okno",
+shortcuts: "Zkratky",
+add_tab: "Přidat tabulování textu",
+remove_tab: "Odtsranit tabulování textu",
+about_notice: "Upozornění! Funkce zvýrazňování textu je k dispozici pouze pro malý text",
+toggle: "Přepnout editor",
+accesskey: "Přístupová klávesa",
+tab: "Záložka",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Zpracovávám ...",
+fullscreen: "Celá obrazovka",
+syntax_selection: "--vyber zvýrazňovač--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+syntax_robotstxt: "Robots txt",
+syntax_tsql: "T-SQL",
+syntax_perl: "Perl",
+syntax_coldfusion: "Coldfusion",
+close_tab: "Close file"
+};
diff --git a/www/extras/editarea/edit_area/langs/de.js b/www/extras/editarea/edit_area/langs/de.js
new file mode 100755
index 000000000..cc5c6e725
--- /dev/null
+++ b/www/extras/editarea/edit_area/langs/de.js
@@ -0,0 +1,65 @@
+editAreaLoader.lang["de"]={
+new_document: "Neues Dokument",
+search_button: "Suchen und Ersetzen",
+search_command: "Weitersuchen / öffne Suchfeld",
+search: "Suchen",
+replace: "Ersetzen",
+replace_command: "Ersetzen / öffne Suchfeld",
+find_next: "Weitersuchen",
+replace_all: "Ersetze alle Treffer",
+reg_exp: "reguläre Ausdrücke",
+match_case: "passt auf den Begriff ",
+not_found: "Nicht gefunden.",
+occurrence_replaced: "Die Vorkommen wurden ersetzt.",
+search_field_empty: "Leeres Suchfeld",
+restart_search_at_begin: "Ende des zu durchsuchenden Bereiches erreicht. Es wird die Suche von Anfang an fortgesetzt.", //find a shorter translation
+move_popup: "Suchfenster bewegen",
+font_size: "--Schriftgröße--",
+go_to_line: "Gehe zu Zeile",
+go_to_line_prompt: "Gehe zu Zeilennummmer:",
+undo: "Rückgängig",
+redo: "Wiederherstellen",
+change_smooth_selection: "Aktiviere/Deaktiviere einige Features (weniger Bildschirmnutzung aber mehr CPU-Belastung)",
+highlight: "Syntax Highlighting an- und ausschalten",
+reset_highlight: "Highlighting zurücksetzen (falls mit Text nicht konform)",
+help: "Info",
+save: "Speichern",
+load: "Öffnen",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Position",
+total: "Gesamt",
+close_popup: "Popup schließen",
+shortcuts: "Shortcuts",
+add_tab: "Tab zum Text hinzufügen",
+remove_tab: "Tab aus Text entfernen",
+about_notice: "Bemerkung: Syntax Highlighting ist nur für kurze Texte",
+toggle: "Editor an- und ausschalten",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "In Bearbeitung...",
+fullscreen: "Full-Screen",
+syntax_selection: "--Syntax--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+syntax_robotstxt: "Robots txt",
+syntax_tsql: "T-SQL",
+syntax_perl: "Perl",
+syntax_coldfusion: "Coldfusion",
+close_tab: "Close file"
+};
diff --git a/www/extras/editarea/edit_area/langs/dk.js b/www/extras/editarea/edit_area/langs/dk.js
new file mode 100755
index 000000000..8adacd052
--- /dev/null
+++ b/www/extras/editarea/edit_area/langs/dk.js
@@ -0,0 +1,65 @@
+editAreaLoader.lang["dk"]={
+new_document: "nyt tomt dokument",
+search_button: "søg og erstat",
+search_command: "find næste / åben søgefelt",
+search: "søg",
+replace: "erstat",
+replace_command: "erstat / åben søgefelt",
+find_next: "find næste",
+replace_all: "erstat alle",
+reg_exp: "regular expressions",
+match_case: "forskel på store/små bogstaver ",
+not_found: "not found.",
+occurrence_replaced: "occurences replaced.",
+search_field_empty: "Search field empty",
+restart_search_at_begin: "End of area reached. Restart at begin.",
+move_popup: "flyt søgepopup",
+font_size: "--Skriftstørrelse--",
+go_to_line: "gå til linie",
+go_to_line_prompt: "gå til linienummer:",
+undo: "fortryd",
+redo: "gentag",
+change_smooth_selection: "slå display funktioner til/fra (smartere display men mere CPU krævende)",
+highlight: "slå syntax highlight til/fra",
+reset_highlight: "nulstil highlight (hvis den er desynkroniseret fra teksten)",
+help: "om",
+save: "gem",
+load: "hent",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Position",
+total: "Total",
+close_popup: "luk popup",
+shortcuts: "Genveje",
+add_tab: "tilføj tabulation til tekst",
+remove_tab: "fjern tabulation fra tekst",
+about_notice: "Husk: syntax highlight funktionen bør kun bruge til små tekster",
+toggle: "Slå editor til / fra",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Skift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Processing...",
+fullscreen: "fullscreen",
+syntax_selection: "--Syntax--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+syntax_robotstxt: "Robots txt",
+syntax_tsql: "T-SQL",
+syntax_perl: "Perl",
+syntax_coldfusion: "Coldfusion",
+close_tab: "Close file"
+};
diff --git a/www/extras/editarea/edit_area/langs/en.js b/www/extras/editarea/edit_area/langs/en.js
new file mode 100755
index 000000000..586ca7a27
--- /dev/null
+++ b/www/extras/editarea/edit_area/langs/en.js
@@ -0,0 +1,65 @@
+editAreaLoader.lang["en"]={
+new_document: "new empty document",
+search_button: "search and replace",
+search_command: "search next / open search area",
+search: "search",
+replace: "replace",
+replace_command: "replace / open search area",
+find_next: "find next",
+replace_all: "replace all",
+reg_exp: "regular expressions",
+match_case: "match case",
+not_found: "not found.",
+occurrence_replaced: "occurences replaced.",
+search_field_empty: "Search field empty",
+restart_search_at_begin: "End of area reached. Restart at begin.",
+move_popup: "move search popup",
+font_size: "--Font size--",
+go_to_line: "go to line",
+go_to_line_prompt: "go to line number:",
+undo: "undo",
+redo: "redo",
+change_smooth_selection: "enable/disable some display features (smarter display but more CPU charge)",
+highlight: "toggle syntax highlight on/off",
+reset_highlight: "reset highlight (if desyncronized from text)",
+help: "about",
+save: "save",
+load: "load",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Position",
+total: "Total",
+close_popup: "close popup",
+shortcuts: "Shortcuts",
+add_tab: "add tabulation to text",
+remove_tab: "remove tabulation to text",
+about_notice: "Notice: syntax highlight function is only for small text",
+toggle: "Toggle editor",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Processing...",
+fullscreen: "fullscreen",
+syntax_selection: "--Syntax--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+syntax_robotstxt: "Robots txt",
+syntax_tsql: "T-SQL",
+syntax_perl: "Perl",
+syntax_coldfusion: "Coldfusion",
+close_tab: "Close file"
+};
diff --git a/www/extras/editarea/edit_area/langs/eo.js b/www/extras/editarea/edit_area/langs/eo.js
new file mode 100755
index 000000000..2631a2ff0
--- /dev/null
+++ b/www/extras/editarea/edit_area/langs/eo.js
@@ -0,0 +1,65 @@
+editAreaLoader.lang["eo"]={
+new_document: "nova dokumento (vakigas la enhavon)",
+search_button: "serĉi / anstataŭigi",
+search_command: "pluserĉi / malfermi la serĉo-fenestron",
+search: "serĉi",
+replace: "anstataŭigi",
+replace_command: "anstataŭigi / malfermi la serĉo-fenestron",
+find_next: "serĉi",
+replace_all: "anstataŭigi ĉion",
+reg_exp: "regula esprimo",
+match_case: "respekti la usklecon",
+not_found: "ne trovita.",
+occurrence_replaced: "anstataŭigoj plenumitaj.",
+search_field_empty: "La kampo estas malplena.",
+restart_search_at_begin: "Fino de teksto ĝisrirata, ĉu daŭrigi el la komenco?",
+move_popup: "movi la serĉo-fenestron",
+font_size: "--Tipara grando--",
+go_to_line: "iri al la linio",
+go_to_line_prompt: "iri al la linio numero:",
+undo: "rezigni",
+redo: "refari",
+change_smooth_selection: "ebligi/malebligi la funkcioj de vidigo (pli bona vidigo, sed pli da ŝarĝo de la ĉeforgano)",
+highlight: "ebligi/malebligi la sintaksan kolorigon",
+reset_highlight: "repravalorizi la sintaksan kolorigon (se malsinkronigon de la teksto)",
+help: "pri",
+save: "registri",
+load: "ŝarĝi",
+line_abbr: "Ln",
+char_abbr: "Sg",
+position: "Pozicio",
+total: "Sumo",
+close_popup: "fermi la ŝprucfenestron",
+shortcuts: "Fulmoklavo",
+add_tab: "aldoni tabon en la tekston",
+remove_tab: "forigi tablon el la teksto",
+about_notice: "Noto: la sintaksa kolorigo estas nur prikalkulita por mallongaj tekstoj.",
+toggle: "baskuligi la redaktilon",
+accesskey: "Fulmoklavo",
+tab: "Tab",
+shift: "Maj",
+ctrl: "Ktrl",
+esc: "Esk",
+processing: "ŝargante...",
+fullscreen: "plenekrane",
+syntax_selection: "--Sintakso--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Pitono",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+syntax_robotstxt: "Robots txt",
+syntax_tsql: "T-SQL",
+syntax_perl: "Perl",
+syntax_coldfusion: "Coldfusion",
+close_tab: "Fermi la dosieron"
+};
\ No newline at end of file
diff --git a/www/extras/editarea/edit_area/langs/es.js b/www/extras/editarea/edit_area/langs/es.js
new file mode 100755
index 000000000..4188e4a20
--- /dev/null
+++ b/www/extras/editarea/edit_area/langs/es.js
@@ -0,0 +1,62 @@
+editAreaLoader.lang["es"]={
+new_document: "nuevo documento vacío",
+search_button: "buscar y reemplazar",
+search_command: "buscar siguiente / abrir área de búsqueda",
+search: "buscar",
+replace: "reemplazar",
+replace_command: "reemplazar / abrir área de búsqueda",
+find_next: "encontrar siguiente",
+replace_all: "reemplazar todos",
+reg_exp: "expresiones regulares",
+match_case: "coincidir capitalización",
+not_found: "no encontrado.",
+occurrence_replaced: "ocurrencias reemplazadas.",
+search_field_empty: "Campo de búsqueda vacío",
+restart_search_at_begin: "Se ha llegado al final del área. Se va a seguir desde el principio.",
+move_popup: "mover la ventana de búsqueda",
+font_size: "--Tamaño de la fuente--",
+go_to_line: "ir a la línea",
+go_to_line_prompt: "ir a la línea número:",
+undo: "deshacer",
+redo: "rehacer",
+change_smooth_selection: "activar/desactivar algunas características de visualización (visualización más inteligente pero más carga de CPU)",
+highlight: "intercambiar resaltado de sintaxis",
+reset_highlight: "reinicializar resaltado (si no esta sincronizado con el texto)",
+help: "acerca",
+save: "guardar",
+load: "cargar",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Posición",
+total: "Total",
+close_popup: "recuadro de cierre",
+shortcuts: "Atajos",
+add_tab: "añadir tabulado al texto",
+remove_tab: "borrar tabulado del texto",
+about_notice: "Aviso: el resaltado de sintaxis sólo funciona para texto pequeño",
+toggle: "Cambiar editor",
+accesskey: "Tecla de acceso",
+tab: "Tab",
+shift: "Mayúsc",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Procesando...",
+fullscreen: "pantalla completa",
+syntax_selection: "--Syntax--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+syntax_coldfusion: "Coldfusion",
+close_tab: "Close file"
+};
diff --git a/www/extras/editarea/edit_area/langs/fr.js b/www/extras/editarea/edit_area/langs/fr.js
new file mode 100755
index 000000000..4db707d93
--- /dev/null
+++ b/www/extras/editarea/edit_area/langs/fr.js
@@ -0,0 +1,65 @@
+editAreaLoader.lang["fr"]={
+new_document: "nouveau document (efface le contenu)",
+search_button: "rechercher / remplacer",
+search_command: "rechercher suivant / ouvrir la fenêtre de recherche",
+search: "rechercher",
+replace: "remplacer",
+replace_command: "remplacer / ouvrir la fenêtre de recherche",
+find_next: "rechercher",
+replace_all: "tout remplacer",
+reg_exp: "expr. régulière",
+match_case: "respecter la casse",
+not_found: "pas trouvé.",
+occurrence_replaced: "remplacements éffectués.",
+search_field_empty: "Le champ de recherche est vide.",
+restart_search_at_begin: "Fin du texte atteint, poursuite au début.",
+move_popup: "déplacer la fenêtre de recherche",
+font_size: "--Taille police--",
+go_to_line: "aller à la ligne",
+go_to_line_prompt: "aller a la ligne numero:",
+undo: "annuler",
+redo: "refaire",
+change_smooth_selection: "activer/désactiver des fonctions d'affichage (meilleur affichage mais plus de charge processeur)",
+highlight: "activer/désactiver la coloration syntaxique",
+reset_highlight: "réinitialiser la coloration syntaxique (si désyncronisée du texte)",
+help: "à propos",
+save: "sauvegarder",
+load: "charger",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Position",
+total: "Total",
+close_popup: "fermer le popup",
+shortcuts: "Racourcis clavier",
+add_tab: "ajouter une tabulation dans le texte",
+remove_tab: "retirer une tabulation dans le texte",
+about_notice: "Note: la coloration syntaxique n'est prévue que pour de courts textes.",
+toggle: "basculer l'éditeur",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Maj",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "chargement...",
+fullscreen: "plein écran",
+syntax_selection: "--Syntaxe--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+syntax_robotstxt: "Robots txt",
+syntax_tsql: "T-SQL",
+syntax_perl: "Perl",
+syntax_coldfusion: "Coldfusion",
+close_tab: "Fermer le fichier"
+};
diff --git a/www/extras/editarea/edit_area/langs/hr.js b/www/extras/editarea/edit_area/langs/hr.js
new file mode 100755
index 000000000..5980c1690
--- /dev/null
+++ b/www/extras/editarea/edit_area/langs/hr.js
@@ -0,0 +1,65 @@
+editAreaLoader.lang["hr"]={
+new_document: "Novi dokument",
+search_button: "Traži i izmijeni",
+search_command: "Traži dalje / Otvori prozor za traženje",
+search: "Traži",
+replace: "Izmijeni",
+replace_command: "Izmijeni / Otvori prozor za traženje",
+find_next: "Traži dalje",
+replace_all: "Izmjeni sve",
+reg_exp: "Regularni izrazi",
+match_case: "Bitna vel. slova",
+not_found: "nije naðeno.",
+occurrence_replaced: "izmjenjenih.",
+search_field_empty: "Prazno polje za traženje!",
+restart_search_at_begin: "Došao do kraja. Poèeo od poèetka.",
+move_popup: "Pomakni prozor",
+font_size: "--Velièina teksta--",
+go_to_line: "Odi na redak",
+go_to_line_prompt: "Odi na redak:",
+undo: "Vrati natrag",
+redo: "Napravi ponovo",
+change_smooth_selection: "Ukljuèi/iskljuèi neke moguænosti prikaza (pametniji prikaz, ali zagušeniji CPU)",
+highlight: "Ukljuèi/iskljuèi bojanje sintakse",
+reset_highlight: "Ponovi kolorizaciju (ako je nesinkronizirana s tekstom)",
+help: "O edit_area",
+save: "Spremi",
+load: "Uèitaj",
+line_abbr: "Ln",
+char_abbr: "Zn",
+position: "Pozicija",
+total: "Ukupno",
+close_popup: "Zatvori prozor",
+shortcuts: "Kratice",
+add_tab: "Dodaj tabulaciju",
+remove_tab: "Makni tabulaciju",
+about_notice: "Napomena: koloriziranje sintakse je samo za kratke kodove",
+toggle: "Prebaci naèin ureðivanja",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Procesiram...",
+fullscreen: "Cijeli prozor",
+syntax_selection: "--Syntax--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+syntax_robotstxt: "Robots txt",
+syntax_tsql: "T-SQL",
+syntax_perl: "Perl",
+syntax_coldfusion: "Coldfusion",
+close_tab: "Close file"
+};
diff --git a/www/extras/editarea/edit_area/langs/it.js b/www/extras/editarea/edit_area/langs/it.js
new file mode 100755
index 000000000..4a7ce11e0
--- /dev/null
+++ b/www/extras/editarea/edit_area/langs/it.js
@@ -0,0 +1,65 @@
+editAreaLoader.lang["it"]={
+new_document: "nuovo documento vuoto",
+search_button: "cerca e sostituisci",
+search_command: "trova successivo / apri finestra di ricerca",
+search: "cerca",
+replace: "sostituisci",
+replace_command: "sostituisci / apri finestra di ricerca",
+find_next: "trova successivo",
+replace_all: "sostituisci tutti",
+reg_exp: "espressioni regolari",
+match_case: "confronta maiuscole/minuscole ",
+not_found: "non trovato.",
+occurrence_replaced: "occorrenze sostituite.",
+search_field_empty: "Campo ricerca vuoto",
+restart_search_at_begin: "Fine del testo raggiunta. Ricomincio dall'inizio.",
+move_popup: "sposta popup di ricerca",
+font_size: "-- Dimensione --",
+go_to_line: "vai alla linea",
+go_to_line_prompt: "vai alla linea numero:",
+undo: "annulla",
+redo: "ripeti",
+change_smooth_selection: "abilita/disabilita alcune caratteristiche della visualizzazione",
+highlight: "abilita/disabilita colorazione della sintassi",
+reset_highlight: "aggiorna colorazione (se non sincronizzata)",
+help: "informazioni su...",
+save: "salva",
+load: "carica",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Posizione",
+total: "Totale",
+close_popup: "chiudi popup",
+shortcuts: "Scorciatoie",
+add_tab: "aggiungi tabulazione",
+remove_tab: "rimuovi tabulazione",
+about_notice: "Avviso: la colorazione della sintassi vale solo con testo piccolo",
+toggle: "Abilita/disabilita editor",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "In corso...",
+fullscreen: "fullscreen",
+syntax_selection: "--Syntax--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+syntax_robotstxt: "Robots txt",
+syntax_tsql: "T-SQL",
+syntax_perl: "Perl",
+syntax_coldfusion: "Coldfusion",
+close_tab: "Close file"
+};
diff --git a/www/extras/editarea/edit_area/langs/ja.js b/www/extras/editarea/edit_area/langs/ja.js
new file mode 100755
index 000000000..f0c4d25a3
--- /dev/null
+++ b/www/extras/editarea/edit_area/langs/ja.js
@@ -0,0 +1,65 @@
+editAreaLoader.lang["ja"]={
+new_document: "新規作成",
+search_button: "検索・置換",
+search_command: "次を検索 / 検索窓を表示",
+search: "検索",
+replace: "置換",
+replace_command: "置換 / 置換窓を表示",
+find_next: "次を検索",
+replace_all: "全置換",
+reg_exp: "正規表現",
+match_case: "大文字小文字の区別",
+not_found: "見つかりません。",
+occurrence_replaced: "置換しました。",
+search_field_empty: "検索対象文字列が空です。",
+restart_search_at_begin: "終端に達しました、始めに戻ります",
+move_popup: "検索窓を移動",
+font_size: "--フォントサイズ--",
+go_to_line: "指定行へ移動",
+go_to_line_prompt: "指定行へ移動します:",
+undo: "元に戻す",
+redo: "やり直し",
+change_smooth_selection: "スムース表示の切り替え(CPUを使います)",
+highlight: "構文強調表示の切り替え",
+reset_highlight: "構文強調表示のリセット",
+help: "ヘルプを表示",
+save: "保存",
+load: "読み込み",
+line_abbr: "行",
+char_abbr: "文字",
+position: "位置",
+total: "合計",
+close_popup: "ポップアップを閉じる",
+shortcuts: "ショートカット",
+add_tab: "タブを挿入する",
+remove_tab: "タブを削除する",
+about_notice: "注意:構文強調表示は短いテキストでしか有効に機能しません。",
+toggle: "テキストエリアとeditAreaの切り替え",
+accesskey: "アクセスキー",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "処理中です...",
+fullscreen: "fullscreen",
+syntax_selection: "--Syntax--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+syntax_robotstxt: "Robots txt",
+syntax_tsql: "T-SQL",
+syntax_perl: "Perl",
+syntax_coldfusion: "Coldfusion",
+close_tab: "Close file"
+};
diff --git a/www/extras/editarea/edit_area/langs/mk.js b/www/extras/editarea/edit_area/langs/mk.js
new file mode 100755
index 000000000..46daa3905
--- /dev/null
+++ b/www/extras/editarea/edit_area/langs/mk.js
@@ -0,0 +1,65 @@
+editAreaLoader.lang["mk"]={
+new_document: "Нов документ",
+search_button: "Најди и замени",
+search_command: "Барај следно / Отвори нов прозорец за пребарување",
+search: "Барај",
+replace: "Замени",
+replace_command: "Замени / Отвори прозорец за пребарување",
+find_next: "најди следно",
+replace_all: "Замени ги сите",
+reg_exp: "Регуларни изрази",
+match_case: "Битна е големината на буквите",
+not_found: "не е пронајдено.",
+occurrence_replaced: "замени.",
+search_field_empty: "Полето за пребарување е празно",
+restart_search_at_begin: "Крај на областа. Стартувај од почеток.",
+move_popup: "Помести го прозорецот",
+font_size: "--Големина на текстот--",
+go_to_line: "Оди на линија",
+go_to_line_prompt: "Оди на линија со број:",
+undo: "Врати",
+redo: "Повтори",
+change_smooth_selection: "Вклучи/исклучи некои карактеристики за приказ (попаметен приказ, но поголемо оптеретување за процесорот)",
+highlight: "Вклучи/исклучи осветлување на синтакса",
+reset_highlight: "Ресетирај го осветлувањето на синтакса (доколку е десинхронизиранo со текстот)",
+help: "За",
+save: "Зачувај",
+load: "Вчитај",
+line_abbr: "Лн",
+char_abbr: "Зн",
+position: "Позиција",
+total: "Вкупно",
+close_popup: "Затвори го прозорецот",
+shortcuts: "Кратенки",
+add_tab: "Додај табулација на текстот",
+remove_tab: "Отстрани ја табулацијата",
+about_notice: "Напомена: Осветлувањето на синтанса е само за краток текст",
+toggle: "Смени начин на уредување",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Обработувам...",
+fullscreen: "Цел прозорец",
+syntax_selection: "--Синтакса--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+syntax_robotstxt: "Robots txt",
+syntax_tsql: "T-SQL",
+syntax_perl: "Perl",
+syntax_coldfusion: "Coldfusion",
+close_tab: "Избери датотека"
+};
diff --git a/www/extras/editarea/edit_area/langs/nl.js b/www/extras/editarea/edit_area/langs/nl.js
new file mode 100755
index 000000000..1f62c2860
--- /dev/null
+++ b/www/extras/editarea/edit_area/langs/nl.js
@@ -0,0 +1,65 @@
+editAreaLoader.lang["nl"]={
+new_document: "nieuw leeg document",
+search_button: "zoek en vervang",
+search_command: "zoek volgende / zoekscherm openen",
+search: "zoek",
+replace: "vervang",
+replace_command: "vervang / zoekscherm openen",
+find_next: "volgende vinden",
+replace_all: "alles vervangen",
+reg_exp: "reguliere expressies",
+match_case: "hoofdletter gevoelig",
+not_found: "niet gevonden.",
+occurrence_replaced: "object vervangen.",
+search_field_empty: "Zoek veld leeg",
+restart_search_at_begin: "Niet meer instanties gevonden, begin opnieuw",
+move_popup: "versleep zoek scherm",
+font_size: "--Letter grootte--",
+go_to_line: "Ga naar regel",
+go_to_line_prompt: "Ga naar regel nummer:",
+undo: "Ongedaan maken",
+redo: "Opnieuw doen",
+change_smooth_selection: "zet wat schermopties aan/uit (kan langzamer zijn)",
+highlight: "zet syntax highlight aan/uit",
+reset_highlight: "reset highlight (indien gedesynchronizeerd)",
+help: "informatie",
+save: "opslaan",
+load: "laden",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Positie",
+total: "Totaal",
+close_popup: "Popup sluiten",
+shortcuts: "Snelkoppelingen",
+add_tab: "voeg tabs toe in tekst",
+remove_tab: "verwijder tabs uit tekst",
+about_notice: "Notitie: syntax highlight functie is alleen voor kleine tekst",
+toggle: "geavanceerde bewerkingsopties",
+accesskey: "Accessknop",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Verwerken...",
+fullscreen: "fullscreen",
+syntax_selection: "--Syntax--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+syntax_robotstxt: "Robots txt",
+syntax_tsql: "T-SQL",
+syntax_perl: "Perl",
+syntax_coldfusion: "Coldfusion",
+close_tab: "Close file"
+};
diff --git a/www/extras/editarea/edit_area/langs/pl.js b/www/extras/editarea/edit_area/langs/pl.js
new file mode 100755
index 000000000..dbbf661a2
--- /dev/null
+++ b/www/extras/editarea/edit_area/langs/pl.js
@@ -0,0 +1,65 @@
+editAreaLoader.lang["pl"]={
+new_document: "nowy dokument",
+search_button: "znajdź i zamień",
+search_command: "znajdź następny",
+search: "znajdź",
+replace: "zamień",
+replace_command: "zamień",
+find_next: "następny",
+replace_all: "zamień wszystko",
+reg_exp: "wyrażenie regularne",
+match_case: "uwzględnij wielkość liter ",
+not_found: "nie znaleziono.",
+occurrence_replaced: "wystąpień zamieniono.",
+search_field_empty: "Nie wprowadzono tekstu",
+restart_search_at_begin: "Koniec dokumentu. Wyszukiwanie od początku.",
+move_popup: "przesuń okienko wyszukiwania",
+font_size: "Rozmiar",
+go_to_line: "idź do linii",
+go_to_line_prompt: "numer linii:",
+undo: "cofnij",
+redo: "przywróć",
+change_smooth_selection: "włącz/wyłącz niektóre opcje wyglądu (zaawansowane opcje wyglądu obciążają procesor)",
+highlight: "włącz/wyłącz podświetlanie składni",
+reset_highlight: "odśwież podświetlanie składni (jeśli rozsynchronizowało się z tekstem)",
+help: "o programie",
+save: "zapisz",
+load: "otwórz",
+line_abbr: "Ln",
+char_abbr: "Zn",
+position: "Pozycja",
+total: "W sumie",
+close_popup: "zamknij okienko",
+shortcuts: "Skróty klawiaturowe",
+add_tab: "dodaj wcięcie do zaznaczonego tekstu",
+remove_tab: "usuń wcięcie",
+about_notice: "Uwaga: podświetlanie składni nie jest zalecane dla długich tekstów",
+toggle: "Włącz/wyłącz edytor",
+accesskey: "Alt+",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Przetwarzanie...",
+fullscreen: "fullscreen",
+syntax_selection: "--Syntax--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+syntax_robotstxt: "Robots txt",
+syntax_tsql: "T-SQL",
+syntax_perl: "Perl",
+syntax_coldfusion: "Coldfusion",
+close_tab: "Close file"
+};
diff --git a/www/extras/editarea/edit_area/langs/pt.js b/www/extras/editarea/edit_area/langs/pt.js
new file mode 100755
index 000000000..99d5f4d23
--- /dev/null
+++ b/www/extras/editarea/edit_area/langs/pt.js
@@ -0,0 +1,65 @@
+editAreaLoader.lang["pt"]={
+new_document: "Novo documento",
+search_button: "Localizar e substituir",
+search_command: "Localizar próximo",
+search: "Localizar",
+replace: "Substituir",
+replace_command: "Substituir",
+find_next: "Localizar",
+replace_all: "Subst. tudo",
+reg_exp: "Expressões regulares",
+match_case: "Diferenciar maiúsculas e minúsculas",
+not_found: "Não encontrado.",
+occurrence_replaced: "Ocorrências substituidas",
+search_field_empty: "Campo localizar vazio.",
+restart_search_at_begin: "Fim das ocorrências. Recomeçar do inicio.",
+move_popup: "Mover janela",
+font_size: "--Tamanho da fonte--",
+go_to_line: "Ir para linha",
+go_to_line_prompt: "Ir para a linha:",
+undo: "Desfazer",
+redo: "Refazer",
+change_smooth_selection: "Opções visuais",
+highlight: "Cores de sintaxe",
+reset_highlight: "Resetar cores (se não sincronizado)",
+help: "Sobre",
+save: "Salvar",
+load: "Carregar",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Posição",
+total: "Total",
+close_popup: "Fechar",
+shortcuts: "Shortcuts",
+add_tab: "Adicionar tabulação",
+remove_tab: "Remover tabulação",
+about_notice: "Atenção: Cores de sintaxe são indicados somente para textos pequenos",
+toggle: "Exibir editor",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Processando...",
+fullscreen: "fullscreen",
+syntax_selection: "--Syntax--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+syntax_robotstxt: "Robots txt",
+syntax_tsql: "T-SQL",
+syntax_perl: "Perl",
+syntax_coldfusion: "Coldfusion",
+close_tab: "Close file"
+};
diff --git a/www/extras/editarea/edit_area/langs/ru.js b/www/extras/editarea/edit_area/langs/ru.js
new file mode 100755
index 000000000..49d9692b2
--- /dev/null
+++ b/www/extras/editarea/edit_area/langs/ru.js
@@ -0,0 +1,65 @@
+editAreaLoader.lang["ru"]={
+new_document: "новый пустой документ",
+search_button: "поиск и замена",
+search_command: "искать следующий / открыть панель поиска",
+search: "поиск",
+replace: "замена",
+replace_command: "заменить / открыть панель поиска",
+find_next: "найти следующее",
+replace_all: "заменить все",
+reg_exp: "регулярное выражение",
+match_case: "учитывать регистр",
+not_found: "не найдено.",
+occurrence_replaced: "вхождение заменено.",
+search_field_empty: "Поле поиска пустое",
+restart_search_at_begin: "Достигнут конец документа. Начинаю с начала.",
+move_popup: "переместить окно поиска",
+font_size: "--Размер шрифта--",
+go_to_line: "перейти к строке",
+go_to_line_prompt: "перейти к строке номер:",
+undo: "отменить",
+redo: "вернуть",
+change_smooth_selection: "включить/отключить некоторые функции просмотра (более красиво, но больше использует процессор)",
+highlight: "переключить подсветку синтаксиса включена/выключена",
+reset_highlight: "восстановить подсветку (если разсинхронизирована от текста)",
+help: "о программе",
+save: "сохранить",
+load: "загрузить",
+line_abbr: "Стр",
+char_abbr: "Стлб",
+position: "Позиция",
+total: "Всего",
+close_popup: "закрыть всплывающее окно",
+shortcuts: "Горячие клавиши",
+add_tab: "добавить табуляцию в текст",
+remove_tab: "убрать табуляцию из текста",
+about_notice: "Внимание: функция подсветки синтаксиса только для небольших текстов",
+toggle: "Переключить редактор",
+accesskey: "Горячая клавиша",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Обработка...",
+fullscreen: "полный экран",
+syntax_selection: "--Синтакс--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+syntax_robotstxt: "Robots txt",
+syntax_tsql: "T-SQL",
+syntax_perl: "Perl",
+syntax_coldfusion: "Coldfusion",
+close_tab: "Закрыть файл"
+};
diff --git a/www/extras/editarea/edit_area/langs/sk.js b/www/extras/editarea/edit_area/langs/sk.js
new file mode 100755
index 000000000..740ac9a83
--- /dev/null
+++ b/www/extras/editarea/edit_area/langs/sk.js
@@ -0,0 +1,65 @@
+editAreaLoader.lang["sk"]={
+new_document: "nový prázdy dokument",
+search_button: "vyhľadaj a nahraď",
+search_command: "hľadaj ďalsšie / otvor vyhľadávacie pole",
+search: "hľadaj",
+replace: "nahraď",
+replace_command: "nahraď / otvor vyhľadávacie pole",
+find_next: "nájdi ďalšie",
+replace_all: "nahraď všetko",
+reg_exp: "platné výrazy",
+match_case: "zhodujúce sa výrazy",
+not_found: "nenájdené.",
+occurrence_replaced: "výskyty nahradené.",
+search_field_empty: "Pole vyhľadávanie je prádzne",
+restart_search_at_begin: "End of area reached. Restart at begin.",
+move_popup: "presuň vyhľadávacie okno",
+font_size: "--Veľkosť textu--",
+go_to_line: "prejdi na riadok",
+go_to_line_prompt: "prejdi na riadok:",
+undo: "krok späť",
+redo: "prepracovať",
+change_smooth_selection: "povoliť/zamietnúť niektoré zo zobrazených funkcií (účelnejšie zobrazenie vyžaduje väčšie zaťaženie procesora CPU)",
+highlight: "prepnúť zvýrazňovanie syntaxe zap/vyp",
+reset_highlight: "zrušiť zvýrazňovanie (ak je nesynchronizované s textom)",
+help: "o programe",
+save: "uložiť",
+load: "načítať",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Pozícia",
+total: "Spolu",
+close_popup: "zavrieť okno",
+shortcuts: "Skratky",
+add_tab: "pridať tabulovanie textu",
+remove_tab: "odstrániť tabulovanie textu",
+about_notice: "Upozornenie: funkcia zvýrazňovania syntaxe je dostupná iba pre malý text",
+toggle: "Prepnúť editor",
+accesskey: "Accesskey",
+tab: "Záložka",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Spracúvam...",
+fullscreen: "cel=a obrazovka",
+syntax_selection: "--Vyber Syntax--",
+syntax_css: "CSS",
+syntax_html: "HTML",
+syntax_js: "Javascript",
+syntax_php: "Php",
+syntax_python: "Python",
+syntax_vb: "Visual Basic",
+syntax_xml: "Xml",
+syntax_c: "C",
+syntax_cpp: "CPP",
+syntax_basic: "Basic",
+syntax_pas: "Pascal",
+syntax_brainfuck: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+syntax_robotstxt: "Robots txt",
+syntax_tsql: "T-SQL",
+syntax_perl: "Perl",
+syntax_coldfusion: "Coldfusion",
+close_tab: "Close file"
+};
diff --git a/www/extras/editarea/edit_area/license.txt b/www/extras/editarea/edit_area/license.txt
new file mode 100755
index 000000000..5ab7695ab
--- /dev/null
+++ b/www/extras/editarea/edit_area/license.txt
@@ -0,0 +1,504 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ , 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/www/extras/editarea/edit_area/manage_area.js b/www/extras/editarea/edit_area/manage_area.js
new file mode 100755
index 000000000..654f4297b
--- /dev/null
+++ b/www/extras/editarea/edit_area/manage_area.js
@@ -0,0 +1,466 @@
+ EditArea.prototype.focus = function() {
+ this.textarea.focus();
+ this.textareaFocused=true;
+ };
+
+
+ EditArea.prototype.check_line_selection= function(timer_checkup){
+ //if(do_highlight==false){
+
+ if(!editAreas[this.id])
+ return false;
+
+ //time=new Date;
+ //t1=t2=t3= time.getTime();
+
+ if(!this.smooth_selection && !this.do_highlight){
+ //formatArea();
+ }else if(this.textareaFocused && editAreas[this.id]["displayed"]==true && this.isResizing==false){
+ infos= this.get_selection_infos();
+ // time=new Date;
+ // t2= time.getTime();
+
+ //if(this.last_selection["line_start"] != infos["line_start"] || this.last_selection["line_nb"] != infos["line_nb"] || infos["full_text"] != this.last_selection["full_text"]){
+ if(this.last_selection["line_start"] != infos["line_start"] || this.last_selection["line_nb"] != infos["line_nb"] || infos["full_text"] != this.last_selection["full_text"] || this.reload_highlight){
+ // if selection change
+
+ new_top=this.lineHeight * (infos["line_start"]-1);
+ new_height=Math.max(0, this.lineHeight * infos["line_nb"]);
+ new_width=Math.max(this.textarea.scrollWidth, this.container.clientWidth -50);
+
+ this.selection_field.style.top=new_top+"px";
+ this.selection_field.style.width=new_width+"px";
+ this.selection_field.style.height=new_height+"px";
+ $("cursor_pos").style.top=new_top+"px";
+
+ if(this.do_highlight==true){
+ var curr_text=infos["full_text"].split("\n");
+ var content="";
+ //alert("length: "+curr_text.length+ " i: "+ Math.max(0,infos["line_start"]-1)+ " end: "+Math.min(curr_text.length, infos["line_start"]+infos["line_nb"]-1)+ " line: "+infos["line_start"]+" [0]: "+curr_text[0]+" [1]: "+curr_text[1]);
+ var start=Math.max(0,infos["line_start"]-1);
+ var end=Math.min(curr_text.length, infos["line_start"]+infos["line_nb"]-1);
+
+ //curr_text[start]= curr_text[start].substr(0,infos["curr_pos"]-1) +"¤_overline_¤"+ curr_text[start].substr(infos["curr_pos"]-1);
+ for(i=start; i< end; i++){
+ content+= curr_text[i]+"\n";
+ }
+
+ content= content.replace(/&/g,"&");
+ content= content.replace(//g,">");
+
+ if(this.nav['isIE'] || this.nav['isOpera'] || this.nav['isFirefox'] >= 3)
+ this.selection_field.innerHTML= "
+
+
+
diff --git a/www/extras/editarea/license_apache.txt b/www/extras/editarea/license_apache.txt
new file mode 100755
index 000000000..c7ef5e6c6
--- /dev/null
+++ b/www/extras/editarea/license_apache.txt
@@ -0,0 +1,7 @@
+Copyright 2008 Christophe Dolivet
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
\ No newline at end of file
diff --git a/www/extras/editarea/license_lgpl.txt b/www/extras/editarea/license_lgpl.txt
new file mode 100755
index 000000000..8c177f8be
--- /dev/null
+++ b/www/extras/editarea/license_lgpl.txt
@@ -0,0 +1,458 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
diff --git a/www/extras/editarea/todo.txt b/www/extras/editarea/todo.txt
new file mode 100755
index 000000000..0088e86ee
--- /dev/null
+++ b/www/extras/editarea/todo.txt
@@ -0,0 +1,85 @@
+FOR AUTOCOMPLETION:
+- work with tab editing (each one having it's context)
+- allow $ in prefix
+- allow to call user function for autocompletion
+- correctly display the box with window limits
+- enable "live" detection for new syntax keyword in the file
+- display a long description of the keyword (arround the box)
+
+DONE:
+- beeing able to prefix those word by key words (sort of namespace)
+- hide it on click
+- enable it for ctrl+space in the middle of a word
+
+/***** To do Needed *****/
+
+- change_callback is called one time at the beginning event if the text has not changed
+- check later init call with safari 3
+- improve callback documentation.
+
+/***** To do Optionnal*****/
+
+- possibility to switch on/off line numbers (allow to get more space)
+- remove the bottom scrollbar is there is no neeed to get one. (adjust the width to the real content width).
+- amelioration of the scroll_to_view function for when there is several lines selected (center a little more the selected text)
+- darken background of the selection when syntax highlight is on (not easy to see actually under firefox)
+- improve opera 9 compatibility (very hard, need help for workaround) cf "Browser remarks".
+- optimize scroll_to_view for Opera?
+- add word wrap option (nearly impossible, there is too much lacks of support from browsers, have spend more than 6 hours on this)
+- possibility to add larger font sizes as options?
+
+/*** Bugs ***/
+
+- when pressing "reset highlight" in IE the textarea scroll to the top (don't know how to fix this...)
+- when pressing "shift+page down" and then "shift+page up" the top of the selection move where as it should be to the bottom of the selection to move (to fix it: must know in which direction the selection grow in "get_selection_infos")
+- Editor doesnt load when running on ASP.NET when using codebehind declaration at top of page (don't really know what to do because I don't know ASP nor .NET)
+
+
+/*** Problems ***/
+
+
+/*** Highlight bugs ***/
+
+/*** Highlight problems ***/
+- only one language at the same time (no html and php in the same textarea. This should be possible, but there would have no optimization and be very very slow)
+
+
+/*** Global remarks ***/
+- editarea must be always visible, to hide it use the hide() function
+
+
+/*** Compatibility ***/
+Supported browsers:
+Firefox 1.5 & 2
+IE 6 & 7
+Opera 9
+
+Safari 3.1
+
+No more supported:
+Netscape 8 with rendering mode IE
+Mozilla 1.7 (buggy)
+
+
+/*** Browser remarks/bugs ***/
+
+OPERA:
+- opera bug or spec problem: find how to get the textarea content width
+- opera bug: pressing the " key is equals to pressing the scrolldown key (with french keyboard at least)
+- currently disabled: scrollDown/Up function (due to the " key error)
+- opera is very very slow with syntax highlight (regexp)
+- opera doesn't render tabulation of the same width in a textarea as in a
tag... => doesn't allow to use non monospace font
+- opera doesn't manage correctly the width 100% for the iframe and allow to scroll with position absolute
+
+IE:
+- IE is far slower than firefox in highlight mode due to opacity filter
+- It's seems impossible to get the selection range when wrap mode is "soft" (and it's still very diffcult when wrap mode is on)
+- The syntax highlight mode is broken when text length is too long (~100000, 150000 chars) don't know why...
+
+FIREFOX:
+- the scrollHeight value for the textarea never decresease when lines are deleted (don't remember anything about this)
+
+
+NETSCAPE:
+- can't manage lineHeight for textarea in firefox mode
+- setting highlight mode on crash the navigator with no warning in firefox mode