#pragma warning disable 1591 //------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.17929 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace Disco.Web.Areas.Config.Views.DocumentTemplate { using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Text; using System.Web; using System.Web.Helpers; using System.Web.Mvc; using System.Web.Mvc.Ajax; using System.Web.Mvc.Html; using System.Web.Routing; using System.Web.Security; using System.Web.UI; using System.Web.WebPages; using Disco.BI.Extensions; using Disco.Models.Repository; using Disco.Web; using Disco.Web.Extensions; [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] [System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DocumentTemplate/Show.cshtml")] public class Show : System.Web.Mvc.WebViewPage { public Show() { } public override void Execute() { #line 2 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(null), Model.DocumentTemplate.Description); #line default #line hidden WriteLiteral("\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Types:\r\n \r\n \r\n"); WriteLiteral(" "); #line 201 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" Write(CommonHelpers.CheckBoxList("Types", Model.JobTypes.ToSelectListItems(Model.Types), 2)); #line default #line hidden WriteLiteral("\r\n \r\n \r\n"); #line 204 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" #line default #line hidden #line 204 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" foreach (var jt in Model.JobTypes) { #line default #line hidden WriteLiteral(" (jt.Id #line default #line hidden , 10465), false) ); WriteLiteral(" class=\"jobSubTypes\""); WriteLiteral(">\r\n \r\n"); WriteLiteral(" "); #line 208 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" Write(jt.Description); #line default #line hidden WriteLiteral("
\r\n Sub Types
\r\n"); WriteLiteral(" "); #line 210 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" Write(CommonHelpers.CheckboxBulkSelect(string.Format("CheckboxBulkSelect_{0}", jt.Id))); #line default #line hidden WriteLiteral("\r\n \r\n \r\n"); WriteLiteral(" "); #line 213 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" Write(CommonHelpers.CheckBoxList("SubTypes", Model.JobSubTypes.Where(jst => jst.JobTypeId == jt.Id).ToList().ToSelectListItems(Model.SubTypes), 2)); #line default #line hidden WriteLiteral("\r\n \r\n \r\n"); #line 216 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" } #line default #line hidden WriteLiteral(" \r\n \r\n \r\n \r\n Save Job Types"); #line 221 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" Write(AjaxHelpers.AjaxLoader()); #line default #line hidden WriteLiteral("\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n Id:\r\n " + ""); #line 11 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" Write(Html.DisplayFor(model => model.DocumentTemplate.Id)); #line default #line hidden WriteLiteral("\r\n
\r\n " + " Stored Instances:\r\n "); #line 18 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" Write(Html.DisplayFor(model => model.StoredInstanceCount)); #line default #line hidden WriteLiteral("\r\n
\r\n " + " Description:\r\n "); #line 25 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" Write(Html.TextBoxFor(model => model.DocumentTemplate.Description)); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 26 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" Write(AjaxHelpers.AjaxSave()); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 27 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" Write(AjaxHelpers.AjaxLoader()); #line default #line hidden WriteLiteral("\r\n $(function () { var $Description = $('#DocumentTemplate_Description'); var $DescriptionAjaxSave = $Description.next('.ajaxSave'); $Description .watermark('Description') .focus(function () { $Description.select() }) .keydown(function (e) { $DescriptionAjaxSave.show(); if (e.which == 13) { $(this).blur(); } }).blur(function () { $DescriptionAjaxSave.hide(); }) .change(function () { $DescriptionAjaxSave.hide(); var $ajaxLoading = $DescriptionAjaxSave.next('.ajaxLoading').show(); var data = { Description: $Description.val() }; $.ajax({ url: '"); #line 48 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" Write(Url.Action(MVC.API.DocumentTemplate.UpdateDescription(Model.DocumentTemplate.Id))); #line default #line hidden WriteLiteral(@"', dataType: 'json', data: data, success: function (d) { if (d == 'OK') { $ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); } else { $ajaxLoading.hide(); alert('Unable to update description: ' + d); } }, error: function (jqXHR, textStatus, errorThrown) { alert('Unable to update description: ' + textStatus); $ajaxLoading.hide(); } }); }); });
Always Flatten Form:
Scope: "); WriteLiteral(" "); #line 100 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" Write(Html.DropDownListFor(model => model.DocumentTemplate.Scope, Model.Scopes.ToSelectListItems(null))); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 101 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" Write(AjaxHelpers.AjaxLoader()); #line default #line hidden WriteLiteral("\r\n $(function () { var $scope = $('#DocumentTemplate_Scope'); $scope.change(function () { var $ajaxLoading = $scope.next('.ajaxLoading').show(); var data = { Scope: $scope.val() }; $.ajax({ url: '"); #line 109 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" Write(Url.Action(MVC.API.DocumentTemplate.UpdateScope(Model.DocumentTemplate.Id))); #line default #line hidden WriteLiteral("\',\r\n dataType: \'json\',\r\n " + " data: data,\r\n success: function (d) {\r\n " + " if (d == \'OK\') {\r\n " + " $ajaxLoading.hide().next(\'.ajaxOk\').show().delay(\'fast\').fadeOut(\'slow" + "\');\r\n scopeChange();\r\n " + " } else {\r\n $ajaxLoading." + "hide();\r\n alert(\'Unable to update scope: " + "\' + d);\r\n }\r\n " + "},\r\n error: function (jqXHR, textStatus, errorThr" + "own) {\r\n alert(\'Unable to update scope: \' + t" + "extStatus);\r\n $ajaxLoading.hide();\r\n " + " }\r\n });\r\n " + " });\r\n\r\n var $trJobTypes = $(\'#trJobTypes\');\r\n " + " var $trJobTypeActions = $(\'#trJobTypeActions\');\r\n " + " var $jobTypes = $trJobTypes.find(\'input[type=\"checkbox\"]\');\r\n " + " $jobTypes.change(jobTypesChange);\r\n\r\n functi" + "on scopeChange() {\r\n if ($scope.val() == \'Job\') {\r\n " + " $trJobTypes.show();\r\n " + " $trJobTypeActions.show();\r\n jobTypesChange();\r" + "\n } else {\r\n $trJobTyp" + "es.hide();\r\n $trJobTypeActions.hide();\r\n " + " $jobTypes.filter(\':checked\').each(function () {\r\n " + " $(this).prop(\'checked\', false);\r\n " + " });\r\n $(\'.jobSubTypes\').hide().find(" + "\'input[type=\"checkbox\"]:checked\').each(function () {\r\n " + " $(this).prop(\'checked\', false);\r\n });\r\n" + " }\r\n }\r\n\r\n " + " function jobTypesChange() {\r\n $(\'.jobSubTypes\').h" + "ide();\r\n $jobTypes.filter(\':checked\').each(function (" + ") {\r\n $(\'#trJobSubType\' + $(this).val()).show();\r" + "\n });\r\n }\r\n\r\n " + " $(\'#TypeAction_Save\').click(function () {\r\n va" + "r data = { SubTypes: [] };\r\n var $ajaxLoading = $(\'#T" + "ypeAction_Save\').next(\'.ajaxLoading\').show();\r\n\r\n $jo" + "bTypes.filter(\':checked\').each(function () {\r\n va" + "r $this = $(this);\r\n $(\'#trJobSubType\' + $this.va" + "l()).find(\'input[type=\"checkbox\"]:checked\').each(function () {\r\n " + " data.SubTypes.push($(this).val());\r\n " + " });\r\n });\r\n\r\n $.aj" + "ax({\r\n url: \'"); #line 169 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" Write(Url.Action(MVC.API.DocumentTemplate.UpdateSubTypes(Model.DocumentTemplate.Id))); #line default #line hidden WriteLiteral(@"', dataType: 'json', type: 'POST', traditional: true, data: data, success: function (d) { if (d == 'OK') { $ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); scopeChange(); } else { $ajaxLoading.hide(); alert('Unable to update job types: ' + d); } }, error: function (jqXHR, textStatus, errorThrown) { alert('Unable to update job types: ' + textStatus); $ajaxLoading.hide(); } }); return false; }); scopeChange(); });
\r\n " + " Template PDF\r\n \r\n"); WriteLiteral(" "); #line 229 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" Write(Html.ActionLink("Download Template", MVC.API.DocumentTemplate.Template(Model.DocumentTemplate.Id))); #line default #line hidden WriteLiteral("\r\n
\r\n"); #line 231 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" #line default #line hidden #line 231 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" using (Html.BeginForm(MVC.API.DocumentTemplate.Template(Model.DocumentTemplate.Id, true, null), FormMethod.Post, new { enctype = "multipart/form-data" })) { #line default #line hidden WriteLiteral(" \r\n"); WriteLiteral(" \r\n"); #line 235 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" } #line default #line hidden WriteLiteral(" $(function () { var $template = $('#Template'); $template.closest('form').submit(function () { if ($template.val() == '') { alert('A template file is required to upload.'); return false; } }); });
Filter Expression: "); #line 253 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" Write(Html.TextBoxFor(model => model.DocumentTemplate.FilterExpression)); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 254 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" Write(AjaxHelpers.AjaxRemove()); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 255 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" Write(AjaxHelpers.AjaxLoader()); #line default #line hidden WriteLiteral("\r\n \r\n $(function () {\r\n var $FilterExpres" + "sion = $(\'#DocumentTemplate_FilterExpression\');\r\n var $aj" + "axLoading = $FilterExpression.nextAll(\'.ajaxLoading\').first();\r\n " + " var $ajaxRemove = $FilterExpression.nextAll(\'.ajaxRemove\').first();\r\n " + " $FilterExpression\r\n .waterma" + "rk(\'Filter Expression\')\r\n .focus(function () { $F" + "ilterExpression.select() })\r\n .keydown(function (" + "e) {\r\n if (e.which == 13) {\r\n " + " $(this).blur();\r\n }\r\n" + " }).change(function () {\r\n " + " updateFilterExpression($FilterExpression.val());\r\n " + " });\r\n if ($FilterExpression.val() != \'\')\r\n" + " $ajaxRemove.show();\r\n $ajaxRe" + "move.click(function () {\r\n updateFilterExpression(\'\')" + ";\r\n $FilterExpression.val(\'\');\r\n " + " });\r\n var updateFilterExpression = function (filterExp" + "ression) {\r\n $ajaxLoading.show();\r\n " + " $ajaxRemove.hide();\r\n var data = { FilterEx" + "pression: filterExpression };\r\n $.ajax({\r\n " + " url: \'"); #line 282 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" Write(Url.Action(MVC.API.DocumentTemplate.UpdateFilterExpression(Model.DocumentTemplate.Id))); #line default #line hidden WriteLiteral(@"', dataType: 'json', data: data, success: function (d) { if (d == 'OK') { $ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); if (data.FilterExpression != '') $ajaxRemove.fadeIn('fast'); } else { $ajaxLoading.hide(); alert('Unable to update filter expression: ' + d); } }, error: function (jqXHR, textStatus, errorThrown) { alert('Unable to update filter expression: ' + textStatus); $ajaxLoading.hide(); } }); }; });
Bulk Generate "); #line 310 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" #line default #line hidden #line 310 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" using (Html.BeginForm(MVC.API.DocumentTemplate.BulkGenerate(Model.DocumentTemplate.Id), FormMethod.Post)) { #line default #line hidden WriteLiteral(" \r\n"); WriteLiteral(" \r\n"); #line 314 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" } #line default #line hidden WriteLiteral("
\r\n\r\n

\r\n Template Expres" + "sions

\r\n"); #line 321 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" Write(Html.Partial(MVC.Config.DocumentTemplate.Views._ExpressionsTable, Model.TemplateExpressions)); #line default #line hidden WriteLiteral("\r\n\r\n

\r\n This item will be permanently deleted and cannot be recovered.
This will not delete attachments which have already been imported, but any generated documents will no longer be automatically imported.
Are you sure?

$(function () { var button = $('#buttonDelete'); var buttonDialog = $(""#dialogConfirmDelete""); var buttonLink = button.attr('href'); button.attr('href', '#'); button.click(function () { buttonDialog.dialog('open'); return false; }); buttonDialog.dialog({ resizable: false, modal: true, autoOpen: false, buttons: { ""Delete"": function () { $this = $(this); $this.dialog('disable'); $this.dialog(""option"", ""buttons"", null); window.location.href = buttonLink; }, Cancel: function () { $(this).dialog(""close""); } } }); }); \r\n"); WriteLiteral(" "); #line 360 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" Write(Html.ActionLinkButton("Expression Browser", MVC.Config.DocumentTemplate.ExpressionBrowser())); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 361 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" Write(Html.ActionLinkButton("Delete", MVC.API.DocumentTemplate.Delete(Model.DocumentTemplate.Id, true), "buttonDelete")); #line default #line hidden WriteLiteral("\r\n\r\n"); } } } #pragma warning restore 1591