diff --git a/Core/Entities/LeafInput.cs b/Core/Entities/LeafInput.cs index e4a4376..a7d085f 100644 --- a/Core/Entities/LeafInput.cs +++ b/Core/Entities/LeafInput.cs @@ -106,6 +106,8 @@ namespace LeafWeb.Core.Entities } } + public DateTime LastStatusChange => StatusHistory.Last().DateTime; + public TimeSpan TimeInProgress { get diff --git a/WebCms/App_Data/Models/all.dll.path b/WebCms/App_Data/Models/all.dll.path index 5ad93ea..457bc9c 100644 --- a/WebCms/App_Data/Models/all.dll.path +++ b/WebCms/App_Data/Models/all.dll.path @@ -1 +1 @@ -C:\Users\poprhythm\AppData\Local\Temp\Temporary ASP.NET Files\vs\f80e29bb\faae20bf\App_Web_all.generated.cs.8f9494c4.re2ngwmg.dll \ No newline at end of file +C:\Users\poprhythm\AppData\Local\Temp\Temporary ASP.NET Files\vs\f80e29bb\faae20bf\App_Web_all.generated.cs.8f9494c4.ieyf0avo.dll \ No newline at end of file diff --git a/WebCms/Config/log4net.config b/WebCms/Config/log4net.config index 6c34479..3575503 100644 --- a/WebCms/Config/log4net.config +++ b/WebCms/Config/log4net.config @@ -11,7 +11,7 @@ - + @@ -27,7 +27,7 @@ - + diff --git a/WebCms/Content/style.css b/WebCms/Content/style.css index 0354c10..9806165 100644 --- a/WebCms/Content/style.css +++ b/WebCms/Content/style.css @@ -200,3 +200,10 @@ form .validation-summary-errors ul { code, pre { line-height: 1; } +.alert { + position: absolute; + left: 30%; + top: 10em; + width: 40%; + z-index: 1; } + diff --git a/WebCms/Content/style.min.css b/WebCms/Content/style.min.css index 7681efb..13300ee 100644 --- a/WebCms/Content/style.min.css +++ b/WebCms/Content/style.min.css @@ -1 +1 @@ -body.debug header .brand{position:relative;}body.debug header .brand:before{content:"";font-family:FontAwesome;font-style:normal;font-weight:normal;text-decoration:inherit;color:#f00;font-size:60px;padding-right:.5em;position:absolute;top:10px;left:0;}h1{padding:24px 0 12px 0;}p{padding:12px 0;}footer{margin-top:24px !important;}.row-no-padding [class*="col-"]{padding-left:0 !important;padding-right:0 !important;}.home .dark .row:first-child .column:first-child h1{padding-top:0;}.home .blogarchive{padding-top:20px;}.top-buffer{margin-top:20px;}.detail-actions>a,.detail-actions>form>button{margin-top:20px;float:left;clear:left;}.banner-link{white-space:normal;padding:20px;background:#000;background:rgba(0,0,0,.5);-moz-border-radius:10px;border-radius:10px;}.banner-link .glyphicon{color:#8cc641;}a.banner-link:hover{text-decoration:none;background:rgba(0,0,0,.6);}a.banner-link:hover .glyphicon{color:#a8ed4f;}.headline-icon h1:after{color:rgba(172,214,118,.8);font-family:"Glyphicons Halflings";font-size:.8em;padding-left:10px;}.headline-icon.headline-icon-file h1:after{content:"";}.headline-icon.headline-icon-leaf h1:after{content:"";}.headline-icon.headline-icon-question h1:after{content:"";}.headline-icon.headline-icon-stats h1:after{content:"";}.headline-icon.headline-icon-user h1:after{content:"";}.headline-icon.headline-icon-list h1:after{content:"";}.status{white-space:nowrap;}.status:after{font-family:"Glyphicons Halflings";font-size:.8em;padding-left:5px;}.status.status-pending{color:#f0ad4e;}.status.status-pending:after{content:"";}.status.status-complete{color:#337ab7;}.status.status-complete:after{content:"";}.status.status-exception{color:#a94442;}.status.status-exception:after{content:"";}.status.status-running,.status.status-starting,.status.status-finishing{color:#3c763d;}.status.status-running:after{content:"";}.status.status-starting:after{content:"";}.status.status-finishing:after{content:"";}.status.status-cancelpending,.status.status-cancelling{color:#f0ad4e;}.status.status-cancelled{color:#ec971f;}.status.status-cancelpending:after{content:"";}.status.status-cancelling:after{content:"";}.status.status-cancelled:after{content:"";}#chart{padding-top:20px;}.btn-file{position:relative;overflow:hidden;}.btn-file input[type=file]{position:absolute;top:0;right:0;min-width:100%;min-height:100%;font-size:100px;text-align:right;filter:alpha(opacity=0);opacity:0;outline:none;background:#fff;cursor:inherit;display:block;}form .validation-summary-errors ul{list-style-type:none;}.autocomplete-suggestions{border:1px solid #999;background:#fff;overflow:auto;}.autocomplete-suggestion{padding:2px 5px;white-space:nowrap;overflow:hidden;}.autocomplete-selected{background:#f0f0f0;}.autocomplete-suggestions strong{font-weight:normal;color:#39f;}.autocomplete-group{padding:2px 5px;}.autocomplete-group strong{display:block;border-bottom:1px solid #000;}.toggle{width:15px;}.dropdown-menu li form .btn-link{display:block;color:#333;clear:both;float:left;font-size:1rem;font-weight:normal;line-height:1.42857;min-width:160px;padding:3px 20px;text-align:left;white-space:nowrap;}.dropdown-menu li form .btn-link:focus,.dropdown-menu li form .btn-link:hover{text-decoration:none;color:#262626;background-color:#f5f5f5;}.divider-right{border-right:1px dashed #333;}.read{overflow:hidden;font-size:16px !important;transition:all .3s;margin-bottom:10px;}.read-less{height:90px !important;}code,pre{line-height:1;} \ No newline at end of file +body.debug header .brand{position:relative;}body.debug header .brand:before{content:"";font-family:FontAwesome;font-style:normal;font-weight:normal;text-decoration:inherit;color:#f00;font-size:60px;padding-right:.5em;position:absolute;top:10px;left:0;}h1{padding:24px 0 12px 0;}p{padding:12px 0;}footer{margin-top:24px !important;}.row-no-padding [class*="col-"]{padding-left:0 !important;padding-right:0 !important;}.home .dark .row:first-child .column:first-child h1{padding-top:0;}.home .blogarchive{padding-top:20px;}.top-buffer{margin-top:20px;}.detail-actions>a,.detail-actions>form>button{margin-top:20px;float:left;clear:left;}.banner-link{white-space:normal;padding:20px;background:#000;background:rgba(0,0,0,.5);-moz-border-radius:10px;border-radius:10px;}.banner-link .glyphicon{color:#8cc641;}a.banner-link:hover{text-decoration:none;background:rgba(0,0,0,.6);}a.banner-link:hover .glyphicon{color:#a8ed4f;}.headline-icon h1:after{color:rgba(172,214,118,.8);font-family:"Glyphicons Halflings";font-size:.8em;padding-left:10px;}.headline-icon.headline-icon-file h1:after{content:"";}.headline-icon.headline-icon-leaf h1:after{content:"";}.headline-icon.headline-icon-question h1:after{content:"";}.headline-icon.headline-icon-stats h1:after{content:"";}.headline-icon.headline-icon-user h1:after{content:"";}.headline-icon.headline-icon-list h1:after{content:"";}.status{white-space:nowrap;}.status:after{font-family:"Glyphicons Halflings";font-size:.8em;padding-left:5px;}.status.status-pending{color:#f0ad4e;}.status.status-pending:after{content:"";}.status.status-complete{color:#337ab7;}.status.status-complete:after{content:"";}.status.status-exception{color:#a94442;}.status.status-exception:after{content:"";}.status.status-running,.status.status-starting,.status.status-finishing{color:#3c763d;}.status.status-running:after{content:"";}.status.status-starting:after{content:"";}.status.status-finishing:after{content:"";}.status.status-cancelpending,.status.status-cancelling{color:#f0ad4e;}.status.status-cancelled{color:#ec971f;}.status.status-cancelpending:after{content:"";}.status.status-cancelling:after{content:"";}.status.status-cancelled:after{content:"";}#chart{padding-top:20px;}.btn-file{position:relative;overflow:hidden;}.btn-file input[type=file]{position:absolute;top:0;right:0;min-width:100%;min-height:100%;font-size:100px;text-align:right;filter:alpha(opacity=0);opacity:0;outline:none;background:#fff;cursor:inherit;display:block;}form .validation-summary-errors ul{list-style-type:none;}.autocomplete-suggestions{border:1px solid #999;background:#fff;overflow:auto;}.autocomplete-suggestion{padding:2px 5px;white-space:nowrap;overflow:hidden;}.autocomplete-selected{background:#f0f0f0;}.autocomplete-suggestions strong{font-weight:normal;color:#39f;}.autocomplete-group{padding:2px 5px;}.autocomplete-group strong{display:block;border-bottom:1px solid #000;}.toggle{width:15px;}.dropdown-menu li form .btn-link{display:block;color:#333;clear:both;float:left;font-size:1rem;font-weight:normal;line-height:1.42857;min-width:160px;padding:3px 20px;text-align:left;white-space:nowrap;}.dropdown-menu li form .btn-link:focus,.dropdown-menu li form .btn-link:hover{text-decoration:none;color:#262626;background-color:#f5f5f5;}.divider-right{border-right:1px dashed #333;}.read{overflow:hidden;font-size:16px !important;transition:all .3s;margin-bottom:10px;}.read-less{height:90px !important;}code,pre{line-height:1;}.alert{position:absolute;left:30%;top:10em;width:40%;z-index:1;} \ No newline at end of file diff --git a/WebCms/Content/style.scss b/WebCms/Content/style.scss index 1cbffa8..a969644 100644 --- a/WebCms/Content/style.scss +++ b/WebCms/Content/style.scss @@ -252,4 +252,12 @@ form .validation-summary-errors ul { code,pre { line-height: 1; +} + +.alert { + position: absolute; + left: 30%; + top: 10em; + width: 40%; + z-index:1; } \ No newline at end of file diff --git a/WebCms/Controllers/ContactController.cs b/WebCms/Controllers/ContactController.cs new file mode 100644 index 0000000..1dad4fd --- /dev/null +++ b/WebCms/Controllers/ContactController.cs @@ -0,0 +1,34 @@ +using System.Web.Mvc; +using log4net; +using LeafWeb.WebCms.Models; +using LeafWeb.WebCms.Services; + +namespace LeafWeb.WebCms.Controllers +{ + public class ContactController : BaseController + { + public ActionResult Index() + { + var viewModel = new ContactForm(); + return PartialView(viewModel); + } + + [HttpPost] + public ActionResult Submit(ContactForm viewModel) + { + if (ModelState.IsValid) // HttpParamMatch indicates it's backing out from Confirm + { + // convert viewModel into Model + new EmailNotificationService().SendContactEmail(viewModel); + + var logger = LogManager.GetLogger(GetType()); + logger.Info($"Contact: Name:{viewModel.Name} Added, Email:{viewModel.Email}, Message:{viewModel.Message}"); + + SetStatusMessage("Your message has been sent!", StatusType.Success); + return RedirectToCurrentUmbracoPage(); + } + + return CurrentUmbracoPage(); + } + } +} \ No newline at end of file diff --git a/WebCms/Controllers/QueueController.cs b/WebCms/Controllers/QueueController.cs index 1a0ed5d..1ac5cdc 100644 --- a/WebCms/Controllers/QueueController.cs +++ b/WebCms/Controllers/QueueController.cs @@ -1,6 +1,8 @@ using System; using System.Collections.Specialized; using System.Linq; +using System.Web; +using System.Web.Caching; using System.Web.Mvc; using Hangfire; using LeafWeb.Core.Entities; @@ -15,6 +17,8 @@ namespace LeafWeb.WebCms.Controllers [MemberAuthorize] public class QueueController : BaseController { + private const int TimeSamples = 40; + public ActionResult Index(string query) { var resultItems = @@ -34,9 +38,7 @@ namespace LeafWeb.WebCms.Controllers } } - // completed leaf input for computing runtime statistics - var completedLeafInput = DataService.GetLeafInputRecentlyCompleted(100); - var timeInProgressEstimater = new TimeInProgressEstimater(completedLeafInput); + var timeInProgressEstimater = TimeInProgressEstimater(); var serviceDescription = ServiceDescription(); @@ -49,10 +51,24 @@ namespace LeafWeb.WebCms.Controllers return View(queueViewModel); } + private TimeInProgressEstimater TimeInProgressEstimater() + { + var estimater = HttpRuntime.Cache["TimeInProgressEstimater"]; + if (estimater == null) + { + // completed leaf input for computing runtime statistics + var completedLeafInput = DataService.GetLeafInputRecentlyCompleted(TimeSamples); + estimater = new TimeInProgressEstimater(completedLeafInput); + HttpRuntime.Cache.Insert("TimeInProgressEstimater", estimater, null, DateTime.Now.AddHours(12), Cache.NoSlidingExpiration); + } + + return (TimeInProgressEstimater)estimater; + } + public ActionResult LeafInputStatistics() { var data = - from li in DataService.GetLeafInputRecentlyCompleted(100) + from li in DataService.GetLeafInputRecentlyCompleted(TimeSamples) select $"{li.InputFiles.Count}, {li.TimeInProgress.TotalSeconds}"; return Content(string.Join("
", data)); } diff --git a/WebCms/Models/ContactForm.cs b/WebCms/Models/ContactForm.cs new file mode 100644 index 0000000..2f7f052 --- /dev/null +++ b/WebCms/Models/ContactForm.cs @@ -0,0 +1,24 @@ +using System.ComponentModel.DataAnnotations; + +namespace LeafWeb.WebCms.Models +{ + public class ContactForm + { + [Display(Name = "Name")] + [Required(ErrorMessage = "Name required")] + [RegularExpression(@"[A-Za-z().]+(\s+[A-Za-z().]+)+", ErrorMessage = "Please provide full name")] + public string Name { get; set; } + + [Display(Name = "Email address")] + [Required(ErrorMessage = "An email address is required")] + [DataType(DataType.EmailAddress)] + [RegularExpression(@"[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}", ErrorMessage = "Must be an email address")] + public string Email { get; set; } + + [UIHint("Multiline")] + [Required(ErrorMessage = "A message is required")] + [MinLength(32, ErrorMessage = "Minimum of 32 characters")] + [MaxLength(1024, ErrorMessage = "Maximum of 1024 characters")] + public string Message { get; set; } + } +} \ No newline at end of file diff --git a/WebCms/Services/EmailNotificationService.cs b/WebCms/Services/EmailNotificationService.cs index a753a69..5879b8c 100644 --- a/WebCms/Services/EmailNotificationService.cs +++ b/WebCms/Services/EmailNotificationService.cs @@ -8,6 +8,7 @@ using log4net; using LeafWeb.Core.DAL; using LeafWeb.Core.Entities; using LeafWeb.Core.Utility; +using LeafWeb.WebCms.Models; namespace LeafWeb.WebCms.Services { @@ -17,13 +18,14 @@ namespace LeafWeb.WebCms.Services private readonly string _emailFromAddress; - private const string EmailSuccessSubject = "LeafWeb results"; - private const string EmailErrorSubject = "LeafWeb processing error"; - private const string EmailSystemErrorSubject = "LeafWeb system error"; - private const string EmailCancelledSubject = "LeafWeb cancelled"; + private const string SuccessSubject = "LeafWeb results"; + private const string ErrorSubject = "LeafWeb processing error"; + private const string SystemErrorSubject = "LeafWeb system error"; + private const string CancelledSubject = "LeafWeb cancelled"; + private const string ContactSubject = "LeafWeb Contact Message"; /// - /// Comma separated values + /// Semicolon separated values /// private readonly string _adminEmailAddresses; @@ -93,7 +95,7 @@ namespace LeafWeb.WebCms.Services var body = $"Your leaf analysis job, {leafInput.Identifier}, has been cancelled. " + "Contact the administrator with any questions."; - var message = new MailMessage(_emailFromAddress, leafInput.Email, FormatSubject(EmailCancelledSubject, leafInput), body); + var message = new MailMessage(_emailFromAddress, leafInput.Email, FormatSubject(CancelledSubject, leafInput), body); SendMessage(message); } @@ -120,14 +122,14 @@ namespace LeafWeb.WebCms.Services + Environment.NewLine + Environment.NewLine + downloadUrl; - var message = new MailMessage(_emailFromAddress, leafInput.Email, FormatSubject(EmailSuccessSubject, leafInput), body); + var message = new MailMessage(_emailFromAddress, leafInput.Email, FormatSubject(SuccessSubject, leafInput), body); SendMessage(message); } else { body += "Please see the attached results."; - var message = new MailMessage(_emailFromAddress, leafInput.Email, EmailSuccessSubject, body); + var message = new MailMessage(_emailFromAddress, leafInput.Email, SuccessSubject, body); var fileStreams = (from outputFile in @@ -164,7 +166,7 @@ namespace LeafWeb.WebCms.Services body += FormatWarningMessage(leafInput); - var message = new MailMessage(_emailFromAddress, leafInput.Email, FormatSubject(EmailErrorSubject, leafInput), body); + var message = new MailMessage(_emailFromAddress, leafInput.Email, FormatSubject(ErrorSubject, leafInput), body); SendMessage(message); } @@ -174,7 +176,25 @@ namespace LeafWeb.WebCms.Services + "System administrators have been notified. You will be notified again when the system error " + "has been resolved and your data has been processed."; - var message = new MailMessage(_emailFromAddress, leafInputEmail, EmailSystemErrorSubject, body); + var message = new MailMessage(_emailFromAddress, leafInputEmail, SystemErrorSubject, body); + SendMessage(message); + } + + public void SendContactEmail(ContactForm contact) + { + var body = + $"via LeafWeb, ${contact.Name} sent the following message from the Contact form." + + Environment.NewLine + Environment.NewLine + + "Message" + + Environment.NewLine + Environment.NewLine + + "--------" + + Environment.NewLine + + contact.Message; + + var message = new MailMessage(_emailFromAddress, _adminEmailAddresses, ContactSubject, body) + { + From = new MailAddress(contact.Email, contact.Name) + }; SendMessage(message); } diff --git a/WebCms/Views/Contact/Index.cshtml b/WebCms/Views/Contact/Index.cshtml new file mode 100644 index 0000000..29a9b63 --- /dev/null +++ b/WebCms/Views/Contact/Index.cshtml @@ -0,0 +1,25 @@ +@using ClientDependency.Core.Mvc +@using LeafWeb.WebCms.Controllers +@model ContactForm +@{ + Html.RequiresJs("~/scripts/jquery.validate.min.js", 2); + Html.RequiresJs("~/scripts/jquery.validate.unobtrusive.min.js", 2); + Html.RequiresJs("~/scripts/jquery.validate.unobtrusive.bootstrap.min.js", 2); + Html.RequiresJs("~/scripts/jquery.validate.custom.js", 2); +} + +
+
+
+ @Html.Partial("_ValidationSummary") + + @using (Html.BeginUmbracoForm("Submit")) + { + @Html.EditorFor(m => m.Name) + @Html.EditorFor(m => m.Email) + @Html.EditorFor(m => m.Message) + } + +
+
+
diff --git a/WebCms/Views/MacroPartials/Contact.cshtml b/WebCms/Views/MacroPartials/Contact.cshtml new file mode 100644 index 0000000..f38fd0a --- /dev/null +++ b/WebCms/Views/MacroPartials/Contact.cshtml @@ -0,0 +1,4 @@ +@inherits Umbraco.Web.Macros.PartialViewMacroPage +@{ + Html.RenderAction("Index", "Contact"); +} \ No newline at end of file diff --git a/WebCms/Views/Queue/Details.cshtml b/WebCms/Views/Queue/Details.cshtml index e297428..0f022b8 100644 --- a/WebCms/Views/Queue/Details.cshtml +++ b/WebCms/Views/Queue/Details.cshtml @@ -33,15 +33,6 @@ } - - @*@using (Html.BeginUmbracoForm( - "SendUserChartLink", null, new { @class = "confirm", confirm_msg = "Confirm sending email to user" })) - { - - - }*@ @DeleteLink(Model.LeafInputId, Model.Identifier, Model.IsDeletable)
@@ -49,7 +40,6 @@
- @helper DeleteLink(int id, string identifier, bool deletable) { using (Html.BeginUmbracoForm( diff --git a/WebCms/Views/Queue/Index.cshtml b/WebCms/Views/Queue/Index.cshtml index 8d65e1e..2465169 100644 --- a/WebCms/Views/Queue/Index.cshtml +++ b/WebCms/Views/Queue/Index.cshtml @@ -34,7 +34,7 @@ grid.Column("Identifier", "Identifier"), grid.Column("SiteId", "Site Id"), grid.Column("Name", "Submitted By"), - grid.Column("TimeInProgress", "Statistics", item => TimeInProgress(item.Value)), + grid.Column("TimeInProgress", "Statistics", item => Statistics(item.Value)), grid.Column("CurrentStatus", "Status", item => Status(item.Value)), grid.Column("Total Results: " + Model.Items.Count(), format: item => Btns(item.Value))), htmlAttributes: new {@class = "table table-striped table-bordered table-hover table-condensed"} @@ -48,28 +48,28 @@ else @helper Status(LeafInput leafInput) { -if (leafInput.IsPending) -{ - - - @Html.Partial("DisplayTemplates/PriorityIcon", leafInput.PendingPriority) + if (leafInput.IsPending) + { + + + @Html.Partial("DisplayTemplates/PriorityIcon", leafInput.PendingPriority) + + @Html.Partial("DisplayTemplates/_LeafInputStatus", leafInput.CurrentStatus.ToString()) + + } + else + { + + @Html.Partial("DisplayTemplates/_LeafInputStatus", leafInput.CurrentStatus.ToString()) + @if (leafInput.OutputErrorMessage != null) + { + + } else if (leafInput.OutputWarningMessage != null) + { + + } - @Html.Partial("DisplayTemplates/_LeafInputStatus", leafInput.CurrentStatus.ToString()) - -} -else -{ - - @Html.Partial("DisplayTemplates/_LeafInputStatus", leafInput.CurrentStatus.ToString()) - @if (leafInput.OutputErrorMessage != null) - { - - } else if (leafInput.OutputWarningMessage != null) - { - } - -} } @helper Btns(LeafInput item) @@ -129,41 +129,41 @@ else ToUser } -@helper TimeInProgress(LeafInput leafInput) +@helper Statistics(LeafInput leafInput) { -var summary = new List { "Added Time: " + leafInput.Added }; -if (leafInput.StartTime.HasValue) -{ - summary.Add("Start Time: " + leafInput.StartTime.Value); -} -if (leafInput.EndTime.HasValue) -{ - summary.Add("End Time: " + leafInput.EndTime.Value); -} -var summaryText = string.Join(Environment.NewLine, summary); - - @leafInput.InputFiles.Count @if(leafInput.InputFiles.Count > 1) {LeafInputs} else { LeafInput} -
- @if (leafInput.TimeInProgress > TimeSpan.Zero) + var summary = new List { "Added Time: " + leafInput.Added }; + if (leafInput.StartTime.HasValue) { - - @leafInput.TimeInProgress.ToRoundedReadableString() - + summary.Add("Start Time: " + leafInput.StartTime.Value); } - else if (leafInput.IsPending) + if (leafInput.EndTime.HasValue) { - - @Html.Partial("DisplayTemplates/_TimeRemaining", Tuple.Create(leafInput, Model.TimeInProgressEstimater)) est. - + summary.Add("End Time: " + leafInput.EndTime.Value); } - @if (leafInput.IsRunning) - { - + var summaryText = string.Join(Environment.NewLine, summary); + + @leafInput.InputFiles.Count @if(leafInput.InputFiles.Count > 1) {LeafInputs} else { LeafInput}
- @Html.Partial("DisplayTemplates/_TimeRemaining", Tuple.Create(leafInput, Model.TimeInProgressEstimater)) left -
- } -
+ @if (leafInput.TimeInProgress > TimeSpan.Zero) + { + + @leafInput.TimeInProgress.ToRoundedReadableString() + + } + else if (leafInput.IsPending) + { + + @Html.Partial("DisplayTemplates/_TimeRemaining", Tuple.Create(leafInput, Model.TimeInProgressEstimater)) est. + + } + @if (leafInput.IsRunning) + { + +
+ @Html.Partial("DisplayTemplates/_TimeRemaining", Tuple.Create(leafInput, Model.TimeInProgressEstimater)) left +
+ } +
} @helper DeleteLink(LeafInput item) { diff --git a/WebCms/Views/Shared/_StatusMessage.cshtml b/WebCms/Views/Shared/_StatusMessage.cshtml index 614d72b..73172c7 100644 --- a/WebCms/Views/Shared/_StatusMessage.cshtml +++ b/WebCms/Views/Shared/_StatusMessage.cshtml @@ -1,14 +1,14 @@ @if (TempData.ContainsKey("StatusMessage")) { -

- +

+ @Html.Raw(TempData["StatusMessage"])

} else if (ViewBag.StatusMessage != null) { -

- +

+ @ViewBag.StatusMessage

} \ No newline at end of file diff --git a/WebCms/WebCms.csproj b/WebCms/WebCms.csproj index 057aec6..435b9c2 100644 --- a/WebCms/WebCms.csproj +++ b/WebCms/WebCms.csproj @@ -894,6 +894,8 @@ + + Web.config @@ -923,11 +925,13 @@ + + diff --git a/WebCms/scripts/LeafInputCreate.js b/WebCms/scripts/LeafInputCreate.js index 0dcab21..0f428f2 100644 --- a/WebCms/scripts/LeafInputCreate.js +++ b/WebCms/scripts/LeafInputCreate.js @@ -6,6 +6,7 @@ var identifier = $(form).find("input[name='Identifier']").val(); $("
" + "Please confirm submitting '" + identifier + "'
") .dialog({ + text: "Confirm", buttons: { "Confirm": function () { $("#confirmCreate") diff --git a/WebCms/scripts/site.js b/WebCms/scripts/site.js index 13970b9..8965433 100644 --- a/WebCms/scripts/site.js +++ b/WebCms/scripts/site.js @@ -13,7 +13,8 @@ text = confirmMsg; } $("
" + text + "
") - .dialog({ + .dialog({ + title: "Confirm", buttons: { "Confirm": function () { form.submit();