Author: jmorliaguet
Date: Thu Jan  5 23:56:19 2006
New Revision: 2152

Modified:
   cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js
   
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_demo.html
   
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_panel_test.html
   cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel5.html
   cpsskins/branches/jmo-perspectives/ui/framework/tests/unit/cpsskins_test.html
Log:

- replaced perspective symbols:

  '|' means 'or', e.g. perspective1|perspective2

  '/' means 'is super-perspective of', e.g. perspective1/sub1/sub2



Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js
==============================================================================
--- cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js (original)
+++ cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Thu Jan  5 
23:56:19 2006
@@ -43,7 +43,7 @@
         }
         case "cpsskins:panel": {
           var perspectives = (e.getAttribute("perspectives")
-                              || "default").split(",");
+                              || "default").split("|");
           var panel = new Renderers.panel(e);
           panel.id = 'cpsskins-panel' + index;
           $A(perspectives).each(function(p) {
@@ -67,9 +67,9 @@
     var to_hide = [];
     CPSSkins.Perspectives.each(function(s) {
       var elements = s[1];
-      var path = perspective.split(":");
+      var path = perspective.split("/");
       path.each(function(p, index)  {
-        var subpath = path.slice(0,index+1).join(":");
+        var subpath = path.slice(0,index+1).join("/");
         if (s[0] == subpath) {
           elements.each(function(el) { to_show.push(el) } );
         } else {

Modified: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_demo.html
==============================================================================
--- 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_demo.html
 (original)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_demo.html
 Thu Jan  5 23:56:19 2006
@@ -44,7 +44,7 @@
     <tr style="vertical-align: top">
       <td colspan="3">
 
-        <cpsskins:panel perspectives="page-designer,layout-designer"
+        <cpsskins:panel perspectives="page-designer|layout-designer"
                         url="panel2.html">
         </cpsskins:panel>
 
@@ -60,7 +60,7 @@
         <cpsskins:panel perspectives="page-designer" url="panel4.html">
         </cpsskins:panel>
 
-        <cpsskins:panel perspectives="site-designer,layout-designer"
+        <cpsskins:panel perspectives="site-designer|layout-designer"
                         url="panel3.html">
         </cpsskins:panel>
 
@@ -71,13 +71,13 @@
         </cpsskins:panel>
 
 
-        <cpsskins:panel perspectives="site-designer,page-designer" 
url="panel1.html">
+        <cpsskins:panel perspectives="site-designer|page-designer" 
url="panel1.html">
         </cpsskins:panel>
 
       </td>
       <td style="width: 20%">
 
-        <cpsskins:panel perspectives="site-designer,layout-designer"
+        <cpsskins:panel perspectives="site-designer|layout-designer"
                         url="panel4.html">
         </cpsskins:panel>
 

Modified: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_panel_test.html
==============================================================================
--- 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_panel_test.html
   (original)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_panel_test.html
   Thu Jan  5 23:56:19 2006
@@ -41,7 +41,7 @@
       <td colspan="3">
 
         <cpsskins:panel
-            perspectives="page-designer,layout-designer"
+            perspectives="page-designer|layout-designer"
             url="panel1.html"
             css="style1.css">
         </cpsskins:panel>
@@ -61,7 +61,7 @@
         <cpsskins:panel perspectives="page-designer" url="panel2.html">
         </cpsskins:panel>
 
-        <cpsskins:panel perspectives="site-designer,layout-designer"
+        <cpsskins:panel perspectives="site-designer|layout-designer"
                         url="panel3.html">
         </cpsskins:panel>
 
@@ -77,7 +77,7 @@
       </td>
       <td style="width: 20%">
 
-        <cpsskins:panel perspectives="site-designer,layout-designer"
+        <cpsskins:panel perspectives="site-designer|layout-designer"
                         url="panel4.html">
         </cpsskins:panel>
 

Modified: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel5.html
==============================================================================
--- 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel5.html    
    (original)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel5.html    
    Thu Jan  5 23:56:19 2006
@@ -8,39 +8,39 @@
      href="javascript:CPSSkins.switchPerspective('site-designer')">
   Close</a>
 
-  <a class="button" 
href="javascript:CPSSkins.switchPerspective('element-editor:1')">
+  <a class="button" 
href="javascript:CPSSkins.switchPerspective('element-editor/1')">
   1</a>
 
-  <a class="button" 
href="javascript:CPSSkins.switchPerspective('element-editor:2')">
+  <a class="button" 
href="javascript:CPSSkins.switchPerspective('element-editor/2')">
   2</a>
 
-  <a class="button" 
href="javascript:CPSSkins.switchPerspective('element-editor:3')">
+  <a class="button" 
href="javascript:CPSSkins.switchPerspective('element-editor/3')">
   3</a>
 
   <table style="width: 100%; padding:1em">
     <tr>
       <td>
         <cpsskins:panel fadein="true"
-                        perspectives="element-editor:1" url="panel1.html">
+                        perspectives="element-editor/1" url="panel1.html">
         </cpsskins:panel>
       </td>
       <td>
         <cpsskins:panel fadein="true"
-                        perspectives="element-editor:1" url="panel2.html">
+                        perspectives="element-editor/1" url="panel2.html">
         </cpsskins:panel>
       </td>
       <td>
         <cpsskins:panel fadein="true"
-                        perspectives="element-editor:2" url="panel3.html">
+                        perspectives="element-editor/2" url="panel3.html">
         </cpsskins:panel>
       </td>
       <td>
         <cpsskins:panel fadein="true"
-                        perspectives="element-editor:2" url="panel4.html">
+                        perspectives="element-editor/2" url="panel4.html">
         </cpsskins:panel>
       </td>
       <td>
-        <cpsskins:panel perspectives="element-editor:3" url="panel6.html">
+        <cpsskins:panel perspectives="element-editor/3" url="panel6.html">
         </cpsskins:panel>
       </td>
     </tr>

Modified: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/unit/cpsskins_test.html
==============================================================================
--- 
cpsskins/branches/jmo-perspectives/ui/framework/tests/unit/cpsskins_test.html   
    (original)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/unit/cpsskins_test.html   
    Thu Jan  5 23:56:19 2006
@@ -51,15 +51,15 @@
   <!-- panels -->
   <cpsskins:panel perspectives="1" url="p1.html"></cpsskins:panel>
 
-  <cpsskins:panel perspectives="1,2" url="p2.html"></cpsskins:panel>
+  <cpsskins:panel perspectives="1|2" url="p2.html"></cpsskins:panel>
 
   <cpsskins:panel perspectives="3" url="p3.html"></cpsskins:panel>
 
-  <cpsskins:panel perspectives="1:2" url="p1_2.html"></cpsskins:panel>
+  <cpsskins:panel perspectives="1/2" url="p1_2.html"></cpsskins:panel>
 
-  <cpsskins:panel perspectives="2:3" url="p2_3.html"></cpsskins:panel>
+  <cpsskins:panel perspectives="2/3" url="p2_3.html"></cpsskins:panel>
 
-  <cpsskins:panel perspectives="2:3:1" url="p2_3_1.html"></cpsskins:panel>
+  <cpsskins:panel perspectives="2/3/1" url="p2_3_1.html"></cpsskins:panel>
 
 </div>
 
@@ -225,7 +225,7 @@
       assert(!isVisible(p2));
       assert(!isVisible(p3));
 
-      CPSSkins.switchPerspective("1:2");
+      CPSSkins.switchPerspective("1/2");
       assert(isVisible(p1));
       assert(isVisible(p2)); // visible because p2 is visible in perspective 1
       assert(isVisible(p1_2));
@@ -234,7 +234,7 @@
       assert(!isVisible(p3));
       assert(!isVisible(p4));
 
-      CPSSkins.switchPerspective("2:3");
+      CPSSkins.switchPerspective("2/3");
       assert(isVisible(p2));
       assert(isVisible(p2_3));
       assert(!isVisible(p1));
@@ -243,7 +243,7 @@
       assert(!isVisible(p3));
       assert(!isVisible(p4));
 
-      CPSSkins.switchPerspective("2:3:1");
+      CPSSkins.switchPerspective("2/3/1");
       assert(isVisible(p2));
       assert(isVisible(p2_3));
       assert(isVisible(p2_3_1));
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to