aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2008-10-11 20:34:28 +0000
committerrub <rub@piwigo.org>2008-10-11 20:34:28 +0000
commit09d7d50142b9d159396c211fd057a02afae123ae (patch)
tree71a3b4fddf9c4047eecb1f020cd3852507858471
parent21fc6813022401aea633ca6e6990eab6da9929e6 (diff)
jQuery autosize:
Prepare public section in order to use autosize on version after butterfly git-svn-id: http://piwigo.org/svn/trunk@2721 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--template/yoga/include/autosize.inc.tpl14
-rw-r--r--template/yoga/picture.tpl6
-rw-r--r--template/yoga/upload.tpl5
3 files changed, 25 insertions, 0 deletions
diff --git a/template/yoga/include/autosize.inc.tpl b/template/yoga/include/autosize.inc.tpl
new file mode 100644
index 000000000..9b06727ff
--- /dev/null
+++ b/template/yoga/include/autosize.inc.tpl
@@ -0,0 +1,14 @@
+{* $Id$ *}
+{known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"}
+{known_script id="jquery.autogrow" src=$ROOT_URL|@cat:"template-common/lib/plugins/jquery.autogrow-textarea.js"}
+
+{* Auto size and auto grow textarea *}
+{literal}
+<script type="text/javascript">
+ jQuery().ready(function(){
+ jQuery('textarea').css('overflow-y', 'hidden');
+ // Auto size and auto grow for all text area
+ jQuery('textarea').autogrow();
+ });
+</script>
+{/literal}
diff --git a/template/yoga/picture.tpl b/template/yoga/picture.tpl
index a2579355c..6b5468fff 100644
--- a/template/yoga/picture.tpl
+++ b/template/yoga/picture.tpl
@@ -1,4 +1,10 @@
{* $Id$ *}
+
+{* Example of resizeable *}
+{*
+{include file='include/autosize.inc.tpl'}
+*}
+
{if isset($errors)}
<div class="errors">
<ul>
diff --git a/template/yoga/upload.tpl b/template/yoga/upload.tpl
index 11f7eb97b..4d2ac9d02 100644
--- a/template/yoga/upload.tpl
+++ b/template/yoga/upload.tpl
@@ -1,5 +1,10 @@
{* $Id$ *}
+{* Example of resizeable *}
+{*
+{include file='include/autosize.inc.tpl'}
+*}
+
<div id="content" class="content">
<div class="titrePage">