EduploneExam/Extensions Install.py,1.4.2.1,1.4.2.2

Claudia Disque <[email protected]> Sun, 13 Nov 2005 15:19:41 +0000
Newsgroups gmane.comp.web.zope.eduplone.cvs
Message-ID <[email protected]>
Update of /cvsroot/eduplone/EduploneExam/Extensions
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv545/Extensions

Modified Files:
      Tag: exam-1_1
	Install.py 
Log Message:
correct translations for challenge and correct field

Index: Install.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/Extensions/Install.py,v
retrieving revision 1.4.2.1
retrieving revision 1.4.2.2
diff -C2 -d -r1.4.2.1 -r1.4.2.2
*** Install.py	2 Oct 2005 21:21:12 -0000	1.4.2.1
--- Install.py	13 Nov 2005 15:19:39 -0000	1.4.2.2
***************
*** 5,9 ****
  #
  # Generated: 
! # Generator: ArchGenXML Version 1.4.0-beta2 devel
  #            http://plone.org/products/archgenxml
  #
--- 5,9 ----
  #
  # Generated: 
! # Generator: ArchGenXML Version 1.4.0-RC1
  #            http://plone.org/products/archgenxml
  #
***************
*** 92,95 ****
--- 92,134 ----
      factory_tool.manage_setPortalFactoryTypes(listOfTypeIds=factory_types)
  
+     # For plone 2.1, allow the easy registering of stylesheets
+     from Products.EduploneExam.config import HAS_PLONE21
+     if HAS_PLONE21:
+         try:
+             from Products.EduploneExam.config import STYLESHEETS
+         except:
+             STYLESHEETS = []
+         try:
+             from Products.EduploneExam.config import JAVASCRIPTS
+         except:
+             JAVASCRIPTS = []
+         portal_css = getToolByName(portal, 'portal_css')
+         portal_javascripts = getToolByName(portal, 'portal_javascripts')
+         for stylesheet in STYLESHEETS:
+             try:
+                 portal_css.unregisterResource(stylesheet['id'])
+             except:
+                 pass
+             defaulttitle = '%s %s' % (PROJECTNAME, stylesheet['id'])
+             defaults = {'id': '',
+             'expression': None,
+             'media': 'all',
+             'title': defaulttitle,
+             'enabled': True}
+             defaults.update(stylesheet)
+             portal_css.manage_addStylesheet(**defaults)
+         for javascript in JAVASCRIPTS:
+             try:
+                 portal_javascripts.unregisterResource(stylesheet['id'])
+             except:
+                 pass
+             defaults = {'id': '',
+             'expression': '', 
+             'inline': False,
+             'enabled': True,
+             'cookable': True}
+             defaults.update(javascript)
+             js_tool.registerScript(**defaults)
+ 
      # try to call a custom install method
      # in 'AppInstall.py' method 'install'



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php