make height for dojo (HTML) editor fields configurable
This commit is contained in:
parent
380aba02ed
commit
368fdc214f
4 changed files with 8 additions and 6 deletions
|
@ -326,11 +326,12 @@
|
|||
<div dojoType="dijit.Editor"
|
||||
extraPlugins="['insertHorizontalRule', 'createLink', 'viewsource']"
|
||||
tal:define="width field/width|nothing;
|
||||
height field/height|python:3"
|
||||
height field/height|python:10"
|
||||
tal:attributes="name name; id name;
|
||||
rows python:height or 3;
|
||||
height python:
|
||||
'%spx' % (height and str(height * 15) or '150');
|
||||
style python:
|
||||
'width: %s' % (width and str(width)+'px' or '600px');"
|
||||
'width: %spx' % (width and str(width) or '600');"
|
||||
tal:content="structure data/?name|string:">
|
||||
</div>
|
||||
</metal:html>
|
||||
|
|
|
@ -34,6 +34,6 @@ class BlogPostSchemaFactory(SchemaFactory):
|
|||
|
||||
def __call__(self, interface, **kw):
|
||||
schema = super(BlogPostSchemaFactory, self).__call__(interface, **kw)
|
||||
schema.fields.text.height = 10
|
||||
schema.fields.text.height = 15
|
||||
return schema
|
||||
|
||||
|
|
|
@ -201,7 +201,8 @@ class IAgendaItem(ILoopsAdapter):
|
|||
missing_value=u'',
|
||||
required=False)
|
||||
|
||||
description.height = discussion.height = consequences.height = 5
|
||||
description.height = 10
|
||||
discussion.height = consequences.height = 7
|
||||
|
||||
|
||||
# 'hasrole' predicate
|
||||
|
|
|
@ -38,7 +38,7 @@ class ResourceSchemaFactory(SchemaFactory):
|
|||
def __call__(self, interface, **kw):
|
||||
schema = super(ResourceSchemaFactory, self).__call__(interface, **kw)
|
||||
#if 'data' in schema.fields.keys():
|
||||
schema.fields.data.height = 10
|
||||
schema.fields.data.height = 15
|
||||
if self.context.contentType == 'text/html':
|
||||
schema.fields.data.fieldType = 'html'
|
||||
return schema
|
||||
|
|
Loading…
Add table
Reference in a new issue