[Checkins] SVN: Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/ - some cleanup (svn properties, headers, whitespace)
Yvo Schubbe
y.2010 at wcm-solutions.de
Fri Jul 2 03:10:49 EDT 2010
Log message for revision 114088:
- some cleanup (svn properties, headers, whitespace)
Changed:
UU Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/__init__.py
UU Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/configure.zcml
UU Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/icons.py
UU Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/icons.txt
_U Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/tests/__init__.py
UU Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/tests/test_icons.py
UU Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/tests/test_ursa.py
UU Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/ursa.py
-=-
Modified: Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/__init__.py
===================================================================
--- Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/__init__.py 2010-07-02 07:07:34 UTC (rev 114087)
+++ Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/__init__.py 2010-07-02 07:10:49 UTC (rev 114088)
@@ -11,6 +11,4 @@
#
##############################################################################
"""CMFDefault skins views.
-
-$Id$
"""
Property changes on: Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/__init__.py
___________________________________________________________________
Deleted: svn:keywords
- Id
Modified: Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/configure.zcml
===================================================================
--- Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/configure.zcml 2010-07-02 07:07:34 UTC (rev 114087)
+++ Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/configure.zcml 2010-07-02 07:10:49 UTC (rev 114088)
@@ -1,14 +1,14 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser">
-
+
<browser:page
for="*"
name="ursine_globals"
class=".ursa.UrsineGlobals"
permission="zope.Public"
/>
-
+
<browser:page
for="*"
layer="Products.CMFDefault.interfaces.ICMFDefaultSkin"
Property changes on: Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/configure.zcml
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/icons.py
===================================================================
--- Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/icons.py 2010-07-02 07:07:34 UTC (rev 114087)
+++ Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/icons.py 2010-07-02 07:10:49 UTC (rev 114088)
@@ -1,6 +1,18 @@
-"""CSS for action icons
-$Id$
+##############################################################################
+#
+# Copyright (c) 2010 Zope Foundation and Contributors.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""CSS for action icons.
"""
+
from logging import getLogger
LOG = getLogger("Action Icons CSS")
@@ -20,10 +32,10 @@
CSS that dynamically checks whether Action Icons are can be used.
Type Icons can always be used.
"""
-
+
default_style = ".%s {/* %s */}"
icon_style = ".%s {background: url(%s) no-repeat 0.1em}"
-
+
def __init__(self, context, request):
super(View, self).__init__(context, request)
self.show_icons = self._show_icons
Property changes on: Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/icons.py
___________________________________________________________________
Deleted: svn:keywords
- Id
Modified: Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/icons.txt
===================================================================
--- Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/icons.txt 2010-07-02 07:07:34 UTC (rev 114087)
+++ Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/icons.txt 2010-07-02 07:10:49 UTC (rev 114088)
@@ -7,11 +7,11 @@
=====================
* icon discovery independent of user status
-
+
* local serialisation of the two sets using either an adapter or, preferably a local utility
-
+
* sprites
-
+
Independent icon discovery
==========================
An adapter for ActionsTool to provide listUnfilteredActions()
@@ -27,4 +27,4 @@
Integration
============
-The icons.css is currently only used by main_template to render user actions. It is difficult to add support for it elsewhere such as folder views without adding Zope 3 style skins.
\ No newline at end of file
+The icons.css is currently only used by main_template to render user actions. It is difficult to add support for it elsewhere such as folder views without adding Zope 3 style skins.
Property changes on: Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/icons.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/tests/__init__.py
___________________________________________________________________
Deleted: svn:keywords
- Id
Modified: Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/tests/test_icons.py
===================================================================
--- Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/tests/test_icons.py 2010-07-02 07:07:34 UTC (rev 114087)
+++ Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/tests/test_icons.py 2010-07-02 07:10:49 UTC (rev 114088)
@@ -1,5 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2010 Zope Foundation and Contributors.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
"""
-$Id$
"""
import unittest
@@ -11,13 +22,13 @@
)
class AbsolutIconsTests(unittest.TestCase, PlacelessSetup):
-
+
def setUp(self):
PlacelessSetup.setUp(self)
def tearDown(self):
PlacelessSetup.tearDown(self)
-
+
def _getTargetClass(self):
from Products.CMFDefault.browser.skins.icons import View
return View
@@ -48,7 +59,7 @@
#Show action icons not set
view = self._makeOne()
self.failIf(view._show_icons)
-
+
def test_show_icons_enabled(self):
#Show actions set to True
site = self._makeSite()
@@ -62,19 +73,19 @@
site.portal_properties.enable_actionicons = False
view = self._makeOne(site)
self.failIf(view._show_icons)
-
+
def test_type_icons_with_action_icons_disabled(self):
#Type actions should always be visible
types = [DummyType("Document"), DummyType("Image")]
site = self._makeSite(types=types)
view = self._makeOne(site)
self.failIf(view.show_icons)
-
+
css = view.types()
self.assertEqual(css,""".Document {background: url(http://example.com/Document.png) no-repeat 0.1em}
.Image {background: url(http://example.com/Image.png) no-repeat 0.1em}""")
-
+
def test_type_icons_with_action_icons_enabled(self):
#Type actions should always be visible"""
types = [DummyType("Document"), DummyType("Image")]
@@ -82,18 +93,18 @@
site.portal_properties.enable_actionicons = True
view = self._makeOne(site)
self.failUnless(view.show_icons)
-
+
css = view.types()
self.assertEqual(css,""".Document {background: url(http://example.com/Document.png) no-repeat 0.1em}
.Image {background: url(http://example.com/Image.png) no-repeat 0.1em}""")
-
+
def test_action_icons_with_action_icons_disabled(self):
#Action icons disabled. Image less styles should be returned.
site = self._makeSite(actions=ACTIONS)
view = self._makeOne(site)
self.failIf(view.show_icons)
-
+
css = view.actions()
self.assertEqual(css, """/* user actions */
@@ -116,14 +127,14 @@
/* global actions */
.Undo {/* Undo.png */}""")
-
+
def test_action_icons_with_action_icons_enabled(self):
#Action icons enabled. Styles with images should be returned.
site = self._makeSite(actions=ACTIONS)
site.portal_properties.enable_actionicons = True
view = self._makeOne(site)
self.failUnless(view.show_icons)
-
+
css = view.actions()
self.assertEqual(css, """/* user actions */
@@ -146,33 +157,33 @@
/* global actions */
.Undo {background: url(Undo.png) no-repeat 0.1em}""")
-
+
class DummyType:
-
+
def __init__(self, id):
from Products.CMFCore.Expression import Expression
self.id = id
self.icon_expr_object = Expression('string:${portal_url}/%s.png' % id)
-
+
def getIconExprObject(self):
return getattr(self, 'icon_expr_object', None)
-
+
class DummyTypesTool:
-
+
def __init__(self, types=None):
if types is None:
self.typeInfos = []
else:
self.typeInfos = types[:]
-
+
def listTypeInfo(self):
return self.typeInfos
def DummyAction(name):
-
+
return {'id':name, 'icon':'%s.png' % name}
@@ -183,9 +194,8 @@
'workflow': [DummyAction('Publish')],
}
+
class DummyMembershipTool:
-
+
def isAnonymousUser(self):
return True
-
-
\ No newline at end of file
Property changes on: Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/tests/test_icons.py
___________________________________________________________________
Deleted: svn:keywords
- Id
Modified: Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/tests/test_ursa.py
===================================================================
--- Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/tests/test_ursa.py 2010-07-02 07:07:34 UTC (rev 114087)
+++ Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/tests/test_ursa.py 2010-07-02 07:10:49 UTC (rev 114088)
@@ -11,12 +11,12 @@
#
##############################################################################
""" Test Products.CMFDefault.browser.ursa
+"""
-$Id$
-"""
import unittest
from zope.component.testing import PlacelessSetup
+
class UrsineGlobalsTests(unittest.TestCase, PlacelessSetup):
def setUp(self):
Property changes on: Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/tests/test_ursa.py
___________________________________________________________________
Deleted: svn:keywords
- Id
Modified: Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/ursa.py
===================================================================
--- Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/ursa.py 2010-07-02 07:07:34 UTC (rev 114087)
+++ Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/ursa.py 2010-07-02 07:10:49 UTC (rev 114088)
@@ -1,3 +1,18 @@
+##############################################################################
+#
+# Copyright (c) 2008 Zope Foundation and Contributors.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""
+"""
+
from Products.CMFDefault.utils import Message as _
from Products.CMFDefault.utils import decode
from Products.CMFDefault.browser.utils import ViewBase
@@ -158,37 +173,37 @@
if message is not None:
message = decode(message, self.context)
return message
-
+
@property
@memoize
def actions(self):
return self.atool.listFilteredActionsFor(self.context)
-
+
@property
@memoize
def user_actions(self):
return self.actions['user']
-
+
@property
@memoize
def object_actions(self):
return self.actions['object']
-
+
@property
@memoize
def workflow_actions(self):
return self.actions['workflow']
-
+
@property
@memoize
def folder_actions(self):
return self.actions['folder']
-
+
@property
@memoize
def global_actions(self):
return self.actions['global']
-
+
@property
@memoize
def add_actions(self):
Property changes on: Products.CMFDefault/trunk/Products/CMFDefault/browser/skins/ursa.py
___________________________________________________________________
Deleted: svn:keywords
- Id
More information about the checkins
mailing list