minor improvements on create/edit dialog
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@1628 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
31ff35de3c
commit
fa6290753c
4 changed files with 13 additions and 8 deletions
|
@ -52,10 +52,12 @@ function inlineEdit(id, saveUrl) {
|
|||
|
||||
function setConceptTypeForComboBox(typeId, cbId) {
|
||||
var t = dojo.byId(typeId).value;
|
||||
var dp = dojo.widget.manager.getWidgetById(cbId).dataProvider;
|
||||
var cb = dojo.widget.manager.getWidgetById(cbId)
|
||||
var dp = cb.dataProvider;
|
||||
var baseUrl = dp.searchUrl.split('&')[0];
|
||||
var newUrl = baseUrl + '&searchType=' + t;
|
||||
dp.searchUrl = newUrl;
|
||||
cb.setValue('');
|
||||
}
|
||||
|
||||
var dialogs = {}
|
||||
|
|
|
@ -36,7 +36,7 @@ from zope.security import canAccess, canWrite
|
|||
from zope.security.proxy import removeSecurityProxy
|
||||
|
||||
from cybertools.typology.interfaces import IType
|
||||
from loops.interfaces import IBaseResource, IDocument, IMediaAsset
|
||||
from loops.interfaces import IBaseResource, IDocument, IMediaAsset, ITextDocument
|
||||
from loops.browser.common import EditForm, BaseView, Action
|
||||
from loops.browser.concept import ConceptRelationView, ConceptConfigureView
|
||||
from loops.browser.node import NodeView, node_macros
|
||||
|
@ -113,8 +113,10 @@ class ResourceView(BaseView):
|
|||
if viewName:
|
||||
return component.queryMultiAdapter((context, self.request),
|
||||
name=viewName)
|
||||
if context.contentType.startswith('text/'):
|
||||
# TODO: This should be controlled by resourceType
|
||||
ct = context.contentType
|
||||
#if ct.startswith('text/') and ct != 'text/rtf':
|
||||
ti = IType(context).typeInterface
|
||||
if not ti or issubclass(ti, ITextDocument):
|
||||
return DocumentView(context, self.request)
|
||||
return self
|
||||
|
||||
|
|
|
@ -22,10 +22,11 @@
|
|||
|
||||
<metal:block define-macro="render_note">
|
||||
<metal:render use-macro="item/template/macros/render" />
|
||||
<div class="content-1" id="1.link">
|
||||
<div class="content-1" id="1.link"
|
||||
tal:define="linkUrl item/linkUrl">
|
||||
<a href="."
|
||||
tal:attributes="href item/linkUrl"
|
||||
tal:condition="item/linkUrl">more...</a>
|
||||
tal:attributes="href linkUrl"
|
||||
tal:condition="python: linkUrl and linkUrl != 'http://'">more...</a>
|
||||
</div>
|
||||
</metal:block>
|
||||
|
||||
|
|
|
@ -619,7 +619,7 @@ class INote(ITextDocument):
|
|||
linkUrl = schema.TextLine(
|
||||
title=_(u'Link URL'),
|
||||
description=_(u'An (optional) link associated with this note'),
|
||||
default=u'',
|
||||
default=u'http://',
|
||||
required=False)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue