diff --git a/browser/form_macros.pt b/browser/form_macros.pt
index 4b9cdd0..0df5ba3 100644
--- a/browser/form_macros.pt
+++ b/browser/form_macros.pt
@@ -170,9 +170,9 @@
-
-
|
diff --git a/browser/loops.css b/browser/loops.css
index aae7154..ab87b8f 100644
--- a/browser/loops.css
+++ b/browser/loops.css
@@ -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 {
diff --git a/browser/node.py b/browser/node.py
index 5bb4fcb..96cd7ae 100644
--- a/browser/node.py
+++ b/browser/node.py
@@ -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'])
diff --git a/browser/resource.py b/browser/resource.py
index 9548777..9b0cfcc 100644
--- a/browser/resource.py
+++ b/browser/resource.py
@@ -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'%s
' % html_quote(text)
source = zapi.createObject(typeKey, text)
diff --git a/browser/util.py b/browser/util.py
index ef3e873..129ca60 100644
--- a/browser/util.py
+++ b/browser/util.py
@@ -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