some CSS improvements and other fixes
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@1408 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
3c158f2f93
commit
7eb49d2513
5 changed files with 23 additions and 6 deletions
|
@ -170,9 +170,9 @@
|
|||
<tr metal:define-macro="buttons">
|
||||
<td colspan="5"
|
||||
tal:define="dlgName view/dialog_name">
|
||||
<input type="button" value="Cancel" onClick="dlg.hide();"
|
||||
<input type="submit" value="Save" onClick="dlg.hide()" class="submit"
|
||||
tal:attributes="onClick string:dialogs['$dlgName'].hide()">
|
||||
<input type="submit" value="Save" onClick="dlg.hide()"
|
||||
<input type="button" value="Cancel" onClick="dlg.hide();"
|
||||
tal:attributes="onClick string:dialogs['$dlgName'].hide()">
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -5,6 +5,16 @@
|
|||
|
||||
*/
|
||||
|
||||
a:hover {
|
||||
background-color: #f0f0ff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
pre {
|
||||
overflow: scroll;
|
||||
max-height: 35em;
|
||||
}
|
||||
|
||||
.box {
|
||||
margin: 12px;
|
||||
}
|
||||
|
@ -74,6 +84,7 @@ div.image {
|
|||
margin-right: 5px;
|
||||
}
|
||||
|
||||
|
||||
/* search stuff */
|
||||
|
||||
.searchForm input.button, input.submit {
|
||||
|
|
|
@ -68,8 +68,8 @@ class NodeView(BaseView):
|
|||
|
||||
def setupController(self):
|
||||
cm = self.controller.macros
|
||||
cm.register('css', identifier='loops.css',
|
||||
resourceName='loops.css', media='all')
|
||||
cm.register('css', identifier='loops.css', resourceName='loops.css',
|
||||
media='all', position=3)
|
||||
cm.register('js', 'loops.js', resourceName='loops.js')
|
||||
cm.register('portlet_left', 'navigation', title='Navigation',
|
||||
subMacro=self.template.macros['menu'])
|
||||
|
|
|
@ -34,7 +34,6 @@ from zope.formlib.interfaces import DISPLAY_UNWRITEABLE
|
|||
from zope.proxy import removeAllProxies
|
||||
from zope.security import canAccess, canWrite
|
||||
from zope.security.proxy import removeSecurityProxy
|
||||
from zope.documenttemplate.dt_util import html_quote
|
||||
|
||||
from cybertools.typology.interfaces import IType
|
||||
from loops.interfaces import IBaseResource, IDocument, IMediaAsset
|
||||
|
@ -42,6 +41,7 @@ from loops.browser.common import EditForm, BaseView
|
|||
from loops.browser.concept import ConceptRelationView, ConceptConfigureView
|
||||
from loops.browser.node import NodeView
|
||||
from loops.interfaces import ITypeConcept
|
||||
from loops.browser.util import html_quote
|
||||
|
||||
renderingFactories = {
|
||||
'text/plain': 'zope.source.plaintext',
|
||||
|
@ -210,7 +210,7 @@ class DocumentView(ResourceView):
|
|||
contentType = self.context.contentType
|
||||
typeKey = renderingFactories.get(contentType, None)
|
||||
if typeKey is None:
|
||||
if contentType == 'text/html':
|
||||
if contentType == u'text/html':
|
||||
return text
|
||||
return u'<pre>%s</pre>' % html_quote(text)
|
||||
source = zapi.createObject(typeKey, text)
|
||||
|
|
|
@ -58,3 +58,9 @@ class LoopsMenu(BrowserMenu):
|
|||
getMenu(item.submenuId, object, request)) or None}
|
||||
for order, action, item in result]
|
||||
|
||||
|
||||
def html_quote(text, character_entities=((u'&', u'&'), (u'<', u'<' ),
|
||||
(u'>', u'>' ), (u'"', u'"'))):
|
||||
for re, name in character_entities:
|
||||
text = text.replace(re, name)
|
||||
return text
|
||||
|
|
Loading…
Add table
Reference in a new issue