Conjunto de Mudanças 1523 no publico para ILSAALMaterial/trunk/Extensions


Ignorar:
Timestamp:
01/12/2005 10:28:11 (14 anos atrás)
Autor:
jeanferri
Mensagem:

Atualizada a versão do ArchGenXml para a 1.4RC2

Localização:
ILSAALMaterial/trunk/Extensions
Arquivos:
19 editados

Legenda:

Não Modificado
Adicionado
Removido
  • ILSAALMaterial/trunk/Extensions/Install.py

    r1408 r1523  
    44#
    55# Generated:
    6 # Generator: ArchGenXML Version 1.4.0-RC1 devel
     6# Generator: ArchGenXML Version 1.4.0-RC2 svn/development
    77#            http://plone.org/products/archgenxml
    88#
     
    7979        if not vocabname in atvm.contentIds():
    8080            atvm.invokeFactory(vocabmap[vocabname][0], vocabname)
    81         if vocabmap[vocabname][0] != "VdexVocabulary" and \
    82            len(atvm[vocabname].contentIds()) < 1:
    83             atvm[vocabname].invokeFactory(vocabmap[vocabname][1],'default')
    84             atvm[vocabname]['default'].setTitle('Default term, replace it by your own stuff')
     81           
     82        if len(atvm[vocabname].contentIds()) < 1:
     83            if vocabmap[vocabname][0] == "VdexVocabulary":
     84                vdexpath = os.path.join(
     85                    package_home(GLOBALS), 'data', '%s.vdex' % vocabname)
     86                if not (os.path.exists(vdexpath) and os.path.isfile(vdexpath)):
     87                    print >>out, 'No VDEX import file provided at %s.' % vdexpath
     88                    continue
     89                try:
     90                    #read data
     91                    f = open(vdexpath, 'r')
     92                    data = f.read()
     93                    f.close()
     94                except:
     95                    print >>out, 'Problems while reading VDEX import file provided at %s.' % vdexpath
     96                    continue
     97                atvm[vocabname].importXMLBinding(data)                   
     98            else:
     99                atvm[vocabname].invokeFactory(vocabmap[vocabname][1],'default')
     100                atvm[vocabname]['default'].setTitle('Default term, replace it by your own stuff')
    85101
    86102    # try to call a workflow install method
     
    107123    factory_tool.manage_setPortalFactoryTypes(listOfTypeIds=factory_types)
    108124
    109     # For plone 2.1, allow the easy registering of stylesheets
    110     from Products.ILSAALMaterial.config import HAS_PLONE21
    111     if HAS_PLONE21:
    112         try:
    113             from Products.ILSAALMaterial.config import STYLESHEETS
    114         except:
    115             STYLESHEETS = []
    116         try:
    117             from Products.ILSAALMaterial.config import JAVASCRIPTS
    118         except:
    119             JAVASCRIPTS = []
     125    from Products.ILSAALMaterial.config import STYLESHEETS
     126    try:
    120127        portal_css = getToolByName(portal, 'portal_css')
    121         portal_javascripts = getToolByName(portal, 'portal_javascripts')
    122128        for stylesheet in STYLESHEETS:
    123129            try:
     
    125131            except:
    126132                pass
    127             defaulttitle = '%s %s' % (PROJECTNAME, stylesheet['id'])
    128133            defaults = {'id': '',
    129             'expression': None,
    130134            'media': 'all',
    131             'title': defaulttitle,
    132135            'enabled': True}
    133136            defaults.update(stylesheet)
    134137            portal_css.manage_addStylesheet(**defaults)
     138    except:
     139        # No portal_css registry
     140        pass
     141    from Products.ILSAALMaterial.config import JAVASCRIPTS
     142    try:
     143        portal_javascripts = getToolByName(portal, 'portal_javascripts')
    135144        for javascript in JAVASCRIPTS:
    136145            try:
     
    138147            except:
    139148                pass
    140             defaults = {'id': '',
    141             'expression': '',
    142             'inline': False,
    143             'enabled': True,
    144             'cookable': True}
     149            defaults = {'id': ''}
    145150            defaults.update(javascript)
    146151            portal_javascripts.registerScript(**defaults)
     152    except:
     153        # No portal_javascripts registry
     154        pass
    147155
    148156    # try to call a custom install method
     
    169177    # try to call a workflow uninstall method
    170178    # in 'InstallWorkflows.py' method 'uninstallWorkflows'
    171     try:
    172         installWorkflows = ExternalMethod('temp','temp',PROJECTNAME+'.InstallWorkflows', 'uninstallWorkflows').__of__(self)
     179   
     180    # TODO: this is buggy code. There is no workflow uninstaller in
     181    # the generated InstallWorkflows.py.
     182    try:
     183        uninstallWorkflows = ExternalMethod('temp','temp',PROJECTNAME+'.InstallWorkflows', 'uninstallWorkflows').__of__(self)
    173184    except NotFound:
    174         installWorkflows = None
    175 
    176     if installWorkflows:
    177         print >>out,'Workflow Uninstall:'
    178         res = uninstallWorkflows(self,out)
    179         print >>out,res or 'no output'
     185        uninstallWorkflows = None
     186
     187    if uninstallWorkflows:
     188        print >>out, 'Workflow Uninstall:'
     189        res = uninstallWorkflows(self, out)
     190        print >>out, res or 'no output'
    180191    else:
    181192        print >>out,'no workflow uninstall'
  • ILSAALMaterial/trunk/Extensions/almoxarifado_workflow.py

    r1408 r1523  
    55#
    66
    7 # Generator: ArchGenXML Version 1.4.0-RC1 devel
     7# Generator: ArchGenXML Version 1.4.0-RC2 svn/development
    88#            http://plone.org/products/archgenxml
    99#
     
    4444    data = list(portal.__ac_roles__)
    4545    for role in ['Almoxarife']:
    46         if not role in self.__ac_roles__:
     46        if not role in data:
    4747            data.append(role)
    4848    portal.__ac_roles__ = tuple(data)
  • ILSAALMaterial/trunk/Extensions/almoxarifado_workflow_scripts.py

    r1323 r1523  
    33# Copyright (c) 2005 by Interlegis
    44#
    5 # Generator: ArchGenXML Version 1.4.0-RC1 devel
     5# Generator: ArchGenXML Version 1.4.0-RC2 svn/development
    66#            http://sf.net/projects/archetypes/
    77#
  • ILSAALMaterial/trunk/Extensions/consolidacao_workflow.py

    r1423 r1523  
    55#
    66
    7 # Generator: ArchGenXML Version 1.4.0-RC1 devel
     7# Generator: ArchGenXML Version 1.4.0-RC2 svn/development
    88#            http://plone.org/products/archgenxml
    99#
     
    4444    data = list(portal.__ac_roles__)
    4545    for role in ['Almoxarife']:
    46         if not role in self.__ac_roles__:
     46        if not role in data:
    4747            data.append(role)
    4848    portal.__ac_roles__ = tuple(data)
  • ILSAALMaterial/trunk/Extensions/consolidacao_workflow_scripts.py

    r1252 r1523  
    33# Copyright (c) 2005 by Interlegis
    44#
    5 # Generator: ArchGenXML Version 1.4.0-RC1 devel
     5# Generator: ArchGenXML Version 1.4.0-RC2 svn/development
    66#            http://sf.net/projects/archetypes/
    77#
  • ILSAALMaterial/trunk/Extensions/entrada_workflow.py

    r1401 r1523  
    55#
    66
    7 # Generator: ArchGenXML Version 1.4.0-RC1 devel
     7# Generator: ArchGenXML Version 1.4.0-RC2 svn/development
    88#            http://plone.org/products/archgenxml
    99#
  • ILSAALMaterial/trunk/Extensions/entrada_workflow_scripts.py

    r1401 r1523  
    33# Copyright (c) 2005 by Interlegis
    44#
    5 # Generator: ArchGenXML Version 1.4.0-RC1 devel
     5# Generator: ArchGenXML Version 1.4.0-RC2 svn/development
    66#            http://sf.net/projects/archetypes/
    77#
  • ILSAALMaterial/trunk/Extensions/fechamento_workflow.py

    r1423 r1523  
    55#
    66
    7 # Generator: ArchGenXML Version 1.4.0-RC1 devel
     7# Generator: ArchGenXML Version 1.4.0-RC2 svn/development
    88#            http://plone.org/products/archgenxml
    99#
     
    4444    data = list(portal.__ac_roles__)
    4545    for role in ['Almoxarife']:
    46         if not role in self.__ac_roles__:
     46        if not role in data:
    4747            data.append(role)
    4848    portal.__ac_roles__ = tuple(data)
  • ILSAALMaterial/trunk/Extensions/fechamento_workflow_scripts.py

    r1288 r1523  
    33# Copyright (c) 2005 by Interlegis
    44#
    5 # Generator: ArchGenXML Version 1.4.0-RC1 devel
     5# Generator: ArchGenXML Version 1.4.0-RC2 svn/development
    66#            http://sf.net/projects/archetypes/
    77#
  • ILSAALMaterial/trunk/Extensions/fornecedor_worflow.py

    r1408 r1523  
    55#
    66
    7 # Generator: ArchGenXML Version 1.4.0-RC1 devel
     7# Generator: ArchGenXML Version 1.4.0-RC2 svn/development
    88#            http://plone.org/products/archgenxml
    99#
     
    4444    data = list(portal.__ac_roles__)
    4545    for role in ['Almoxarife']:
    46         if not role in self.__ac_roles__:
     46        if not role in data:
    4747            data.append(role)
    4848    portal.__ac_roles__ = tuple(data)
  • ILSAALMaterial/trunk/Extensions/fornecedor_worflow_scripts.py

    r1306 r1523  
    33# Copyright (c) 2005 by Interlegis
    44#
    5 # Generator: ArchGenXML Version 1.4.0-RC1 devel
     5# Generator: ArchGenXML Version 1.4.0-RC2 svn/development
    66#            http://sf.net/projects/archetypes/
    77#
  • ILSAALMaterial/trunk/Extensions/itemEntrada_workflow.py

    r1401 r1523  
    55#
    66
    7 # Generator: ArchGenXML Version 1.4.0-RC1 devel
     7# Generator: ArchGenXML Version 1.4.0-RC2 svn/development
    88#            http://plone.org/products/archgenxml
    99#
  • ILSAALMaterial/trunk/Extensions/itemEntrada_workflow_scripts.py

    r1401 r1523  
    33# Copyright (c) 2005 by Interlegis
    44#
    5 # Generator: ArchGenXML Version 1.4.0-RC1 devel
     5# Generator: ArchGenXML Version 1.4.0-RC2 svn/development
    66#            http://sf.net/projects/archetypes/
    77#
  • ILSAALMaterial/trunk/Extensions/itemRequisitado_workflow.py

    r1423 r1523  
    55#
    66
    7 # Generator: ArchGenXML Version 1.4.0-RC1 devel
     7# Generator: ArchGenXML Version 1.4.0-RC2 svn/development
    88#            http://plone.org/products/archgenxml
    99#
     
    4444    data = list(portal.__ac_roles__)
    4545    for role in ['Almoxarife']:
    46         if not role in self.__ac_roles__:
     46        if not role in data:
    4747            data.append(role)
    4848    portal.__ac_roles__ = tuple(data)
  • ILSAALMaterial/trunk/Extensions/itemRequisitado_workflow_scripts.py

    r1344 r1523  
    33# Copyright (c) 2005 by Interlegis
    44#
    5 # Generator: ArchGenXML Version 1.4.0-RC1 devel
     5# Generator: ArchGenXML Version 1.4.0-RC2 svn/development
    66#            http://sf.net/projects/archetypes/
    77#
  • ILSAALMaterial/trunk/Extensions/material_workflow.py

    r1423 r1523  
    55#
    66
    7 # Generator: ArchGenXML Version 1.4.0-RC1 devel
     7# Generator: ArchGenXML Version 1.4.0-RC2 svn/development
    88#            http://plone.org/products/archgenxml
    99#
     
    4444    data = list(portal.__ac_roles__)
    4545    for role in ['Almoxarife']:
    46         if not role in self.__ac_roles__:
     46        if not role in data:
    4747            data.append(role)
    4848    portal.__ac_roles__ = tuple(data)
  • ILSAALMaterial/trunk/Extensions/material_workflow_scripts.py

    r1368 r1523  
    33# Copyright (c) 2005 by Interlegis
    44#
    5 # Generator: ArchGenXML Version 1.4.0-RC1 devel
     5# Generator: ArchGenXML Version 1.4.0-RC2 svn/development
    66#            http://sf.net/projects/archetypes/
    77#
  • ILSAALMaterial/trunk/Extensions/requisicao_workflow.py

    r1423 r1523  
    55#
    66
    7 # Generator: ArchGenXML Version 1.4.0-RC1 devel
     7# Generator: ArchGenXML Version 1.4.0-RC2 svn/development
    88#            http://plone.org/products/archgenxml
    99#
     
    4444    data = list(portal.__ac_roles__)
    4545    for role in ['Almoxarife']:
    46         if not role in self.__ac_roles__:
     46        if not role in data:
    4747            data.append(role)
    4848    portal.__ac_roles__ = tuple(data)
  • ILSAALMaterial/trunk/Extensions/requisicao_workflow_scripts.py

    r1341 r1523  
    33# Copyright (c) 2005 by Interlegis
    44#
    5 # Generator: ArchGenXML Version 1.4.0-RC1 devel
     5# Generator: ArchGenXML Version 1.4.0-RC2 svn/development
    66#            http://sf.net/projects/archetypes/
    77#
Note: Veja TracChangeset para ajuda no uso do visualizador de conjunto de mudanças.
 

The contents and data of this website are published under license:
Creative Commons 4.0 Brasil - Atribuir Fonte - Compartilhar Igual.