Exemple #1
0
import os, sys

import Preferences, Utils, Plugins

if not Plugins.transportInstalled('ZopeLib.ZopeExplorer'):
    raise Plugins.SkipPlugin, 'Zope support is not enabled'

#---Model-----------------------------------------------------------------------

# Define new zope image and a Model for opening in the Editor
from ZopeLib.ZopeEditorModels import addZOAImage, ZOAIcons, ZopeDocumentModel, ZopeController
import Models
from Models import Controllers, EditorHelper
from Models.HTMLSupport import HTMLFileModel, HTMLFileController, HTMLFileView

addZOAImage('Page Template', 'Images/ZOA/ZopePageTemplate.png')
addZOAImage('Filesystem Page Template', 'Images/ZOA/ZopePageTemplate.png')


class ZopePageTemplateModel(ZopeDocumentModel):
    imgIdx = ZOAIcons['Page Template']


EditorHelper.imgZopePTFSModel = EditorHelper.imgIdxRange()


class ZopePageTemplateFSModel(HTMLFileModel):
    modelIdentifier = 'PageTemplateHTML'
    defaultName = 'pagetemplate'
    bitmap = 'ZopePageTemplate_s.png'
    imgIdx = EditorHelper.imgZopePTFSModel
import os, sys

import Preferences, Utils, Plugins

if not Plugins.transportInstalled('ZopeLib.ZopeExplorer'):
    raise Plugins.SkipPlugin, 'Zope support is not enabled'

#---Model-----------------------------------------------------------------------

# Define new zope image and a Model for opening in the Editor
from ZopeLib.ZopeEditorModels import addZOAImage, ZOAIcons, ZopeDocumentModel, ZopeController
import Models
from Models import Controllers, EditorHelper
from Models.HTMLSupport import HTMLFileModel, HTMLFileController, HTMLFileView

addZOAImage('Page Template', 'Images/ZOA/ZopePageTemplate.png')
addZOAImage('Filesystem Page Template', 'Images/ZOA/ZopePageTemplate.png')

class ZopePageTemplateModel(ZopeDocumentModel):
    imgIdx = ZOAIcons['Page Template']

EditorHelper.imgZopePTFSModel = EditorHelper.imgIdxRange()

class ZopePageTemplateFSModel(HTMLFileModel):
    modelIdentifier = 'PageTemplateHTML'
    defaultName = 'pagetemplate'
    bitmap = 'ZopePageTemplate_s.png'
    imgIdx = EditorHelper.imgZopePTFSModel
    ext = '.pt'

EditorHelper.modelReg[ZopePageTemplateFSModel.modelIdentifier] = ZopePageTemplateFSModel
import os, sys, string

import Preferences, Utils, Plugins

if not Plugins.transportInstalled('ZopeLib.ZopeExplorer'):
    raise Plugins.SkipPlugin, 'Zope support is not enabled'

#---Model-----------------------------------------------------------------------

# Define new zope image and a Model for opening in the Editor
from ZopeLib.ZopeEditorModels import addZOAImage, ZOAIcons, ZopeBlankEditorModel, ZopeController

addZOAImage('Formulator Form', 'Images/ZOA/FormulatorForm.png')

field_meta_types = ['FileField', 'MultiCheckBoxField', 'LinesField',
      'ListField', 'TextAreaField', 'MultiListField', 'EmailField',
      'CheckBoxField', 'PasswordField', 'FloatField', 'PatternField',
      'LinkField', 'StringField', 'RawTextAreaField', 'IntegerField',
      'RadioField', 'DateTimeField']
for field in field_meta_types:
    addZOAImage(field, 'Images/ZOA/FormulatorField.png')

class FormulatorFormModel(ZopeBlankEditorModel):
    imgIdx = ZOAIcons['Formulator Form']

#---Controller------------------------------------------------------------------

# Connect controller to the model
from Models import Controllers

Controllers.modelControllerReg[FormulatorFormModel] = ZopeController
Exemple #4
0
import os, sys, string

import Preferences, Utils, Plugins

if not Plugins.transportInstalled('ZopeLib.ZopeExplorer'):
    raise Plugins.SkipPlugin, 'Zope support is not enabled'

#---Model-----------------------------------------------------------------------

# Define new zope image and a Model for opening in the Editor
from ZopeLib.ZopeEditorModels import addZOAImage, ZOAIcons, ZopeBlankEditorModel, ZopeController

addZOAImage('Formulator Form', 'Images/ZOA/FormulatorForm.png')

field_meta_types = [
    'FileField', 'MultiCheckBoxField', 'LinesField', 'ListField',
    'TextAreaField', 'MultiListField', 'EmailField', 'CheckBoxField',
    'PasswordField', 'FloatField', 'PatternField', 'LinkField', 'StringField',
    'RawTextAreaField', 'IntegerField', 'RadioField', 'DateTimeField'
]
for field in field_meta_types:
    addZOAImage(field, 'Images/ZOA/FormulatorField.png')


class FormulatorFormModel(ZopeBlankEditorModel):
    imgIdx = ZOAIcons['Formulator Form']


#---Controller------------------------------------------------------------------

# Connect controller to the model