From 0061728aa1b822c1f07f97f8fc83daf4ecedd202 Mon Sep 17 00:00:00 2001
From: vitalets <noginsk@rambler.ru>
Date: Fri, 11 Jan 2013 18:28:10 +0400
Subject: [PATCH] remove rows option from wysihtml, use css instead
---
src/editable-form/editable-form.css | 3 ++-
src/inputs-ext/wysihtml5/wysihtml5.js | 18 ++++--------------
2 files changed, 6 insertions(+), 15 deletions(-)
diff --git a/src/editable-form/editable-form.css b/src/editable-form/editable-form.css
index 6406314..be98f1f 100644
--- a/src/editable-form/editable-form.css
+++ b/src/editable-form/editable-form.css
@@ -85,7 +85,8 @@
/* set exact width of textarea to fit buttons toolbar */
.editable-wysihtml5 {
- width: 566px;
+ width: 566px;
+ height: 250px;
}
/* clear button shown as link in date inputs */
diff --git a/src/inputs-ext/wysihtml5/wysihtml5.js b/src/inputs-ext/wysihtml5/wysihtml5.js
index 1c0f598..9ec40f1 100644
--- a/src/inputs-ext/wysihtml5/wysihtml5.js
+++ b/src/inputs-ext/wysihtml5/wysihtml5.js
@@ -42,15 +42,13 @@ $(function(){
this.$input.attr('id', 'textarea_'+(new Date()).getTime());
this.setClass();
- this.setAttr('rows');
this.setAttr('placeholder');
-
//resolve deffered when widget loaded
$.extend(this.options.wysihtml5, {
events: {
load: function() {
- deferred.resolve();
+ deferred.resolve();
}
}
});
@@ -90,12 +88,12 @@ $(function(){
@property tpl
@default <textarea></textarea>
**/
- tpl:'<textarea class="editable-wysihtml5"></textarea>',
+ tpl:'<textarea></textarea>',
/**
@property inputclass
- @default null
+ @default editable-wysihtml5
**/
- inputclass: null,
+ inputclass: 'editable-wysihtml5',
/**
Placeholder attribute of input. Shown when input is empty.
@@ -105,14 +103,6 @@ $(function(){
**/
placeholder: null,
/**
- Number of rows in textarea
-
- @property rows
- @type integer
- @default 10
- **/
- rows: 10,
- /**
Wysihtml5 default options.
See https://github.com/jhollingworth/bootstrap-wysihtml5#options