Author: jmorliaguet
Date: Sat Feb 25 10:56:40 2006
New Revision: 2452

Modified:
   cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js
Log:

- simpler code



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 Sat Feb 25 
10:56:40 2006
@@ -889,20 +889,17 @@
   fadeout: function(node, options) {
     var setOpacity = CPSSkins.Canvas.setOpacity;
     setOpacity(node, 1);
-    return new CPSSkins.Scheduler(node, {
-      delay: options.delay,
-      duration: options.duration,
+    Object.extend(options, {
       action: function(value) { setOpacity(node, 1-value) },
       onComplete: function() { Element.hide(node) }
     });
+    return new CPSSkins.Scheduler(node, options);
   },
 
   blinddown: function(node, options) {
     var height = parseInt(Element.getStyle(node, 'height'));
     Element.makeClipping(node);
-    return new CPSSkins.Scheduler(node, {
-      delay: options.delay,
-      duration: options.duration,
+    Object.extend(options, {
       action: function(value) {
         Element.setStyle(node, {height: height*value + 'px'});
       },
@@ -911,21 +908,19 @@
         Element.undoClipping(node);
       }
     });
+    return new CPSSkins.Scheduler(node, options);
   },
 
   blindup: function(node, options) {
     var height = parseInt(Element.getStyle(node, 'height'));
     Element.makeClipping(node);
-    return new CPSSkins.Scheduler(node, {
-      delay: options.delay,
-      duration: options.duration,
+    Object.extend(options, {
       action: function(value) {
         Element.setStyle(node, {height: height*(1-value) + 'px'});
       },
-      onComplete: function() {
-        Element.setStyle(node, {height: '0px'});
-      }
+      onComplete: function() { Element.setStyle(node, {height: '0px'}); }
     });
+    return new CPSSkins.Scheduler(node, options);
   }
 }
 
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to