mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-12 09:13:14 +00:00
ensuring autosize fires. styling field
This commit is contained in:
parent
27c605c00f
commit
2d38f23fb0
2 changed files with 5 additions and 3 deletions
|
|
@ -267,7 +267,8 @@
|
|||
}
|
||||
|
||||
.struct-block .widget-text_input > label,
|
||||
.struct-block .widget-textarea > label{
|
||||
.struct-block .widget-textarea > label,
|
||||
.struct-block .widget-admin_auto_height_text_input > label{
|
||||
display:none;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,14 +17,15 @@ from taggit.forms import TagWidget
|
|||
|
||||
class AdminAutoHeightTextInput(WidgetWithScript, widgets.Textarea):
|
||||
def __init__(self, attrs=None):
|
||||
# Use slightly better defaults than HTML's 20x2 box
|
||||
# Use more appropriate rows default, given autoheight will alter this anyway
|
||||
default_attrs = {'rows': '1'}
|
||||
if attrs:
|
||||
default_attrs.update(attrs)
|
||||
|
||||
super(AdminAutoHeightTextInput, self).__init__(default_attrs)
|
||||
|
||||
def render_js_init(self, id_, name, value):
|
||||
return '$("#{0}").autosize();'.format(json.dumps(id_))
|
||||
return '$("#{0}").autosize();'.format(id_)
|
||||
|
||||
class AdminDateInput(WidgetWithScript, widgets.DateInput):
|
||||
def render_js_init(self, id_, name, value):
|
||||
|
|
|
|||
Loading…
Reference in a new issue