[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kupu-checkins
Subject:    [kupu-checkins] r37335 - kupu/trunk/kupu/Extensions
From:       duncan () codespeak ! net
Date:       2007-01-25 15:08:28
Message-ID: 20070125150828.87C1C1006E () code0 ! codespeak ! net
[Download RAW message or body]

Author: duncan
Date: Thu Jan 25 16:08:22 2007
New Revision: 37335

Modified:
   kupu/trunk/kupu/Extensions/Install.py
Log:
Install sarissa.js into resource registry if it isnt there already

Modified: kupu/trunk/kupu/Extensions/Install.py
==============================================================================
--- kupu/trunk/kupu/Extensions/Install.py	(original)
+++ kupu/trunk/kupu/Extensions/Install.py	Thu Jan 25 16:08:22 2007
@@ -108,13 +108,27 @@
             enabled=True,
             cookable=cookable)
 
-    jstool.manage_removeScript('kupucontextmenu.js');
+    existing = [ sheet.getId() for sheet in jstool.getResources()]
+    if 'kupucontextmenu.js' in existing:
+        jstool.manage_removeScript('kupucontextmenu.js');
+    # Insert sarissa.js into the scripts but only if it isn't already
+    # there.
+    SARISSA = 'sarissa.js'
+    if SARISSA not in existing:
+        jstool.manage_addScript(id=SARISSA, enabled=True,
+            cookable=True,
+            compression='safe-encode',
+            cacheable=True)
+        jstool.moveResourceAfter(SARISSA, 'plone_javascripts.js')
+        print >>out, "JS file", SARISSA
+
     for id in js_files(data):
         print >>out, "JS file", id
         jstool.manage_removeScript(id=id)
         jstool.manage_addScript(id=id,
             expression=CONDITION,
             enabled=True,
+            compression='safe-encode',
             cookable=True)
 
 def uninstall_resources(self, out):

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic