Author: jmorliaguet
Date: Sat Feb 11 18:19:27 2006
New Revision: 2359

Added:
   
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/ajax_widget_template.pt
   (contents, props changed)
Modified:
   
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_progressive_enhancement.html
Log:

- using an external template to draw the widget (-20 lines)



Added: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/ajax_widget_template.pt
==============================================================================
--- (empty file)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/ajax_widget_template.pt
    Sat Feb 11 18:19:27 2006
@@ -0,0 +1,3 @@
+<div class="ajax">
+  AJAX widget
+</div>

Modified: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_progressive_enhancement.html
==============================================================================
--- 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_progressive_enhancement.html
      (original)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_progressive_enhancement.html
      Sat Feb 11 18:19:27 2006
@@ -7,6 +7,7 @@
   <meta http-equiv="content-type" content="text/html; charset=utf-8" />
   <script src="../../prototype.js" type="text/javascript"></script>
   <script src="../../json.js" type="text/javascript"></script>
+  <script src="../../ctal.js" type="text/javascript"></script>
   <script src="../../cpsskins.js" type="text/javascript"></script>
   <link rel="stylesheet" href="../../cpsskins.css" type="text/css" />
 
@@ -25,29 +26,6 @@
   }
   </style>
 
-  <script type="text/javascript">
-    Object.extend(Widgets, {
-
-      ajaxwidget: function(def) {
-        var widget = Canvas.createNode({
-          tag: "div",
-          classes: "ajax"
-        });
-        return new AjaxWidget(widget, def);
-      },
-    });
-
-    AjaxWidget = Class.create();
-    AjaxWidget.prototype = Object.extend(new CPSSkins.View(), {
-
-      render: function(data) {
-        this.widget.innerHTML = "Ajax widget";
-      }
-
-    });
-
-  </script>
-
 </head>
 <body>
 
@@ -77,7 +55,7 @@
 
   <ins class="view">
   {"widget": {
-     "type": "ajaxwidget",
+     "template": "ajax_widget_template.pt",
      "replace": "htmlwidget"
    },
    "model": "ram-data-provider"
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to