changeset 173:3095a0b960c8

Ticket 153: UI de Publicar. Se agregó ui-button-confirm a botones que requieren confirmación y el comportamiento.
author juanjose.montesdeocaarbos
date Mon, 08 Aug 2011 06:13:34 -0300
parents a18d4d12fc36
children 3c70b0d8bd69
files Agendas/trunk/src/Agendas.Web/Views/Evento/Index.cshtml Agendas/trunk/src/Agendas.Web/Views/Shared/_Layout.cshtml
diffstat 2 files changed, 23 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Web/Views/Evento/Index.cshtml	Sat Aug 06 15:11:41 2011 -0300
+++ b/Agendas/trunk/src/Agendas.Web/Views/Evento/Index.cshtml	Mon Aug 08 06:13:34 2011 -0300
@@ -23,7 +23,7 @@
 					<td class="buttons">
 						@if (item.PuedeAgendar)
 						{
-							@Html.ActionLink("Agendar", "Agendar", "Evento", new {id = item.Id}, null)
+							@Html.ActionLink("Agendar", "Agendar", "Evento", new { id = item.Id }, null)
 							<span>&nbsp;</span>
 						}
 						@if (item.PuedeModificar)
@@ -33,7 +33,7 @@
 						}
 						@if (item.PuedeConfirmar)
 						{
-							@Html.ActionLink("Confirmar", "Confirmar", new { id = item.Id })
+							@Html.ActionLink("Confirmar", "Confirmar", new { id = item.Id }, new { @class = "ui-button-confirm" })
 							<span>&nbsp;</span>
 						}
 						@if (item.PuedePublicar)
@@ -43,12 +43,12 @@
 						}
 						@if (item.PuedeCancelar)
 						{
-							@Html.ActionLink("Cancelar", "Cancelar", new { id = item.Id })
+							@Html.ActionLink("Cancelar", "Cancelar", new { id = item.Id }, new { @class = "ui-button-confirm"})
 							<span>&nbsp;</span>
 						}
 						@if (item.PuedeDescartar)
 						{
-							@Html.ActionLink("Descartar", "Descartar", new { id = item.Id })
+							@Html.ActionLink("Descartar", "Descartar", new { id = item.Id }, new { @class = "ui-button-confirm"})
 							<span>&nbsp;</span>
 						}
 						@if (item.PuedeReAgendar)
--- a/Agendas/trunk/src/Agendas.Web/Views/Shared/_Layout.cshtml	Sat Aug 06 15:11:41 2011 -0300
+++ b/Agendas/trunk/src/Agendas.Web/Views/Shared/_Layout.cshtml	Mon Aug 08 06:13:34 2011 -0300
@@ -1,24 +1,29 @@
 <!DOCTYPE html>
 <html>
 <head>
-    <title>Gestión de VANs</title>
-    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
-    <link href="@Url.Content("~/Content/AltNetHispanoVans.css")" rel="stylesheet" type="text/css" />
-    <link href="@Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" />
+	<title>Gestión de VANs</title>
+	<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
+	<link href="@Url.Content("~/Content/AltNetHispanoVans.css")" rel="stylesheet" type="text/css" />
+	<link href="@Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" />
 
-    <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
+	<script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
 	<script src="@Url.Content("~/Scripts/jquery-ui.js")" type="text/javascript"></script>
 
-    <script type="text/javascript">
-    	$(document).ready(function () {
-    		$(".buttons > :button").addClass("ui-button");
-    		$(".buttons > :submit").addClass("ui-button");
-    		$(".buttons > a").addClass("ui-button ui-state-default ui-corner-all");
-			
+	<script type="text/javascript">
+		$(document).ready(function () {
+			$(".buttons > :button").addClass("ui-button");
+			$(".buttons > :submit").addClass("ui-button");
+			$(".buttons > a").addClass("ui-button ui-state-default ui-corner-all");
+			$(".buttons > a.ui-button-confirm").click(function (event) {
+				var rsp = confirm("Esta seguro que desea " + $(this).text() + "?");
+				if (!rsp)
+					event.preventDefault();
+			});
+
 			$(".errorbox").addClass("ui-state-error ui-corner-all");
-    		$(".warningbox").addClass("ui-state-highlight ui-corner-all");
-    		$(".notificationbox").addClass("ui-corner-all");
-    	});
+			$(".warningbox").addClass("ui-state-highlight ui-corner-all");
+			$(".notificationbox").addClass("ui-corner-all");
+		});
 	</script>
 </head>