Author: tyrell
Date: Fri Dec  7 19:14:56 2007
New Revision: 10718

Log:

Adding deletion confirmation.

Modified:
   trunk/mashup/java/modules/www/org/mashup.jsp

Modified: trunk/mashup/java/modules/www/org/mashup.jsp
==============================================================================
--- trunk/mashup/java/modules/www/org/mashup.jsp        (original)
+++ trunk/mashup/java/modules/www/org/mashup.jsp        Fri Dec  7 19:14:56 2007
@@ -549,13 +549,20 @@
                     
(author.equalsIgnoreCase(RegistryUtils.getCurrentUser(registry)))) { %>
             <script type="text/javascript">
                 function deleteServiceCallback() {
-                   window.location = "index.jsp";
+                    window.location = "index.jsp";
+                }
+
+                function deleteService() {
+                    var confirmation = confirm("You are about to permanently 
delete the '<%=mashup%>' service. Are you sure?")
+
+                    if (confirmation) {
+                        wso2.mashup.services.deleteService('<%=mashup%>', 
deleteServiceCallback);
+                    }
                 }
             </script>
             <li>
                 <a href="#"
-                   
onclick="wso2.mashup.services.deleteService('<%=mashup%>',deleteServiceCallback);">Delete
-                    this service</a>
+                   onclick="deleteService();">Delete this service</a>
             </li>
             <%}%>
         </ul>

_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to