From 7211eee1caba1b1d798449b6df6def86c50552ef Mon Sep 17 00:00:00 2001 From: patdenice Date: Wed, 13 Apr 2011 10:38:45 +0000 Subject: merge r10348 from trunk to branch 2.2 Clean code git-svn-id: http://piwigo.org/svn/branches/2.2@10349 68402e56-0260-453c-a942-63ccdbb3a9ee --- plugins/LocalFilesEditor/template/admin.tpl | 97 ++++++++++++++++++++++ plugins/LocalFilesEditor/template/locfiledit.css | 32 +++++++ plugins/LocalFilesEditor/template/show_default.tpl | 37 +++++++++ 3 files changed, 166 insertions(+) create mode 100644 plugins/LocalFilesEditor/template/admin.tpl create mode 100644 plugins/LocalFilesEditor/template/locfiledit.css create mode 100644 plugins/LocalFilesEditor/template/show_default.tpl (limited to 'plugins/LocalFilesEditor/template') diff --git a/plugins/LocalFilesEditor/template/admin.tpl b/plugins/LocalFilesEditor/template/admin.tpl new file mode 100644 index 000000000..1761951d2 --- /dev/null +++ b/plugins/LocalFilesEditor/template/admin.tpl @@ -0,0 +1,97 @@ +{combine_script id="codemirror" path="plugins/LocalFilesEditor/codemirror/lib/codemirror.js"} +{combine_script id="codemirror.xml" require="codemirror" path="plugins/LocalFilesEditor/codemirror/mode/xml/xml.js"} +{combine_script id="codemirror.javascript" require="codemirror" path="plugins/LocalFilesEditor/codemirror/mode/javascript/javascript.js"} +{combine_script id="codemirror.css" require="codemirror" path="plugins/LocalFilesEditor/codemirror/mode/css/css.js"} +{combine_script id="codemirror.clike" require="codemirror" path="plugins/LocalFilesEditor/codemirror/mode/clike/clike.js"} +{combine_script id="codemirror.htmlmixed" require="codemirror.xml,codemirror.javascript,codemirror.css" path="plugins/LocalFilesEditor/codemirror/mode/htmlmixed/htmlmixed.js"} +{combine_script id="codemirror.php" require="codemirror.xml,codemirror.javascript,codemirror.css,codemirror.clike" path="plugins/LocalFilesEditor/codemirror/mode/php/php.js"} + +{combine_css path="plugins/LocalFilesEditor/codemirror/lib/codemirror.css"} +{combine_css path="plugins/LocalFilesEditor/codemirror/mode/xml/xml.css"} +{combine_css path="plugins/LocalFilesEditor/codemirror/mode/javascript/javascript.css"} +{combine_css path="plugins/LocalFilesEditor/codemirror/mode/css/css.css"} +{combine_css path="plugins/LocalFilesEditor/codemirror/mode/clike/clike.css"} +{combine_css path="plugins/LocalFilesEditor/template/locfiledit.css"} + +{footer_script} +if (document.getElementById("text") != null) + var editor = CodeMirror.fromTextArea(document.getElementById("text"), {ldelim} + matchBrackets: true, + mode: "{$CODEMIRROR_MODE}", + tabMode: "shift" + }); +{/footer_script} + +
+

LocalFiles Editor

+
+ +
+ +
+ + + +{if isset ($create_tpl)} + + + + + + + + + + + + + +
{'locfiledit_new_filename'|@translate}
{'locfiledit_parent_directory'|@translate}{html_options name=tpl_parent options=$create_tpl.PARENT_OPTIONS selected=$create_tpl.PARENT_SELECTED}
{'locfiledit_model'|@translate}{html_options name=tpl_model options=$create_tpl.MODEL_OPTIONS selected=$create_tpl.MODEL_SELECTED}
+

+ +{/if} + +{if isset ($css_lang_tpl)} +{html_options name=file_to_edit options=$css_lang_tpl.OPTIONS selected=$css_lang_tpl.SELECTED} + +

+ {if isset ($css_lang_tpl.NEW_FILE_URL)} + + {'locfiledit_new_tpl'|@translate} + + {/if} +{/if} + +{if isset ($zone_edit)} +
+{/if} + +{if !empty($show_default)} +{foreach from=$show_default item=file name=default_loop} + +{'locfiledit_show_default'|@translate} "{$file.FILE}" + +{if !($smarty.foreach.default_loop.last)}
{/if} +{/foreach} +{/if} + +{if isset ($zone_edit)} +{$zone_edit.FILE_NAME} +
{* title_bar *} + + +
+ + +{if isset ($restore)} + +{/if} + +{if isset ($restore_infos)} +

+{'locfiledit_save_bak'|@translate} +{/if} + +{/if} {* zone_edit *} +
+
diff --git a/plugins/LocalFilesEditor/template/locfiledit.css b/plugins/LocalFilesEditor/template/locfiledit.css new file mode 100644 index 000000000..10589bcec --- /dev/null +++ b/plugins/LocalFilesEditor/template/locfiledit.css @@ -0,0 +1,32 @@ +#LocalFilesEditor { + text-align: center; + margin: 0 2em; +} + +#LocalFilesEditor #title_bar { + overflow: auto; +} + +#LocalFilesEditor .file_name { + font-weight: bold; + float: left; +} + +#LocalFilesEditor .default_file { + float: right; +} + +#LocalFilesEditor TD { + padding: 0.5em; +} + +#LocalFilesEditor TEXTAREA, .CodeMirror { + background-color: #EEEEEE; + font-family: monospace,Arial,sans-serif; + font-size: 1.2em; + border: 1px solid #999999; + margin: 0.5em 0; + width: 100%; + min-height: 500px; + height: auto; +} \ No newline at end of file diff --git a/plugins/LocalFilesEditor/template/show_default.tpl b/plugins/LocalFilesEditor/template/show_default.tpl new file mode 100644 index 000000000..cd6c3f318 --- /dev/null +++ b/plugins/LocalFilesEditor/template/show_default.tpl @@ -0,0 +1,37 @@ +{combine_script id="codemirror" path="plugins/LocalFilesEditor/codemirror/lib/codemirror.js"} +{combine_script id="codemirror.xml" require="codemirror" path="plugins/LocalFilesEditor/codemirror/mode/xml/xml.js"} +{combine_script id="codemirror.javascript" require="codemirror" path="plugins/LocalFilesEditor/codemirror/mode/javascript/javascript.js"} +{combine_script id="codemirror.css" require="codemirror" path="plugins/LocalFilesEditor/codemirror/mode/css/css.js"} +{combine_script id="codemirror.clike" require="codemirror" path="plugins/LocalFilesEditor/codemirror/mode/clike/clike.js"} +{combine_script id="codemirror.htmlmixed" require="codemirror.xml,codemirror.javascript,codemirror.css" path="plugins/LocalFilesEditor/codemirror/mode/htmlmixed/htmlmixed.js"} +{combine_script id="codemirror.php" require="codemirror.xml,codemirror.javascript,codemirror.css,codemirror.clike" path="plugins/LocalFilesEditor/codemirror/mode/php/php.js"} + +{combine_css path="plugins/LocalFilesEditor/codemirror/lib/codemirror.css"} +{combine_css path="plugins/LocalFilesEditor/codemirror/mode/xml/xml.css"} +{combine_css path="plugins/LocalFilesEditor/codemirror/mode/javascript/javascript.css"} +{combine_css path="plugins/LocalFilesEditor/codemirror/mode/css/css.css"} +{combine_css path="plugins/LocalFilesEditor/codemirror/mode/clike/clike.css"} +{combine_css path="plugins/LocalFilesEditor/template/locfiledit.css"} + +{footer_script} +var editor = CodeMirror.fromTextArea(document.getElementById("text"), {ldelim} + readOnly: true, + mode: "application/x-httpd-php" +}); +{/footer_script} + +{html_head} + +{/html_head} + +
+ +
+ {$TITLE} +
+ + + +
-- cgit v1.2.3