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"
|
<div dojoType="dijit.Editor"
|
||||||
extraPlugins="['insertHorizontalRule', 'createLink', 'viewsource']"
|
extraPlugins="['insertHorizontalRule', 'createLink', 'viewsource']"
|
||||||
tal:define="width field/width|nothing;
|
tal:define="width field/width|nothing;
|
||||||
height field/height|python:3"
|
height field/height|python:10"
|
||||||
tal:attributes="name name; id name;
|
tal:attributes="name name; id name;
|
||||||
rows python:height or 3;
|
height python:
|
||||||
|
'%spx' % (height and str(height * 15) or '150');
|
||||||
style python:
|
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:">
|
tal:content="structure data/?name|string:">
|
||||||
</div>
|
</div>
|
||||||
</metal:html>
|
</metal:html>
|
||||||
|
|
|
@ -34,6 +34,6 @@ class BlogPostSchemaFactory(SchemaFactory):
|
||||||
|
|
||||||
def __call__(self, interface, **kw):
|
def __call__(self, interface, **kw):
|
||||||
schema = super(BlogPostSchemaFactory, self).__call__(interface, **kw)
|
schema = super(BlogPostSchemaFactory, self).__call__(interface, **kw)
|
||||||
schema.fields.text.height = 10
|
schema.fields.text.height = 15
|
||||||
return schema
|
return schema
|
||||||
|
|
||||||
|
|
|
@ -201,7 +201,8 @@ class IAgendaItem(ILoopsAdapter):
|
||||||
missing_value=u'',
|
missing_value=u'',
|
||||||
required=False)
|
required=False)
|
||||||
|
|
||||||
description.height = discussion.height = consequences.height = 5
|
description.height = 10
|
||||||
|
discussion.height = consequences.height = 7
|
||||||
|
|
||||||
|
|
||||||
# 'hasrole' predicate
|
# 'hasrole' predicate
|
||||||
|
|
|
@ -38,7 +38,7 @@ class ResourceSchemaFactory(SchemaFactory):
|
||||||
def __call__(self, interface, **kw):
|
def __call__(self, interface, **kw):
|
||||||
schema = super(ResourceSchemaFactory, self).__call__(interface, **kw)
|
schema = super(ResourceSchemaFactory, self).__call__(interface, **kw)
|
||||||
#if 'data' in schema.fields.keys():
|
#if 'data' in schema.fields.keys():
|
||||||
schema.fields.data.height = 10
|
schema.fields.data.height = 15
|
||||||
if self.context.contentType == 'text/html':
|
if self.context.contentType == 'text/html':
|
||||||
schema.fields.data.fieldType = 'html'
|
schema.fields.data.fieldType = 'html'
|
||||||
return schema
|
return schema
|
||||||
|
|
Loading…
Add table
Reference in a new issue