Author: reebalazs
Date: Mon Apr 21 03:06:13 2008
New Revision: 53959

Modified:
   kukit/kss.demo/branch/1.4-kss-test/docs/HISTORY.txt
   kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/body_macros.pt
   kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/configure.zcml
   kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/header_macros.pt
   kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/kss_demo_index.pt
   kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/registry.py
   kukit/kss.demo/branch/1.4-kss-test/kss/demo/resource.py
   kukit/kss.demo/branch/1.4-kss-test/kss/demo/simplecontent.py
Log:
Merge up -r53907:53958 changes from trunk

Modified: kukit/kss.demo/branch/1.4-kss-test/docs/HISTORY.txt
==============================================================================
--- kukit/kss.demo/branch/1.4-kss-test/docs/HISTORY.txt (original)
+++ kukit/kss.demo/branch/1.4-kss-test/docs/HISTORY.txt Mon Apr 21 03:06:13 2008
@@ -6,6 +6,13 @@
 
     - ...
 
+kukit.js - 1.4 Released 2008-04-21
+
+    - Add improved demos
+      (insertions in tbody is not included : that demo is 
+      still broken in IE6)
+      [cryu, jone, gotcha]
+
 kss.demo - 1.4-rc1 Released 2008-03-25
 
     - Prepare for release

Modified: kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/body_macros.pt
==============================================================================
--- kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/body_macros.pt  
(original)
+++ kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/body_macros.pt  Mon Apr 
21 03:06:13 2008
@@ -2,15 +2,23 @@
 
     <metal:header define-macro="header">
     
-    <div id="global-links">
+    <div id="global-links"
+        tal:define="demoregistry    context/@@demoregistry;
+                    demo python:    demoregistry.getDemo(viewname);">
       <ul>
         <li><a href=".">All demos</a></li>
         <li><a tal:attributes="href mainkss">View KSS resource</a></li>
+        <li tal:condition="python: demo and demo.helpfile">
+            <a href="#" id="displayHelp" tal:attributes="class 
string:kssattr-viewname-${viewname}">Description</a>
+            <a href="#" id="hideHelp" tal:attributes="class string:hidden 
kssattr-viewname-${viewname}">Hide Description</a>
+        </li>
       </ul>
     </div>  
     
         <p metal:use-macro="context/@@body_macros/kss_mode">Kss mode</p>
 
+    <div id="help"></div>
+
     </metal:header>
 
 

Modified: kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/configure.zcml
==============================================================================
--- kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/configure.zcml  
(original)
+++ kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/configure.zcml  Mon Apr 
21 03:06:13 2008
@@ -59,7 +59,7 @@
     for="kss.demo.interfaces.ISimpleContent"
     name="kss_demo_registry"
     class=".registry.KSSDemoRegistryView"
-    allowed_attributes="getSortedDemos getDemoGroups getSeleniumTests"
+    allowed_attributes="getSortedDemos getDemoGroups getSeleniumTests getZuite"
     permission="zope.View"
     />
   <page

Modified: kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/header_macros.pt
==============================================================================
--- kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/header_macros.pt        
(original)
+++ kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/header_macros.pt        
Mon Apr 21 03:06:13 2008
@@ -15,9 +15,12 @@
     
     <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
 
-    <link rel="kinetic-stylesheet" type="text/css"
+    <link rel="kinetic-stylesheet" type="text/kss"
           tal:attributes="href mainkss"/>
     
+    <link rel="kinetic-stylesheet" type="text/kss"
+          tal:attributes="href 
string:${context/@@absolute_url}/++resource++help.kss"/>
+    
     <link rel="stylesheet" type="text/css"
           tal:attributes="href 
string:${context/@@absolute_url}/@@kss_devel_mode/ui_css"/>
 

Modified: kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/kss_demo_index.pt
==============================================================================
--- kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/kss_demo_index.pt       
(original)
+++ kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/kss_demo_index.pt       
Mon Apr 21 03:06:13 2008
@@ -8,8 +8,8 @@
     <p metal:use-macro="context/@@body_macros/kss_mode">Kss mode</p>
     <h2>Tests</h2>
     <ul style="background-color:#E0E0C0;">
-     <li><a href="@@kukittestsuite">Run all ECMA unittests</a></li>
-     <li>Run Selenium tests
+     <li><a href="@@kukittestsuite">ECMA unittests</a></li>
+     <li>Selenium tests runner
        <form tal:attributes="action string:${context/absolute_url}/zuite.html">
           <ul>
             <li>Admin credentials, used for site creation:
@@ -44,7 +44,11 @@
           <tal:demos repeat="demo demo_group/demos">
             <li><a href="demo_page.html"
                    tal:attributes="href demo/page_url"
-                   tal:content="demo/title">A simple demo</a></li>
+                   tal:content="demo/title">A simple demo</a>
+                <tal:condition condition="demo/description">
+                    <small tal:content="demo/description" />
+                </tal:condition>
+            </li>
           </tal:demos>
         </ul>
       </tal:groups>

Modified: kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/registry.py
==============================================================================
--- kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/registry.py     
(original)
+++ kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/registry.py     Mon Apr 
21 03:06:13 2008
@@ -124,7 +124,7 @@
         return file(path).read()
 
     def getZuiteHomePage(self):
-        """Redirects to the Zuite home page, Zuite object is found from 
catalog."""
+        """Redirects to the Zuite home page, Zuite object is found from 
path."""
         # XXX: this actually does some parameter name searching, which is not 
optimal. If you find
         # a better way to implement multiple submit buttons and have the form 
post a key-value pair
         # that tells us what we pressed, feel free to kill this code
@@ -156,6 +156,16 @@
             raise Exception, 'No Zuite found in the directory below. Create a 
Zuite.'
         return zuites[0][1]
 
+    def getZuite(self):
+        """Finds a zuite in the same directory or under"""
+        if not hasattr(self, 'zuites'):
+            container = self.context.aq_inner.aq_parent
+            self.zuites = self.context.ZopeFind(container, 
obj_metatypes=['Zuite'], search_sub=1)
+        if self.zuites:
+            return self.zuites[0][1]
+        else:
+            return None
+
 class KSSDemoRegistryAdminView(BrowserView):
     """Things that only admin should do"""
     implements(IBrowserPublisher)

Modified: kukit/kss.demo/branch/1.4-kss-test/kss/demo/resource.py
==============================================================================
--- kukit/kss.demo/branch/1.4-kss-test/kss/demo/resource.py     (original)
+++ kukit/kss.demo/branch/1.4-kss-test/kss/demo/resource.py     Mon Apr 21 
03:06:13 2008
@@ -16,11 +16,16 @@
     """Represents a demo.
     """
     implements(IKSSDemo)
-    def __init__(self, plugin_namespace, category, page_url, title):
+    def __init__(self, plugin_namespace, category, page_url, title, 
description=None, helpfile=None, packageName=None):
         self.plugin_namespace = plugin_namespace
         self.category = category
         self.page_url = page_url
         self.title = title
+        self.description = description
+        if not packageName:
+            helpfile = None
+        self.helpfile = helpfile
+        self.packageName = packageName
 
     # convenience access for page templates
     __allow_access_to_unprotected_subobjects__ = 1

Modified: kukit/kss.demo/branch/1.4-kss-test/kss/demo/simplecontent.py
==============================================================================
--- kukit/kss.demo/branch/1.4-kss-test/kss/demo/simplecontent.py        
(original)
+++ kukit/kss.demo/branch/1.4-kss-test/kss/demo/simplecontent.py        Mon Apr 
21 03:06:13 2008
@@ -29,6 +29,7 @@
 from Products.PageTemplates.PageTemplateFile import PageTemplateFile
 from zope.interface import implements
 from interfaces import ISimpleContent
+from persistent.mapping import PersistentMapping
 
 class SimpleContent(SimpleItem):
     implements(ISimpleContent)
@@ -43,6 +44,17 @@
     def __init__(self, id, title):
         self.id = id
         self.title = title
+        self.mapping = PersistentMapping()
+
+    def getValue(self, name, default=None):
+        result = self.mapping.get(name, default)
+        if not result or result == default:
+            result = default
+            self.setValue(name, result)
+        return result
+
+    def setValue(self, name, value):
+        self.mapping[name] = value
 
     security.declarePublic('direct')
     def direct(self):
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins

Reply via email to