X-Git-Url: https://scm.cri.ensmp.fr/git/MosaicDocument.git/blobdiff_plain/155c6ba3d7e8e9693d30b3cf70f591f0153610b6:/SpacerSlot.py..99b3ba92670e19c1f86f5de83b8e6bbe4fdc297f:/Products/MosaicDocument/static/git-favicon.png diff --git a/SpacerSlot.py b/SpacerSlot.py deleted file mode 100755 index e8daf01..0000000 --- a/SpacerSlot.py +++ /dev/null @@ -1,67 +0,0 @@ -# -*- coding: utf-8 -*- -# (c) 2003 Centre de Recherche en Informatique ENSMP Fontainebleau -# (c) 2003 Benoît PIN -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as published -# by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. -# - - -from Globals import InitializeClass -from Products.CMFCore.permissions import View, ModifyPortalContent -from BaseSlot import BaseSlot -from OFS.SimpleItem import SimpleItem - -factory_type_information = ( {'id' : 'Spacer Slot', - 'meta_type' : 'Spacer Slot', - 'description' : "Spacer Slot for Mosaic Document", - 'icon' : 'mosaic_tool/spacer_icon.gif', - 'product' : 'MosaicDocument', - 'factory' : 'addSpacerSlot', - 'immediate_view' : 'view', - 'actions' : - ({'id' : 'view', - 'name' : 'View', - 'action' : 'slot_spacer_view', - 'permissions' : (View, ) - }, - - {'id' : 'edit', - 'name' : 'Edit', - 'action' : 'slot_spacer_form', - 'permissions' : (ModifyPortalContent, ) - }, - ) - }, - ) - - -class SpacerSlot(BaseSlot, SimpleItem) : - """Spacer Slot""" - meta_type = 'Spacer Slot' - - _editableFields = ('nbOfSpaces',) - _indexableFields = () - - def __init__(self, id, nbOfSpaces = 3) : - self.id = id - self.nbOfSpaces = nbOfSpaces - -InitializeClass(SpacerSlot) - -def addSpacerSlot(dispatcher, id, nbOfSpaces = 3) : - """Add a new SpacerSlot object""" - - o = SpacerSlot(id, nbOfSpaces) - dispatcher.Destination()._setObject(id, o)