From hannosch at codespeak.net Sun Apr 1 19:31:57 2007 From: hannosch at codespeak.net (hannosch at codespeak.net) Date: Sun, 1 Apr 2007 19:31:57 +0200 (CEST) Subject: [kupu-checkins] r41772 - kupu/trunk/kupu/plone Message-ID: <20070401173157.7CCBB1007C@code0.codespeak.net> Author: hannosch Date: Sun Apr 1 19:31:55 2007 New Revision: 41772 Modified: kupu/trunk/kupu/plone/util.py Log: Remove print statement. Modified: kupu/trunk/kupu/plone/util.py ============================================================================== --- kupu/trunk/kupu/plone/util.py (original) +++ kupu/trunk/kupu/plone/util.py Sun Apr 1 19:31:55 2007 @@ -46,7 +46,7 @@ mod = __import__(module, globals(), locals(), [interface]) if hasattr(mod, interface): iname_mapping[id] = getattr(mod, interface) - print iname_mapping + security.declarePublic('getToolByName') def getToolByName(context, tool_name, default=None): From nouri at codespeak.net Sun Apr 1 20:27:36 2007 From: nouri at codespeak.net (nouri at codespeak.net) Date: Sun, 1 Apr 2007 20:27:36 +0200 (CEST) Subject: [kupu-checkins] r41774 - kupu/trunk/kupu/plone/profiles/default Message-ID: <20070401182736.70ED11007C@code0.codespeak.net> Author: nouri Date: Sun Apr 1 20:27:34 2007 New Revision: 41774 Modified: kupu/trunk/kupu/plone/profiles/default/skins.xml Log: Install the kupu layer after custom. Modified: kupu/trunk/kupu/plone/profiles/default/skins.xml ============================================================================== --- kupu/trunk/kupu/plone/profiles/default/skins.xml (original) +++ kupu/trunk/kupu/plone/profiles/default/skins.xml Sun Apr 1 20:27:34 2007 @@ -9,7 +9,7 @@ - + From duncan at codespeak.net Tue Apr 3 10:36:12 2007 From: duncan at codespeak.net (duncan at codespeak.net) Date: Tue, 3 Apr 2007 10:36:12 +0200 (CEST) Subject: [kupu-checkins] r41836 - in kupu/trunk/kupu: common default doc Message-ID: <20070403083612.03A5B10077@code0.codespeak.net> Author: duncan Date: Tue Apr 3 10:36:10 2007 New Revision: 41836 Modified: kupu/trunk/kupu/common/kupudrawers.js kupu/trunk/kupu/default/drawers.kupu kupu/trunk/kupu/doc/CHANGES.txt Log: Make ToC numbering optional Modified: kupu/trunk/kupu/common/kupudrawers.js ============================================================================== --- kupu/trunk/kupu/common/kupudrawers.js (original) +++ kupu/trunk/kupu/common/kupudrawers.js Tue Apr 3 10:36:10 2007 @@ -1425,6 +1425,7 @@ this.style1 = getFromSelector('kupu-bm-sel1'); this.style2 = getFromSelector('kupu-bm-sel2'); this.ostyle = getFromSelector('kupu-bm-outcls'); + this.nstyle = getFromSelector('kupu-bm-number'); this.radio1 = getFromSelector('kupu-ins-bm'); this.radio2 = getFromSelector('kupu-toc'); this.paralist = getBaseTagClass(this.element, 'div', 'kupu-bm-paras'); @@ -1532,7 +1533,7 @@ }; var li = ed.newElement('li', {'className': 'level'+level}, [ed.newElement('a', {'href': '#'+a}, - [ed.newText(number + ' ' + caption)])]); + [ed.newText((this.nstyle.checked?number + ' ':'') + caption)])]); if (level==0) { toc.appendChild(li); Modified: kupu/trunk/kupu/default/drawers.kupu ============================================================================== --- kupu/trunk/kupu/default/drawers.kupu (original) +++ kupu/trunk/kupu/default/drawers.kupu Tue Apr 3 10:36:10 2007 @@ -268,6 +268,12 @@ +
+ + +
Modified: kupu/trunk/kupu/doc/CHANGES.txt ============================================================================== --- kupu/trunk/kupu/doc/CHANGES.txt (original) +++ kupu/trunk/kupu/doc/CHANGES.txt Tue Apr 3 10:36:10 2007 @@ -2,8 +2,19 @@ Kupu changes ============ +- latest - Adjusted some more Plone tests to work on Plone 3.0. + - Kupu is automatically suppressed when the content being edited + starts with an html comment ( - + + + - + From limi at codespeak.net Tue Apr 24 02:41:12 2007 From: limi at codespeak.net (limi at codespeak.net) Date: Tue, 24 Apr 2007 02:41:12 +0200 (CEST) Subject: [kupu-checkins] r42278 - kupu/trunk/kupu/plone/kupu_plone_layer Message-ID: <20070424004112.A0B3B8099@code0.codespeak.net> Author: limi Date: Tue Apr 24 02:41:12 2007 New Revision: 42278 Modified: kupu/trunk/kupu/plone/kupu_plone_layer/emptypage.pt Log: Updating the ID to reflect the change in http://dev.plone.org/plone/ticket/6465 ? the ID on the tag in Kupu's template didn't exist prior to the 1.4 release anyway, so shouldn't cause any problems. Will need a release to go with the Plone 3.0 beta2, though - sorry about that. Trying to restore some sanity here. :) Modified: kupu/trunk/kupu/plone/kupu_plone_layer/emptypage.pt ============================================================================== --- kupu/trunk/kupu/plone/kupu_plone_layer/emptypage.pt (original) +++ kupu/trunk/kupu/plone/kupu_plone_layer/emptypage.pt Tue Apr 24 02:41:12 2007 @@ -21,7 +21,7 @@ tail python:test(folderish, '/', '');" tal:attributes="href string:${request/URL1}${tail}" /> - + This template is an empty placeholder, used for loading contents From wiggy at codespeak.net Wed Apr 25 23:18:11 2007 From: wiggy at codespeak.net (wiggy at codespeak.net) Date: Wed, 25 Apr 2007 23:18:11 +0200 (CEST) Subject: [kupu-checkins] r42337 - kupu/trunk/kupu/plone Message-ID: <20070425211811.8D23F807E@code0.codespeak.net> Author: wiggy Date: Wed Apr 25 23:18:10 2007 New Revision: 42337 Modified: kupu/trunk/kupu/plone/plonedrawers.py kupu/trunk/kupu/plone/util.py Log: Remove getUtility related code; the getToolByName deprecation has been removed from CMF 2.1 Modified: kupu/trunk/kupu/plone/plonedrawers.py ============================================================================== --- kupu/trunk/kupu/plone/plonedrawers.py (original) +++ kupu/trunk/kupu/plone/plonedrawers.py Wed Apr 25 23:18:10 2007 @@ -523,7 +523,7 @@ if allow_browse and context is not portal: parent = context.aq_parent - pt = getattr(parent.aq_base, 'portal_type', None) + pt = getattr(parent, 'portal_type', None) if pt in collection_type.portal_types: data = self.getSingleObjectInfo(parent, resource_type) data['label'] = '.. (Parent folder)' Modified: kupu/trunk/kupu/plone/util.py ============================================================================== --- kupu/trunk/kupu/plone/util.py (original) +++ kupu/trunk/kupu/plone/util.py Wed Apr 25 23:18:10 2007 @@ -13,53 +13,8 @@ # trying to get rid of some deprecation warnings in a # backwards compatible way -try: - from zope.component import getUtility - from zope.component.interfaces import ComponentLookupError - HAVE_GET_UTILITY = True -except ImportError: - HAVE_GET_UTILITY = False -from Products.CMFCore.utils import getToolByName as gtbn - -if HAVE_GET_UTILITY: - INTERFACEMAP = { - 'portal_catalog': ('Products.CMFCore.interfaces', 'ICatalogTool'), - 'portal_memberdata': ('Products.CMFCore.interfaces', 'IMemberDataTool'), - 'portal_membership': ('Products.CMFCore.interfaces', 'IMembershipTool'), - 'portal_types': ('Products.CMFCore.interfaces', 'ITypesTool'), - 'portal_url': ('Products.CMFCore.interfaces', 'IURLTool'), - 'portal_workflow': ('Products.CMFCore.interfaces', 'IWorkflowTool'), - 'plone_utils': ('Products.CMFPlone.interfaces', 'IPloneTool'), - 'portal_interface': ('Products.CMFPlone.interfaces', 'IInterfaceTool'), - 'portal_skins': ('Products.CMFPlone.interfaces', 'ISkinsContainer'), - 'content_type_registry': ('Products.CMFPlone.interfaces', 'IContentTypeRegistry'), - 'portal_quickinstaller': ('Products.CMFQuickInstallerTool.interfaces', 'IQuickInstallerTool'), - 'archetype_tool': ('Products.Archetypes.interfaces', 'IArchetypeTool'), - 'reference_catalog': ('Products.Archetypes.interfaces', 'IReferenceCatalog'), - 'uid_catalog': ('Products.Archetypes.interfaces', 'IUIDCatalog'), - 'mimetypes_registry': ('Products.MimetypesRegistry.interfaces', 'IMimetypesRegistryTool'), - 'portal_transforms': ('Products.PortalTransforms.interfaces', 'IPortalTransformsTool'), - 'kupu_library_tool': ('Products.kupu.plone.z3interfaces', 'IPloneKupuLibraryTool'), - } - iname_mapping = {} - for id, (module, interface) in INTERFACEMAP.iteritems(): - mod = __import__(module, globals(), locals(), [interface]) - if hasattr(mod, interface): - iname_mapping[id] = getattr(mod, interface) - - -security.declarePublic('getToolByName') -def getToolByName(context, tool_name, default=None): - if HAVE_GET_UTILITY: - interface = iname_mapping.get(tool_name, None) - if interface is not None: - try: - return getUtility(interface) - except ComponentLookupError: - # Behave in backward compatible way - # fall through to old implementation - pass - return gtbn(context, tool_name, default) +from Products.CMFCore.utils import getToolByName + def register_layer(self, relpath, name, out, add=True): """Register a file system directory as skin layer From limi at codespeak.net Thu Apr 26 01:23:12 2007 From: limi at codespeak.net (limi at codespeak.net) Date: Thu, 26 Apr 2007 01:23:12 +0200 (CEST) Subject: [kupu-checkins] r42342 - in kupu/trunk/kupu/plone: . kupu_plone_layer Message-ID: <20070425232312.3C450807E@code0.codespeak.net> Author: limi Date: Thu Apr 26 01:23:10 2007 New Revision: 42342 Modified: kupu/trunk/kupu/plone/exportimport.py kupu/trunk/kupu/plone/html2captioned.py kupu/trunk/kupu/plone/kupu2html.py kupu/trunk/kupu/plone/kupu_plone_layer/contentUsesKupu.py kupu/trunk/kupu/plone/kupu_plone_layer/convertContentForKupu.py kupu/trunk/kupu/plone/kupu_plone_layer/kupuUploadImage.py kupu/trunk/kupu/plone/kupu_plone_layer/kupulibraries.xml.pt kupu/trunk/kupu/plone/kupu_plone_layer/resolveuid.py kupu/trunk/kupu/plone/kupu_plone_layer/sample-kupu-customisation-policy.py kupu/trunk/kupu/plone/librarytool.py kupu/trunk/kupu/plone/plonedrawers.py kupu/trunk/kupu/plone/plonelibrarytool.py kupu/trunk/kupu/plone/util.py Log: Removing the getUtility workarounds now that it has been undeprecated in CMF. Modified: kupu/trunk/kupu/plone/exportimport.py ============================================================================== --- kupu/trunk/kupu/plone/exportimport.py (original) +++ kupu/trunk/kupu/plone/exportimport.py Thu Apr 26 01:23:10 2007 @@ -20,7 +20,7 @@ from Globals import package_home from Products.PageTemplates.PageTemplateFile import PageTemplateFile -from Products.kupu.plone.util import getToolByName +from Products.CMFCore.utils import getToolByName from Products.GenericSetup.utils import CONVERTER from Products.GenericSetup.utils import DEFAULT Modified: kupu/trunk/kupu/plone/html2captioned.py ============================================================================== --- kupu/trunk/kupu/plone/html2captioned.py (original) +++ kupu/trunk/kupu/plone/html2captioned.py Thu Apr 26 01:23:10 2007 @@ -10,7 +10,7 @@ from Products.PortalTransforms.interfaces import itransform from DocumentTemplate.DT_Util import html_quote from DocumentTemplate.DT_Var import newline_to_br -from Products.kupu.plone.util import getToolByName +from Products.CMFCore.utils import getToolByName import re from cgi import escape from urlparse import urlsplit, urljoin, urlunsplit Modified: kupu/trunk/kupu/plone/kupu2html.py ============================================================================== --- kupu/trunk/kupu/plone/kupu2html.py (original) +++ kupu/trunk/kupu/plone/kupu2html.py Thu Apr 26 01:23:10 2007 @@ -9,7 +9,7 @@ from Products.PortalTransforms.interfaces import itransform from Products.kupu.plone import html2captioned -from Products.kupu.plone.util import getToolByName +from Products.CMFCore.utils import getToolByName class KupuOutputTransform(html2captioned.HTMLToCaptioned): """Transform which adds captions to images embedded in HTML""" Modified: kupu/trunk/kupu/plone/kupu_plone_layer/contentUsesKupu.py ============================================================================== --- kupu/trunk/kupu/plone/kupu_plone_layer/contentUsesKupu.py (original) +++ kupu/trunk/kupu/plone/kupu_plone_layer/contentUsesKupu.py Thu Apr 26 01:23:10 2007 @@ -6,7 +6,7 @@ ##bind script=script ##bind subpath=traverse_subpath ##parameters=fieldname -from Products.kupu.plone.util import getToolByName +from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName tool = getToolByName(context, 'kupu_library_tool') Modified: kupu/trunk/kupu/plone/kupu_plone_layer/convertContentForKupu.py ============================================================================== --- kupu/trunk/kupu/plone/kupu_plone_layer/convertContentForKupu.py (original) +++ kupu/trunk/kupu/plone/kupu_plone_layer/convertContentForKupu.py Thu Apr 26 01:23:10 2007 @@ -6,7 +6,7 @@ ##bind script=script ##bind subpath=traverse_subpath ##parameters=fieldname, content -from Products.kupu.plone.util import getToolByName +from Products.CMFCore.utils import getToolByName from Products.PythonScripts.standard import structured_text, newline_to_br field = context.getField(fieldname) Modified: kupu/trunk/kupu/plone/kupu_plone_layer/kupuUploadImage.py ============================================================================== --- kupu/trunk/kupu/plone/kupu_plone_layer/kupuUploadImage.py (original) +++ kupu/trunk/kupu/plone/kupu_plone_layer/kupuUploadImage.py Thu Apr 26 01:23:10 2007 @@ -6,7 +6,7 @@ ##bind subpath=traverse_subpath ##parameters=node_prop_title, node_prop_desc, node_prop_image -from Products.kupu.plone.util import getToolByName +from Products.CMFCore.utils import getToolByName from Products.PythonScripts.standard import html_quote, newline_to_br request = context.REQUEST RESPONSE = request.RESPONSE Modified: kupu/trunk/kupu/plone/kupu_plone_layer/kupulibraries.xml.pt ============================================================================== --- kupu/trunk/kupu/plone/kupu_plone_layer/kupulibraries.xml.pt (original) +++ kupu/trunk/kupu/plone/kupu_plone_layer/kupulibraries.xml.pt Thu Apr 26 01:23:10 2007 @@ -10,7 +10,7 @@ > Modified: kupu/trunk/kupu/plone/kupu_plone_layer/resolveuid.py ============================================================================== --- kupu/trunk/kupu/plone/kupu_plone_layer/resolveuid.py (original) +++ kupu/trunk/kupu/plone/kupu_plone_layer/resolveuid.py Thu Apr 26 01:23:10 2007 @@ -7,7 +7,7 @@ ##bind subpath=traverse_subpath ##parameters= # (reference_url is supposed to do the same thing, but is broken) -from Products.kupu.plone.util import getToolByName +from Products.CMFCore.utils import getToolByName from Products.PythonScripts.standard import html_quote request = context.REQUEST Modified: kupu/trunk/kupu/plone/kupu_plone_layer/sample-kupu-customisation-policy.py ============================================================================== --- kupu/trunk/kupu/plone/kupu_plone_layer/sample-kupu-customisation-policy.py (original) +++ kupu/trunk/kupu/plone/kupu_plone_layer/sample-kupu-customisation-policy.py Thu Apr 26 01:23:10 2007 @@ -11,7 +11,7 @@ # Make a copy of this script called 'kupu-customisation-policy' # in any skin folder on your site and edit it to set up your own # preferred kupu configuration. -from Products.kupu.plone.util import getToolByName +from Products.CMFCore.utils import getToolByName RESOURCES = dict( linkable = ('Document', 'Image', 'File', 'News Item', 'Event', 'Folder', 'Large Plone Folder'), Modified: kupu/trunk/kupu/plone/librarytool.py ============================================================================== --- kupu/trunk/kupu/plone/librarytool.py (original) +++ kupu/trunk/kupu/plone/librarytool.py Thu Apr 26 01:23:10 2007 @@ -18,7 +18,7 @@ from Products.CMFCore.Expression import Expression, createExprContext from Products.PageTemplates.Expressions import getEngine, SecureModuleImporter from Products.kupu.plone.interfaces import IKupuLibraryTool -from Products.kupu.plone.util import getToolByName +from Products.CMFCore.utils import getToolByName class KupuError(Exception): pass NEWTYPE_IGNORE, NEWTYPE_ADD = 0, 1 Modified: kupu/trunk/kupu/plone/plonedrawers.py ============================================================================== --- kupu/trunk/kupu/plone/plonedrawers.py (original) +++ kupu/trunk/kupu/plone/plonedrawers.py Thu Apr 26 01:23:10 2007 @@ -22,7 +22,7 @@ from Products.Archetypes.interfaces.referenceable import IReferenceable from Products.PythonScripts.standard import html_quote, newline_to_br from Products.kupu.plone.librarytool import KupuError -from Products.kupu.plone.util import getToolByName +from Products.CMFCore.utils import getToolByName import html2captioned try: Modified: kupu/trunk/kupu/plone/plonelibrarytool.py ============================================================================== --- kupu/trunk/kupu/plone/plonelibrarytool.py (original) +++ kupu/trunk/kupu/plone/plonelibrarytool.py Thu Apr 26 01:23:10 2007 @@ -29,7 +29,7 @@ from Products.kupu.plone.librarytool import KupuLibraryTool from Products.kupu.plone import permissions, scanner, plonedrawers, util, helpers -from Products.kupu.plone.util import getToolByName +from Products.CMFCore.utils import getToolByName from Products.kupu import kupu_globals from Products.kupu.config import TOOLNAME, TOOLTITLE from StringIO import StringIO Modified: kupu/trunk/kupu/plone/util.py ============================================================================== --- kupu/trunk/kupu/plone/util.py (original) +++ kupu/trunk/kupu/plone/util.py Thu Apr 26 01:23:10 2007 @@ -6,16 +6,12 @@ from Products.MimetypesRegistry import MimeTypeItem from Products.kupu import kupu_globals -from AccessControl import ModuleSecurityInfo -security = ModuleSecurityInfo('Products.kupu.plone.util') - kupu_package_dir = package_home(kupu_globals) # trying to get rid of some deprecation warnings in a # backwards compatible way from Products.CMFCore.utils import getToolByName - def register_layer(self, relpath, name, out, add=True): """Register a file system directory as skin layer """ From limi at codespeak.net Thu Apr 26 01:42:49 2007 From: limi at codespeak.net (limi at codespeak.net) Date: Thu, 26 Apr 2007 01:42:49 +0200 (CEST) Subject: [kupu-checkins] r42343 - kupu/trunk/kupu/plone Message-ID: <20070425234249.C04318062@code0.codespeak.net> Author: limi Date: Thu Apr 26 01:42:49 2007 New Revision: 42343 Modified: kupu/trunk/kupu/plone/ReftextField.py Log: Forgot this one :) Modified: kupu/trunk/kupu/plone/ReftextField.py ============================================================================== --- kupu/trunk/kupu/plone/ReftextField.py (original) +++ kupu/trunk/kupu/plone/ReftextField.py Thu Apr 26 01:42:49 2007 @@ -5,7 +5,7 @@ from Products.Archetypes.ReferenceEngine import Reference from Products.Archetypes.exceptions import ReferenceException from ZPublisher.HTTPRequest import FileUpload -from Products.kupu.plone.util import getToolByName +from Products.CMFCore.utils import getToolByName import re # UID_PATTERN matches a UID in an anchor or image tag. From limi at codespeak.net Thu Apr 26 02:03:06 2007 From: limi at codespeak.net (limi at codespeak.net) Date: Thu, 26 Apr 2007 02:03:06 +0200 (CEST) Subject: [kupu-checkins] r42344 - in kupu/trunk/kupu: doc plone Message-ID: <20070426000306.ED13A807E@code0.codespeak.net> Author: limi Date: Thu Apr 26 02:03:06 2007 New Revision: 42344 Modified: kupu/trunk/kupu/doc/PLONE2.txt kupu/trunk/kupu/plone/kupu_config.pt kupu/trunk/kupu/plone/libraries.pt kupu/trunk/kupu/plone/resource_types.pt kupu/trunk/kupu/plone/zmi_docs.pt kupu/trunk/kupu/plone/zmi_toolbar.pt Log: Upgrading the configuration screens to match Plone 2.1 and up (I believe). Duncan, please help me test this on earlier versions of Plone, I don't have any Plone 2.0 or 2.1 instances handy. Modified: kupu/trunk/kupu/doc/PLONE2.txt ============================================================================== --- kupu/trunk/kupu/doc/PLONE2.txt (original) +++ kupu/trunk/kupu/doc/PLONE2.txt Thu Apr 26 02:03:06 2007 @@ -1,6 +1,6 @@ -========================= -Installing Kupu in Plone2 -========================= +======================== +Installing Kupu in Plone +======================== .. contents:: Table of Contents :depth: 2 Modified: kupu/trunk/kupu/plone/kupu_config.pt ============================================================================== --- kupu/trunk/kupu/plone/kupu_config.pt (original) +++ kupu/trunk/kupu/plone/kupu_config.pt Thu Apr 26 02:03:06 2007 @@ -1,33 +1,23 @@ - - - - - - - - - - - - - - - + + + + + + -
-
-
@@ -49,7 +39,8 @@
-

Kupu Configuration

+

Kupu Configuration

-
Modified: kupu/trunk/kupu/plone/libraries.pt ============================================================================== --- kupu/trunk/kupu/plone/libraries.pt (original) +++ kupu/trunk/kupu/plone/libraries.pt Thu Apr 26 02:03:06 2007 @@ -6,11 +6,11 @@
-

Kupu Configuration

-

Manage libraries

+

Kupu Libraries

In the below form, you may manage the list of drawer libraries for -the kupu editor. Each property of a library is dynamically expanded at +the Kupu editor. Each property of a library is dynamically expanded at execution time using TALES expressions. That way it is possible, to support libraries like Current folder or My folder very easily.

Modified: kupu/trunk/kupu/plone/resource_types.pt ============================================================================== --- kupu/trunk/kupu/plone/resource_types.pt (original) +++ kupu/trunk/kupu/plone/resource_types.pt Thu Apr 26 02:03:06 2007 @@ -6,7 +6,8 @@
-

Kupu Configuration

+

Kupu Resource Types

While libraries provide abstract locations for objects of any type, Kupu distinguishes objects by resource type. For example, a user might Modified: kupu/trunk/kupu/plone/zmi_docs.pt ============================================================================== --- kupu/trunk/kupu/plone/zmi_docs.pt (original) +++ kupu/trunk/kupu/plone/zmi_docs.pt Thu Apr 26 02:03:06 2007 @@ -3,244 +3,6 @@ metal:use-macro="here/kupu_config/macros/master" i18n:domain="plone"> - - -

-

Kupu Toolbar Configuration

+

Kupu Toolbar Configuration

Author: limi Date: Thu Apr 26 09:05:02 2007 New Revision: 42348 Modified: kupu/trunk/kupu/plone/kupu_plone_layer/kupuplone.css.dtml Log: This has now been turned off in the config, so this is no longer needed. Modified: kupu/trunk/kupu/plone/kupu_plone_layer/kupuplone.css.dtml ============================================================================== --- kupu/trunk/kupu/plone/kupu_plone_layer/kupuplone.css.dtml (original) +++ kupu/trunk/kupu/plone/kupu_plone_layer/kupuplone.css.dtml Thu Apr 26 09:05:02 2007 @@ -107,13 +107,6 @@ margin-bottom:4px; } -/* Since we define bullet styles in the CSS in Plone, the bullet selector has no meaning. - Bullet styles belong in the style sheet, not in the HTML. ;) - Remove this if you want it back. */ -#kupu-ulstyles { - display: none !important; -} - body.documentContent { padding: 1em !important; } html.kupu-html { From limi at codespeak.net Sat Apr 28 12:29:22 2007 From: limi at codespeak.net (limi at codespeak.net) Date: Sat, 28 Apr 2007 12:29:22 +0200 (CEST) Subject: [kupu-checkins] r42388 - in kupu/trunk/kupu/plone: . kupu_plone_layer kupu_references Message-ID: <20070428102922.0621F8067@code0.codespeak.net> Author: limi Date: Sat Apr 28 12:29:22 2007 New Revision: 42388 Modified: kupu/trunk/kupu/plone/body.kupu kupu/trunk/kupu/plone/kupu_config.pt kupu/trunk/kupu/plone/kupu_plone_layer/kupu_wysiwyg_support.html kupu/trunk/kupu/plone/kupu_plone_layer/kupuplone.css.dtml kupu/trunk/kupu/plone/kupu_references/referencebrowser.pt kupu/trunk/kupu/plone/wysiwyg_support.kupu kupu/trunk/kupu/plone/zmi_toolbar.pt Log: Death to tabindexes! Modified: kupu/trunk/kupu/plone/body.kupu ============================================================================== --- kupu/trunk/kupu/plone/body.kupu (original) +++ kupu/trunk/kupu/plone/body.kupu Sat Apr 28 12:29:22 2007 @@ -15,9 +15,8 @@ tal:define="base python:here.kupu_library_tool.getBaseUrl(here, True); base kupu_base_override|base;" tal:attributes="src string:${base}/emptypage; - tabindex tabindex/next|nothing; - id string:kupu-editor-iframe-${fname}; - name string:kupu-editor-iframe-${fname};" + id string:kupu-editor-iframe-${fname}; + name string:kupu-editor-iframe-${fname};" > Modified: kupu/trunk/kupu/plone/kupu_config.pt ============================================================================== --- kupu/trunk/kupu/plone/kupu_config.pt (original) +++ kupu/trunk/kupu/plone/kupu_config.pt Sat Apr 28 12:29:22 2007 @@ -285,12 +285,10 @@
Modified: kupu/trunk/kupu/plone/kupu_plone_layer/kupu_wysiwyg_support.html ============================================================================== --- kupu/trunk/kupu/plone/kupu_plone_layer/kupu_wysiwyg_support.html (original) +++ kupu/trunk/kupu/plone/kupu_plone_layer/kupu_wysiwyg_support.html Sat Apr 28 12:29:22 2007 @@ -436,18 +436,70 @@
- - + - -
-
+ @@ -466,7 +518,16 @@ - @@ -501,13 +562,31 @@ Text and type the document as you usually do.
- +
- +
- + Modified: kupu/trunk/kupu/plone/kupu_plone_layer/kupuplone.css.dtml ============================================================================== --- kupu/trunk/kupu/plone/kupu_plone_layer/kupuplone.css.dtml (original) +++ kupu/trunk/kupu/plone/kupu_plone_layer/kupuplone.css.dtml Sat Apr 28 12:29:22 2007 @@ -72,6 +72,11 @@ /* plone customizations regarding color and borders etc */ +/* hide the Plone table of contents if it is visible (inline edit) */ +dl.toc { + display: none; +} + .kupu-tb { background-color:&dtml-contentViewBackgroundColor;; padding-bottom:0px; margin:0; Modified: kupu/trunk/kupu/plone/kupu_references/referencebrowser.pt ============================================================================== --- kupu/trunk/kupu/plone/kupu_references/referencebrowser.pt (original) +++ kupu/trunk/kupu/plone/kupu_references/referencebrowser.pt Sat Apr 28 12:29:22 2007 @@ -180,7 +180,6 @@ value="" id="" tal:attributes="value obj/title_or_id; - tabindex tabindex/next; size python:test(widget.size=='', 30, widget.size); id string:${fieldName}_label" readonly="readonly" /> @@ -204,11 +203,9 @@ tal:define="targets python:[(here.reference_catalog.lookupObject(u),u) for u in uids if u]">
From duncan at codespeak.net Mon Apr 30 14:50:26 2007 From: duncan at codespeak.net (duncan at codespeak.net) Date: Mon, 30 Apr 2007 14:50:26 +0200 (CEST) Subject: [kupu-checkins] r42473 - kupu/trunk/kupu/plone/kupu_plone_layer Message-ID: <20070430125026.4E6DC8077@code0.codespeak.net> Author: duncan Date: Mon Apr 30 14:50:25 2007 New Revision: 42473 Modified: kupu/trunk/kupu/plone/kupu_plone_layer/resolveuid.py Log: Fix typo in resolveuid.py Modified: kupu/trunk/kupu/plone/kupu_plone_layer/resolveuid.py ============================================================================== --- kupu/trunk/kupu/plone/kupu_plone_layer/resolveuid.py (original) +++ kupu/trunk/kupu/plone/kupu_plone_layer/resolveuid.py Mon Apr 30 14:50:25 2007 @@ -19,7 +19,7 @@ if not obj: hook = getattr(context, 'kupu_resolveuid_hook', None) if hook: - obj = hook(uid) + obj = hook(uuid) if not obj: return context.standard_error_message(error_type=404, error_message='''The link you followed appears to be broken''') From duncan at codespeak.net Mon Apr 30 15:57:13 2007 From: duncan at codespeak.net (duncan at codespeak.net) Date: Mon, 30 Apr 2007 15:57:13 +0200 (CEST) Subject: [kupu-checkins] r42483 - kupu/branch/duncan-flash Message-ID: <20070430135713.6AB57807A@code0.codespeak.net> Author: duncan Date: Mon Apr 30 15:57:13 2007 New Revision: 42483 Added: kupu/branch/duncan-flash/ - copied from r42482, kupu/trunk/kupu/ Log: Created a branch to add Flash support From duncan at codespeak.net Mon Apr 30 16:22:35 2007 From: duncan at codespeak.net (duncan at codespeak.net) Date: Mon, 30 Apr 2007 16:22:35 +0200 (CEST) Subject: [kupu-checkins] r42487 - in kupu/branch/duncan-flash: common doc plone plone/kupu_plone_layer Message-ID: <20070430142235.935CD806B@code0.codespeak.net> Author: duncan Date: Mon Apr 30 16:22:35 2007 New Revision: 42487 Modified: kupu/branch/duncan-flash/common/kupubasetools.js kupu/branch/duncan-flash/doc/LIBRARIES.txt kupu/branch/duncan-flash/doc/PLONE2.txt kupu/branch/duncan-flash/plone/kupu_plone_layer/kupucollection.xml.pt kupu/branch/duncan-flash/plone/librarytool.py kupu/branch/duncan-flash/plone/plonedrawers.py kupu/branch/duncan-flash/plone/plonelibrarytool.py kupu/branch/duncan-flash/plone/resource_types.pt Log: Partially implemented support for Flash media. So far: allows adding a Flash content type to resource library for media (probably just ATFlashMovie since that's what I'm using) and includes a new xml tag to distinguish flash from images. To do: make xsl expose the media field to the javascript, fix up filtering to not remove the object tag. Modified: kupu/branch/duncan-flash/common/kupubasetools.js ============================================================================== --- kupu/branch/duncan-flash/common/kupubasetools.js (original) +++ kupu/branch/duncan-flash/common/kupubasetools.js Mon Apr 30 16:22:35 2007 @@ -1271,6 +1271,13 @@ return img; }; + this.createObject = function(url, type, alttext, className, width, height) { + var ed = this.editor; + var obj = ed.newElement('object', + {src:url, alt:alttext, className:className, width:width, height:height, type:type} + [ed.newElement('param', {name:'movie', value:url})]); + } + this.setImageClass = function(imgclass) { /* set the class of the selected image */ var currnode = this.editor.getSelectedNode(); Modified: kupu/branch/duncan-flash/doc/LIBRARIES.txt ============================================================================== --- kupu/branch/duncan-flash/doc/LIBRARIES.txt (original) +++ kupu/branch/duncan-flash/doc/LIBRARIES.txt Mon Apr 30 16:22:35 2007 @@ -120,7 +120,10 @@ & element label { text }? & ## Icon to use in resource pane - element icon { xsd:anyURI }?) + element icon { xsd:anyURI }? + & + ## Type of media to insert in document + element media { text }?) ## A list of collections and resources with an optional upload button at the end. collectionItems = @@ -405,13 +408,27 @@ - Go to the kupu configlet/resource types tab. Scroll to the bottom of the page. - - Under 'preview URLs' select the type 'Image' and under URL enter: + - Under 'preview URLs' select the type 'Image' and under preview enter: string:${object_url}/image_thumb - Hit the 'Save' button. +Flash support +------------- + +To support Flash you need a separate content type (such as ATFlashMovie). +1. Add this content type to the mediaobject resource type. +2. Add the type under the 'action urls' section at the bottom of the + resource types tab. Put in appropriate expressions for the urls (for + ATFlashMove the 'Normal Image' expression is: + 'string:${object_url}/download'. Select type 'flash'. + +N.B. This function is not yet fully implemented, so when you've done +that it still won't work. Watch this space... + + Futures ------- Modified: kupu/branch/duncan-flash/doc/PLONE2.txt ============================================================================== --- kupu/branch/duncan-flash/doc/PLONE2.txt (original) +++ kupu/branch/duncan-flash/doc/PLONE2.txt Mon Apr 30 16:22:35 2007 @@ -339,6 +339,15 @@ Defaults to 'image'. N.B. This is a literal string, not a tal expression. + classes + An optional list of class names to be allowed for this media + type. The class names will be applied in addition to + left/inline/right and captioned class names. + + type + This controls whether kupu inserts an img tag or an object + tag. Only images and flash objects are supported at this time. + documentation tab ================= Modified: kupu/branch/duncan-flash/plone/kupu_plone_layer/kupucollection.xml.pt ============================================================================== --- kupu/branch/duncan-flash/plone/kupu_plone_layer/kupucollection.xml.pt (original) +++ kupu/branch/duncan-flash/plone/kupu_plone_layer/kupucollection.xml.pt Mon Apr 30 16:22:35 2007 @@ -37,6 +37,9 @@ tal:content="info/url">URI icon + mime type + size Modified: kupu/branch/duncan-flash/plone/librarytool.py ============================================================================== --- kupu/branch/duncan-flash/plone/librarytool.py (original) +++ kupu/branch/duncan-flash/plone/librarytool.py Mon Apr 30 16:22:35 2007 @@ -256,12 +256,17 @@ if normal: normal = Expression(normal) scalefield = a.get('scalefield', 'image') + classes = a.get('classes', '').split('\n') + mediatype = a.get('mediatype', 'image') if not portal_type: continue action_map[portal_type] = { 'expression': Expression(preview), 'normal': normal, - 'scalefield': scalefield, } + 'scalefield': scalefield, + 'classes': classes, + 'mediatype': mediatype, + } self._preview_actions = action_map def deleteResourceTypes(self, resource_types): Modified: kupu/branch/duncan-flash/plone/plonedrawers.py ============================================================================== --- kupu/branch/duncan-flash/plone/plonedrawers.py (original) +++ kupu/branch/duncan-flash/plone/plonedrawers.py Mon Apr 30 16:22:35 2007 @@ -207,7 +207,28 @@ if type is None: return None return "%s/%s" % (self.base, type.getIcon()) - + + def media(self, portal_type): + """Get the media type to be included in the xml. + Since 'image' is the default we can omit it.""" + media = self.tool.getMediaForType(portal_type) + if media=='image': + return None + return media + + def classes(self, portal_type): + stored = self.tool.getClassesForType(portal_type) + classes = [] + for c in stored: + c = c.strip() + if not c: + continue + if '|' in c: + title, classname = c.split('|', 1) + classes.append({'title': title, 'classname': classname}) + else: + classes.append({'title': c, 'classname': c}) + return classes def sizes(self, obj): """Returns size, width, height""" @@ -312,6 +333,8 @@ normal = url sizes = self.get_image_sizes(obj, portal_type, url) + media = self.media(portal_type) + classes = self.classes(portal_type) icon = self.icon(portal_type) size, width, height = self.sizes(obj) @@ -338,6 +361,8 @@ 'height': height, 'preview': preview, 'sizes': sizes, + 'media': media, + 'classes': classes, 'title': title, 'description': description, 'linkable': linkable, @@ -389,6 +414,8 @@ normal = url sizes = self.get_image_sizes(brain, portal_type, url) + media = self.media(portal_type) + classes = self.classes(portal_type) icon = self.icon(portal_type) size, width, height = self.sizes(brain) @@ -414,6 +441,8 @@ 'height': height, 'preview': preview, 'sizes': sizes, + 'media': media, + 'classes': classes, 'title': title, 'description': description, 'linkable': linkable, Modified: kupu/branch/duncan-flash/plone/plonelibrarytool.py ============================================================================== --- kupu/branch/duncan-flash/plone/plonelibrarytool.py (original) +++ kupu/branch/duncan-flash/plone/plonelibrarytool.py Mon Apr 30 16:22:35 2007 @@ -682,6 +682,17 @@ value = action_map.get(portal_type, {}).get('scalefield', 'image') return value + security.declareProtected(permissions.ManageLibraries, "getClassesForType") + def getClassesForType(self, portal_type): + action_map = getattr(self, '_preview_actions', {}) + return action_map.get(portal_type, {}).get('classes', ()) + + security.declareProtected(permissions.ManageLibraries, "getMediaForType") + def getMediaForType(self, portal_type): + action_map = getattr(self, '_preview_actions', {}) + value = action_map.get(portal_type, {}).get('mediatype', 'image') + return value + security.declareProtected(permissions.ManageLibraries, "set_html_exclusions") def set_html_exclusions(self, exclusions): """Set the html_exclusions. Modified: kupu/branch/duncan-flash/plone/resource_types.pt ============================================================================== --- kupu/branch/duncan-flash/plone/resource_types.pt (original) +++ kupu/branch/duncan-flash/plone/resource_types.pt Mon Apr 30 16:22:35 2007 @@ -1,249 +1,285 @@ - - - -
-

Kupu Resource Types

-
-

While libraries provide abstract locations for objects of any type, -Kupu distinguishes objects by resource type. For example, a user might -request a library showing objects to link to or a library showing -objects to be inserted into a document. The abstract location -(library) might be the same, but the former library would contain -documents, the latter images.

- -

This management screen allows you to define resource types using a -list of portal types. A special resource type, collection, -identifies portal types that are to be treated as collections. -The resource type containsanchors is used to list types which -may contain HTML anchors.

- -

Also on this screen are urls -for each type which can be previewed as an image. The expression may -use object_url and portal_type, but should -not attempt to access the object directly. The resulting URL should -ideally return an image no larger than 128 pixels square.

- -
-Map resource types - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Map resource types
 
use this entry to add a new resource -
- - - Resource - -
Portal Types - -
New types - -
 
specify a resource type to be used for reference fields with an empty list of allowed types -
Default resource - -
  - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Action URLs
TypeURL
- - - - typepreview - -
Normal mage - -
fieldname - -
- - - - preview - -
Normal Image - -
fieldname - -
  - - - Preview is an expression to use for the preview image in the drawer [default is no preview]. - Normal image is an expression to use for the normal view of a mediaobject [string:$object_url]. - Fieldname is the name of the field to use for scaled variants of the mediaobject [image]. - -
- -
-
-
- +lang="en" +metal:use-macro="here/kupu_config/macros/master" +i18n:domain="kupuconfig"> + + +
+

Kupu Resource Types

+
+

While libraries provide abstract locations for objects of any type, + Kupu distinguishes objects by resource type. For example, a user might + request a library showing objects to link to or a library showing + objects to be inserted into a document. The abstract location + (library) might be the same, but the former library would contain + documents, the latter images.

+

This management screen allows you to define resource types using a + list of portal types. A special resource type, collection, + identifies portal types that are to be treated as collections. + The resource type containsanchors is used to list types which + may contain HTML anchors.

+ +

Also on this screen are urls + for each type which can be previewed as an image. The expression may + use object_url and portal_type, but should + not attempt to access the object directly. The resulting URL should + ideally return an image no larger than 128 pixels square.

+ +
+ Map resource types + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Map resource types
 
use this entry to add a new resource +
+ + + Resource + +
Portal Types + +
New types + +
 
specify a resource type to be used for reference fields with an empty list of allowed types +
Default resource + +
  + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Action URLs
TypeURL
+ + + + typepreview + +
Normal image + +
fieldname + +
classes + +
type + +
  + + +
+ Preview is an expression to use for the preview image in the drawer [default is no preview]. + Normal image is an expression to use for the normal view of a mediaobject [string:$object_url]. + Fieldname is the name of the field to use for scaled variants of the mediaobject [image]. + Classes is a list of classnames which may be selected when inserting the object as media. + Type controls whether kupu inserts an img tag or an object tag to embed flash. + +
+ +
+
+
+ - - From duncan at codespeak.net Mon Apr 30 16:35:24 2007 From: duncan at codespeak.net (duncan at codespeak.net) Date: Mon, 30 Apr 2007 16:35:24 +0200 (CEST) Subject: [kupu-checkins] r42488 - kupu/trunk/kupu/common/kupudrawers Message-ID: <20070430143524.36FBB8075@code0.codespeak.net> Author: duncan Date: Mon Apr 30 16:35:23 2007 New Revision: 42488 Modified: kupu/trunk/kupu/common/kupudrawers/drawer.xsl Log: Removed most of the illegal forms from drawer.xsl. Hopefully this will stop IE6 crashing. (Left in the image upload form as that actually gets submitted. It needs fixing also, but that will be harder). Modified: kupu/trunk/kupu/common/kupudrawers/drawer.xsl ============================================================================== --- kupu/trunk/kupu/common/kupudrawers/drawer.xsl (original) +++ kupu/trunk/kupu/common/kupudrawers/drawer.xsl Mon Apr 30 16:35:23 2007 @@ -299,25 +299,28 @@
-
+
+ if(event.keyCode==13)return false; checked - - checked - + if(event.keyCode==13)return false; + + checked + - - checked - + if(event.keyCode==13)return false; + + checked +
@@ -329,11 +332,12 @@
- - checked - - document.getElementById('image_alt_div').style.display = - this.checked?'none':''; + if(event.keyCode==13)return false; + + checked + + document.getElementById('image_alt_div').style.display = + this.checked?'none':'';
@@ -352,9 +356,10 @@
+ if(event.keyCode==13)return false;
- +
@@ -374,19 +379,25 @@ -
+
- + + if(event.keyCode==13)return false; + +
- + + if(event.keyCode==13)return false; + +
-
+
From duncan at codespeak.net Mon Apr 30 16:45:49 2007 From: duncan at codespeak.net (duncan at codespeak.net) Date: Mon, 30 Apr 2007 16:45:49 +0200 (CEST) Subject: [kupu-checkins] r42489 - kupu/trunk/kupu/plone/kupu_plone_layer Message-ID: <20070430144549.25DA38075@code0.codespeak.net> Author: duncan Date: Mon Apr 30 16:45:48 2007 New Revision: 42489 Modified: kupu/trunk/kupu/plone/kupu_plone_layer/kupu_wysiwyg_support.html Log: Built kupu template Modified: kupu/trunk/kupu/plone/kupu_plone_layer/kupu_wysiwyg_support.html ============================================================================== --- kupu/trunk/kupu/plone/kupu_plone_layer/kupu_wysiwyg_support.html (original) +++ kupu/trunk/kupu/plone/kupu_plone_layer/kupu_wysiwyg_support.html Mon Apr 30 16:45:48 2007 @@ -16,18 +16,18 @@ - - + + - + - +
@@ -436,70 +436,18 @@
- - + - -
-
- - + @@ -518,16 +466,7 @@ - @@ -562,31 +501,13 @@ Text and type the document as you usually do.
- +
- +
- + From duncan at codespeak.net Mon Apr 30 16:46:57 2007 From: duncan at codespeak.net (duncan at codespeak.net) Date: Mon, 30 Apr 2007 16:46:57 +0200 (CEST) Subject: [kupu-checkins] r42490 - kupu/tag/kupu-1.4b6 Message-ID: <20070430144657.BBBC38075@code0.codespeak.net> Author: duncan Date: Mon Apr 30 16:46:57 2007 New Revision: 42490 Added: kupu/tag/kupu-1.4b6/ - copied from r42489, kupu/trunk/kupu/ Log: Tag a new kupu beta for Plone 3 beta 2.