aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/LocalFilesEditor/show_default.tpl
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2008-09-25 17:46:27 +0000
committerpatdenice <patdenice@piwigo.org>2008-09-25 17:46:27 +0000
commit1eb3d18ae24a221037a44d662439d50c74e6fe9f (patch)
treebad9aae88920126457aeadf09a7a9ec55242977b /plugins/LocalFilesEditor/show_default.tpl
parentfd0b26af453fedf4528eaf4114914a6e5b7bc685 (diff)
- Move get_extents function to include/functions.inc.php.
- Change all plugins version to 2.0. - LocalFiles Editor can now edit and create template extension. - Editarea (for LocalFiles Editor) go to version 0.7.2.2 (chrome compatible) - Editarea activation is now saved in database with AJAX. git-svn-id: http://piwigo.org/svn/trunk@2588 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--plugins/LocalFilesEditor/show_default.tpl47
1 files changed, 37 insertions, 10 deletions
diff --git a/plugins/LocalFilesEditor/show_default.tpl b/plugins/LocalFilesEditor/show_default.tpl
index bccfc9712..ffdca4d68 100644
--- a/plugins/LocalFilesEditor/show_default.tpl
+++ b/plugins/LocalFilesEditor/show_default.tpl
@@ -1,13 +1,40 @@
-{if isset($editarea)}
-<script type="text/javascript" src="{$editarea.URL}"></script>
+{* $Id$ *}
+{html_head}<link rel="stylesheet" type="text/css" href="{$LOCALEDIT_PATH}locfiledit.css">{/html_head}
+{known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"}
+{known_script id="editarea" src=$LOCALEDIT_PATH|@cat:"editarea/edit_area_full.js"}
<script type="text/javascript">
-editAreaLoader.init({ldelim}
- id: "text"
- {foreach from=$editarea.OPTIONS key=option item=value}
- , {$option}: {$value|editarea_quote}
- {/foreach}
-{rdelim});
+var editarea = "{$LOAD_EDITAREA}";
+
+function loadEditarea() {ldelim}
+ editAreaLoader.init({ldelim}
+ id: "text"
+ {foreach from=$EDITAREA_OPTIONS key=option item=value}
+ , {$option}: {$value|editarea_quote}
+ {/foreach}
+ });
+ jQuery("#showedit").hide();
+ jQuery("#hideedit").show();
+}
+
+function unloadEditarea() {ldelim}
+ editAreaLoader.delete_instance("text");
+ jQuery("#hideedit").hide();
+ jQuery("#showedit").show();
+}
</script>
-{/if}
-<textarea rows="30" id="text" cols="90">{$DEFAULT_CONTENT}</textarea> \ No newline at end of file
+<div id="LocalFilesEditor">
+
+<textarea id="text" rows="30" cols="90">{$DEFAULT_CONTENT}</textarea>
+
+<div id="editarea_buttons">
+<a href="javascript:loadEditarea();" id="showedit">[{'locfiledit_enable_editarea'|@translate}]</a>
+<a href="javascript:unloadEditarea();" id="hideedit">[{'locfiledit_disable_editarea'|@translate}]</a>
+</div>
+
+</div>
+
+<script type="text/javascript">
+jQuery("#editarea_buttons").show();
+if (editarea == "on") loadEditarea();
+</script>