commit 847ec2ce3b298b823c5cbe22b226c9a94021c8b9
parent b2c502d350e39e160ad7d43cd852b0ffff3dc71a
Author: Jan Dankert <devnull@localhost>
Date: Sun, 28 Oct 2012 23:03:11 +0100
Textareas automatisch in der Höhe anpassen.
Diffstat:
4 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/themes/default/css/openrat.css.php b/themes/default/css/openrat.css.php
@@ -524,7 +524,6 @@ textarea.longtext
font-family:Arial;
font-size:13px;
width:100%;
- height:300px;
border:1px solid <?php echo $_GET['text_color']; ?>;
}
@@ -626,7 +625,6 @@ table.calendar td
textarea.editor
{
width:100%;
- height:400px;
}
label,
diff --git a/themes/default/include/html/inputarea.inc.php b/themes/default/include/html/inputarea.inc.php
@@ -1 +1 @@
-<div class="inputholder"><textarea class="<?php echo $attr_class ?>" name="<?php echo $attr_name ?>" rows="<?php echo $attr_rows ?>" cols="<?php echo $attr_cols ?>"><?php echo htmlentities(isset($$attr_name)?$$attr_name:$attr_default) ?></textarea></div>
-\ No newline at end of file
+<div class="inputholder"><textarea class="<?php echo $attr_class ?>" name="<?php echo $attr_name ?>" ><?php echo htmlentities(isset($$attr_name)?$$attr_name:$attr_default) ?></textarea></div>
+\ No newline at end of file
diff --git a/themes/default/js/openrat.js b/themes/default/js/openrat.js
@@ -430,6 +430,8 @@ function registerViewEvents( viewEl )
$(viewEl).find('tr.headline > td > input.checkbox').click( function() {
$(this).closest('table').find('tr.data > td > input.checkbox').attr('checked',Boolean( $(this).attr('checked') ) );
});
+
+ $(viewEl).find('textarea').orAutoheight();
}
diff --git a/themes/default/layout/index.php b/themes/default/layout/index.php
@@ -41,6 +41,7 @@
<script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/plugin/jquery-plugin-orLinkify.js"></script>
<script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/plugin/jquery-plugin-orTree.js"></script>
<script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/plugin/jquery-plugin-orLoadView.js"></script>
+ <script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/plugin/jquery-plugin-orAutoheight.js"></script>
<!--
<script src="<?php echo OR_THEMES_EXT_DIR ?>../editor/wymeditor/wymeditor/jquery.wymeditor.min.js"></script>
-->