initial source commit
This commit is contained in:
@@ -0,0 +1,781 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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<Disco.Web.Areas.Config.Models.DocumentTemplate.ShowModel>
|
||||
{
|
||||
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<div");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 650px\"");
|
||||
|
||||
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>\r\n Id:\r\n " +
|
||||
"</th>\r\n <td>");
|
||||
|
||||
|
||||
#line 11 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
Write(Html.DisplayFor(model => model.DocumentTemplate.Id));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
|
||||
" Stored Instances:\r\n </th>\r\n <td>");
|
||||
|
||||
|
||||
#line 18 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
Write(Html.DisplayFor(model => model.StoredInstanceCount));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
|
||||
" Description:\r\n </th>\r\n <td>");
|
||||
|
||||
|
||||
#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 <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(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();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Always Flatten Form:
|
||||
</th>
|
||||
<td>
|
||||
<input");
|
||||
|
||||
WriteLiteral(" id=\"DocumentTemplate_FlattenForm\"");
|
||||
|
||||
WriteLiteral(" type=\"checkbox\"");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 74 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
Write(Model.DocumentTemplate.FlattenForm ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 75 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
$('#DocumentTemplate_FlattenForm').click(function () {
|
||||
var $this = $(this);
|
||||
var $ajaxLoading = $this.next('.ajaxLoading').show();
|
||||
var data = { FlattenForm: $this.is(':checked') };
|
||||
$.getJSON('");
|
||||
|
||||
|
||||
#line 82 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
Write(Url.Action(MVC.API.DocumentTemplate.UpdateFlattenForm(Model.DocumentTemplate.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"', data, function (response, result) {
|
||||
if (result != 'success' || response != 'OK') {
|
||||
alert('Unable to change Flatten Form:\n' + response);
|
||||
$ajaxLoading.hide();
|
||||
} else {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Scope:
|
||||
</th>
|
||||
<td>
|
||||
");
|
||||
|
||||
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 <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(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).attr(\'checked\', false);\r\n " +
|
||||
" });\r\n $(\'.jobSubTypes\').hide().find(" +
|
||||
"\'input[type=\"checkbox\"]:checked\').each(function () {\r\n " +
|
||||
" $(this).attr(\'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();
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr");
|
||||
|
||||
WriteLiteral(" id=\"trJobTypes\"");
|
||||
|
||||
WriteLiteral(">\r\n <th");
|
||||
|
||||
WriteLiteral(" class=\"name\"");
|
||||
|
||||
WriteLiteral(">\r\n Types:\r\n </th>\r\n <td");
|
||||
|
||||
WriteLiteral(" class=\"value\"");
|
||||
|
||||
WriteLiteral(">\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 </td>\r\n </tr>\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(" <tr");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 10448), Tuple.Create("\"", 10473)
|
||||
, Tuple.Create(Tuple.Create("", 10453), Tuple.Create("trJobSubType", 10453), true)
|
||||
|
||||
#line 206 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 10465), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 10465), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"jobSubTypes\"");
|
||||
|
||||
WriteLiteral(">\r\n <th");
|
||||
|
||||
WriteLiteral(" class=\"name\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 208 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
Write(jt.Description);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n Sub Types<br />\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 </th>\r\n <td");
|
||||
|
||||
WriteLiteral(" class=\"value\"");
|
||||
|
||||
WriteLiteral(">\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 </td>\r\n </tr> \r\n");
|
||||
|
||||
|
||||
#line 216 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr");
|
||||
|
||||
WriteLiteral(" id=\"trJobTypeActions\"");
|
||||
|
||||
WriteLiteral(">\r\n <th");
|
||||
|
||||
WriteLiteral(" class=\"name\"");
|
||||
|
||||
WriteLiteral(">\r\n </th>\r\n <td");
|
||||
|
||||
WriteLiteral(" class=\"value\"");
|
||||
|
||||
WriteLiteral(">\r\n <a");
|
||||
|
||||
WriteLiteral(" id=\"TypeAction_Save\"");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(">Save Job Types</a>");
|
||||
|
||||
|
||||
#line 221 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
|
||||
" Template PDF\r\n </th>\r\n <td>\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 <br />\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(" <input");
|
||||
|
||||
WriteLiteral(" type=\"file\"");
|
||||
|
||||
WriteLiteral(" name=\"Template\"");
|
||||
|
||||
WriteLiteral(" id=\"Template\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 250px;\"");
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
WriteLiteral(" <input");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(" type=\"submit\"");
|
||||
|
||||
WriteLiteral(" value=\"Upload\"");
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
|
||||
#line 235 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
var $template = $('#Template');
|
||||
$template.closest('form').submit(function () {
|
||||
if ($template.val() == '') {
|
||||
alert('A template file is required to upload.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Filter Expression:
|
||||
</th>
|
||||
<td>");
|
||||
|
||||
|
||||
#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 <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\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();
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Bulk Generate
|
||||
</th>
|
||||
<td>
|
||||
");
|
||||
|
||||
|
||||
#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(" <textarea");
|
||||
|
||||
WriteLiteral(" name=\"DataIds\"");
|
||||
|
||||
WriteLiteral("></textarea>\r\n");
|
||||
|
||||
WriteLiteral(" <input");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(" type=\"submit\"");
|
||||
|
||||
WriteLiteral(" value=\"Generate\"");
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
|
||||
#line 314 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n </table>\r\n</div>\r\n<h2>\r\n Template Expres" +
|
||||
"sions</h2>\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<div");
|
||||
|
||||
WriteLiteral(" id=\"dialogConfirmDelete\"");
|
||||
|
||||
WriteLiteral(" title=\"Delete this Document Template?\"");
|
||||
|
||||
WriteLiteral(">\r\n <p>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
|
||||
|
||||
WriteLiteral(" style=\"float: left; margin: 0 7px 100px 0;\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
</span>This item will be permanently deleted and cannot be recovered.<br />
|
||||
<em>This <strong>will not delete attachments</strong> which have already been imported,
|
||||
but any generated documents will no longer be automatically imported.</em><br />
|
||||
Are you sure?</p>
|
||||
</div>
|
||||
<script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(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"");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\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</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
Reference in New Issue
Block a user