From 6aa72e141a0b651f35e6d4dc08777d715aed2e71 Mon Sep 17 00:00:00 2001 From: patdenice Date: Tue, 25 Mar 2008 23:30:23 +0000 Subject: Add editarea to LocalFiles Editor. git-svn-id: http://piwigo.org/svn/trunk@2291 68402e56-0260-453c-a942-63ccdbb3a9ee --- plugins/LocalFilesEditor/admin.php | 54 ++++++------- plugins/LocalFilesEditor/admin.tpl | 18 ++++- .../LocalFilesEditor/editarea/edit_area_full.js | 38 ++++++++++ plugins/LocalFilesEditor/editarea/images/close.gif | Bin 0 -> 102 bytes .../editarea/images/fullscreen.gif | Bin 0 -> 198 bytes .../editarea/images/go_to_line.gif | Bin 0 -> 1053 bytes plugins/LocalFilesEditor/editarea/images/help.gif | Bin 0 -> 295 bytes .../LocalFilesEditor/editarea/images/highlight.gif | Bin 0 -> 256 bytes plugins/LocalFilesEditor/editarea/images/index.php | 33 ++++++++ plugins/LocalFilesEditor/editarea/images/load.gif | Bin 0 -> 1041 bytes plugins/LocalFilesEditor/editarea/images/move.gif | Bin 0 -> 257 bytes .../editarea/images/newdocument.gif | Bin 0 -> 170 bytes .../LocalFilesEditor/editarea/images/opacity.png | Bin 0 -> 147 bytes .../editarea/images/processing.gif | Bin 0 -> 825 bytes plugins/LocalFilesEditor/editarea/images/redo.gif | Bin 0 -> 169 bytes .../editarea/images/reset_highlight.gif | Bin 0 -> 168 bytes plugins/LocalFilesEditor/editarea/images/save.gif | Bin 0 -> 285 bytes .../LocalFilesEditor/editarea/images/search.gif | Bin 0 -> 191 bytes .../editarea/images/smooth_selection.gif | Bin 0 -> 174 bytes .../LocalFilesEditor/editarea/images/spacer.gif | Bin 0 -> 43 bytes .../editarea/images/statusbar_resize.gif | Bin 0 -> 79 bytes plugins/LocalFilesEditor/editarea/images/undo.gif | Bin 0 -> 175 bytes plugins/LocalFilesEditor/editarea/index.php | 33 ++++++++ plugins/LocalFilesEditor/editarea/langs/cs.js | 61 +++++++++++++++ plugins/LocalFilesEditor/editarea/langs/de.js | 61 +++++++++++++++ plugins/LocalFilesEditor/editarea/langs/dk.js | 61 +++++++++++++++ plugins/LocalFilesEditor/editarea/langs/en.js | 61 +++++++++++++++ plugins/LocalFilesEditor/editarea/langs/es.js | 61 +++++++++++++++ plugins/LocalFilesEditor/editarea/langs/fr.js | 61 +++++++++++++++ plugins/LocalFilesEditor/editarea/langs/hr.js | 61 +++++++++++++++ plugins/LocalFilesEditor/editarea/langs/index.php | 33 ++++++++ plugins/LocalFilesEditor/editarea/langs/it.js | 61 +++++++++++++++ plugins/LocalFilesEditor/editarea/langs/ja.js | 61 +++++++++++++++ plugins/LocalFilesEditor/editarea/langs/mk.js | 61 +++++++++++++++ plugins/LocalFilesEditor/editarea/langs/nl.js | 61 +++++++++++++++ plugins/LocalFilesEditor/editarea/langs/pl.js | 61 +++++++++++++++ plugins/LocalFilesEditor/editarea/langs/pt.js | 61 +++++++++++++++ plugins/LocalFilesEditor/editarea/langs/ru.js | 61 +++++++++++++++ plugins/LocalFilesEditor/editarea/langs/sk.js | 61 +++++++++++++++ .../LocalFilesEditor/editarea/reg_syntax/css.js | 84 +++++++++++++++++++++ .../LocalFilesEditor/editarea/reg_syntax/html.js | 50 ++++++++++++ .../LocalFilesEditor/editarea/reg_syntax/index.php | 33 ++++++++ plugins/LocalFilesEditor/editarea/reg_syntax/js.js | 60 +++++++++++++++ .../LocalFilesEditor/editarea/reg_syntax/php.js | 75 ++++++++++++++++++ .../LocalFilesEditor/editarea/reg_syntax/sql.js | 55 ++++++++++++++ .../LocalFilesEditor/editarea/reg_syntax/xml.js | 56 ++++++++++++++ plugins/LocalFilesEditor/functions.inc.php | 73 ++++++++++++++++++ .../language/en_UK/plugin.lang.php | 3 +- .../language/es_ES/plugin.lang.php | 3 +- .../language/fr_FR/plugin.lang.php | 3 +- plugins/LocalFilesEditor/main.inc.php | 5 +- plugins/LocalFilesEditor/show_default.php | 27 +++++-- plugins/LocalFilesEditor/show_default.tpl | 16 +++- 53 files changed, 1620 insertions(+), 47 deletions(-) create mode 100644 plugins/LocalFilesEditor/editarea/edit_area_full.js create mode 100644 plugins/LocalFilesEditor/editarea/images/close.gif create mode 100644 plugins/LocalFilesEditor/editarea/images/fullscreen.gif create mode 100644 plugins/LocalFilesEditor/editarea/images/go_to_line.gif create mode 100644 plugins/LocalFilesEditor/editarea/images/help.gif create mode 100644 plugins/LocalFilesEditor/editarea/images/highlight.gif create mode 100644 plugins/LocalFilesEditor/editarea/images/index.php create mode 100644 plugins/LocalFilesEditor/editarea/images/load.gif create mode 100644 plugins/LocalFilesEditor/editarea/images/move.gif create mode 100644 plugins/LocalFilesEditor/editarea/images/newdocument.gif create mode 100644 plugins/LocalFilesEditor/editarea/images/opacity.png create mode 100644 plugins/LocalFilesEditor/editarea/images/processing.gif create mode 100644 plugins/LocalFilesEditor/editarea/images/redo.gif create mode 100644 plugins/LocalFilesEditor/editarea/images/reset_highlight.gif create mode 100644 plugins/LocalFilesEditor/editarea/images/save.gif create mode 100644 plugins/LocalFilesEditor/editarea/images/search.gif create mode 100644 plugins/LocalFilesEditor/editarea/images/smooth_selection.gif create mode 100644 plugins/LocalFilesEditor/editarea/images/spacer.gif create mode 100644 plugins/LocalFilesEditor/editarea/images/statusbar_resize.gif create mode 100644 plugins/LocalFilesEditor/editarea/images/undo.gif create mode 100644 plugins/LocalFilesEditor/editarea/index.php create mode 100644 plugins/LocalFilesEditor/editarea/langs/cs.js create mode 100644 plugins/LocalFilesEditor/editarea/langs/de.js create mode 100644 plugins/LocalFilesEditor/editarea/langs/dk.js create mode 100644 plugins/LocalFilesEditor/editarea/langs/en.js create mode 100644 plugins/LocalFilesEditor/editarea/langs/es.js create mode 100644 plugins/LocalFilesEditor/editarea/langs/fr.js create mode 100644 plugins/LocalFilesEditor/editarea/langs/hr.js create mode 100644 plugins/LocalFilesEditor/editarea/langs/index.php create mode 100644 plugins/LocalFilesEditor/editarea/langs/it.js create mode 100644 plugins/LocalFilesEditor/editarea/langs/ja.js create mode 100644 plugins/LocalFilesEditor/editarea/langs/mk.js create mode 100644 plugins/LocalFilesEditor/editarea/langs/nl.js create mode 100644 plugins/LocalFilesEditor/editarea/langs/pl.js create mode 100644 plugins/LocalFilesEditor/editarea/langs/pt.js create mode 100644 plugins/LocalFilesEditor/editarea/langs/ru.js create mode 100644 plugins/LocalFilesEditor/editarea/langs/sk.js create mode 100644 plugins/LocalFilesEditor/editarea/reg_syntax/css.js create mode 100644 plugins/LocalFilesEditor/editarea/reg_syntax/html.js create mode 100644 plugins/LocalFilesEditor/editarea/reg_syntax/index.php create mode 100644 plugins/LocalFilesEditor/editarea/reg_syntax/js.js create mode 100644 plugins/LocalFilesEditor/editarea/reg_syntax/php.js create mode 100644 plugins/LocalFilesEditor/editarea/reg_syntax/sql.js create mode 100644 plugins/LocalFilesEditor/editarea/reg_syntax/xml.js create mode 100644 plugins/LocalFilesEditor/functions.inc.php (limited to 'plugins/LocalFilesEditor') diff --git a/plugins/LocalFilesEditor/admin.php b/plugins/LocalFilesEditor/admin.php index 551e124ee..a1bee1d5e 100644 --- a/plugins/LocalFilesEditor/admin.php +++ b/plugins/LocalFilesEditor/admin.php @@ -26,36 +26,10 @@ if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); +include_once(LOCALEDIT_PATH.'functions.inc.php'); load_language('plugin.lang', LOCALEDIT_PATH); $my_base_url = get_admin_plugin_menu_link(__FILE__); -/** - * returns $code if php syntax is correct - * else return false - * - * @param string php code - */ -function eval_syntax($code) -{ - $code = str_replace(array(''), '', $code); - $b = 0; - foreach (token_get_all($code) as $token) - { - if ('{' == $token) ++$b; - else if ('}' == $token) --$b; - } - if ($b) return false; - else - { - ob_start(); - $eval = eval('if(0){' . $code . '}'); - ob_end_clean(); - if ($eval === false) return false; - else return ''; - } -} - - // +-----------------------------------------------------------------------+ // | Tabssheet // +-----------------------------------------------------------------------+ @@ -101,6 +75,16 @@ Author: Author URI: */\n\n\n\n\n?>"; +// Editarea options +$editarea = array( + 'start_highlight' => true, + 'language' => substr($user['language'], 0, 2), + 'toolbar' => 'search,fullscreen, |,select_font, |, undo, redo, change_smooth_selection, highlight, reset_highlight, |, help'); +if (isset($conf['editarea_options']) and is_array($conf['editarea_options'])) +{ + $editarea = array_merge($editarea, $conf['editarea_options']); +} + // Edit selected file for CSS, template and language if ((isset($_POST['edit'])) and !is_numeric($_POST['file_to_edit'])) { @@ -127,9 +111,9 @@ switch ($page['tab']) array('SHOW_DEFAULT' => LOCALEDIT_PATH . 'show_default.php?file=include/config_default.inc.php', 'FILE' => 'config_default.inc.php'))); + $editarea['syntax'] = 'php'; break; - case 'css': $template_dir = PHPWG_ROOT_PATH . 'template'; $options[] = '----------------------'; @@ -154,8 +138,8 @@ switch ($page['tab']) $template->assign('css_lang_tpl', array( 'OPTIONS' => $options, 'SELECTED' => $selected)); + $editarea['syntax'] = 'css'; break; - case 'tpl': $template_dir = PHPWG_ROOT_PATH . 'template'; @@ -181,9 +165,9 @@ switch ($page['tab']) $template->assign('css_lang_tpl', array( 'OPTIONS' => $options, 'SELECTED' => $selected)); + $editarea['syntax'] = 'html'; break; - case 'lang': $options[] = '----------------------'; foreach (get_languages() as $language_code => $language_name) @@ -207,12 +191,14 @@ switch ($page['tab']) $template->assign('css_lang_tpl', array( 'OPTIONS' => $options, 'SELECTED' => $selected)); + $editarea['syntax'] = 'php'; break; case 'plug': $edited_file = PHPWG_PLUGINS_PATH . "PersonalPlugin/main.inc.php"; $content_file = file_exists($edited_file) ? file_get_contents($edited_file) : $new_file['plug']; + $editarea['syntax'] = 'php'; break; } @@ -308,6 +294,14 @@ if (!empty($edited_file)) } } +// Editarea +if (!isset($conf['editarea_options']) or $conf['editarea_options'] !== false) +{ + $template->assign('editarea', array( + 'URL' => LOCALEDIT_PATH . 'editarea/edit_area_full.js', + 'OPTIONS' => $editarea)); +} + $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); ?> \ No newline at end of file diff --git a/plugins/LocalFilesEditor/admin.tpl b/plugins/LocalFilesEditor/admin.tpl index d8a228d67..f1306080e 100644 --- a/plugins/LocalFilesEditor/admin.tpl +++ b/plugins/LocalFilesEditor/admin.tpl @@ -1,3 +1,15 @@ +{if isset($editarea)} + + +{/if} +

LocalFiles Editor

{$TABSHEET} @@ -14,7 +26,7 @@ {/if} {foreach from=$show_default item=file} -{'locfiledit_show_default'|@translate} "{$file.FILE}" +{'locfiledit_show_default'|@translate} "{$file.FILE}"
{/foreach} @@ -23,12 +35,12 @@ {$zone_edit.FILE_NAME}
- +
{'locfiledit_save_bak'|@translate}

{if isset ($restore)} - + {/if} {/if} diff --git a/plugins/LocalFilesEditor/editarea/edit_area_full.js b/plugins/LocalFilesEditor/editarea/edit_area_full.js new file mode 100644 index 000000000..7cb34270d --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/edit_area_full.js @@ -0,0 +1,38 @@ + function EAL(){this.version="0.7.1";date=new Date();this.start_time=date.getTime();this.win="loading";this.error=false;this.baseURL="";this.template="";this.lang=new Object();this.load_syntax=new Object();this.syntax=new Object();this.loadedFiles=new Array();this.waiting_loading=new Object();this.scripts_to_load=new Array();this.sub_scripts_to_load=new Array();this.resize=new Array();this.hidden=new Object();this.default_settings={debug: false ,smooth_selection: true ,font_size: "10" ,font_family: "monospace" ,start_highlight: false ,toolbar: "search, go_to_line, fullscreen, |, undo, redo, |, select_font,|, change_smooth_selection, highlight, reset_highlight, |, help" ,begin_toolbar: "" ,end_toolbar: "" ,is_multi_files: false ,allow_resize: "both" ,min_width: 400 ,min_height: 125 ,replace_tab_by_spaces: false ,allow_toggle: true ,language: "en" ,syntax: "" ,syntax_selection_allow: "basic,brainfuck,c,cpp,css,html,js,pas,php,python,ruby,sql,vb,xml" ,display: "onload" ,max_undo: 30 ,browsers: "known" ,plugins: "" ,gecko_spellcheck: false ,fullscreen: false ,is_editable: true ,load_callback: "" ,save_callback: "" ,change_callback: "" ,submit_callback: "" ,EA_init_callback: "" ,EA_delete_callback: "" ,EA_load_callback: "" ,EA_unload_callback: "" ,EA_toggle_on_callback: "" ,EA_toggle_off_callback: "" ,EA_file_switch_on_callback: "" ,EA_file_switch_off_callback: "" ,EA_file_close_callback: "" };this.advanced_buttons=[ ['new_document', 'newdocument.gif', 'new_document', false], ['search', 'search.gif', 'show_search', false], ['go_to_line', 'go_to_line.gif', 'go_to_line', false], ['undo', 'undo.gif', 'undo', true], ['redo', 'redo.gif', 'redo', true], ['change_smooth_selection', 'smooth_selection.gif', 'change_smooth_selection_mode', true], ['reset_highlight', 'reset_highlight.gif', 'resync_highlight', true], ['highlight', 'highlight.gif','change_highlight', true], ['help', 'help.gif', 'show_help', false], ['save', 'save.gif', 'save', false], ['load', 'load.gif', 'load', false], ['fullscreen', 'fullscreen.gif', 'toggle_full_screen', false] ];ua=navigator.userAgent;this.nav=new Object();this.nav['isMacOS']=(ua.indexOf('Mac OS') !=-1);this.nav['isIE']=(navigator.appName=="Microsoft Internet Explorer");if(this.nav['isIE']){this.nav['isIE']=ua.replace(/^.*?MSIE ([0-9\.]*).*$/, "$1");if(this.nav['isIE']<6) this.has_error();}if(this.nav['isNS']=ua.indexOf('Netscape/') !=-1){this.nav['isNS']=ua.substr(ua.indexOf('Netscape/')+9);if(this.nav['isNS']<8 || !this.nav['isIE']) this.has_error();}if(this.nav['isOpera']=(ua.indexOf('Opera') !=-1)){this.nav['isOpera']=ua.replace(/^.*?Opera.*?([0-9\.]+).*$/i, "$1");if(this.nav['isOpera']<9) this.has_error();this.nav['isIE']=false;}this.nav['isGecko']=(ua.indexOf('Gecko') !=-1);if(this.nav['isFirefox'] =(ua.indexOf('Firefox') !=-1)) this.nav['isFirefox']=ua.replace(/^.*?Firefox.*?([0-9\.]+).*$/i, "$1");if(this.nav['isIceweasel'] =(ua.indexOf('Iceweasel') !=-1)) this.nav['isFirefox']=this.nav['isIceweasel']=ua.replace(/^.*?Iceweasel.*?([0-9\.]+).*$/i, "$1");if(this.nav['isCamino'] =(ua.indexOf('Camino') !=-1)) this.nav['isCamino']=ua.replace(/^.*?Camino.*?([0-9\.]+).*$/i, "$1");if(this.nav['isSafari'] =(ua.indexOf('Safari') !=-1)) this.nav['isSafari']=ua.replace(/^.*?Version\/([0-9]+\.[0-9]+).*$/i, "$1");if(this.nav['isIE']>=6 || this.nav['isOpera']>=9 || this.nav['isFirefox'] || this.nav['isCamino'] || this.nav['isSafari']>=3) this.nav['isValidBrowser']=true; +else this.nav['isValidBrowser']=false;this.set_base_url();for(var i=0;i0) settings["toolbar"]=settings["begin_toolbar"] +","+ settings["toolbar"];if(settings["end_toolbar"].length>0) settings["toolbar"]=settings["toolbar"] +","+ settings["end_toolbar"];settings["tab_toolbar"]=settings["toolbar"].replace(/ /g,"").split(",");settings["plugins"]=settings["plugins"].replace(/ /g,"").split(",");for(var i=0;i0){settings["syntax"]=settings["syntax"].toLowerCase();this.load_script(this.baseURL + "reg_syntax/"+ settings["syntax"] + ".js");}eAs[settings["id"]]={"settings": settings};eAs[settings["id"]]["displayed"]=false;eAs[settings["id"]]["hidden"]=false;eAL.start(settings["id"]);};EAL.prototype.delete_instance=function(id){eAL.execCommand(id, "EA_delete");if(window.frames["frame_"+id] && window.frames["frame_"+id].editArea){if(eAs[id]["displayed"]) eAL.toggle(id, "off");window.frames["frame_"+id].editArea.execCommand("EA_unload");}var span=document.getElementById("EditAreaArroundInfos_"+id);if(span){span.parentNode.removeChild(span);}var iframe=document.getElementById("frame_"+id);if(iframe){iframe.parentNode.removeChild(iframe);try{delete window.frames["frame_"+id];}catch (e){}}delete eAs[id];};EAL.prototype.start=function(id){if(this.win!="loaded"){setTimeout("eAL.start('"+id+"');", 50);return;}for(var i in eAL.waiting_loading){if(eAL.waiting_loading[i]!="loaded" && typeof(eAL.waiting_loading[i])!="function"){setTimeout("eAL.start('"+id+"');", 50);return;}}if(!eAL.lang[eAs[id]["settings"]["language"]] || (eAs[id]["settings"]["syntax"].length>0 && !eAL.load_syntax[eAs[id]["settings"]["syntax"]]) ){setTimeout("eAL.start('"+id+"');", 50);return;}if(eAs[id]["settings"]["syntax"].length>0) eAL.init_syntax_regexp();if(!document.getElementById("EditAreaArroundInfos_"+id) && (eAs[id]["settings"]["debug"] || eAs[id]["settings"]["allow_toggle"])){var span=document.createElement("span");span.id="EditAreaArroundInfos_"+id;var html="";if(eAs[id]["settings"]["allow_toggle"]){checked=(eAs[id]["settings"]["display"]=="onload")?"checked":"";html+="
";html+="";html+="
";}if(eAs[id]["settings"]["debug"]) html+="
";html=eAL.translate(html, eAs[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(!eAs[id]["initialized"]){this.execCommand(id, "EA_init");if(eAs[id]["settings"]["display"]=="later"){eAs[id]["initialized"]=true;return;}}if(this.nav['isIE']){eAL.init_ie_textarea(id);}var html_toolbar_content="";area=eAs[id];for(var i=0;i';}for(var i=0;i';this.iframe_script+='';}if(!this.iframe_css){this.iframe_css="";}var template=this.template.replace(/\[__BASEURL__\]/g, this.baseURL);template=template.replace("[__TOOLBAR__]",html_toolbar_content);template=this.translate(template, area["settings"]["language"], "template");template=template.replace("[__CSSRULES__]", this.iframe_css);template=template.replace("[__JSCODE__]", this.iframe_script);template=template.replace("[__EA_VERSION__]", this.version);area.textarea=document.getElementById(area["settings"]["id"]);eAs[area["settings"]["id"]]["textarea"]=area.textarea;if(typeof(window.frames["frame_"+area["settings"]["id"]])!='undefined') delete window.frames["frame_"+area["settings"]["id"]];var father=area.textarea.parentNode;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");content.style.overflow="hidden";content.style.display="none";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.eAs=eAs;frame.area_id=area["settings"]["id"];frame.document.area_id=area["settings"]["id"];frame.document.write(template);frame.document.close();};EAL.prototype.toggle=function(id, toggle_to){if(!toggle_to) toggle_to=(eAs[id]["displayed"]==true)?"off":"on";if(eAs[id]["displayed"]==true && toggle_to=="off"){this.toggle_off(id);} +else if(eAs[id]["displayed"]==false && toggle_to=="on"){this.toggle_on(id);}return false;};EAL.prototype.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);eAs[id]["displayed"]=false;eAs[id]["textarea"].wrap="off";setAttribute(eAs[id]["textarea"], "wrap", "off");var parNod=eAs[id]["textarea"].parentNode;var nxtSib=eAs[id]["textarea"].nextSibling;parNod.removeChild(eAs[id]["textarea"]);parNod.insertBefore(eAs[id]["textarea"], nxtSib);eAs[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';eAs[id]["textarea"].style.display="inline";eAs[id]["textarea"].focus();if(this.nav['isIE']){eAs[id]["textarea"].selectionStart=selStart;eAs[id]["textarea"].selectionEnd=selEnd;eAs[id]["textarea"].focused=true;set_IE_selection(eAs[id]["textarea"]);} +else{if(this.nav['isOpera']){eAs[id]["textarea"].setSelectionRange(0, 0);}try{eAs[id]["textarea"].setSelectionRange(selStart, selEnd);}catch(e){};}eAs[id]["textarea"].scrollTop=scrollTop;eAs[id]["textarea"].scrollLeft=scrollLeft;frame.editArea.execCommand("toggle_off");}};EAL.prototype.toggle_on=function(id){if(window.frames["frame_"+id]){var frame=window.frames["frame_"+id];area=window.frames["frame_"+id].editArea;area.textarea.value=eAs[id]["textarea"].value;var selStart=0;var selEnd=0;var scrollTop=0;var scrollLeft=0;if(eAs[id]["textarea"].use_last==true){var selStart=eAs[id]["textarea"].last_selectionStart;var selEnd=eAs[id]["textarea"].last_selectionEnd;var scrollTop=eAs[id]["textarea"].last_scrollTop;var scrollLeft=eAs[id]["textarea"].last_scrollLeft;eAs[id]["textarea"].use_last=false;} +else{try{var selStart=eAs[id]["textarea"].selectionStart;var selEnd=eAs[id]["textarea"].selectionEnd;var scrollTop=eAs[id]["textarea"].scrollTop;var scrollLeft=eAs[id]["textarea"].scrollLeft;}catch(ex){}}this.set_editarea_size_from_textarea(id, document.getElementById("frame_"+id));eAs[id]["textarea"].style.display="none";document.getElementById("frame_"+id).style.display="inline";area.execCommand("focus");eAs[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");} +else{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;eAL.start(id);}};EAL.prototype.set_editarea_size_from_textarea=function(id, frame){var elem=document.getElementById(id);var width=Math.max(eAs[id]["settings"]["min_width"], elem.offsetWidth)+"px";var height=Math.max(eAs[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;frame.style.width=width;frame.style.height=height;};EAL.prototype.set_base_url=function(){if (!this.baseURL){var elements=document.getElementsByTagName('script');for (var i=0;i';html+='';return html;};EAL.prototype.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+"]";};EAL.prototype.get_template=function(){if(this.template==""){var xhr_object=null;if(window.XMLHttpRequest) xhr_object=new XMLHttpRequest(); +else if(window.ActiveXObject) xhr_object=new ActiveXObject("Microsoft.XMLHTTP"); +else{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();}};EAL.prototype.translate=function(text, lang, mode){if(mode=="word") text=eAL.get_word_translation(text, lang); +else if(mode="template"){eAL.current_language=lang;text=text.replace(/\{\$([^\}]+)\}/gm, eAL.translate_template);}return text;};EAL.prototype.translate_template=function(){return eAL.get_word_translation(EAL.prototype.translate_template.arguments[1], eAL.current_language);};EAL.prototype.get_word_translation=function(val, lang){for(var i in eAL.lang[lang]){if(i==val) return eAL.lang[lang][i];}return "_"+val;};EAL.prototype.load_script=function(url){if (this.loadedFiles[url]) return;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('');}this.loadedFiles[url]=true;};EAL.prototype.add_event=function(obj, name, handler){if (obj.attachEvent){obj.attachEvent("on" + name, handler);} +else{obj.addEventListener(name, handler, false);}};EAL.prototype.remove_event=function(obj, name, handler){if (obj.detachEvent) obj.detachEvent("on" + name, handler); +else obj.removeEventListener(name, handler, false);};EAL.prototype.reset=function(e){var formObj=eAL.nav['isIE'] ? window.event.srcElement : e.target;if(formObj.tagName!='FORM') formObj=formObj.form;for(var i in eAs){var is_child=false;for (var x=0;x old_sel["start"]) this.setSelectionRange(id, new_sel["end"], new_sel["end"]); +else this.setSelectionRange(id, old_sel["start"]+open_tag.length, old_sel["start"]+open_tag.length);};EAL.prototype.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"]=eAs[id]["displayed"];if(window.frames["frame_"+id] && eAs[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(eAs[id]["displayed"]==true) eAL.toggle_off(id);}var span=document.getElementById("EditAreaArroundInfos_"+id);if(span){span.style.display='none';}document.getElementById(id).style.display="none";}};EAL.prototype.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]){elem.style.display="inline";if(this.hidden[id]["toggle"]==true) eAL.toggle_on(id);scrollTop=this.hidden[id]["scrollTop"];scrollLeft=this.hidden[id]["scrollLeft"];if(window.frames["frame_"+id] && eAs[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;}}sel=this.hidden[id]["selectionRange"];this.setSelectionRange(id, sel["start"], sel["end"]);delete this.hidden[id];}};EAL.prototype.getCurrentFile=function(id){return this.execCommand(id, 'get_file', this.execCommand(id, 'curr_file'));};EAL.prototype.getFile=function(id, file_id){return this.execCommand(id, 'get_file', file_id);};EAL.prototype.getAllFiles=function(id){return this.execCommand(id, 'get_all_files()');};EAL.prototype.openFile=function(id, file_infos){return this.execCommand(id, 'open_file', file_infos);};EAL.prototype.closeFile=function(id, file_id){return this.execCommand(id, 'close_file', file_id);};EAL.prototype.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 +')');};EAL.prototype.execCommand=function(id, cmd, fct_param){switch(cmd){case "EA_init": if(eAs[id]['settings']["EA_init_callback"].length>0) eval(eAs[id]['settings']["EA_init_callback"]+"('"+ id +"');");break;case "EA_delete": if(eAs[id]['settings']["EA_delete_callback"].length>0) eval(eAs[id]['settings']["EA_delete_callback"]+"('"+ id +"');");break;case "EA_submit": if(eAs[id]['settings']["submit_callback"].length>0) eval(eAs[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 eAL=new EAL();var eAs=new Object(); 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;};function setAttribute( elm, attr, val ){if(attr=="class"){elm.setAttribute("className", val);elm.setAttribute("class", val);} +else{elm.setAttribute(attr, val);}};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(e!=null && typeof(e.pageX)!="undefined"){return e.pageX;} +else{return (e!=null?e.x:event.x)+ document.documentElement.scrollLeft;}};function getMouseY(e){if(e!=null && typeof(e.pageY)!="undefined"){return e.pageY;} +else{return (e!=null?e.y: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;};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;}var move_current_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;mouse_x=getMouseX(e);mouse_y=getMouseY(e);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){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;};var nav=eAL.nav;function getSelectionRange(textarea){return {"start": textarea.selectionStart, "end": textarea.selectionEnd};};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']){textarea.selectionEnd=1;textarea.selectionStart=0;textarea.selectionEnd=1;textarea.selectionStart=0;}textarea.selectionStart=start;textarea.selectionEnd=end;if(nav['isIE']) set_IE_selection(textarea);};function get_IE_selection(textarea){if(textarea && textarea.focused){if(!textarea.ea_line_height){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);}var range=document.selection.createRange();var stored_range=range.duplicate();stored_range.moveToElementText( textarea );stored_range.setEndPoint( 'EndToEnd', range );if(stored_range.parentElement()==textarea){var elem=textarea;var scrollTop=0;while(elem.parentNode){scrollTop+=elem.scrollTop;elem=elem.parentNode;}var relative_top=range.offsetTop - calculeOffsetTop(textarea)+ scrollTop;var line_start=Math.round((relative_top / textarea.ea_line_height) +1);var line_nb=Math.round(range.boundingHeight / textarea.ea_line_height);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;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;}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();}};eAL.waiting_loading["elements_functions.js"]="loaded"; + EAL.prototype.start_resize_area=function(){document.onmouseup=eAL.end_resize_area;document.onmousemove=eAL.resize_area;eAL.toggle(eAL.resize["id"]);var textarea=eAs[eAL.resize["id"]]["textarea"];var div=document.getElementById("edit_area_resize");if(!div){div=document.createElement("div");div.id="edit_area_resize";div.style.border="dashed #888888 1px";}var width=textarea.offsetWidth -2;var height=textarea.offsetHeight -2;div.style.display="block";div.style.width=width+"px";div.style.height=height+"px";var father=textarea.parentNode;father.insertBefore(div, textarea);textarea.style.display="none";eAL.resize["start_top"]=calculeOffsetTop(div);eAL.resize["start_left"]=calculeOffsetLeft(div);};EAL.prototype.end_resize_area=function(e){document.onmouseup="";document.onmousemove="";var div=document.getElementById("edit_area_resize");var textarea=eAs[eAL.resize["id"]]["textarea"];var width=Math.max(eAs[eAL.resize["id"]]["settings"]["min_width"], div.offsetWidth-4);var height=Math.max(eAs[eAL.resize["id"]]["settings"]["min_height"], div.offsetHeight-4);if(eAL.nav['isIE']==6){width-=2;height-=2;}textarea.style.width=width+"px";textarea.style.height=height+"px";div.style.display="none";textarea.style.display="inline";textarea.selectionStart=eAL.resize["selectionStart"];textarea.selectionEnd=eAL.resize["selectionEnd"];eAL.toggle(eAL.resize["id"]);return false;};EAL.prototype.resize_area=function(e){var allow=eAs[eAL.resize["id"]]["settings"]["allow_resize"];if(allow=="both" || allow=="y"){new_y=getMouseY(e);var new_height=Math.max(20, new_y- eAL.resize["start_top"]);document.getElementById("edit_area_resize").style.height=new_height+"px";}if(allow=="both" || allow=="x"){new_x=getMouseX(e);var new_width=Math.max(20, new_x- eAL.resize["start_left"]);document.getElementById("edit_area_resize").style.width=new_width+"px";}return false;};eAL.waiting_loading["resize_area.js"]="loaded"; + EAL.prototype.get_regexp=function(text_array){res="(\\b)(";for(i=0;i0) res+="|";res+=this.get_escaped_regexp(text_array[i]);}res+=")(\\b)";reg=new RegExp(res);return res;};EAL.prototype.get_escaped_regexp=function(str){return str.replace(/(\.|\?|\*|\+|\\|\(|\)|\[|\]|\}|\{|\$|\^|\|)/g, "\\$1");};EAL.prototype.init_syntax_regexp=function(){var lang_style=new Object();for(var lang in this.load_syntax){if(!this.syntax[lang]){this.syntax[lang]=new Object();this.syntax[lang]["keywords_reg_exp"]=new Object();this.keywords_reg_exp_nb=0;if(this.load_syntax[lang]['KEYWORDS']){param="g";if(this.load_syntax[lang]['KEYWORD_CASE_SENSITIVE']===false) param+="i";for(var i in this.load_syntax[lang]['KEYWORDS']){if(typeof(this.load_syntax[lang]['KEYWORDS'][i])=="function") continue;this.syntax[lang]["keywords_reg_exp"][i]=new RegExp(this.get_regexp( this.load_syntax[lang]['KEYWORDS'][i] ), param);this.keywords_reg_exp_nb++;}}if(this.load_syntax[lang]['OPERATORS']){var str="";var nb=0;for(var i in this.load_syntax[lang]['OPERATORS']){if(typeof(this.load_syntax[lang]['OPERATORS'][i])=="function") continue;if(nb>0) str+="|";str+=this.get_escaped_regexp(this.load_syntax[lang]['OPERATORS'][i]);nb++;}if(str.length>0) this.syntax[lang]["operators_reg_exp"]=new RegExp("("+str+")","g");}if(this.load_syntax[lang]['DELIMITERS']){var str="";var nb=0;for(var i in this.load_syntax[lang]['DELIMITERS']){if(typeof(this.load_syntax[lang]['DELIMITERS'][i])=="function") continue;if(nb>0) str+="|";str+=this.get_escaped_regexp(this.load_syntax[lang]['DELIMITERS'][i]);nb++;}if(str.length>0) this.syntax[lang]["delimiters_reg_exp"]=new RegExp("("+str+")","g");}var syntax_trace=new Array();this.syntax[lang]["quotes"]=new Object();var quote_tab=new Array();if(this.load_syntax[lang]['QUOTEMARKS']){for(var i in this.load_syntax[lang]['QUOTEMARKS']){if(typeof(this.load_syntax[lang]['QUOTEMARKS'][i])=="function") continue;var x=this.get_escaped_regexp(this.load_syntax[lang]['QUOTEMARKS'][i]);this.syntax[lang]["quotes"][x]=x;quote_tab[quote_tab.length]="("+x+"(?:[^"+x+"\\\\]*(\\\\\\\\)*(\\\\"+x+"?)?)*("+x+"|$))";syntax_trace.push(x);}}this.syntax[lang]["comments"]=new Object();if(this.load_syntax[lang]['COMMENT_SINGLE']){for(var i in this.load_syntax[lang]['COMMENT_SINGLE']){if(typeof(this.load_syntax[lang]['COMMENT_SINGLE'][i])=="function") continue;var x=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_SINGLE'][i]);quote_tab[quote_tab.length]="("+x+"(.|\\r|\\t)*(\\n|$))";syntax_trace.push(x);this.syntax[lang]["comments"][x]="\n";}}if(this.load_syntax[lang]['COMMENT_MULTI']){for(var i in this.load_syntax[lang]['COMMENT_MULTI']){if(typeof(this.load_syntax[lang]['COMMENT_MULTI'][i])=="function") continue;var start=this.get_escaped_regexp(i);var end=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_MULTI'][i]);quote_tab[quote_tab.length]="("+start+"(.|\\n|\\r)*?("+end+"|$))";syntax_trace.push(start);syntax_trace.push(end);this.syntax[lang]["comments"][i]=this.load_syntax[lang]['COMMENT_MULTI'][i];}}if(quote_tab.length>0) this.syntax[lang]["comment_or_quote_reg_exp"]=new RegExp("("+quote_tab.join("|")+")","gi");if(syntax_trace.length>0) this.syntax[lang]["syntax_trace_regexp"]=new RegExp("((.|\n)*?)(\\\\*("+ syntax_trace.join("|") +"|$))", "gmi");if(this.load_syntax[lang]['SCRIPT_DELIMITERS']){this.syntax[lang]["script_delimiters"]=new Object();for(var i in this.load_syntax[lang]['SCRIPT_DELIMITERS']){if(typeof(this.load_syntax[lang]['SCRIPT_DELIMITERS'][i])=="function") continue;this.syntax[lang]["script_delimiters"][i]=this.load_syntax[lang]['SCRIPT_DELIMITERS'];}}this.syntax[lang]["custom_regexp"]=new Object();if(this.load_syntax[lang]['REGEXPS']){for(var i in this.load_syntax[lang]['REGEXPS']){if(typeof(this.load_syntax[lang]['REGEXPS'][i])=="function") continue;var val=this.load_syntax[lang]['REGEXPS'][i];if(!this.syntax[lang]["custom_regexp"][val['execute']]) this.syntax[lang]["custom_regexp"][val['execute']]=new Object();this.syntax[lang]["custom_regexp"][val['execute']][i]={'regexp' : new RegExp(val['search'], val['modifiers']) , 'class' : val['class']};}}if(this.load_syntax[lang]['STYLES']){lang_style[lang]=new Object();for(var i in this.load_syntax[lang]['STYLES']){if(typeof(this.load_syntax[lang]['STYLES'][i])=="function") continue;if(typeof(this.load_syntax[lang]['STYLES'][i]) !="string"){for(var j in this.load_syntax[lang]['STYLES'][i]){lang_style[lang][j]=this.load_syntax[lang]['STYLES'][i][j];}} +else{lang_style[lang][i]=this.load_syntax[lang]['STYLES'][i];}}}var style="";for(var i in lang_style[lang]){if(lang_style[lang][i].length>0){style+="."+ lang +" ."+ i.toLowerCase() +" span{"+lang_style[lang][i]+"}\n";style+="."+ lang +" ."+ i.toLowerCase() +"{"+lang_style[lang][i]+"}\n";}}this.syntax[lang]["styles"]=style;}}};eAL.waiting_loading["reg_syntax.js"]="loaded"; +var editAreaLoader= eAL;var editAreas=eAs;EditAreaLoader=EAL;editAreaLoader.iframe_script= ""; +editAreaLoader.template= " EditArea [__CSSRULES__] [__JSCODE__]
[__TOOLBAR__]
 
 
{$position}: {$line_abbr} 0, {$char_abbr} 0 {$total}: {$line_abbr} 0, {$char_abbr} 0 resize
{$processing}
{$search} {$close_popup}
{$replace} {$move_popup}

{$find_next} {$replace} {$replace_all}
{$close_popup}

Editarea [__EA_VERSION__]


{$shortcuts}:

{$tab}: {$add_tab}
{$shift}+{$tab}: {$remove_tab}
{$ctrl}+f: {$search_command}
{$ctrl}+r: {$replace_command}
{$ctrl}+h: {$highlight}
{$ctrl}+g: {$go_to_line}
{$ctrl}+z: {$undo}
{$ctrl}+y: {$redo}
{$ctrl}+e: {$help}
{$ctrl}+q, {$esc}: {$close_popup}
{$accesskey} E: {$toggle}

{$about_notice}
"; +editAreaLoader.iframe_css= ""; diff --git a/plugins/LocalFilesEditor/editarea/images/close.gif b/plugins/LocalFilesEditor/editarea/images/close.gif new file mode 100644 index 000000000..679ca2aa4 Binary files /dev/null and b/plugins/LocalFilesEditor/editarea/images/close.gif differ diff --git a/plugins/LocalFilesEditor/editarea/images/fullscreen.gif b/plugins/LocalFilesEditor/editarea/images/fullscreen.gif new file mode 100644 index 000000000..66fa6d921 Binary files /dev/null and b/plugins/LocalFilesEditor/editarea/images/fullscreen.gif differ diff --git a/plugins/LocalFilesEditor/editarea/images/go_to_line.gif b/plugins/LocalFilesEditor/editarea/images/go_to_line.gif new file mode 100644 index 000000000..06042ec9a Binary files /dev/null and b/plugins/LocalFilesEditor/editarea/images/go_to_line.gif differ diff --git a/plugins/LocalFilesEditor/editarea/images/help.gif b/plugins/LocalFilesEditor/editarea/images/help.gif new file mode 100644 index 000000000..51a1ee420 Binary files /dev/null and b/plugins/LocalFilesEditor/editarea/images/help.gif differ diff --git a/plugins/LocalFilesEditor/editarea/images/highlight.gif b/plugins/LocalFilesEditor/editarea/images/highlight.gif new file mode 100644 index 000000000..16491f6cf Binary files /dev/null and b/plugins/LocalFilesEditor/editarea/images/highlight.gif differ diff --git a/plugins/LocalFilesEditor/editarea/images/index.php b/plugins/LocalFilesEditor/editarea/images/index.php new file mode 100644 index 000000000..61741e9cb --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/images/index.php @@ -0,0 +1,33 @@ + diff --git a/plugins/LocalFilesEditor/editarea/images/load.gif b/plugins/LocalFilesEditor/editarea/images/load.gif new file mode 100644 index 000000000..461698f56 Binary files /dev/null and b/plugins/LocalFilesEditor/editarea/images/load.gif differ diff --git a/plugins/LocalFilesEditor/editarea/images/move.gif b/plugins/LocalFilesEditor/editarea/images/move.gif new file mode 100644 index 000000000..d15f9f542 Binary files /dev/null and b/plugins/LocalFilesEditor/editarea/images/move.gif differ diff --git a/plugins/LocalFilesEditor/editarea/images/newdocument.gif b/plugins/LocalFilesEditor/editarea/images/newdocument.gif new file mode 100644 index 000000000..a9d293842 Binary files /dev/null and b/plugins/LocalFilesEditor/editarea/images/newdocument.gif differ diff --git a/plugins/LocalFilesEditor/editarea/images/opacity.png b/plugins/LocalFilesEditor/editarea/images/opacity.png new file mode 100644 index 000000000..b4217cb21 Binary files /dev/null and b/plugins/LocalFilesEditor/editarea/images/opacity.png differ diff --git a/plugins/LocalFilesEditor/editarea/images/processing.gif b/plugins/LocalFilesEditor/editarea/images/processing.gif new file mode 100644 index 000000000..cce32f20f Binary files /dev/null and b/plugins/LocalFilesEditor/editarea/images/processing.gif differ diff --git a/plugins/LocalFilesEditor/editarea/images/redo.gif b/plugins/LocalFilesEditor/editarea/images/redo.gif new file mode 100644 index 000000000..3af90697f Binary files /dev/null and b/plugins/LocalFilesEditor/editarea/images/redo.gif differ diff --git a/plugins/LocalFilesEditor/editarea/images/reset_highlight.gif b/plugins/LocalFilesEditor/editarea/images/reset_highlight.gif new file mode 100644 index 000000000..0fa3cb797 Binary files /dev/null and b/plugins/LocalFilesEditor/editarea/images/reset_highlight.gif differ diff --git a/plugins/LocalFilesEditor/editarea/images/save.gif b/plugins/LocalFilesEditor/editarea/images/save.gif new file mode 100644 index 000000000..2777bebfe Binary files /dev/null and b/plugins/LocalFilesEditor/editarea/images/save.gif differ diff --git a/plugins/LocalFilesEditor/editarea/images/search.gif b/plugins/LocalFilesEditor/editarea/images/search.gif new file mode 100644 index 000000000..cfe76b5d5 Binary files /dev/null and b/plugins/LocalFilesEditor/editarea/images/search.gif differ diff --git a/plugins/LocalFilesEditor/editarea/images/smooth_selection.gif b/plugins/LocalFilesEditor/editarea/images/smooth_selection.gif new file mode 100644 index 000000000..8a532e5e6 Binary files /dev/null and b/plugins/LocalFilesEditor/editarea/images/smooth_selection.gif differ diff --git a/plugins/LocalFilesEditor/editarea/images/spacer.gif b/plugins/LocalFilesEditor/editarea/images/spacer.gif new file mode 100644 index 000000000..388486517 Binary files /dev/null and b/plugins/LocalFilesEditor/editarea/images/spacer.gif differ diff --git a/plugins/LocalFilesEditor/editarea/images/statusbar_resize.gif b/plugins/LocalFilesEditor/editarea/images/statusbar_resize.gif new file mode 100644 index 000000000..af89d803f Binary files /dev/null and b/plugins/LocalFilesEditor/editarea/images/statusbar_resize.gif differ diff --git a/plugins/LocalFilesEditor/editarea/images/undo.gif b/plugins/LocalFilesEditor/editarea/images/undo.gif new file mode 100644 index 000000000..520796d69 Binary files /dev/null and b/plugins/LocalFilesEditor/editarea/images/undo.gif differ diff --git a/plugins/LocalFilesEditor/editarea/index.php b/plugins/LocalFilesEditor/editarea/index.php new file mode 100644 index 000000000..61741e9cb --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/index.php @@ -0,0 +1,33 @@ + diff --git a/plugins/LocalFilesEditor/editarea/langs/cs.js b/plugins/LocalFilesEditor/editarea/langs/cs.js new file mode 100644 index 000000000..cb7ff1e89 --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/langs/cs.js @@ -0,0 +1,61 @@ +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", +close_tab: "Close file" +}; diff --git a/plugins/LocalFilesEditor/editarea/langs/de.js b/plugins/LocalFilesEditor/editarea/langs/de.js new file mode 100644 index 000000000..cd953473f --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/langs/de.js @@ -0,0 +1,61 @@ +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", +close_tab: "Close file" +}; diff --git a/plugins/LocalFilesEditor/editarea/langs/dk.js b/plugins/LocalFilesEditor/editarea/langs/dk.js new file mode 100644 index 000000000..75700ec65 --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/langs/dk.js @@ -0,0 +1,61 @@ +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", +close_tab: "Close file" +}; diff --git a/plugins/LocalFilesEditor/editarea/langs/en.js b/plugins/LocalFilesEditor/editarea/langs/en.js new file mode 100644 index 000000000..aa432163b --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/langs/en.js @@ -0,0 +1,61 @@ +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", +close_tab: "Close file" +}; diff --git a/plugins/LocalFilesEditor/editarea/langs/es.js b/plugins/LocalFilesEditor/editarea/langs/es.js new file mode 100644 index 000000000..0e425014a --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/langs/es.js @@ -0,0 +1,61 @@ +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", +close_tab: "Close file" +}; diff --git a/plugins/LocalFilesEditor/editarea/langs/fr.js b/plugins/LocalFilesEditor/editarea/langs/fr.js new file mode 100644 index 000000000..b24bd03ae --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/langs/fr.js @@ -0,0 +1,61 @@ +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", +close_tab: "Fermer le fichier" +}; diff --git a/plugins/LocalFilesEditor/editarea/langs/hr.js b/plugins/LocalFilesEditor/editarea/langs/hr.js new file mode 100644 index 000000000..f37b28c5e --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/langs/hr.js @@ -0,0 +1,61 @@ +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", +close_tab: "Close file" +}; diff --git a/plugins/LocalFilesEditor/editarea/langs/index.php b/plugins/LocalFilesEditor/editarea/langs/index.php new file mode 100644 index 000000000..61741e9cb --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/langs/index.php @@ -0,0 +1,33 @@ + diff --git a/plugins/LocalFilesEditor/editarea/langs/it.js b/plugins/LocalFilesEditor/editarea/langs/it.js new file mode 100644 index 000000000..2191e6b26 --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/langs/it.js @@ -0,0 +1,61 @@ +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", +close_tab: "Close file" +}; diff --git a/plugins/LocalFilesEditor/editarea/langs/ja.js b/plugins/LocalFilesEditor/editarea/langs/ja.js new file mode 100644 index 000000000..3afc1cb7d --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/langs/ja.js @@ -0,0 +1,61 @@ +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", +close_tab: "Close file" +}; diff --git a/plugins/LocalFilesEditor/editarea/langs/mk.js b/plugins/LocalFilesEditor/editarea/langs/mk.js new file mode 100644 index 000000000..7cacb038c --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/langs/mk.js @@ -0,0 +1,61 @@ +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", +close_tab: "Избери датотека" +}; diff --git a/plugins/LocalFilesEditor/editarea/langs/nl.js b/plugins/LocalFilesEditor/editarea/langs/nl.js new file mode 100644 index 000000000..00cbbe3a6 --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/langs/nl.js @@ -0,0 +1,61 @@ +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", +close_tab: "Close file" +}; diff --git a/plugins/LocalFilesEditor/editarea/langs/pl.js b/plugins/LocalFilesEditor/editarea/langs/pl.js new file mode 100644 index 000000000..501ec9a2b --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/langs/pl.js @@ -0,0 +1,61 @@ +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", +close_tab: "Close file" +}; diff --git a/plugins/LocalFilesEditor/editarea/langs/pt.js b/plugins/LocalFilesEditor/editarea/langs/pt.js new file mode 100644 index 000000000..547796b0a --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/langs/pt.js @@ -0,0 +1,61 @@ +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", +close_tab: "Close file" +}; diff --git a/plugins/LocalFilesEditor/editarea/langs/ru.js b/plugins/LocalFilesEditor/editarea/langs/ru.js new file mode 100644 index 000000000..56b3cd57c --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/langs/ru.js @@ -0,0 +1,61 @@ +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", +close_tab: "Закрыть файл" +}; diff --git a/plugins/LocalFilesEditor/editarea/langs/sk.js b/plugins/LocalFilesEditor/editarea/langs/sk.js new file mode 100644 index 000000000..3d4881a3f --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/langs/sk.js @@ -0,0 +1,61 @@ +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", +close_tab: "Close file" +}; diff --git a/plugins/LocalFilesEditor/editarea/reg_syntax/css.js b/plugins/LocalFilesEditor/editarea/reg_syntax/css.js new file mode 100644 index 000000000..b8131ccdd --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/reg_syntax/css.js @@ -0,0 +1,84 @@ +editAreaLoader.load_syntax["css"] = { + 'COMMENT_SINGLE' : {1 : '@'} + ,'COMMENT_MULTI' : {'/*' : '*/'} + ,'QUOTEMARKS' : ['"', "'"] + ,'KEYWORD_CASE_SENSITIVE' : false + ,'KEYWORDS' : { + 'attributes' : [ + 'aqua', 'azimuth', 'background-attachment', 'background-color', + 'background-image', 'background-position', 'background-repeat', + 'background', 'border-bottom-color', 'border-bottom-style', + 'border-bottom-width', 'border-left-color', 'border-left-style', + 'border-left-width', 'border-right', 'border-right-color', + 'border-right-style', 'border-right-width', 'border-top-color', + 'border-top-style', 'border-top-width','border-bottom', 'border-collapse', + 'border-left', 'border-width', 'border-color', 'border-spacing', + 'border-style', 'border-top', 'border', 'caption-side', + 'clear', 'clip', 'color', 'content', 'counter-increment', 'counter-reset', + 'cue-after', 'cue-before', 'cue', 'cursor', 'direction', 'display', + 'elevation', 'empty-cells', 'float', 'font-family', 'font-size', + 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', + 'font-weight', 'font', 'height', 'letter-spacing', 'line-height', + 'list-style', 'list-style-image', 'list-style-position', 'list-style-type', + 'margin-bottom', 'margin-left', 'margin-right', 'margin-top', 'margin', + 'marker-offset', 'marks', 'max-height', 'max-width', 'min-height', + 'min-width', 'opacity', 'orphans', 'outline', 'outline-color', 'outline-style', + 'outline-width', 'overflow', 'padding-bottom', 'padding-left', + 'padding-right', 'padding-top', 'padding', 'page', 'page-break-after', + 'page-break-before', 'page-break-inside', 'pause-after', 'pause-before', + 'pause', 'pitch', 'pitch-range', 'play-during', 'position', 'quotes', + 'richness', 'right', 'size', 'speak-header', 'speak-numeral', 'speak-punctuation', + 'speak', 'speech-rate', 'stress', 'table-layout', 'text-align', 'text-decoration', + 'text-indent', 'text-shadow', 'text-transform', 'top', 'unicode-bidi', + 'vertical-align', 'visibility', 'voice-family', 'volume', 'white-space', 'widows', + 'width', 'word-spacing', 'z-index', 'bottom', 'left' + ] + ,'values' : [ + 'above', 'absolute', 'always', 'armenian', 'aural', 'auto', 'avoid', + 'baseline', 'behind', 'below', 'bidi-override', 'black', 'blue', 'blink', 'block', 'bold', 'bolder', 'both', + 'capitalize', 'center-left', 'center-right', 'center', 'circle', 'cjk-ideographic', + 'close-quote', 'collapse', 'condensed', 'continuous', 'crop', 'crosshair', 'cross', 'cursive', + 'dashed', 'decimal-leading-zero', 'decimal', 'default', 'digits', 'disc', 'dotted', 'double', + 'e-resize', 'embed', 'extra-condensed', 'extra-expanded', 'expanded', + 'fantasy', 'far-left', 'far-right', 'faster', 'fast', 'fixed', 'fuchsia', + 'georgian', 'gray', 'green', 'groove', 'hebrew', 'help', 'hidden', 'hide', 'higher', + 'high', 'hiragana-iroha', 'hiragana', 'icon', 'inherit', 'inline-table', 'inline', + 'inset', 'inside', 'invert', 'italic', 'justify', 'katakana-iroha', 'katakana', + 'landscape', 'larger', 'large', 'left-side', 'leftwards', 'level', 'lighter', 'lime', 'line-through', 'list-item', 'loud', 'lower-alpha', 'lower-greek', 'lower-roman', 'lowercase', 'ltr', 'lower', 'low', + 'maroon', 'medium', 'message-box', 'middle', 'mix', 'monospace', + 'n-resize', 'narrower', 'navy', 'ne-resize', 'no-close-quote', 'no-open-quote', 'no-repeat', 'none', 'normal', 'nowrap', 'nw-resize', + 'oblique', 'olive', 'once', 'open-quote', 'outset', 'outside', 'overline', + 'pointer', 'portrait', 'purple', 'px', + 'red', 'relative', 'repeat-x', 'repeat-y', 'repeat', 'rgb', 'ridge', 'right-side', 'rightwards', + 's-resize', 'sans-serif', 'scroll', 'se-resize', 'semi-condensed', 'semi-expanded', 'separate', 'serif', 'show', 'silent', 'silver', 'slow', 'slower', 'small-caps', 'small-caption', 'smaller', 'soft', 'solid', 'spell-out', 'square', + 'static', 'status-bar', 'super', 'sw-resize', + 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row', 'table-row-group', 'teal', 'text', 'text-bottom', 'text-top', 'thick', 'thin', 'transparent', + 'ultra-condensed', 'ultra-expanded', 'underline', 'upper-alpha', 'upper-latin', 'upper-roman', 'uppercase', 'url', + 'visible', + 'w-resize', 'wait', 'white', 'wider', + 'x-fast', 'x-high', 'x-large', 'x-loud', 'x-low', 'x-small', 'x-soft', 'xx-large', 'xx-small', + 'yellow', 'yes' + ] + ,'specials' : [ + 'important' + ] + } + ,'OPERATORS' :[ + ':', ';', '!', '.', '#' + ] + ,'DELIMITERS' :[ + '{', '}' + ] + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #6381F8;' + ,'KEYWORDS' : { + 'attributes' : 'color: #48BDDF;' + ,'values' : 'color: #2B60FF;' + ,'specials' : 'color: #FF0000;' + } + ,'OPERATORS' : 'color: #FF00FF;' + ,'DELIMITERS' : 'color: #60CA00;' + + } +}; diff --git a/plugins/LocalFilesEditor/editarea/reg_syntax/html.js b/plugins/LocalFilesEditor/editarea/reg_syntax/html.js new file mode 100644 index 000000000..cc2a90e6e --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/reg_syntax/html.js @@ -0,0 +1,50 @@ +/* +* last update: 2006-08-24 +*/ + +editAreaLoader.load_syntax["html"] = { + 'COMMENT_SINGLE' : {} + ,'COMMENT_MULTI' : {''} + ,'QUOTEMARKS' : {1: "'", 2: '"'} + ,'KEYWORD_CASE_SENSITIVE' : false + ,'KEYWORDS' : { + } + ,'OPERATORS' :[ + ] + ,'DELIMITERS' :[ + ] + ,'REGEXPS' : { + 'doctype' : { + 'search' : '()(]*>)()' + ,'class' : 'doctype' + ,'modifiers' : '' + ,'execute' : 'before' // before or after + } + ,'tags' : { + 'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)' + ,'class' : 'tags' + ,'modifiers' : 'gi' + ,'execute' : 'before' // before or after + } + ,'attributes' : { + 'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)' + ,'class' : 'attributes' + ,'modifiers' : 'g' + ,'execute' : 'before' // before or after + } + } + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #6381F8;' + ,'KEYWORDS' : { + } + ,'OPERATORS' : 'color: #E775F0;' + ,'DELIMITERS' : '' + ,'REGEXPS' : { + 'attributes': 'color: #B1AC41;' + ,'tags': 'color: #E62253;' + ,'doctype': 'color: #8DCFB5;' + ,'test': 'color: #00FF00;' + } + } +}; diff --git a/plugins/LocalFilesEditor/editarea/reg_syntax/index.php b/plugins/LocalFilesEditor/editarea/reg_syntax/index.php new file mode 100644 index 000000000..61741e9cb --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/reg_syntax/index.php @@ -0,0 +1,33 @@ + diff --git a/plugins/LocalFilesEditor/editarea/reg_syntax/js.js b/plugins/LocalFilesEditor/editarea/reg_syntax/js.js new file mode 100644 index 000000000..8c7beb624 --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/reg_syntax/js.js @@ -0,0 +1,60 @@ +editAreaLoader.load_syntax["js"] = { + 'COMMENT_SINGLE' : {1 : '//'} + ,'COMMENT_MULTI' : {'/*' : '*/'} + ,'QUOTEMARKS' : {1: "'", 2: '"'} + ,'KEYWORD_CASE_SENSITIVE' : false + ,'KEYWORDS' : { + 'statements' : [ + 'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do', + 'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item', + 'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void', + 'while', 'write', 'with' + ] + ,'keywords' : [ + 'class', 'const', 'default', 'debugger', 'export', 'extends', 'false', + 'function', 'import', 'namespace', 'new', 'null', 'package', 'private', + 'protected', 'public', 'super', 'true', 'use', 'var', 'window', 'document', + // the list below must be sorted and checked (if it is a keywords or a function and if it is not present twice + 'Link ', 'outerHeight ', 'Anchor', 'FileUpload', + 'location', 'outerWidth', 'Select', 'Area', 'find', 'Location', 'Packages', 'self', + 'arguments', 'locationbar', 'pageXoffset', 'Form', + 'Math', 'pageYoffset', 'setTimeout', 'assign', 'Frame', 'menubar', 'parent', 'status', + 'blur', 'frames', 'MimeType', 'parseFloat', 'statusbar', 'Boolean', 'Function', 'moveBy', + 'parseInt', 'stop', 'Button', 'getClass', 'moveTo', 'Password', 'String', 'callee', 'Hidden', + 'name', 'personalbar', 'Submit', 'caller', 'history', 'NaN', 'Plugin', 'sun', 'captureEvents', + 'History', 'navigate', 'print', 'taint', 'Checkbox', 'home', 'navigator', 'prompt', 'Text', + 'Image', 'Navigator', 'prototype', 'Textarea', 'clearTimeout', 'Infinity', + 'netscape', 'Radio', 'toolbar', 'close', 'innerHeight', 'Number', 'ref', 'top', 'closed', + 'innerWidth', 'Object', 'RegExp', 'toString', 'confirm', 'isFinite', 'onBlur', 'releaseEvents', + 'unescape', 'constructor', 'isNan', 'onError', 'Reset', 'untaint', 'Date', 'java', 'onFocus', + 'resizeBy', 'unwatch', 'defaultStatus', 'JavaArray', 'onLoad', 'resizeTo', 'valueOf', 'document', + 'JavaClass', 'onUnload', 'routeEvent', 'watch', 'Document', 'JavaObject', 'open', 'scroll', 'window', + 'Element', 'JavaPackage', 'opener', 'scrollbars', 'Window', 'escape', 'length', 'Option', 'scrollBy' + ] + ,'functions' : [ + // common functions for Window object + 'alert', 'Array', 'back', 'blur', 'clearInterval', 'close', 'confirm', 'eval ', 'focus', 'forward', 'home', + 'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove', + 'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'scrollTo', 'setInterval', 'status', + 'stop' + ] + } + ,'OPERATORS' :[ + '+', '-', '/', '*', '=', '<', '>', '%', '!' + ] + ,'DELIMITERS' :[ + '(', ')', '[', ']', '{', '}' + ] + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #6381F8;' + ,'KEYWORDS' : { + 'statements' : 'color: #60CA00;' + ,'keywords' : 'color: #48BDDF;' + ,'functions' : 'color: #2B60FF;' + } + ,'OPERATORS' : 'color: #FF00FF;' + ,'DELIMITERS' : 'color: #0038E1;' + + } +}; diff --git a/plugins/LocalFilesEditor/editarea/reg_syntax/php.js b/plugins/LocalFilesEditor/editarea/reg_syntax/php.js new file mode 100644 index 000000000..535a22bd3 --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/reg_syntax/php.js @@ -0,0 +1,75 @@ +editAreaLoader.load_syntax["php"] = { + 'COMMENT_SINGLE' : {1 : '//', 2 : '#'} + ,'COMMENT_MULTI' : {'/*' : '*/'} + ,'QUOTEMARKS' : {1: "'", 2: '"'} + ,'KEYWORD_CASE_SENSITIVE' : false + ,'KEYWORDS' : { + 'statements' : [ + 'include', 'require', 'include_once', 'require_once', + 'for', 'foreach', 'as', 'if', 'elseif', 'else', 'while', 'do', 'endwhile', + 'endif', 'switch', 'case', 'endswitch', + 'return', 'break', 'continue' + ] + ,'reserved' : [ + '_GET', '_POST', '_SERVER', '_FILES', '_ENV', '_COOKIE', '_REQUEST', + 'null', '__LINE__', '__FILE__', + 'false', '<?php', '?>', '<?', + '<script language', '</script>', + 'true', 'var', 'default', + 'function', 'class', 'new', '&new', 'this', + '__FUNCTION__', '__CLASS__', '__METHOD__', 'PHP_VERSION', + 'PHP_OS', 'DEFAULT_INCLUDE_PATH', 'PEAR_INSTALL_DIR', 'PEAR_EXTENSION_DIR', + 'PHP_EXTENSION_DIR', 'PHP_BINDIR', 'PHP_LIBDIR', 'PHP_DATADIR', 'PHP_SYSCONFDIR', + 'PHP_LOCALSTATEDIR', 'PHP_CONFIG_FILE_PATH', 'PHP_OUTPUT_HANDLER_START', 'PHP_OUTPUT_HANDLER_CONT', + 'PHP_OUTPUT_HANDLER_END', 'E_ERROR', 'E_WARNING', 'E_PARSE', 'E_NOTICE', + 'E_CORE_ERROR', 'E_CORE_WARNING', 'E_COMPILE_ERROR', 'E_COMPILE_WARNING', 'E_USER_ERROR', + 'E_USER_WARNING', 'E_USER_NOTICE', 'E_ALL' + + ] + ,'functions' : [ + 'func_num_args', 'func_get_arg', 'func_get_args', 'strlen', 'strcmp', 'strncmp', 'strcasecmp', 'strncasecmp', 'each', 'error_reporting', 'define', 'defined', + 'trigger_error', 'user_error', 'set_error_handler', 'restore_error_handler', 'get_declared_classes', 'get_loaded_extensions', + 'extension_loaded', 'get_extension_funcs', 'debug_backtrace', + 'constant', 'bin2hex', 'sleep', 'usleep', 'time', 'mktime', 'gmmktime', 'strftime', 'gmstrftime', 'strtotime', 'date', 'gmdate', 'getdate', 'localtime', 'checkdate', 'flush', 'wordwrap', 'htmlspecialchars', 'htmlentities', 'html_entity_decode', 'md5', 'md5_file', 'crc32', 'getimagesize', 'image_type_to_mime_type', 'phpinfo', 'phpversion', 'phpcredits', 'strnatcmp', 'strnatcasecmp', 'substr_count', 'strspn', 'strcspn', 'strtok', 'strtoupper', 'strtolower', 'strpos', 'strrpos', 'strrev', 'hebrev', 'hebrevc', 'nl2br', 'basename', 'dirname', 'pathinfo', 'stripslashes', 'stripcslashes', 'strstr', 'stristr', 'strrchr', 'str_shuffle', 'str_word_count', 'strcoll', 'substr', 'substr_replace', 'quotemeta', 'ucfirst', 'ucwords', 'strtr', 'addslashes', 'addcslashes', 'rtrim', 'str_replace', 'str_repeat', 'count_chars', 'chunk_split', 'trim', 'ltrim', 'strip_tags', 'similar_text', 'explode', 'implode', 'setlocale', 'localeconv', + 'parse_str', 'str_pad', 'chop', 'strchr', 'sprintf', 'printf', 'vprintf', 'vsprintf', 'sscanf', 'fscanf', 'parse_url', 'urlencode', 'urldecode', 'rawurlencode', 'rawurldecode', 'readlink', 'linkinfo', 'link', 'unlink', 'exec', 'system', 'escapeshellcmd', 'escapeshellarg', 'passthru', 'shell_exec', 'proc_open', 'proc_close', 'rand', 'srand', 'getrandmax', 'mt_rand', 'mt_srand', 'mt_getrandmax', 'base64_decode', 'base64_encode', 'abs', 'ceil', 'floor', 'round', 'is_finite', 'is_nan', 'is_infinite', 'bindec', 'hexdec', 'octdec', 'decbin', 'decoct', 'dechex', 'base_convert', 'number_format', 'fmod', 'ip2long', 'long2ip', 'getenv', 'putenv', 'getopt', 'microtime', 'gettimeofday', 'getrusage', 'uniqid', 'quoted_printable_decode', 'set_time_limit', 'get_cfg_var', 'magic_quotes_runtime', 'set_magic_quotes_runtime', 'get_magic_quotes_gpc', 'get_magic_quotes_runtime', + 'import_request_variables', 'error_log', 'serialize', 'unserialize', 'memory_get_usage', 'var_dump', 'var_export', 'debug_zval_dump', 'print_r','highlight_file', 'show_source', 'highlight_string', 'ini_get', 'ini_get_all', 'ini_set', 'ini_alter', 'ini_restore', 'get_include_path', 'set_include_path', 'restore_include_path', 'setcookie', 'header', 'headers_sent', 'connection_aborted', 'connection_status', 'ignore_user_abort', 'parse_ini_file', 'is_uploaded_file', 'move_uploaded_file', 'intval', 'floatval', 'doubleval', 'strval', 'gettype', 'settype', 'is_null', 'is_resource', 'is_bool', 'is_long', 'is_float', 'is_int', 'is_integer', 'is_double', 'is_real', 'is_numeric', 'is_string', 'is_array', 'is_object', 'is_scalar', + 'ereg', 'ereg_replace', 'eregi', 'eregi_replace', 'split', 'spliti', 'join', 'sql_regcase', 'dl', 'pclose', 'popen', 'readfile', 'rewind', 'rmdir', 'umask', 'fclose', 'feof', 'fgetc', 'fgets', 'fgetss', 'fread', 'fopen', 'fpassthru', 'ftruncate', 'fstat', 'fseek', 'ftell', 'fflush', 'fwrite', 'fputs', 'mkdir', 'rename', 'copy', 'tempnam', 'tmpfile', 'file', 'file_get_contents', 'stream_select', 'stream_context_create', 'stream_context_set_params', 'stream_context_set_option', 'stream_context_get_options', 'stream_filter_prepend', 'stream_filter_append', 'fgetcsv', 'flock', 'get_meta_tags', 'stream_set_write_buffer', 'set_file_buffer', 'set_socket_blocking', 'stream_set_blocking', 'socket_set_blocking', 'stream_get_meta_data', 'stream_register_wrapper', 'stream_wrapper_register', 'stream_set_timeout', 'socket_set_timeout', 'socket_get_status', 'realpath', 'fnmatch', 'fsockopen', 'pfsockopen', 'pack', 'unpack', 'get_browser', 'crypt', 'opendir', 'closedir', 'chdir', 'getcwd', 'rewinddir', 'readdir', 'dir', 'glob', 'fileatime', 'filectime', 'filegroup', 'fileinode', 'filemtime', 'fileowner', 'fileperms', 'filesize', 'filetype', 'file_exists', 'is_writable', 'is_writeable', 'is_readable', 'is_executable', 'is_file', 'is_dir', 'is_link', 'stat', 'lstat', 'chown', + 'touch', 'clearstatcache', 'mail', 'ob_start', 'ob_flush', 'ob_clean', 'ob_end_flush', 'ob_end_clean', 'ob_get_flush', 'ob_get_clean', 'ob_get_length', 'ob_get_level', 'ob_get_status', 'ob_get_contents', 'ob_implicit_flush', 'ob_list_handlers', 'ksort', 'krsort', 'natsort', 'natcasesort', 'asort', 'arsort', 'sort', 'rsort', 'usort', 'uasort', 'uksort', 'shuffle', 'array_walk', 'count', 'end', 'prev', 'next', 'reset', 'current', 'key', 'min', 'max', 'in_array', 'array_search', 'extract', 'compact', 'array_fill', 'range', 'array_multisort', 'array_push', 'array_pop', 'array_shift', 'array_unshift', 'array_splice', 'array_slice', 'array_merge', 'array_merge_recursive', 'array_keys', 'array_values', 'array_count_values', 'array_reverse', 'array_reduce', 'array_pad', 'array_flip', 'array_change_key_case', 'array_rand', 'array_unique', 'array_intersect', 'array_intersect_assoc', 'array_diff', 'array_diff_assoc', 'array_sum', 'array_filter', 'array_map', 'array_chunk', 'array_key_exists', 'pos', 'sizeof', 'key_exists', 'assert', 'assert_options', 'version_compare', 'ftok', 'str_rot13', 'aggregate', + 'session_name', 'session_module_name', 'session_save_path', 'session_id', 'session_regenerate_id', 'session_decode', 'session_register', 'session_unregister', 'session_is_registered', 'session_encode', + 'session_start', 'session_destroy', 'session_unset', 'session_set_save_handler', 'session_cache_limiter', 'session_cache_expire', 'session_set_cookie_params', 'session_get_cookie_params', 'session_write_close', 'preg_match', 'preg_match_all', 'preg_replace', 'preg_replace_callback', 'preg_split', 'preg_quote', 'preg_grep', 'overload', 'ctype_alnum', 'ctype_alpha', 'ctype_cntrl', 'ctype_digit', 'ctype_lower', 'ctype_graph', 'ctype_print', 'ctype_punct', 'ctype_space', 'ctype_upper', 'ctype_xdigit', 'virtual', 'apache_request_headers', 'apache_note', 'apache_lookup_uri', 'apache_child_terminate', 'apache_setenv', 'apache_response_headers', 'apache_get_version', 'getallheaders', 'mysql_connect', 'mysql_pconnect', 'mysql_close', 'mysql_select_db', 'mysql_create_db', 'mysql_drop_db', 'mysql_query', 'mysql_unbuffered_query', 'mysql_db_query', 'mysql_list_dbs', 'mysql_list_tables', 'mysql_list_fields', 'mysql_list_processes', 'mysql_error', 'mysql_errno', 'mysql_affected_rows', 'mysql_insert_id', 'mysql_result', 'mysql_num_rows', 'mysql_num_fields', 'mysql_fetch_row', 'mysql_fetch_array', 'mysql_fetch_assoc', 'mysql_fetch_object', 'mysql_data_seek', 'mysql_fetch_lengths', 'mysql_fetch_field', 'mysql_field_seek', 'mysql_free_result', 'mysql_field_name', 'mysql_field_table', 'mysql_field_len', 'mysql_field_type', 'mysql_field_flags', 'mysql_escape_string', 'mysql_real_escape_string', 'mysql_stat', + 'mysql_thread_id', 'mysql_client_encoding', 'mysql_get_client_info', 'mysql_get_host_info', 'mysql_get_proto_info', 'mysql_get_server_info', 'mysql_info', 'mysql', 'mysql_fieldname', 'mysql_fieldtable', 'mysql_fieldlen', 'mysql_fieldtype', 'mysql_fieldflags', 'mysql_selectdb', 'mysql_createdb', 'mysql_dropdb', 'mysql_freeresult', 'mysql_numfields', 'mysql_numrows', 'mysql_listdbs', 'mysql_listtables', 'mysql_listfields', 'mysql_db_name', 'mysql_dbname', 'mysql_tablename', 'mysql_table_name', 'pg_connect', 'pg_pconnect', 'pg_close', 'pg_connection_status', 'pg_connection_busy', 'pg_connection_reset', 'pg_host', 'pg_dbname', 'pg_port', 'pg_tty', 'pg_options', 'pg_ping', 'pg_query', 'pg_send_query', 'pg_cancel_query', 'pg_fetch_result', 'pg_fetch_row', 'pg_fetch_assoc', 'pg_fetch_array', 'pg_fetch_object', 'pg_fetch_all', 'pg_affected_rows', 'pg_get_result', 'pg_result_seek', 'pg_result_status', 'pg_free_result', 'pg_last_oid', 'pg_num_rows', 'pg_num_fields', 'pg_field_name', 'pg_field_num', 'pg_field_size', 'pg_field_type', 'pg_field_prtlen', 'pg_field_is_null', 'pg_get_notify', 'pg_get_pid', 'pg_result_error', 'pg_last_error', 'pg_last_notice', 'pg_put_line', 'pg_end_copy', 'pg_copy_to', 'pg_copy_from', + 'pg_trace', 'pg_untrace', 'pg_lo_create', 'pg_lo_unlink', 'pg_lo_open', 'pg_lo_close', 'pg_lo_read', 'pg_lo_write', 'pg_lo_read_all', 'pg_lo_import', 'pg_lo_export', 'pg_lo_seek', 'pg_lo_tell', 'pg_escape_string', 'pg_escape_bytea', 'pg_unescape_bytea', 'pg_client_encoding', 'pg_set_client_encoding', 'pg_meta_data', 'pg_convert', 'pg_insert', 'pg_update', 'pg_delete', 'pg_select', 'pg_exec', 'pg_getlastoid', 'pg_cmdtuples', 'pg_errormessage', 'pg_numrows', 'pg_numfields', 'pg_fieldname', 'pg_fieldsize', 'pg_fieldtype', 'pg_fieldnum', 'pg_fieldprtlen', 'pg_fieldisnull', 'pg_freeresult', 'pg_result', 'pg_loreadall', 'pg_locreate', 'pg_lounlink', 'pg_loopen', 'pg_loclose', 'pg_loread', 'pg_lowrite', 'pg_loimport', 'pg_loexport', + 'echo', 'print', 'global', 'static', 'exit', 'array', 'empty', 'eval', 'isset', 'unset', 'die' + + ] + } + ,'OPERATORS' :[ + '+', '-', '/', '*', '=', '<', '>', '%', '!', '&&', '||' + ] + ,'DELIMITERS' :[ + '(', ')', '[', ']', '{', '}' + ] + ,'REGEXPS' : { + // highlight all variables ($...) + 'variables' : { + 'search' : '()(\\$\\w+)()' + ,'class' : 'variables' + ,'modifiers' : 'g' + ,'execute' : 'before' // before or after + } + } + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #879EFA;' + ,'KEYWORDS' : { + 'reserved' : 'color: #48BDDF;' + ,'functions' : 'color: #0040FD;' + ,'statements' : 'color: #60CA00;' + } + ,'OPERATORS' : 'color: #FF00FF;' + ,'DELIMITERS' : 'color: #2B60FF;' + ,'REGEXPS' : { + 'variables' : 'color: #E0BD54;' + } + } +}; diff --git a/plugins/LocalFilesEditor/editarea/reg_syntax/sql.js b/plugins/LocalFilesEditor/editarea/reg_syntax/sql.js new file mode 100644 index 000000000..f4530a99c --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/reg_syntax/sql.js @@ -0,0 +1,55 @@ +editAreaLoader.load_syntax["sql"] = { + 'COMMENT_SINGLE' : {1 : '--'} + ,'COMMENT_MULTI' : {'/*' : '*/'} + ,'QUOTEMARKS' : {1: "'", 2: '"', 3: '`'} + ,'KEYWORD_CASE_SENSITIVE' : false + ,'KEYWORDS' : { + 'statements' : [ + 'select', 'SELECT', 'where', 'order', 'by', + 'insert', 'from', 'update', 'grant', 'left join', 'right join', + 'union', 'group', 'having', 'limit', 'alter', 'LIKE','IN','CASE' + ] + ,'reserved' : [ + 'null', 'enum', 'int', 'boolean', 'add', 'varchar' + + ] + ,'functions' : [ + 'ABS','ACOS','ADDDATE','ADDTIME','AES_DECRYPT','AES_ENCRYPT','ASCII','ASIN','ATAN2 ATAN','ATAN','AVG','BENCHMARK','DISTINCT','BIN','BIT_AND','BIT_COUNT','BIT_LENGTH','BIT_OR','BIT_XOR','CAST','CEILING CEIL','CHAR_LENGTH','CHAR', +'CHARACTER_LENGTH','CHARSET','COALESCE','COERCIBILITY','COLLATION','COMPRESS','CONCAT_WS','CONCAT','CONNECTION_ID','CONV','CONVERT_TZ','COS','COT','COUNT','CRC32','CURDATE','CURRENT_DATE','CURRENT_TIME','CURRENT_TIMESTAMP','CURRENT_USER','CURTIME','DATABASE','DATE_ADD','DATE_FORMAT','DATE_SUB','DATE','DATEDIFF','DAY','DAYNAME','DAYOFMONTH', +'DAYOFWEEK','DAYOFYEAR','DECODE','DEFAULT','DEGREES','DES_DECRYPT','DES_ENCRYPT','ELT','ENCODE','ENCRYPT','EXP','EXPORT_SET','EXTRACT','FIELD','FIND_IN_SET','FLOOR','FORMAT','FOUND_ROWS','FROM_DAYS','FROM_UNIXTIME','GET_FORMAT','GET_LOCK','GREATEST','GROUP_CONCAT','HEX','HOUR','IF','IFNULL','INET_ATON','INET_NTOA', +'INSERT','INSTR','INTERVAL','IS_FREE_LOCK','IS_USED_LOCK','ISNULL','LAST_DAY','LAST_INSERT_ID','LCASE','LEAST','LEFT','LENGTH','LN','LOAD_FILE','LOCALTIME','LOCALTIMESTAMP','LOCATE','LOG10','LOG2','LOG','LOWER','LPAD','LTRIM','MAKE_SET','MAKEDATE','MAKETIME','MASTER_POS_WAIT','MAX','MD5','MICROSECOND', +'MID','MIN','MINUTE','MOD','MONTH','MONTHNAME','NOW','NULLIF','OCT','OCTET_LENGTH','OLD_PASSWORD','ORD','PASSWORD','PERIOD_ADD','PERIOD_DIFF','PI','POSITION','POW','POWER','PROCEDURE ANALYSE','QUARTER','QUOTE','RADIANS','RAND','RELEASE_LOCK','REPEAT','REPLACE','REVERSE','RIGHT','ROUND', +'RPAD','RTRIM','SEC_TO_TIME','SECOND','SESSION_USER','SHA1','SHA','SIGN','SIN','SOUNDEX','SOUNDS LIKE','SPACE','SQRT','STD','STDDEV','STR_TO_DATE','STRCMP','SUBDATE','SUBSTRING_INDEX','SUBSTRING','SUBSTR','SUBTIME','SUM','SYSDATE','SYSTEM_USER','TAN','TIME_FORMAT','TIME_TO_SEC','TIME','TIMEDIFF', +'TIMESTAMP','TO_DAYS','TRIM','TRUNCATE','UCASE','UNCOMPRESS','UNCOMPRESSED_LENGTH','UNHEX','UNIX_TIMESTAMP','UPPER','USER','UTC_DATE','UTC_TIME','UTC_TIMESTAMP','UUID','VALUES','VARIANCE','WEEK','WEEKDAY','WEEKOFYEAR','YEAR','YEARWEEK' + ] + } + ,'OPERATORS' :[ + 'AND','&&','BETWEEN','BINARY','&','|','^','/','DIV','<=>','=','>=','>','<<','>>','IS','NULL','<=','<','-','%','!=','<>','!','||','OR','+','REGEXP','RLIKE','XOR','~','*' + ] + ,'DELIMITERS' :[ + '(', ')', '[', ']', '{', '}' + ] + ,'REGEXPS' : { + // highlight all variables (@...) + 'variables' : { + 'search' : '()(\\@\\w+)()' + ,'class' : 'variables' + ,'modifiers' : 'g' + ,'execute' : 'before' // before or after + } + } + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #879EFA;' + ,'KEYWORDS' : { + 'reserved' : 'color: #48BDDF;' + ,'functions' : 'color: #0040FD;' + ,'statements' : 'color: #60CA00;' + } + ,'OPERATORS' : 'color: #FF00FF;' + ,'DELIMITERS' : 'color: #2B60FF;' + ,'REGEXPS' : { + 'variables' : 'color: #E0BD54;' + } + } +}; diff --git a/plugins/LocalFilesEditor/editarea/reg_syntax/xml.js b/plugins/LocalFilesEditor/editarea/reg_syntax/xml.js new file mode 100644 index 000000000..a043dd63a --- /dev/null +++ b/plugins/LocalFilesEditor/editarea/reg_syntax/xml.js @@ -0,0 +1,56 @@ +/* +* last update: 2006-08-24 +*/ + +editAreaLoader.load_syntax["xml"] = { + 'COMMENT_SINGLE' : {} + ,'COMMENT_MULTI' : {''} + ,'QUOTEMARKS' : {1: "'", 2: '"'} + ,'KEYWORD_CASE_SENSITIVE' : false + ,'KEYWORDS' : { + } + ,'OPERATORS' :[ + ] + ,'DELIMITERS' :[ + ] + ,'REGEXPS' : { + 'xml' : { + 'search' : '()(<\\?[^>]*?\\?>)()' + ,'class' : 'xml' + ,'modifiers' : 'g' + ,'execute' : 'before' // before or after + } + ,'cdatas' : { + 'search' : '()()()' + ,'class' : 'cdata' + ,'modifiers' : 'g' + ,'execute' : 'before' // before or after + } + ,'tags' : { + 'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)' + ,'class' : 'tags' + ,'modifiers' : 'gi' + ,'execute' : 'before' // before or after + } + ,'attributes' : { + 'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)' + ,'class' : 'attributes' + ,'modifiers' : 'g' + ,'execute' : 'before' // before or after + } + } + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #6381F8;' + ,'KEYWORDS' : { + } + ,'OPERATORS' : 'color: #E775F0;' + ,'DELIMITERS' : '' + ,'REGEXPS' : { + 'attributes': 'color: #B1AC41;' + ,'tags': 'color: #E62253;' + ,'xml': 'color: #8DCFB5;' + ,'cdata': 'color: #50B020;' + } + } +}; diff --git a/plugins/LocalFilesEditor/functions.inc.php b/plugins/LocalFilesEditor/functions.inc.php new file mode 100644 index 000000000..95a88c050 --- /dev/null +++ b/plugins/LocalFilesEditor/functions.inc.php @@ -0,0 +1,73 @@ +'), '', $code); + $b = 0; + foreach (token_get_all($code) as $token) + { + if ('{' == $token) ++$b; + else if ('}' == $token) --$b; + } + if ($b) return false; + else + { + ob_start(); + $eval = eval('if(0){' . $code . '}'); + ob_end_clean(); + if ($eval === false) return false; + else return ''; + } +} + +/** + * returns true or false if $str is bool + * returns $str if $str is integer + * else "$str" + * + * @param string + */ +function editarea_quote($value) +{ + switch (gettype($value)) + { + case "boolean": + return $value ? 'true' : 'false'; + case "integer": + return $value; + default: + return '"'.$value.'"'; + } +} + +?> \ No newline at end of file diff --git a/plugins/LocalFilesEditor/language/en_UK/plugin.lang.php b/plugins/LocalFilesEditor/language/en_UK/plugin.lang.php index d0d3fb395..291e2b0a0 100644 --- a/plugins/LocalFilesEditor/language/en_UK/plugin.lang.php +++ b/plugins/LocalFilesEditor/language/en_UK/plugin.lang.php @@ -39,7 +39,8 @@ $lang['locfiledit_save_file'] = 'Save file'; $lang['locfiledit_choose_file'] = 'Choose the file to be edited'; $lang['locfiledit_edit'] = 'Edit'; $lang['locfiledit_restore'] = 'Restore the backup file'; -$lang['locfiledit_restore_confirm'] = 'Please confirm?\nRestore won\\\'t be effective till next save.'; +$lang['locfiledit_restore_confirm'] = 'Please confirm? +Restore won\'t be effective till next save.'; $lang['locfiledit_bak_loaded1'] = 'Backup file loaded.'; $lang['locfiledit_bak_loaded2'] = 'You must save file to restore it.'; $lang['locfiledit_syntax_error'] = 'Syntax error! File can\'t be saved.'; diff --git a/plugins/LocalFilesEditor/language/es_ES/plugin.lang.php b/plugins/LocalFilesEditor/language/es_ES/plugin.lang.php index efaeb82d0..e28c1273e 100644 --- a/plugins/LocalFilesEditor/language/es_ES/plugin.lang.php +++ b/plugins/LocalFilesEditor/language/es_ES/plugin.lang.php @@ -39,7 +39,8 @@ $lang['locfiledit_save_file'] = 'Registrar el fichero'; $lang['locfiledit_choose_file'] = 'Escoja un fichero que hay que editar'; $lang['locfiledit_edit'] = 'Editar'; $lang['locfiledit_restore'] = 'Cargar el fichero de salvaguardia'; -$lang['locfiledit_restore_confirm'] = '¿ Desea cargar el fichero de salvaguardia?\nUsted deberá luego hacer clic Registrar para restaurarlo.'; +$lang['locfiledit_restore_confirm'] = '¿ Desea cargar el fichero de salvaguardia? +Usted deberá luego hacer clic Registrar para restaurarlo.'; $lang['locfiledit_bak_loaded1'] = 'Fichero cargado de salvaguardia'; $lang['locfiledit_bak_loaded2'] = 'Usted debe registrarlo para salvaguardarlo.'; $lang['locfiledit_syntax_error'] = '¡ Error de sintaxis! Imposible registrar el fichero.'; diff --git a/plugins/LocalFilesEditor/language/fr_FR/plugin.lang.php b/plugins/LocalFilesEditor/language/fr_FR/plugin.lang.php index 1d4eb1714..45f9b725f 100644 --- a/plugins/LocalFilesEditor/language/fr_FR/plugin.lang.php +++ b/plugins/LocalFilesEditor/language/fr_FR/plugin.lang.php @@ -39,7 +39,8 @@ $lang['locfiledit_save_file'] = 'Enregistrer le fichier'; $lang['locfiledit_choose_file'] = 'Choisissez un fichier à éditer'; $lang['locfiledit_edit'] = 'Editer'; $lang['locfiledit_restore'] = 'Charger le fichier de sauvegarde'; -$lang['locfiledit_restore_confirm'] = 'Souaitez-vous charger le fichier de sauvegarde?\nVous devrez ensuite cliquer sur Enregistrer pour le restaurer.'; +$lang['locfiledit_restore_confirm'] = 'Souaitez-vous charger le fichier de sauvegarde? +Vous devrez ensuite cliquer sur Enregistrer pour le restaurer.'; $lang['locfiledit_bak_loaded1'] = 'Fichier de sauvegarde chargé'; $lang['locfiledit_bak_loaded2'] = 'Vous devez l\'enregistrer pour le sauvegarder.'; $lang['locfiledit_syntax_error'] = 'Erreur de syntaxe! Impossible d\'enregistrer le fichier.'; diff --git a/plugins/LocalFilesEditor/main.inc.php b/plugins/LocalFilesEditor/main.inc.php index 8046d5467..7cd1d68dc 100644 --- a/plugins/LocalFilesEditor/main.inc.php +++ b/plugins/LocalFilesEditor/main.inc.php @@ -37,8 +37,9 @@ define('LOCALEDIT_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/' function localfiles_admin_menu($menu) { - array_push($menu, array('NAME' => 'LocalFiles Editor', - 'URL' => get_admin_plugin_menu_link(LOCALEDIT_PATH . 'admin.php'))); + array_push($menu, array( + 'NAME' => 'LocalFiles Editor', + 'URL' => get_admin_plugin_menu_link(LOCALEDIT_PATH . 'admin.php'))); return $menu; } diff --git a/plugins/LocalFilesEditor/show_default.php b/plugins/LocalFilesEditor/show_default.php index 22e74630b..8c1f433a4 100644 --- a/plugins/LocalFilesEditor/show_default.php +++ b/plugins/LocalFilesEditor/show_default.php @@ -26,6 +26,7 @@ define('PHPWG_ROOT_PATH', '../../'); include_once(PHPWG_ROOT_PATH . 'include/common.inc.php'); +include_once(LOCALEDIT_PATH.'functions.inc.php'); check_status(ACCESS_ADMINISTRATOR); if (isset($_GET['file'])) @@ -37,19 +38,33 @@ if (isset($_GET['file'])) } $template->set_filename('show_default', dirname(__FILE__) . '/show_default.tpl'); - - $file = file_get_contents(PHPWG_ROOT_PATH . $path); - - $template->assign(array('DEFAULT_CONTENT' => nl2br($file))); + // Editarea + if (!isset($conf['editarea_options']) or $conf['editarea_options'] !== false) + { + $editarea = array( + 'syntax' => 'php', + 'start_highlight' => true, + 'is_editable' => false, + 'language' => substr($user['language'], 0, 2)); + + $template->assign('editarea', array( + 'URL' => LOCALEDIT_PATH . 'editarea/edit_area_full.js', + 'OPTIONS' => $editarea)); + } + + $file = file_get_contents(PHPWG_ROOT_PATH . $path); + + $template->assign(array('DEFAULT_CONTENT' => $file)); + $title = $path; $page['page_banner'] = '

'.str_replace('/', ' / ', $path).'

'; $page['body_id'] = 'thePopuphelpPage'; include(PHPWG_ROOT_PATH.'include/page_header.php'); - + $template->pparse('show_default'); - + include(PHPWG_ROOT_PATH.'include/page_tail.php'); } diff --git a/plugins/LocalFilesEditor/show_default.tpl b/plugins/LocalFilesEditor/show_default.tpl index c101e351a..bccfc9712 100644 --- a/plugins/LocalFilesEditor/show_default.tpl +++ b/plugins/LocalFilesEditor/show_default.tpl @@ -1,3 +1,13 @@ -
-{$DEFAULT_CONTENT} -
\ No newline at end of file +{if isset($editarea)} + + +{/if} + + \ No newline at end of file -- cgit v1.2.3