Author: jmorliaguet
Date: Mon Jan  2 18:37:37 2006
New Revision: 2121

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

- added the "confirm" option



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 Mon Jan  2 
18:37:37 2006
@@ -348,15 +348,15 @@
     if (element.getAttribute("disabled")) return;
     var action = element.getAttribute("action");
     if (!action) return;
+    var choice = element.getAttribute("choice") || action;
     var confirm = element.getAttribute("confirm");
+    Element.hide(this.widget);
     if (confirm) {
       if (!window.confirm(confirm)) return;
     }
-    var choice = element.getAttribute("choice") || action;
     var handler = this.handlers[action];
     if (handler) {
       handler(this.selected, choice);
-      Element.hide(this.widget);
       this.active = false;
     }
   },
@@ -428,6 +428,11 @@
             }
           }
 
+          var confirm = tag.getAttribute("confirm");
+          if (confirm && visible) {
+            options.attributes.confirm = confirm;
+          }
+
           var icon = tag.getAttribute("icon");
           if (icon && visible) {
             options.style.backgroundImage = "url(" + icon + ")";
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to