GIT: perform LF normalization
This commit is contained in:
@@ -1,96 +1,96 @@
|
||||
@model Disco.Web.Areas.Config.Models.DocumentTemplate.CreateModel
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(null), "Create");
|
||||
}
|
||||
@using (Html.BeginForm(MVC.Config.DocumentTemplate.Create(), FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
<div class="form" style="width: 650px">
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
Id:
|
||||
</th>
|
||||
<td>@Html.TextBoxFor(model => model.DocumentTemplate.Id)<br />@Html.ValidationMessageFor(model => model.DocumentTemplate.Id)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Description:
|
||||
</th>
|
||||
<td>@Html.TextBoxFor(model => model.DocumentTemplate.Description)<br />@Html.ValidationMessageFor(model => model.DocumentTemplate.Description)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Scope:
|
||||
</th>
|
||||
<td>
|
||||
@Html.DropDownListFor(model => model.DocumentTemplate.Scope, Model.Scopes.ToSelectListItems(null))
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Template PDF
|
||||
</th>
|
||||
<td>
|
||||
<input type="file" name="Template" /><br />@Html.ValidationMessage("Template")
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="trJobTypes">
|
||||
<th class="name">
|
||||
Types:
|
||||
</th>
|
||||
<td class="value">
|
||||
@CommonHelpers.CheckBoxList("Types", Model.JobTypes.ToSelectListItems(Model.Types), 2)
|
||||
</td>
|
||||
</tr>
|
||||
@foreach (var jt in Model.JobTypes)
|
||||
{
|
||||
<tr id="trJobSubType@(jt.Id)" class="jobSubTypes">
|
||||
<th class="name">
|
||||
@jt.Description<br />
|
||||
Sub Types<br />
|
||||
@CommonHelpers.CheckboxBulkSelect(string.Format("CheckboxBulkSelect_{0}", jt.Id))
|
||||
</th>
|
||||
<td class="value">
|
||||
@CommonHelpers.CheckBoxList("SubTypes", Model.JobSubTypes.Where(jst => jst.JobTypeId == jt.Id).ToList().ToSelectListItems(Model.SubTypes), 2)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
<p class="actions">
|
||||
<input type="submit" class="button" value="Create" />
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#Name').focus().select();
|
||||
|
||||
var $scope = $('#DocumentTemplate_Scope');
|
||||
var $trJobTypes = $('#trJobTypes');
|
||||
var $jobTypes = $trJobTypes.find('input[type="checkbox"]');
|
||||
$scope.change(scopeChange);
|
||||
$jobTypes.change(jobTypesChange);
|
||||
|
||||
scopeChange();
|
||||
|
||||
function scopeChange() {
|
||||
if ($scope.val() == 'Job') {
|
||||
$trJobTypes.show();
|
||||
jobTypesChange();
|
||||
} else {
|
||||
$trJobTypes.hide();
|
||||
$('.jobSubTypes').hide();
|
||||
}
|
||||
}
|
||||
|
||||
function jobTypesChange() {
|
||||
$('.jobSubTypes').hide();
|
||||
$jobTypes.filter(':checked').each(function () {
|
||||
$('#trJobSubType' + $(this).val()).show();
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
@model Disco.Web.Areas.Config.Models.DocumentTemplate.CreateModel
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(null), "Create");
|
||||
}
|
||||
@using (Html.BeginForm(MVC.Config.DocumentTemplate.Create(), FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
<div class="form" style="width: 650px">
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
Id:
|
||||
</th>
|
||||
<td>@Html.TextBoxFor(model => model.DocumentTemplate.Id)<br />@Html.ValidationMessageFor(model => model.DocumentTemplate.Id)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Description:
|
||||
</th>
|
||||
<td>@Html.TextBoxFor(model => model.DocumentTemplate.Description)<br />@Html.ValidationMessageFor(model => model.DocumentTemplate.Description)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Scope:
|
||||
</th>
|
||||
<td>
|
||||
@Html.DropDownListFor(model => model.DocumentTemplate.Scope, Model.Scopes.ToSelectListItems(null))
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Template PDF
|
||||
</th>
|
||||
<td>
|
||||
<input type="file" name="Template" /><br />@Html.ValidationMessage("Template")
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="trJobTypes">
|
||||
<th class="name">
|
||||
Types:
|
||||
</th>
|
||||
<td class="value">
|
||||
@CommonHelpers.CheckBoxList("Types", Model.JobTypes.ToSelectListItems(Model.Types), 2)
|
||||
</td>
|
||||
</tr>
|
||||
@foreach (var jt in Model.JobTypes)
|
||||
{
|
||||
<tr id="trJobSubType@(jt.Id)" class="jobSubTypes">
|
||||
<th class="name">
|
||||
@jt.Description<br />
|
||||
Sub Types<br />
|
||||
@CommonHelpers.CheckboxBulkSelect(string.Format("CheckboxBulkSelect_{0}", jt.Id))
|
||||
</th>
|
||||
<td class="value">
|
||||
@CommonHelpers.CheckBoxList("SubTypes", Model.JobSubTypes.Where(jst => jst.JobTypeId == jt.Id).ToList().ToSelectListItems(Model.SubTypes), 2)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
<p class="actions">
|
||||
<input type="submit" class="button" value="Create" />
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#Name').focus().select();
|
||||
|
||||
var $scope = $('#DocumentTemplate_Scope');
|
||||
var $trJobTypes = $('#trJobTypes');
|
||||
var $jobTypes = $trJobTypes.find('input[type="checkbox"]');
|
||||
$scope.change(scopeChange);
|
||||
$jobTypes.change(jobTypesChange);
|
||||
|
||||
scopeChange();
|
||||
|
||||
function scopeChange() {
|
||||
if ($scope.val() == 'Job') {
|
||||
$trJobTypes.show();
|
||||
jobTypesChange();
|
||||
} else {
|
||||
$trJobTypes.hide();
|
||||
$('.jobSubTypes').hide();
|
||||
}
|
||||
}
|
||||
|
||||
function jobTypesChange() {
|
||||
$('.jobSubTypes').hide();
|
||||
$jobTypes.filter(':checked').each(function () {
|
||||
$('#trJobSubType' + $(this).val()).show();
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@@ -1,299 +1,299 @@
|
||||
#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/Create.cshtml")]
|
||||
public class Create : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DocumentTemplate.CreateModel>
|
||||
{
|
||||
public Create()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(null), "Create");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 5 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
using (Html.BeginForm(MVC.Config.DocumentTemplate.Create(), FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 650px\"");
|
||||
|
||||
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>\r\n I" +
|
||||
"d:\r\n </th>\r\n <td>");
|
||||
|
||||
|
||||
#line 13 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
Write(Html.TextBoxFor(model => model.DocumentTemplate.Id));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />");
|
||||
|
||||
|
||||
#line 13 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.DocumentTemplate.Id));
|
||||
|
||||
|
||||
#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 20 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
Write(Html.TextBoxFor(model => model.DocumentTemplate.Description));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />");
|
||||
|
||||
|
||||
#line 20 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.DocumentTemplate.Description));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">\r\n Scope:\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 28 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
Write(Html.DropDownListFor(model => model.DocumentTemplate.Scope, Model.Scopes.ToSelectListItems(null)));
|
||||
|
||||
|
||||
#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 <input");
|
||||
|
||||
WriteLiteral(" type=\"file\"");
|
||||
|
||||
WriteLiteral(" name=\"Template\"");
|
||||
|
||||
WriteLiteral(" /><br />");
|
||||
|
||||
|
||||
#line 36 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
Write(Html.ValidationMessage("Template"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <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 44 "..\..\Areas\Config\Views\DocumentTemplate\Create.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 47 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 47 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
foreach (var jt in Model.JobTypes)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 1914), Tuple.Create("\"", 1939)
|
||||
, Tuple.Create(Tuple.Create("", 1919), Tuple.Create("trJobSubType", 1919), true)
|
||||
|
||||
#line 49 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1931), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1931), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"jobSubTypes\"");
|
||||
|
||||
WriteLiteral(">\r\n <th");
|
||||
|
||||
WriteLiteral(" class=\"name\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 51 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
Write(jt.Description);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n Sub Types<br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\DocumentTemplate\Create.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 56 "..\..\Areas\Config\Views\DocumentTemplate\Create.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 59 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </table>\r\n <p");
|
||||
|
||||
WriteLiteral(" class=\"actions\"");
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"submit\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(" value=\"Create\"");
|
||||
|
||||
WriteLiteral(" />\r\n </p>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
$('#Name').focus().select();
|
||||
|
||||
var $scope = $('#DocumentTemplate_Scope');
|
||||
var $trJobTypes = $('#trJobTypes');
|
||||
var $jobTypes = $trJobTypes.find('input[type=""checkbox""]');
|
||||
$scope.change(scopeChange);
|
||||
$jobTypes.change(jobTypesChange);
|
||||
|
||||
scopeChange();
|
||||
|
||||
function scopeChange() {
|
||||
if ($scope.val() == 'Job') {
|
||||
$trJobTypes.show();
|
||||
jobTypesChange();
|
||||
} else {
|
||||
$trJobTypes.hide();
|
||||
$('.jobSubTypes').hide();
|
||||
}
|
||||
}
|
||||
|
||||
function jobTypesChange() {
|
||||
$('.jobSubTypes').hide();
|
||||
$jobTypes.filter(':checked').each(function () {
|
||||
$('#trJobSubType' + $(this).val()).show();
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
");
|
||||
|
||||
|
||||
#line 96 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
#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/Create.cshtml")]
|
||||
public class Create : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DocumentTemplate.CreateModel>
|
||||
{
|
||||
public Create()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(null), "Create");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 5 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
using (Html.BeginForm(MVC.Config.DocumentTemplate.Create(), FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 650px\"");
|
||||
|
||||
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>\r\n I" +
|
||||
"d:\r\n </th>\r\n <td>");
|
||||
|
||||
|
||||
#line 13 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
Write(Html.TextBoxFor(model => model.DocumentTemplate.Id));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />");
|
||||
|
||||
|
||||
#line 13 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.DocumentTemplate.Id));
|
||||
|
||||
|
||||
#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 20 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
Write(Html.TextBoxFor(model => model.DocumentTemplate.Description));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />");
|
||||
|
||||
|
||||
#line 20 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.DocumentTemplate.Description));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">\r\n Scope:\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 28 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
Write(Html.DropDownListFor(model => model.DocumentTemplate.Scope, Model.Scopes.ToSelectListItems(null)));
|
||||
|
||||
|
||||
#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 <input");
|
||||
|
||||
WriteLiteral(" type=\"file\"");
|
||||
|
||||
WriteLiteral(" name=\"Template\"");
|
||||
|
||||
WriteLiteral(" /><br />");
|
||||
|
||||
|
||||
#line 36 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
Write(Html.ValidationMessage("Template"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <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 44 "..\..\Areas\Config\Views\DocumentTemplate\Create.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 47 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 47 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
foreach (var jt in Model.JobTypes)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 1914), Tuple.Create("\"", 1939)
|
||||
, Tuple.Create(Tuple.Create("", 1919), Tuple.Create("trJobSubType", 1919), true)
|
||||
|
||||
#line 49 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1931), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1931), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"jobSubTypes\"");
|
||||
|
||||
WriteLiteral(">\r\n <th");
|
||||
|
||||
WriteLiteral(" class=\"name\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 51 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
Write(jt.Description);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n Sub Types<br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\DocumentTemplate\Create.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 56 "..\..\Areas\Config\Views\DocumentTemplate\Create.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 59 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </table>\r\n <p");
|
||||
|
||||
WriteLiteral(" class=\"actions\"");
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"submit\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(" value=\"Create\"");
|
||||
|
||||
WriteLiteral(" />\r\n </p>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
$('#Name').focus().select();
|
||||
|
||||
var $scope = $('#DocumentTemplate_Scope');
|
||||
var $trJobTypes = $('#trJobTypes');
|
||||
var $jobTypes = $trJobTypes.find('input[type=""checkbox""]');
|
||||
$scope.change(scopeChange);
|
||||
$jobTypes.change(jobTypesChange);
|
||||
|
||||
scopeChange();
|
||||
|
||||
function scopeChange() {
|
||||
if ($scope.val() == 'Job') {
|
||||
$trJobTypes.show();
|
||||
jobTypesChange();
|
||||
} else {
|
||||
$trJobTypes.hide();
|
||||
$('.jobSubTypes').hide();
|
||||
}
|
||||
}
|
||||
|
||||
function jobTypesChange() {
|
||||
$('.jobSubTypes').hide();
|
||||
$jobTypes.filter(':checked').each(function () {
|
||||
$('#trJobSubType' + $(this).val()).show();
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
");
|
||||
|
||||
|
||||
#line 96 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
|
||||
@@ -1,132 +1,132 @@
|
||||
@model Disco.Web.Areas.Config.Models.DocumentTemplate.ExpressionBrowserModel
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(null), "Expression Browser");
|
||||
Html.BundleDeferred("~/Style/jQueryUI/dynatree");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-DynaTree");
|
||||
}
|
||||
<div id="configurationDocumentTemplateExpressionBrowser">
|
||||
Expressions within Disco are based on the <a href="http://www.springframework.net/"
|
||||
target="_blank">Spring.NET Framework</a>. Please refer to the <a href="http://www.springframework.net/doc-latest/reference/html/expressions.html"
|
||||
target="_blank">Expression Evaluation</a> documentation.
|
||||
<h2>
|
||||
Device Scope</h2>
|
||||
<div id="deviceScopeTree" class="expressionTree">
|
||||
</div>
|
||||
<h2>
|
||||
Job Scope</h2>
|
||||
<div id="jobScopeTree" class="expressionTree">
|
||||
</div>
|
||||
<h2>
|
||||
User Scope</h2>
|
||||
<div id="userScopeTree" class="expressionTree">
|
||||
</div>
|
||||
<h2>
|
||||
Variables
|
||||
</h2>
|
||||
<div id="variableScopeTree" class="expressionTree">
|
||||
</div>
|
||||
<h2>
|
||||
Extension Libraries</h2>
|
||||
<div id="extScopeTree" class="expressionTree">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
if (!document.DiscoFunctions) {
|
||||
document.DiscoFunctions = {};
|
||||
}
|
||||
|
||||
var typeLib = {};
|
||||
var loadTypeUrl = '@(Url.Action(MVC.Config.DocumentTemplate.ExpressionBrowser()))';
|
||||
var deviceScopeTree = $('#deviceScopeTree');
|
||||
var jobScopeTree = $('#jobScopeTree');
|
||||
var userScopeTree = $('#userScopeTree');
|
||||
var variableScopeTree = $('#variableScopeTree');
|
||||
var extScopeTree = $('#extScopeTree');
|
||||
|
||||
var lazyLoadNode = function (node) {
|
||||
if (node.data.expressionType) {
|
||||
node.setLazyNodeStatus(DTNodeStatus_Loading);
|
||||
loadType(node, node.data.expressionType, node.data.staticDeclaredMembersOnly);
|
||||
} else {
|
||||
if (node.data.memberDescriptor) {
|
||||
loadMember(node);
|
||||
} else {
|
||||
node.setLazyNodeStatus(DTNodeStatus_Ok);
|
||||
}
|
||||
}
|
||||
}
|
||||
var loadMember = function (memberNode) {
|
||||
var previousUpdateMode = memberNode.tree.enableUpdate(false);
|
||||
var memberDescriptor = memberNode.data.memberDescriptor;
|
||||
// Return Type
|
||||
memberNode.addChild({ title: 'Returns: ' + memberDescriptor.ReturnType, tooltip: memberDescriptor.ReturnExpressionType, isFolder: true, expressionType: memberDescriptor.ReturnExpressionType, isLazy: true, addClass: 'object' });
|
||||
// Parameters
|
||||
var parametersNode = memberNode.addChild({ title: 'Parameters', isFolder: true, addClass: 'parameter' });
|
||||
for (var i = 0; i < memberDescriptor.Parameters.length; i++) {
|
||||
var p = memberDescriptor.Parameters[i];
|
||||
parametersNode.addChild({ title: p.Name + ' [' + p.ReturnType + ']', tooltip: p.ReturnExpressionType, addClass: 'object' });
|
||||
}
|
||||
memberNode.setLazyNodeStatus(DTNodeStatus_Ok);
|
||||
memberNode.tree.enableUpdate(previousUpdateMode);
|
||||
}
|
||||
var typeLoaded = function (parentNode, typeDescriptor) {
|
||||
var previousUpdateMode = parentNode.tree.enableUpdate(false);
|
||||
for (var i = 0; i < typeDescriptor.Members.length; i++) {
|
||||
var memberDescriptor = typeDescriptor.Members[i];
|
||||
parentNode.addChild({ title: memberDescriptor.Name, tooltip: memberDescriptor.ReturnType, isFolder: true, addClass: memberDescriptor.Kind, memberDescriptor: memberDescriptor, isLazy: true });
|
||||
}
|
||||
parentNode.setLazyNodeStatus(DTNodeStatus_Ok);
|
||||
parentNode.tree.enableUpdate(previousUpdateMode);
|
||||
}
|
||||
|
||||
var loadType = function (parentNode, type, staticDeclaredMembersOnly) {
|
||||
if (typeLib[type]) {
|
||||
typeLoaded(parentNode, typeLib[type]);
|
||||
} else {
|
||||
var requestData = { type: type, StaticDeclaredMembersOnly: staticDeclaredMembersOnly };
|
||||
$.getJSON(loadTypeUrl, requestData, function (data) {
|
||||
typeLib[type] = data;
|
||||
typeLoaded(parentNode, data);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var initVariable = function (name, type) {
|
||||
variableScopeTree.dynatree('getRoot').addChild({ title: name, tooltip: type, isFolder: true, addClass: 'object', expressionType: type, isLazy: true });
|
||||
}
|
||||
var initExpressionLibrary = function (name, type) {
|
||||
extScopeTree.dynatree('getRoot').addChild({ title: name, tooltip: type, isFolder: true, addClass: 'object', expressionType: type, staticDeclaredMembersOnly: true, isLazy: true });
|
||||
}
|
||||
|
||||
// Init
|
||||
deviceScopeTree.dynatree({ onLazyRead: lazyLoadNode });
|
||||
loadType(deviceScopeTree.dynatree('getRoot'), '@(Model.DeviceType)');
|
||||
|
||||
jobScopeTree.dynatree({ onLazyRead: lazyLoadNode });
|
||||
loadType(jobScopeTree.dynatree('getRoot'), '@(Model.JobType)');
|
||||
|
||||
userScopeTree.dynatree({ onLazyRead: lazyLoadNode });
|
||||
loadType(userScopeTree.dynatree('getRoot'), '@(Model.UserType)');
|
||||
|
||||
variableScopeTree.dynatree({ onLazyRead: lazyLoadNode });
|
||||
document.DiscoFunctions.expressionInitVariable = initVariable;
|
||||
|
||||
extScopeTree.dynatree({ onLazyRead: lazyLoadNode });
|
||||
document.DiscoFunctions.expressionInitExpressionLibrary = initExpressionLibrary;
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
@{
|
||||
foreach (var variable in Model.Variables)
|
||||
{
|
||||
<text>document.DiscoFunctions.expressionInitVariable('@(variable.Key)', '@variable.Value');</text>
|
||||
}
|
||||
foreach (var variable in Model.ExtensionLibraries)
|
||||
{
|
||||
<text>document.DiscoFunctions.expressionInitExpressionLibrary('@(variable.Key)', '@variable.Value');</text>
|
||||
}
|
||||
}
|
||||
});
|
||||
@model Disco.Web.Areas.Config.Models.DocumentTemplate.ExpressionBrowserModel
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(null), "Expression Browser");
|
||||
Html.BundleDeferred("~/Style/jQueryUI/dynatree");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-DynaTree");
|
||||
}
|
||||
<div id="configurationDocumentTemplateExpressionBrowser">
|
||||
Expressions within Disco are based on the <a href="http://www.springframework.net/"
|
||||
target="_blank">Spring.NET Framework</a>. Please refer to the <a href="http://www.springframework.net/doc-latest/reference/html/expressions.html"
|
||||
target="_blank">Expression Evaluation</a> documentation.
|
||||
<h2>
|
||||
Device Scope</h2>
|
||||
<div id="deviceScopeTree" class="expressionTree">
|
||||
</div>
|
||||
<h2>
|
||||
Job Scope</h2>
|
||||
<div id="jobScopeTree" class="expressionTree">
|
||||
</div>
|
||||
<h2>
|
||||
User Scope</h2>
|
||||
<div id="userScopeTree" class="expressionTree">
|
||||
</div>
|
||||
<h2>
|
||||
Variables
|
||||
</h2>
|
||||
<div id="variableScopeTree" class="expressionTree">
|
||||
</div>
|
||||
<h2>
|
||||
Extension Libraries</h2>
|
||||
<div id="extScopeTree" class="expressionTree">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
if (!document.DiscoFunctions) {
|
||||
document.DiscoFunctions = {};
|
||||
}
|
||||
|
||||
var typeLib = {};
|
||||
var loadTypeUrl = '@(Url.Action(MVC.Config.DocumentTemplate.ExpressionBrowser()))';
|
||||
var deviceScopeTree = $('#deviceScopeTree');
|
||||
var jobScopeTree = $('#jobScopeTree');
|
||||
var userScopeTree = $('#userScopeTree');
|
||||
var variableScopeTree = $('#variableScopeTree');
|
||||
var extScopeTree = $('#extScopeTree');
|
||||
|
||||
var lazyLoadNode = function (node) {
|
||||
if (node.data.expressionType) {
|
||||
node.setLazyNodeStatus(DTNodeStatus_Loading);
|
||||
loadType(node, node.data.expressionType, node.data.staticDeclaredMembersOnly);
|
||||
} else {
|
||||
if (node.data.memberDescriptor) {
|
||||
loadMember(node);
|
||||
} else {
|
||||
node.setLazyNodeStatus(DTNodeStatus_Ok);
|
||||
}
|
||||
}
|
||||
}
|
||||
var loadMember = function (memberNode) {
|
||||
var previousUpdateMode = memberNode.tree.enableUpdate(false);
|
||||
var memberDescriptor = memberNode.data.memberDescriptor;
|
||||
// Return Type
|
||||
memberNode.addChild({ title: 'Returns: ' + memberDescriptor.ReturnType, tooltip: memberDescriptor.ReturnExpressionType, isFolder: true, expressionType: memberDescriptor.ReturnExpressionType, isLazy: true, addClass: 'object' });
|
||||
// Parameters
|
||||
var parametersNode = memberNode.addChild({ title: 'Parameters', isFolder: true, addClass: 'parameter' });
|
||||
for (var i = 0; i < memberDescriptor.Parameters.length; i++) {
|
||||
var p = memberDescriptor.Parameters[i];
|
||||
parametersNode.addChild({ title: p.Name + ' [' + p.ReturnType + ']', tooltip: p.ReturnExpressionType, addClass: 'object' });
|
||||
}
|
||||
memberNode.setLazyNodeStatus(DTNodeStatus_Ok);
|
||||
memberNode.tree.enableUpdate(previousUpdateMode);
|
||||
}
|
||||
var typeLoaded = function (parentNode, typeDescriptor) {
|
||||
var previousUpdateMode = parentNode.tree.enableUpdate(false);
|
||||
for (var i = 0; i < typeDescriptor.Members.length; i++) {
|
||||
var memberDescriptor = typeDescriptor.Members[i];
|
||||
parentNode.addChild({ title: memberDescriptor.Name, tooltip: memberDescriptor.ReturnType, isFolder: true, addClass: memberDescriptor.Kind, memberDescriptor: memberDescriptor, isLazy: true });
|
||||
}
|
||||
parentNode.setLazyNodeStatus(DTNodeStatus_Ok);
|
||||
parentNode.tree.enableUpdate(previousUpdateMode);
|
||||
}
|
||||
|
||||
var loadType = function (parentNode, type, staticDeclaredMembersOnly) {
|
||||
if (typeLib[type]) {
|
||||
typeLoaded(parentNode, typeLib[type]);
|
||||
} else {
|
||||
var requestData = { type: type, StaticDeclaredMembersOnly: staticDeclaredMembersOnly };
|
||||
$.getJSON(loadTypeUrl, requestData, function (data) {
|
||||
typeLib[type] = data;
|
||||
typeLoaded(parentNode, data);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var initVariable = function (name, type) {
|
||||
variableScopeTree.dynatree('getRoot').addChild({ title: name, tooltip: type, isFolder: true, addClass: 'object', expressionType: type, isLazy: true });
|
||||
}
|
||||
var initExpressionLibrary = function (name, type) {
|
||||
extScopeTree.dynatree('getRoot').addChild({ title: name, tooltip: type, isFolder: true, addClass: 'object', expressionType: type, staticDeclaredMembersOnly: true, isLazy: true });
|
||||
}
|
||||
|
||||
// Init
|
||||
deviceScopeTree.dynatree({ onLazyRead: lazyLoadNode });
|
||||
loadType(deviceScopeTree.dynatree('getRoot'), '@(Model.DeviceType)');
|
||||
|
||||
jobScopeTree.dynatree({ onLazyRead: lazyLoadNode });
|
||||
loadType(jobScopeTree.dynatree('getRoot'), '@(Model.JobType)');
|
||||
|
||||
userScopeTree.dynatree({ onLazyRead: lazyLoadNode });
|
||||
loadType(userScopeTree.dynatree('getRoot'), '@(Model.UserType)');
|
||||
|
||||
variableScopeTree.dynatree({ onLazyRead: lazyLoadNode });
|
||||
document.DiscoFunctions.expressionInitVariable = initVariable;
|
||||
|
||||
extScopeTree.dynatree({ onLazyRead: lazyLoadNode });
|
||||
document.DiscoFunctions.expressionInitExpressionLibrary = initExpressionLibrary;
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
@{
|
||||
foreach (var variable in Model.Variables)
|
||||
{
|
||||
<text>document.DiscoFunctions.expressionInitVariable('@(variable.Key)', '@variable.Value');</text>
|
||||
}
|
||||
foreach (var variable in Model.ExtensionLibraries)
|
||||
{
|
||||
<text>document.DiscoFunctions.expressionInitExpressionLibrary('@(variable.Key)', '@variable.Value');</text>
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -1,282 +1,282 @@
|
||||
#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/ExpressionBrowser.cshtml")]
|
||||
public class ExpressionBrowser : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DocumentTemplate.ExpressionBrowserModel>
|
||||
{
|
||||
public ExpressionBrowser()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(null), "Expression Browser");
|
||||
Html.BundleDeferred("~/Style/jQueryUI/dynatree");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-DynaTree");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"configurationDocumentTemplateExpressionBrowser\"");
|
||||
|
||||
WriteLiteral(">\r\n Expressions within Disco are based on the <a");
|
||||
|
||||
WriteLiteral(" href=\"http://www.springframework.net/\"");
|
||||
|
||||
WriteLiteral("\r\n target=\"_blank\"");
|
||||
|
||||
WriteLiteral(">Spring.NET Framework</a>. Please refer to the <a");
|
||||
|
||||
WriteLiteral(" href=\"http://www.springframework.net/doc-latest/reference/html/expressions.html\"" +
|
||||
"");
|
||||
|
||||
WriteLiteral("\r\n target=\"_blank\"");
|
||||
|
||||
WriteLiteral(">Expression Evaluation</a> documentation.\r\n <h2>\r\n Device Scope</h2>\r\n " +
|
||||
" <div");
|
||||
|
||||
WriteLiteral(" id=\"deviceScopeTree\"");
|
||||
|
||||
WriteLiteral(" class=\"expressionTree\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n <h2>\r\n Job Scope</h2>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"jobScopeTree\"");
|
||||
|
||||
WriteLiteral(" class=\"expressionTree\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n <h2>\r\n User Scope</h2>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"userScopeTree\"");
|
||||
|
||||
WriteLiteral(" class=\"expressionTree\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n <h2>\r\n Variables\r\n </h2>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"variableScopeTree\"");
|
||||
|
||||
WriteLiteral(" class=\"expressionTree\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n <h2>\r\n Extension Libraries</h2>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"extScopeTree\"");
|
||||
|
||||
WriteLiteral(" class=\"expressionTree\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n</div>\r\n<script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n if (!document.DiscoFunctions) {\r\n docu" +
|
||||
"ment.DiscoFunctions = {};\r\n }\r\n\r\n var typeLib = {};\r\n var l" +
|
||||
"oadTypeUrl = \'");
|
||||
|
||||
|
||||
#line 40 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
|
||||
Write(Url.Action(MVC.Config.DocumentTemplate.ExpressionBrowser()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\';\r\n var deviceScopeTree = $(\'#deviceScopeTree\');\r\n var jobScopeTre" +
|
||||
"e = $(\'#jobScopeTree\');\r\n var userScopeTree = $(\'#userScopeTree\');\r\n " +
|
||||
" var variableScopeTree = $(\'#variableScopeTree\');\r\n var extScopeTree = " +
|
||||
"$(\'#extScopeTree\');\r\n\r\n var lazyLoadNode = function (node) {\r\n " +
|
||||
" if (node.data.expressionType) {\r\n node.setLazyNodeStatus(DTNodeS" +
|
||||
"tatus_Loading);\r\n loadType(node, node.data.expressionType, node.d" +
|
||||
"ata.staticDeclaredMembersOnly);\r\n } else {\r\n if (node." +
|
||||
"data.memberDescriptor) {\r\n loadMember(node);\r\n " +
|
||||
" } else {\r\n node.setLazyNodeStatus(DTNodeStatus_Ok);\r\n " +
|
||||
" }\r\n }\r\n }\r\n var loadMember = function (memberN" +
|
||||
"ode) {\r\n var previousUpdateMode = memberNode.tree.enableUpdate(false)" +
|
||||
";\r\n var memberDescriptor = memberNode.data.memberDescriptor;\r\n " +
|
||||
" // Return Type\r\n memberNode.addChild({ title: \'Returns: \' + memb" +
|
||||
"erDescriptor.ReturnType, tooltip: memberDescriptor.ReturnExpressionType, isFolde" +
|
||||
"r: true, expressionType: memberDescriptor.ReturnExpressionType, isLazy: true, ad" +
|
||||
"dClass: \'object\' });\r\n // Parameters\r\n var parametersNode " +
|
||||
"= memberNode.addChild({ title: \'Parameters\', isFolder: true, addClass: \'paramete" +
|
||||
"r\' });\r\n for (var i = 0; i < memberDescriptor.Parameters.length; i++)" +
|
||||
" {\r\n var p = memberDescriptor.Parameters[i];\r\n par" +
|
||||
"ametersNode.addChild({ title: p.Name + \' [\' + p.ReturnType + \']\', tooltip: p.Ret" +
|
||||
"urnExpressionType, addClass: \'object\' });\r\n }\r\n memberNode" +
|
||||
".setLazyNodeStatus(DTNodeStatus_Ok);\r\n memberNode.tree.enableUpdate(p" +
|
||||
"reviousUpdateMode);\r\n }\r\n var typeLoaded = function (parentNode, t" +
|
||||
"ypeDescriptor) {\r\n var previousUpdateMode = parentNode.tree.enableUpd" +
|
||||
"ate(false);\r\n for (var i = 0; i < typeDescriptor.Members.length; i++)" +
|
||||
" {\r\n var memberDescriptor = typeDescriptor.Members[i];\r\n " +
|
||||
" parentNode.addChild({ title: memberDescriptor.Name, tooltip: memberDescri" +
|
||||
"ptor.ReturnType, isFolder: true, addClass: memberDescriptor.Kind, memberDescript" +
|
||||
"or: memberDescriptor, isLazy: true });\r\n }\r\n parentNode.se" +
|
||||
"tLazyNodeStatus(DTNodeStatus_Ok);\r\n parentNode.tree.enableUpdate(prev" +
|
||||
"iousUpdateMode);\r\n }\r\n\r\n var loadType = function (parentNode, type" +
|
||||
", staticDeclaredMembersOnly) {\r\n if (typeLib[type]) {\r\n " +
|
||||
" typeLoaded(parentNode, typeLib[type]);\r\n } else {\r\n " +
|
||||
"var requestData = { type: type, StaticDeclaredMembersOnly: staticDeclaredMembers" +
|
||||
"Only };\r\n $.getJSON(loadTypeUrl, requestData, function (data) {\r\n" +
|
||||
" typeLib[type] = data;\r\n typeLoaded(parent" +
|
||||
"Node, data);\r\n });\r\n }\r\n }\r\n\r\n var initV" +
|
||||
"ariable = function (name, type) {\r\n variableScopeTree.dynatree(\'getRo" +
|
||||
"ot\').addChild({ title: name, tooltip: type, isFolder: true, addClass: \'object\', " +
|
||||
"expressionType: type, isLazy: true });\r\n }\r\n var initExpressionLib" +
|
||||
"rary = function (name, type) {\r\n extScopeTree.dynatree(\'getRoot\').add" +
|
||||
"Child({ title: name, tooltip: type, isFolder: true, addClass: \'object\', expressi" +
|
||||
"onType: type, staticDeclaredMembersOnly: true, isLazy: true });\r\n }\r\n\r\n " +
|
||||
" // Init\r\n deviceScopeTree.dynatree({ onLazyRead: lazyLoadNode });\r\n" +
|
||||
" loadType(deviceScopeTree.dynatree(\'getRoot\'), \'");
|
||||
|
||||
|
||||
#line 104 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
|
||||
Write(Model.DeviceType);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\');\r\n\r\n jobScopeTree.dynatree({ onLazyRead: lazyLoadNode });\r\n load" +
|
||||
"Type(jobScopeTree.dynatree(\'getRoot\'), \'");
|
||||
|
||||
|
||||
#line 107 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
|
||||
Write(Model.JobType);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\');\r\n\r\n userScopeTree.dynatree({ onLazyRead: lazyLoadNode });\r\n loa" +
|
||||
"dType(userScopeTree.dynatree(\'getRoot\'), \'");
|
||||
|
||||
|
||||
#line 110 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
|
||||
Write(Model.UserType);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"');
|
||||
|
||||
variableScopeTree.dynatree({ onLazyRead: lazyLoadNode });
|
||||
document.DiscoFunctions.expressionInitVariable = initVariable;
|
||||
|
||||
extScopeTree.dynatree({ onLazyRead: lazyLoadNode });
|
||||
document.DiscoFunctions.expressionInitExpressionLibrary = initExpressionLibrary;
|
||||
});
|
||||
</script>
|
||||
<script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n");
|
||||
|
||||
|
||||
#line 121 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
|
||||
|
||||
foreach (var variable in Model.Variables)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
WriteLiteral("document.DiscoFunctions.expressionInitVariable(\'");
|
||||
|
||||
|
||||
#line 124 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
|
||||
Write(variable.Key);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\', \'");
|
||||
|
||||
|
||||
#line 124 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
|
||||
Write(variable.Value);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\');");
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 125 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
|
||||
}
|
||||
foreach (var variable in Model.ExtensionLibraries)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
WriteLiteral("document.DiscoFunctions.expressionInitExpressionLibrary(\'");
|
||||
|
||||
|
||||
#line 128 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
|
||||
Write(variable.Key);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\', \'");
|
||||
|
||||
|
||||
#line 128 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
|
||||
Write(variable.Value);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\');");
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 129 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n });\r\n </script>");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
#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/ExpressionBrowser.cshtml")]
|
||||
public class ExpressionBrowser : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DocumentTemplate.ExpressionBrowserModel>
|
||||
{
|
||||
public ExpressionBrowser()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(null), "Expression Browser");
|
||||
Html.BundleDeferred("~/Style/jQueryUI/dynatree");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-DynaTree");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"configurationDocumentTemplateExpressionBrowser\"");
|
||||
|
||||
WriteLiteral(">\r\n Expressions within Disco are based on the <a");
|
||||
|
||||
WriteLiteral(" href=\"http://www.springframework.net/\"");
|
||||
|
||||
WriteLiteral("\r\n target=\"_blank\"");
|
||||
|
||||
WriteLiteral(">Spring.NET Framework</a>. Please refer to the <a");
|
||||
|
||||
WriteLiteral(" href=\"http://www.springframework.net/doc-latest/reference/html/expressions.html\"" +
|
||||
"");
|
||||
|
||||
WriteLiteral("\r\n target=\"_blank\"");
|
||||
|
||||
WriteLiteral(">Expression Evaluation</a> documentation.\r\n <h2>\r\n Device Scope</h2>\r\n " +
|
||||
" <div");
|
||||
|
||||
WriteLiteral(" id=\"deviceScopeTree\"");
|
||||
|
||||
WriteLiteral(" class=\"expressionTree\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n <h2>\r\n Job Scope</h2>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"jobScopeTree\"");
|
||||
|
||||
WriteLiteral(" class=\"expressionTree\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n <h2>\r\n User Scope</h2>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"userScopeTree\"");
|
||||
|
||||
WriteLiteral(" class=\"expressionTree\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n <h2>\r\n Variables\r\n </h2>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"variableScopeTree\"");
|
||||
|
||||
WriteLiteral(" class=\"expressionTree\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n <h2>\r\n Extension Libraries</h2>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"extScopeTree\"");
|
||||
|
||||
WriteLiteral(" class=\"expressionTree\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n</div>\r\n<script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n if (!document.DiscoFunctions) {\r\n docu" +
|
||||
"ment.DiscoFunctions = {};\r\n }\r\n\r\n var typeLib = {};\r\n var l" +
|
||||
"oadTypeUrl = \'");
|
||||
|
||||
|
||||
#line 40 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
|
||||
Write(Url.Action(MVC.Config.DocumentTemplate.ExpressionBrowser()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\';\r\n var deviceScopeTree = $(\'#deviceScopeTree\');\r\n var jobScopeTre" +
|
||||
"e = $(\'#jobScopeTree\');\r\n var userScopeTree = $(\'#userScopeTree\');\r\n " +
|
||||
" var variableScopeTree = $(\'#variableScopeTree\');\r\n var extScopeTree = " +
|
||||
"$(\'#extScopeTree\');\r\n\r\n var lazyLoadNode = function (node) {\r\n " +
|
||||
" if (node.data.expressionType) {\r\n node.setLazyNodeStatus(DTNodeS" +
|
||||
"tatus_Loading);\r\n loadType(node, node.data.expressionType, node.d" +
|
||||
"ata.staticDeclaredMembersOnly);\r\n } else {\r\n if (node." +
|
||||
"data.memberDescriptor) {\r\n loadMember(node);\r\n " +
|
||||
" } else {\r\n node.setLazyNodeStatus(DTNodeStatus_Ok);\r\n " +
|
||||
" }\r\n }\r\n }\r\n var loadMember = function (memberN" +
|
||||
"ode) {\r\n var previousUpdateMode = memberNode.tree.enableUpdate(false)" +
|
||||
";\r\n var memberDescriptor = memberNode.data.memberDescriptor;\r\n " +
|
||||
" // Return Type\r\n memberNode.addChild({ title: \'Returns: \' + memb" +
|
||||
"erDescriptor.ReturnType, tooltip: memberDescriptor.ReturnExpressionType, isFolde" +
|
||||
"r: true, expressionType: memberDescriptor.ReturnExpressionType, isLazy: true, ad" +
|
||||
"dClass: \'object\' });\r\n // Parameters\r\n var parametersNode " +
|
||||
"= memberNode.addChild({ title: \'Parameters\', isFolder: true, addClass: \'paramete" +
|
||||
"r\' });\r\n for (var i = 0; i < memberDescriptor.Parameters.length; i++)" +
|
||||
" {\r\n var p = memberDescriptor.Parameters[i];\r\n par" +
|
||||
"ametersNode.addChild({ title: p.Name + \' [\' + p.ReturnType + \']\', tooltip: p.Ret" +
|
||||
"urnExpressionType, addClass: \'object\' });\r\n }\r\n memberNode" +
|
||||
".setLazyNodeStatus(DTNodeStatus_Ok);\r\n memberNode.tree.enableUpdate(p" +
|
||||
"reviousUpdateMode);\r\n }\r\n var typeLoaded = function (parentNode, t" +
|
||||
"ypeDescriptor) {\r\n var previousUpdateMode = parentNode.tree.enableUpd" +
|
||||
"ate(false);\r\n for (var i = 0; i < typeDescriptor.Members.length; i++)" +
|
||||
" {\r\n var memberDescriptor = typeDescriptor.Members[i];\r\n " +
|
||||
" parentNode.addChild({ title: memberDescriptor.Name, tooltip: memberDescri" +
|
||||
"ptor.ReturnType, isFolder: true, addClass: memberDescriptor.Kind, memberDescript" +
|
||||
"or: memberDescriptor, isLazy: true });\r\n }\r\n parentNode.se" +
|
||||
"tLazyNodeStatus(DTNodeStatus_Ok);\r\n parentNode.tree.enableUpdate(prev" +
|
||||
"iousUpdateMode);\r\n }\r\n\r\n var loadType = function (parentNode, type" +
|
||||
", staticDeclaredMembersOnly) {\r\n if (typeLib[type]) {\r\n " +
|
||||
" typeLoaded(parentNode, typeLib[type]);\r\n } else {\r\n " +
|
||||
"var requestData = { type: type, StaticDeclaredMembersOnly: staticDeclaredMembers" +
|
||||
"Only };\r\n $.getJSON(loadTypeUrl, requestData, function (data) {\r\n" +
|
||||
" typeLib[type] = data;\r\n typeLoaded(parent" +
|
||||
"Node, data);\r\n });\r\n }\r\n }\r\n\r\n var initV" +
|
||||
"ariable = function (name, type) {\r\n variableScopeTree.dynatree(\'getRo" +
|
||||
"ot\').addChild({ title: name, tooltip: type, isFolder: true, addClass: \'object\', " +
|
||||
"expressionType: type, isLazy: true });\r\n }\r\n var initExpressionLib" +
|
||||
"rary = function (name, type) {\r\n extScopeTree.dynatree(\'getRoot\').add" +
|
||||
"Child({ title: name, tooltip: type, isFolder: true, addClass: \'object\', expressi" +
|
||||
"onType: type, staticDeclaredMembersOnly: true, isLazy: true });\r\n }\r\n\r\n " +
|
||||
" // Init\r\n deviceScopeTree.dynatree({ onLazyRead: lazyLoadNode });\r\n" +
|
||||
" loadType(deviceScopeTree.dynatree(\'getRoot\'), \'");
|
||||
|
||||
|
||||
#line 104 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
|
||||
Write(Model.DeviceType);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\');\r\n\r\n jobScopeTree.dynatree({ onLazyRead: lazyLoadNode });\r\n load" +
|
||||
"Type(jobScopeTree.dynatree(\'getRoot\'), \'");
|
||||
|
||||
|
||||
#line 107 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
|
||||
Write(Model.JobType);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\');\r\n\r\n userScopeTree.dynatree({ onLazyRead: lazyLoadNode });\r\n loa" +
|
||||
"dType(userScopeTree.dynatree(\'getRoot\'), \'");
|
||||
|
||||
|
||||
#line 110 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
|
||||
Write(Model.UserType);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"');
|
||||
|
||||
variableScopeTree.dynatree({ onLazyRead: lazyLoadNode });
|
||||
document.DiscoFunctions.expressionInitVariable = initVariable;
|
||||
|
||||
extScopeTree.dynatree({ onLazyRead: lazyLoadNode });
|
||||
document.DiscoFunctions.expressionInitExpressionLibrary = initExpressionLibrary;
|
||||
});
|
||||
</script>
|
||||
<script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n");
|
||||
|
||||
|
||||
#line 121 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
|
||||
|
||||
foreach (var variable in Model.Variables)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
WriteLiteral("document.DiscoFunctions.expressionInitVariable(\'");
|
||||
|
||||
|
||||
#line 124 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
|
||||
Write(variable.Key);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\', \'");
|
||||
|
||||
|
||||
#line 124 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
|
||||
Write(variable.Value);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\');");
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 125 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
|
||||
}
|
||||
foreach (var variable in Model.ExtensionLibraries)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
WriteLiteral("document.DiscoFunctions.expressionInitExpressionLibrary(\'");
|
||||
|
||||
|
||||
#line 128 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
|
||||
Write(variable.Key);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\', \'");
|
||||
|
||||
|
||||
#line 128 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
|
||||
Write(variable.Value);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\');");
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 129 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n });\r\n </script>");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
|
||||
@@ -1,37 +1,37 @@
|
||||
@model Disco.Web.Areas.Config.Models.DocumentTemplate.IndexModel
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates");
|
||||
}
|
||||
<table class="tableData">
|
||||
<tr>
|
||||
<th>
|
||||
Id
|
||||
</th>
|
||||
<th>
|
||||
Description
|
||||
</th>
|
||||
<th>
|
||||
Scope
|
||||
</th>
|
||||
</tr>
|
||||
@foreach (var item in Model.DocumentTemplates)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.ActionLink(item.Id.ToString(), MVC.Config.DocumentTemplate.Index(item.Id))
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Description)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Scope)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
<div class="actionBar">
|
||||
@Html.ActionLinkButton("Undetected Pages", MVC.Config.DocumentTemplate.UndetectedPages())
|
||||
@Html.ActionLinkButton("Import Status", MVC.Config.DocumentTemplate.ImportStatus())
|
||||
@Html.ActionLinkButton("Expression Browser", MVC.Config.DocumentTemplate.ExpressionBrowser())
|
||||
@Html.ActionLinkButton("Create Document Template", MVC.Config.DocumentTemplate.Create())
|
||||
@model Disco.Web.Areas.Config.Models.DocumentTemplate.IndexModel
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates");
|
||||
}
|
||||
<table class="tableData">
|
||||
<tr>
|
||||
<th>
|
||||
Id
|
||||
</th>
|
||||
<th>
|
||||
Description
|
||||
</th>
|
||||
<th>
|
||||
Scope
|
||||
</th>
|
||||
</tr>
|
||||
@foreach (var item in Model.DocumentTemplates)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.ActionLink(item.Id.ToString(), MVC.Config.DocumentTemplate.Index(item.Id))
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Description)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Scope)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
<div class="actionBar">
|
||||
@Html.ActionLinkButton("Undetected Pages", MVC.Config.DocumentTemplate.UndetectedPages())
|
||||
@Html.ActionLinkButton("Import Status", MVC.Config.DocumentTemplate.ImportStatus())
|
||||
@Html.ActionLinkButton("Expression Browser", MVC.Config.DocumentTemplate.ExpressionBrowser())
|
||||
@Html.ActionLinkButton("Create Document Template", MVC.Config.DocumentTemplate.Create())
|
||||
</div>
|
||||
@@ -1,168 +1,168 @@
|
||||
#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/Index.cshtml")]
|
||||
public class Index : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DocumentTemplate.IndexModel>
|
||||
{
|
||||
public Index()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<table");
|
||||
|
||||
WriteLiteral(" class=\"tableData\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <th>\r\n Id\r\n </th>\r\n <th>\r\n " +
|
||||
" Description\r\n </th>\r\n <th>\r\n Scope\r\n </th>\r\n " +
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 17 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 17 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
foreach (var item in Model.DocumentTemplates)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 21 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
Write(Html.ActionLink(item.Id.ToString(), MVC.Config.DocumentTemplate.Index(item.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 24 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
Write(Html.DisplayFor(modelItem => item.Description));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 27 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
Write(Html.DisplayFor(modelItem => item.Scope));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 30 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</table>\r\n<div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Undetected Pages", MVC.Config.DocumentTemplate.UndetectedPages()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 34 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Import Status", MVC.Config.DocumentTemplate.ImportStatus()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 35 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Expression Browser", MVC.Config.DocumentTemplate.ExpressionBrowser()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 36 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Create Document Template", MVC.Config.DocumentTemplate.Create()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n</div>");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
#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/Index.cshtml")]
|
||||
public class Index : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DocumentTemplate.IndexModel>
|
||||
{
|
||||
public Index()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<table");
|
||||
|
||||
WriteLiteral(" class=\"tableData\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <th>\r\n Id\r\n </th>\r\n <th>\r\n " +
|
||||
" Description\r\n </th>\r\n <th>\r\n Scope\r\n </th>\r\n " +
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 17 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 17 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
foreach (var item in Model.DocumentTemplates)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 21 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
Write(Html.ActionLink(item.Id.ToString(), MVC.Config.DocumentTemplate.Index(item.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 24 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
Write(Html.DisplayFor(modelItem => item.Description));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 27 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
Write(Html.DisplayFor(modelItem => item.Scope));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 30 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</table>\r\n<div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Undetected Pages", MVC.Config.DocumentTemplate.UndetectedPages()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 34 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Import Status", MVC.Config.DocumentTemplate.ImportStatus()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 35 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Expression Browser", MVC.Config.DocumentTemplate.ExpressionBrowser()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 36 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Create Document Template", MVC.Config.DocumentTemplate.Create()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n</div>");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
|
||||
@@ -1,239 +1,239 @@
|
||||
@model Disco.Web.Areas.Config.Models.DocumentTemplate.UndetectedPagesModel
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(), "Undetected Pages");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Knockout");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
|
||||
}
|
||||
<div id="undetectedPagesContainer">
|
||||
<div id="noUndetectedPages" data-bind="visible: noUndetectedPages">
|
||||
<h3>
|
||||
No Undetected Pages</h3>
|
||||
</div>
|
||||
<ul id="undetectedPages" class="clearfix" data-bind="visible: !noUndetectedPages(), foreach: {data: undetectedPages}">
|
||||
<li class="undetectedPage" data-bind="style: {backgroundImage: thumbnailUrl}, click: select">
|
||||
<div class="pageDetails" data-bind="text: timestampFuzzy, attr: {title: timestamp}">
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="undetectedPageDialog" data-bind="with: selectedUndetectedPage">
|
||||
<div class="pagePreview" data-bind="style: {backgroundImage: previewUrl}">
|
||||
</div>
|
||||
<div class="actions">
|
||||
<a href="#" class="button" target="_blank" data-bind="attr: {href: sourceUrl}">Download</a>
|
||||
<a href="#" class="button" id="dialogDeleteButton" data-bind="click: deletePage">Delete</a>
|
||||
</div>
|
||||
<div class="actions">
|
||||
Type: @Html.DropDownList("dialogDocumentTemplateId", Model.DocumentTemplatesSelectListItems, new Dictionary<string, object> { { "data-bind", "value: dialogTemplateId" } })
|
||||
Data:
|
||||
<input id="dialogDataId" type="text" data-bind="value: dialogDataId, autocomplete: {source: dialogDataIdService, minLength: 3, position: {my: 'left bottom', at: 'left top'}}" />
|
||||
<a href="#" class="button" id="dialogAssignButton" data-bind="click: assignPage">Assign</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dialogRemove" title="Delete this Page?">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
|
||||
Are you sure?</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
ko.bindingHandlers.autocomplete = {
|
||||
update: function (element, valueAccessor, allBindingsAccessor, viewModel) {
|
||||
var autocompleteOptions = ko.utils.unwrapObservable(valueAccessor());
|
||||
if (autocompleteOptions.source)
|
||||
autocompleteOptions.source = ko.utils.unwrapObservable(autocompleteOptions.source);
|
||||
$element = $(element);
|
||||
if (!$element.is('.ui-autocomplete-input')) {
|
||||
autocompleteOptions.select = function (e, ui) {
|
||||
allBindingsAccessor().value(ui.item.value);
|
||||
return false;
|
||||
}
|
||||
$element.autocomplete(autocompleteOptions);
|
||||
} else {
|
||||
// Update Source Option Only
|
||||
if (autocompleteOptions.source)
|
||||
$element.autocomplete('option', 'source', autocompleteOptions.source);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
var vm;
|
||||
var urlUndetectedPageThumbnail = '@(new HtmlString(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFile(null, false, true))))';
|
||||
var urlUndetectedPagePreview = '@(new HtmlString(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFile(null, false, false))))';
|
||||
var urlUndetectedPageSource = '@(new HtmlString(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFile(null, true, false))))';
|
||||
var urlDataIdLookupService = '@(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedDataIdLookup()))/';
|
||||
var urlImporterUndetectedAssign = '@(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedAssign()))/';
|
||||
var urlImporterUndetectedDelete = '@(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedDelete()))/';
|
||||
var $undetectedPageDialog = $('#undetectedPageDialog').dialog({
|
||||
modal: true,
|
||||
height: 820,
|
||||
width: 800,
|
||||
resizable: false,
|
||||
autoOpen: false
|
||||
});
|
||||
|
||||
$dialogRemove = $('#dialogRemove').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
|
||||
function pageViewModel() {
|
||||
var self = this;
|
||||
|
||||
self.selectedUndetectedPage = ko.observable(null);
|
||||
self.undetectedPages = ko.observableArray();
|
||||
self.noUndetectedPages = ko.computed(function () { return self.undetectedPages().length == 0 });
|
||||
self.selectNextPage = function () {
|
||||
var oldSelected = self.selectedUndetectedPage();
|
||||
var oldSelectedIndex = vm.undetectedPages.indexOf(oldSelected);
|
||||
|
||||
if (vm.undetectedPages().length > 1) {
|
||||
if (oldSelectedIndex > vm.undetectedPages().length - 1)
|
||||
vm.selectedUndetectedPage(vm.undetectedPages()[oldSelectedIndex + 1]);
|
||||
else
|
||||
vm.selectedUndetectedPage(vm.undetectedPages()[oldSelectedIndex - 1]);
|
||||
} else {
|
||||
$undetectedPageDialog.dialog('close');
|
||||
vm.selectedUndetectedPage(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function undetectedPageViewModel(id, timestamp, timestampFuzzy) {
|
||||
var self = this;
|
||||
|
||||
self.id = id;
|
||||
self.timestamp = timestamp;
|
||||
self.timestampFuzzy = timestampFuzzy;
|
||||
self.thumbnailUrl = "url(" + urlUndetectedPageThumbnail + "&id=" + id + ")";
|
||||
self.previewUrl = "url(" + urlUndetectedPagePreview + "&id=" + id + ")";
|
||||
self.sourceUrl = urlUndetectedPageSource + "&id=" + id;
|
||||
self.select = function (e, d) {
|
||||
vm.selectedUndetectedPage(self);
|
||||
$undetectedPageDialog.dialog('open');
|
||||
}
|
||||
|
||||
// Dialog Properties
|
||||
self.dialogTemplateId = ko.observable(null);
|
||||
self.dialogDataId = ko.observable(null);
|
||||
self.dialogDataIdService = ko.computed(function () {
|
||||
return urlDataIdLookupService + self.dialogTemplateId();
|
||||
});
|
||||
self.deletePage = function () {
|
||||
$undetectedPageDialog.dialog('option', 'disabled', true);
|
||||
|
||||
$dialogRemove.dialog('option', 'buttons', {
|
||||
"Remove": function () {
|
||||
$dialogRemove.dialog("close");
|
||||
var data = { id: self.id };
|
||||
$.ajax({
|
||||
url: urlImporterUndetectedDelete,
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
type: 'POST',
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
vm.selectNextPage();
|
||||
vm.undetectedPages.remove(self);
|
||||
} else {
|
||||
alert('Unable to delete page: ' + d);
|
||||
}
|
||||
$undetectedPageDialog.dialog('option', 'disabled', false);
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to delete page: ' + errorThrown);
|
||||
$undetectedPageDialog.dialog('option', 'disabled', false);
|
||||
}
|
||||
});
|
||||
},
|
||||
"Cancel": function () {
|
||||
$dialogRemove.dialog("close");
|
||||
$undetectedPageDialog.dialog('option', 'disabled', false);
|
||||
}
|
||||
});
|
||||
|
||||
$dialogRemove.dialog('open');
|
||||
|
||||
return false;
|
||||
}
|
||||
self.assignPage = function () {
|
||||
var dtId = self.dialogTemplateId();
|
||||
var dId = self.dialogDataId();
|
||||
if (!dtId || !dId) {
|
||||
alert('Please specify a valid Document Type and Data Id');
|
||||
} else {
|
||||
$undetectedPageDialog.dialog('option', 'disabled', true);
|
||||
|
||||
var data = { id: self.id, DocumentTemplateId: dtId, DataId: dId };
|
||||
|
||||
$.ajax({
|
||||
url: urlImporterUndetectedAssign,
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
type: 'POST',
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
vm.selectNextPage();
|
||||
vm.undetectedPages.remove(self);
|
||||
} else {
|
||||
alert('Unable to assign page: ' + d);
|
||||
}
|
||||
$undetectedPageDialog.dialog('option', 'disabled', false);
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to assign page: ' + errorThrown);
|
||||
$undetectedPageDialog.dialog('option', 'disabled', false);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
function init() {
|
||||
vm = new pageViewModel();
|
||||
|
||||
$.ajax({
|
||||
url: '@(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFiles()))',
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
success: init_loadedContent,
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to load content: ' + errorThrown);
|
||||
}
|
||||
});
|
||||
}
|
||||
function init_loadedContent(content) {
|
||||
if (content.length > 0) {
|
||||
for (var i = 0; i < content.length; i++) {
|
||||
var c = content[i];
|
||||
var up = new undetectedPageViewModel(c.Id, c.Timestamp, c.TimestampFuzzy);
|
||||
vm.undetectedPages.push(up);
|
||||
}
|
||||
}
|
||||
|
||||
ko.applyBindings(vm);
|
||||
init_loadedOpen();
|
||||
}
|
||||
function init_loadedOpen() {
|
||||
var fileId = window.location.hash;
|
||||
if (fileId) {
|
||||
fileId = fileId.substr(1);
|
||||
for (var i = 0; i < vm.undetectedPages().length; i++) {
|
||||
var up = vm.undetectedPages()[i];
|
||||
if (up.id == fileId) {
|
||||
up.select();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
init();
|
||||
|
||||
});
|
||||
</script>
|
||||
@model Disco.Web.Areas.Config.Models.DocumentTemplate.UndetectedPagesModel
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(), "Undetected Pages");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Knockout");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
|
||||
}
|
||||
<div id="undetectedPagesContainer">
|
||||
<div id="noUndetectedPages" data-bind="visible: noUndetectedPages">
|
||||
<h3>
|
||||
No Undetected Pages</h3>
|
||||
</div>
|
||||
<ul id="undetectedPages" class="clearfix" data-bind="visible: !noUndetectedPages(), foreach: {data: undetectedPages}">
|
||||
<li class="undetectedPage" data-bind="style: {backgroundImage: thumbnailUrl}, click: select">
|
||||
<div class="pageDetails" data-bind="text: timestampFuzzy, attr: {title: timestamp}">
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="undetectedPageDialog" data-bind="with: selectedUndetectedPage">
|
||||
<div class="pagePreview" data-bind="style: {backgroundImage: previewUrl}">
|
||||
</div>
|
||||
<div class="actions">
|
||||
<a href="#" class="button" target="_blank" data-bind="attr: {href: sourceUrl}">Download</a>
|
||||
<a href="#" class="button" id="dialogDeleteButton" data-bind="click: deletePage">Delete</a>
|
||||
</div>
|
||||
<div class="actions">
|
||||
Type: @Html.DropDownList("dialogDocumentTemplateId", Model.DocumentTemplatesSelectListItems, new Dictionary<string, object> { { "data-bind", "value: dialogTemplateId" } })
|
||||
Data:
|
||||
<input id="dialogDataId" type="text" data-bind="value: dialogDataId, autocomplete: {source: dialogDataIdService, minLength: 3, position: {my: 'left bottom', at: 'left top'}}" />
|
||||
<a href="#" class="button" id="dialogAssignButton" data-bind="click: assignPage">Assign</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dialogRemove" title="Delete this Page?">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
|
||||
Are you sure?</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
ko.bindingHandlers.autocomplete = {
|
||||
update: function (element, valueAccessor, allBindingsAccessor, viewModel) {
|
||||
var autocompleteOptions = ko.utils.unwrapObservable(valueAccessor());
|
||||
if (autocompleteOptions.source)
|
||||
autocompleteOptions.source = ko.utils.unwrapObservable(autocompleteOptions.source);
|
||||
$element = $(element);
|
||||
if (!$element.is('.ui-autocomplete-input')) {
|
||||
autocompleteOptions.select = function (e, ui) {
|
||||
allBindingsAccessor().value(ui.item.value);
|
||||
return false;
|
||||
}
|
||||
$element.autocomplete(autocompleteOptions);
|
||||
} else {
|
||||
// Update Source Option Only
|
||||
if (autocompleteOptions.source)
|
||||
$element.autocomplete('option', 'source', autocompleteOptions.source);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
var vm;
|
||||
var urlUndetectedPageThumbnail = '@(new HtmlString(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFile(null, false, true))))';
|
||||
var urlUndetectedPagePreview = '@(new HtmlString(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFile(null, false, false))))';
|
||||
var urlUndetectedPageSource = '@(new HtmlString(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFile(null, true, false))))';
|
||||
var urlDataIdLookupService = '@(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedDataIdLookup()))/';
|
||||
var urlImporterUndetectedAssign = '@(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedAssign()))/';
|
||||
var urlImporterUndetectedDelete = '@(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedDelete()))/';
|
||||
var $undetectedPageDialog = $('#undetectedPageDialog').dialog({
|
||||
modal: true,
|
||||
height: 820,
|
||||
width: 800,
|
||||
resizable: false,
|
||||
autoOpen: false
|
||||
});
|
||||
|
||||
$dialogRemove = $('#dialogRemove').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
|
||||
function pageViewModel() {
|
||||
var self = this;
|
||||
|
||||
self.selectedUndetectedPage = ko.observable(null);
|
||||
self.undetectedPages = ko.observableArray();
|
||||
self.noUndetectedPages = ko.computed(function () { return self.undetectedPages().length == 0 });
|
||||
self.selectNextPage = function () {
|
||||
var oldSelected = self.selectedUndetectedPage();
|
||||
var oldSelectedIndex = vm.undetectedPages.indexOf(oldSelected);
|
||||
|
||||
if (vm.undetectedPages().length > 1) {
|
||||
if (oldSelectedIndex > vm.undetectedPages().length - 1)
|
||||
vm.selectedUndetectedPage(vm.undetectedPages()[oldSelectedIndex + 1]);
|
||||
else
|
||||
vm.selectedUndetectedPage(vm.undetectedPages()[oldSelectedIndex - 1]);
|
||||
} else {
|
||||
$undetectedPageDialog.dialog('close');
|
||||
vm.selectedUndetectedPage(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function undetectedPageViewModel(id, timestamp, timestampFuzzy) {
|
||||
var self = this;
|
||||
|
||||
self.id = id;
|
||||
self.timestamp = timestamp;
|
||||
self.timestampFuzzy = timestampFuzzy;
|
||||
self.thumbnailUrl = "url(" + urlUndetectedPageThumbnail + "&id=" + id + ")";
|
||||
self.previewUrl = "url(" + urlUndetectedPagePreview + "&id=" + id + ")";
|
||||
self.sourceUrl = urlUndetectedPageSource + "&id=" + id;
|
||||
self.select = function (e, d) {
|
||||
vm.selectedUndetectedPage(self);
|
||||
$undetectedPageDialog.dialog('open');
|
||||
}
|
||||
|
||||
// Dialog Properties
|
||||
self.dialogTemplateId = ko.observable(null);
|
||||
self.dialogDataId = ko.observable(null);
|
||||
self.dialogDataIdService = ko.computed(function () {
|
||||
return urlDataIdLookupService + self.dialogTemplateId();
|
||||
});
|
||||
self.deletePage = function () {
|
||||
$undetectedPageDialog.dialog('option', 'disabled', true);
|
||||
|
||||
$dialogRemove.dialog('option', 'buttons', {
|
||||
"Remove": function () {
|
||||
$dialogRemove.dialog("close");
|
||||
var data = { id: self.id };
|
||||
$.ajax({
|
||||
url: urlImporterUndetectedDelete,
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
type: 'POST',
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
vm.selectNextPage();
|
||||
vm.undetectedPages.remove(self);
|
||||
} else {
|
||||
alert('Unable to delete page: ' + d);
|
||||
}
|
||||
$undetectedPageDialog.dialog('option', 'disabled', false);
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to delete page: ' + errorThrown);
|
||||
$undetectedPageDialog.dialog('option', 'disabled', false);
|
||||
}
|
||||
});
|
||||
},
|
||||
"Cancel": function () {
|
||||
$dialogRemove.dialog("close");
|
||||
$undetectedPageDialog.dialog('option', 'disabled', false);
|
||||
}
|
||||
});
|
||||
|
||||
$dialogRemove.dialog('open');
|
||||
|
||||
return false;
|
||||
}
|
||||
self.assignPage = function () {
|
||||
var dtId = self.dialogTemplateId();
|
||||
var dId = self.dialogDataId();
|
||||
if (!dtId || !dId) {
|
||||
alert('Please specify a valid Document Type and Data Id');
|
||||
} else {
|
||||
$undetectedPageDialog.dialog('option', 'disabled', true);
|
||||
|
||||
var data = { id: self.id, DocumentTemplateId: dtId, DataId: dId };
|
||||
|
||||
$.ajax({
|
||||
url: urlImporterUndetectedAssign,
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
type: 'POST',
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
vm.selectNextPage();
|
||||
vm.undetectedPages.remove(self);
|
||||
} else {
|
||||
alert('Unable to assign page: ' + d);
|
||||
}
|
||||
$undetectedPageDialog.dialog('option', 'disabled', false);
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to assign page: ' + errorThrown);
|
||||
$undetectedPageDialog.dialog('option', 'disabled', false);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
function init() {
|
||||
vm = new pageViewModel();
|
||||
|
||||
$.ajax({
|
||||
url: '@(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFiles()))',
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
success: init_loadedContent,
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to load content: ' + errorThrown);
|
||||
}
|
||||
});
|
||||
}
|
||||
function init_loadedContent(content) {
|
||||
if (content.length > 0) {
|
||||
for (var i = 0; i < content.length; i++) {
|
||||
var c = content[i];
|
||||
var up = new undetectedPageViewModel(c.Id, c.Timestamp, c.TimestampFuzzy);
|
||||
vm.undetectedPages.push(up);
|
||||
}
|
||||
}
|
||||
|
||||
ko.applyBindings(vm);
|
||||
init_loadedOpen();
|
||||
}
|
||||
function init_loadedOpen() {
|
||||
var fileId = window.location.hash;
|
||||
if (fileId) {
|
||||
fileId = fileId.substr(1);
|
||||
for (var i = 0; i < vm.undetectedPages().length; i++) {
|
||||
var up = vm.undetectedPages()[i];
|
||||
if (up.id == fileId) {
|
||||
up.select();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
init();
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -1,370 +1,370 @@
|
||||
#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/UndetectedPages.cshtml")]
|
||||
public class UndetectedPages : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DocumentTemplate.UndetectedPagesModel>
|
||||
{
|
||||
public UndetectedPages()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(), "Undetected Pages");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Knockout");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"undetectedPagesContainer\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"noUndetectedPages\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"visible: noUndetectedPages\"");
|
||||
|
||||
WriteLiteral(">\r\n <h3>\r\n No Undetected Pages</h3>\r\n </div>\r\n <ul");
|
||||
|
||||
WriteLiteral(" id=\"undetectedPages\"");
|
||||
|
||||
WriteLiteral(" class=\"clearfix\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"visible: !noUndetectedPages(), foreach: {data: undetectedPages}\"");
|
||||
|
||||
WriteLiteral(">\r\n <li");
|
||||
|
||||
WriteLiteral(" class=\"undetectedPage\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"style: {backgroundImage: thumbnailUrl}, click: select\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"pageDetails\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"text: timestampFuzzy, attr: {title: timestamp}\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n </li>\r\n </ul>\r\n</div>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"undetectedPageDialog\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"with: selectedUndetectedPage\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"pagePreview\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"style: {backgroundImage: previewUrl}\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"actions\"");
|
||||
|
||||
WriteLiteral(">\r\n <a");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(" target=\"_blank\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"attr: {href: sourceUrl}\"");
|
||||
|
||||
WriteLiteral(">Download</a>\r\n <a");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(" id=\"dialogDeleteButton\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"click: deletePage\"");
|
||||
|
||||
WriteLiteral(">Delete</a>\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"actions\"");
|
||||
|
||||
WriteLiteral(">\r\n Type: ");
|
||||
|
||||
|
||||
#line 27 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
|
||||
Write(Html.DropDownList("dialogDocumentTemplateId", Model.DocumentTemplatesSelectListItems, new Dictionary<string, object> { { "data-bind", "value: dialogTemplateId" } }));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n Data:\r\n <input");
|
||||
|
||||
WriteLiteral(" id=\"dialogDataId\"");
|
||||
|
||||
WriteLiteral(" type=\"text\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"value: dialogDataId, autocomplete: {source: dialogDataIdService, minL" +
|
||||
"ength: 3, position: {my: \'left bottom\', at: \'left top\'}}\"");
|
||||
|
||||
WriteLiteral(" />\r\n <a");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(" id=\"dialogAssignButton\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"click: assignPage\"");
|
||||
|
||||
WriteLiteral(">Assign</a>\r\n </div>\r\n</div>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"dialogRemove\"");
|
||||
|
||||
WriteLiteral(" title=\"Delete this Page?\"");
|
||||
|
||||
WriteLiteral(">\r\n <p>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
|
||||
|
||||
WriteLiteral(" style=\"float: left; margin: 0 7px 20px 0;\"");
|
||||
|
||||
WriteLiteral("></span>\r\n Are you sure?</p>\r\n</div>\r\n<script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
ko.bindingHandlers.autocomplete = {
|
||||
update: function (element, valueAccessor, allBindingsAccessor, viewModel) {
|
||||
var autocompleteOptions = ko.utils.unwrapObservable(valueAccessor());
|
||||
if (autocompleteOptions.source)
|
||||
autocompleteOptions.source = ko.utils.unwrapObservable(autocompleteOptions.source);
|
||||
$element = $(element);
|
||||
if (!$element.is('.ui-autocomplete-input')) {
|
||||
autocompleteOptions.select = function (e, ui) {
|
||||
allBindingsAccessor().value(ui.item.value);
|
||||
return false;
|
||||
}
|
||||
$element.autocomplete(autocompleteOptions);
|
||||
} else {
|
||||
// Update Source Option Only
|
||||
if (autocompleteOptions.source)
|
||||
$element.autocomplete('option', 'source', autocompleteOptions.source);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n\r\n var vm;\r\n var urlUndetectedPageThumbnail" +
|
||||
" = \'");
|
||||
|
||||
|
||||
#line 63 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
|
||||
Write(new HtmlString(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFile(null, false, true))));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\';\r\n var urlUndetectedPagePreview = \'");
|
||||
|
||||
|
||||
#line 64 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
|
||||
Write(new HtmlString(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFile(null, false, false))));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\';\r\n var urlUndetectedPageSource = \'");
|
||||
|
||||
|
||||
#line 65 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
|
||||
Write(new HtmlString(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFile(null, true, false))));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\';\r\n var urlDataIdLookupService = \'");
|
||||
|
||||
|
||||
#line 66 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
|
||||
Write(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedDataIdLookup()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\';\r\n var urlImporterUndetectedAssign = \'");
|
||||
|
||||
|
||||
#line 67 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
|
||||
Write(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedAssign()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\';\r\n var urlImporterUndetectedDelete = \'");
|
||||
|
||||
|
||||
#line 68 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
|
||||
Write(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedDelete()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\';\r\n var $undetectedPageDialog = $(\'#undetectedPageDialog\').dialog({\r\n " +
|
||||
" modal: true,\r\n height: 820,\r\n width: 800,\r\n " +
|
||||
" resizable: false,\r\n autoOpen: false\r\n });\r\n\r\n $di" +
|
||||
"alogRemove = $(\'#dialogRemove\').dialog({\r\n resizable: false,\r\n " +
|
||||
" height: 140,\r\n modal: true,\r\n autoOpen: false\r\n " +
|
||||
" });\r\n\r\n function pageViewModel() {\r\n var self = this;\r\n\r\n " +
|
||||
" self.selectedUndetectedPage = ko.observable(null);\r\n self.un" +
|
||||
"detectedPages = ko.observableArray();\r\n self.noUndetectedPages = ko.c" +
|
||||
"omputed(function () { return self.undetectedPages().length == 0 });\r\n " +
|
||||
" self.selectNextPage = function () {\r\n var oldSelected = self.sel" +
|
||||
"ectedUndetectedPage();\r\n var oldSelectedIndex = vm.undetectedPage" +
|
||||
"s.indexOf(oldSelected);\r\n\r\n if (vm.undetectedPages().length > 1) " +
|
||||
"{\r\n if (oldSelectedIndex > vm.undetectedPages().length - 1)\r\n" +
|
||||
" vm.selectedUndetectedPage(vm.undetectedPages()[oldSelect" +
|
||||
"edIndex + 1]);\r\n else\r\n vm.selectedUnd" +
|
||||
"etectedPage(vm.undetectedPages()[oldSelectedIndex - 1]);\r\n } else" +
|
||||
" {\r\n $undetectedPageDialog.dialog(\'close\');\r\n " +
|
||||
" vm.selectedUndetectedPage(null);\r\n }\r\n }\r\n " +
|
||||
"}\r\n\r\n function undetectedPageViewModel(id, timestamp, timestampFuzzy) {\r\n" +
|
||||
" var self = this;\r\n\r\n self.id = id;\r\n self.time" +
|
||||
"stamp = timestamp;\r\n self.timestampFuzzy = timestampFuzzy;\r\n " +
|
||||
" self.thumbnailUrl = \"url(\" + urlUndetectedPageThumbnail + \"&id=\" + id + \")\";\r" +
|
||||
"\n self.previewUrl = \"url(\" + urlUndetectedPagePreview + \"&id=\" + id +" +
|
||||
" \")\";\r\n self.sourceUrl = urlUndetectedPageSource + \"&id=\" + id;\r\n " +
|
||||
" self.select = function (e, d) {\r\n vm.selectedUndetectedPa" +
|
||||
"ge(self);\r\n $undetectedPageDialog.dialog(\'open\');\r\n }\r" +
|
||||
"\n\r\n // Dialog Properties\r\n self.dialogTemplateId = ko.obse" +
|
||||
"rvable(null);\r\n self.dialogDataId = ko.observable(null);\r\n " +
|
||||
" self.dialogDataIdService = ko.computed(function () {\r\n return ur" +
|
||||
"lDataIdLookupService + self.dialogTemplateId();\r\n });\r\n se" +
|
||||
"lf.deletePage = function () {\r\n $undetectedPageDialog.dialog(\'opt" +
|
||||
"ion\', \'disabled\', true);\r\n\r\n $dialogRemove.dialog(\'option\', \'butt" +
|
||||
"ons\', {\r\n \"Remove\": function () {\r\n $d" +
|
||||
"ialogRemove.dialog(\"close\");\r\n var data = { id: self.id }" +
|
||||
";\r\n $.ajax({\r\n url: urlImporte" +
|
||||
"rUndetectedDelete,\r\n dataType: \'json\',\r\n " +
|
||||
" data: data,\r\n type: \'POST\',\r\n " +
|
||||
" success: function (d) {\r\n if (" +
|
||||
"d == \'OK\') {\r\n vm.selectNextPage();\r\n " +
|
||||
" vm.undetectedPages.remove(self);\r\n " +
|
||||
" } else {\r\n alert(\'Unable to del" +
|
||||
"ete page: \' + d);\r\n }\r\n " +
|
||||
" $undetectedPageDialog.dialog(\'option\', \'disabled\', false);\r\n " +
|
||||
" },\r\n error: function (jqXHR, textStatus" +
|
||||
", errorThrown) {\r\n alert(\'Unable to delete page: " +
|
||||
"\' + errorThrown);\r\n $undetectedPageDialog.dialog(" +
|
||||
"\'option\', \'disabled\', false);\r\n }\r\n " +
|
||||
" });\r\n },\r\n \"Cancel\": function () {\r\n" +
|
||||
" $dialogRemove.dialog(\"close\");\r\n " +
|
||||
"$undetectedPageDialog.dialog(\'option\', \'disabled\', false);\r\n " +
|
||||
"}\r\n });\r\n\r\n $dialogRemove.dialog(\'open\');\r\n\r\n " +
|
||||
" return false;\r\n }\r\n self.assignPage = function " +
|
||||
"() {\r\n var dtId = self.dialogTemplateId();\r\n var d" +
|
||||
"Id = self.dialogDataId();\r\n if (!dtId || !dId) {\r\n " +
|
||||
" alert(\'Please specify a valid Document Type and Data Id\');\r\n " +
|
||||
" } else {\r\n $undetectedPageDialog.dialog(\'option\', \'disabled\'" +
|
||||
", true);\r\n\r\n var data = { id: self.id, DocumentTemplateId: dt" +
|
||||
"Id, DataId: dId };\r\n\r\n $.ajax({\r\n url:" +
|
||||
" urlImporterUndetectedAssign,\r\n dataType: \'json\',\r\n " +
|
||||
" data: data,\r\n type: \'POST\',\r\n " +
|
||||
" success: function (d) {\r\n if (d == \'OK\'" +
|
||||
") {\r\n vm.selectNextPage();\r\n " +
|
||||
" vm.undetectedPages.remove(self);\r\n } else " +
|
||||
"{\r\n alert(\'Unable to assign page: \' + d);\r\n " +
|
||||
" }\r\n $undetectedPageDialog.dialo" +
|
||||
"g(\'option\', \'disabled\', false);\r\n },\r\n " +
|
||||
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
|
||||
" alert(\'Unable to assign page: \' + errorThrown);\r\n " +
|
||||
" $undetectedPageDialog.dialog(\'option\', \'disabled\', false);\r\n " +
|
||||
" }\r\n });\r\n\r\n }\r\n return fa" +
|
||||
"lse;\r\n };\r\n }\r\n\r\n function init() {\r\n vm = n" +
|
||||
"ew pageViewModel();\r\n\r\n $.ajax({\r\n url: \'");
|
||||
|
||||
|
||||
#line 202 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
|
||||
Write(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFiles()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"',
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
success: init_loadedContent,
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to load content: ' + errorThrown);
|
||||
}
|
||||
});
|
||||
}
|
||||
function init_loadedContent(content) {
|
||||
if (content.length > 0) {
|
||||
for (var i = 0; i < content.length; i++) {
|
||||
var c = content[i];
|
||||
var up = new undetectedPageViewModel(c.Id, c.Timestamp, c.TimestampFuzzy);
|
||||
vm.undetectedPages.push(up);
|
||||
}
|
||||
}
|
||||
|
||||
ko.applyBindings(vm);
|
||||
init_loadedOpen();
|
||||
}
|
||||
function init_loadedOpen() {
|
||||
var fileId = window.location.hash;
|
||||
if (fileId) {
|
||||
fileId = fileId.substr(1);
|
||||
for (var i = 0; i < vm.undetectedPages().length; i++) {
|
||||
var up = vm.undetectedPages()[i];
|
||||
if (up.id == fileId) {
|
||||
up.select();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
init();
|
||||
|
||||
});
|
||||
</script>
|
||||
");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
#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/UndetectedPages.cshtml")]
|
||||
public class UndetectedPages : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DocumentTemplate.UndetectedPagesModel>
|
||||
{
|
||||
public UndetectedPages()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(), "Undetected Pages");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Knockout");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"undetectedPagesContainer\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"noUndetectedPages\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"visible: noUndetectedPages\"");
|
||||
|
||||
WriteLiteral(">\r\n <h3>\r\n No Undetected Pages</h3>\r\n </div>\r\n <ul");
|
||||
|
||||
WriteLiteral(" id=\"undetectedPages\"");
|
||||
|
||||
WriteLiteral(" class=\"clearfix\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"visible: !noUndetectedPages(), foreach: {data: undetectedPages}\"");
|
||||
|
||||
WriteLiteral(">\r\n <li");
|
||||
|
||||
WriteLiteral(" class=\"undetectedPage\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"style: {backgroundImage: thumbnailUrl}, click: select\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"pageDetails\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"text: timestampFuzzy, attr: {title: timestamp}\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n </li>\r\n </ul>\r\n</div>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"undetectedPageDialog\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"with: selectedUndetectedPage\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"pagePreview\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"style: {backgroundImage: previewUrl}\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"actions\"");
|
||||
|
||||
WriteLiteral(">\r\n <a");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(" target=\"_blank\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"attr: {href: sourceUrl}\"");
|
||||
|
||||
WriteLiteral(">Download</a>\r\n <a");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(" id=\"dialogDeleteButton\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"click: deletePage\"");
|
||||
|
||||
WriteLiteral(">Delete</a>\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"actions\"");
|
||||
|
||||
WriteLiteral(">\r\n Type: ");
|
||||
|
||||
|
||||
#line 27 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
|
||||
Write(Html.DropDownList("dialogDocumentTemplateId", Model.DocumentTemplatesSelectListItems, new Dictionary<string, object> { { "data-bind", "value: dialogTemplateId" } }));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n Data:\r\n <input");
|
||||
|
||||
WriteLiteral(" id=\"dialogDataId\"");
|
||||
|
||||
WriteLiteral(" type=\"text\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"value: dialogDataId, autocomplete: {source: dialogDataIdService, minL" +
|
||||
"ength: 3, position: {my: \'left bottom\', at: \'left top\'}}\"");
|
||||
|
||||
WriteLiteral(" />\r\n <a");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(" id=\"dialogAssignButton\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"click: assignPage\"");
|
||||
|
||||
WriteLiteral(">Assign</a>\r\n </div>\r\n</div>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"dialogRemove\"");
|
||||
|
||||
WriteLiteral(" title=\"Delete this Page?\"");
|
||||
|
||||
WriteLiteral(">\r\n <p>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
|
||||
|
||||
WriteLiteral(" style=\"float: left; margin: 0 7px 20px 0;\"");
|
||||
|
||||
WriteLiteral("></span>\r\n Are you sure?</p>\r\n</div>\r\n<script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
ko.bindingHandlers.autocomplete = {
|
||||
update: function (element, valueAccessor, allBindingsAccessor, viewModel) {
|
||||
var autocompleteOptions = ko.utils.unwrapObservable(valueAccessor());
|
||||
if (autocompleteOptions.source)
|
||||
autocompleteOptions.source = ko.utils.unwrapObservable(autocompleteOptions.source);
|
||||
$element = $(element);
|
||||
if (!$element.is('.ui-autocomplete-input')) {
|
||||
autocompleteOptions.select = function (e, ui) {
|
||||
allBindingsAccessor().value(ui.item.value);
|
||||
return false;
|
||||
}
|
||||
$element.autocomplete(autocompleteOptions);
|
||||
} else {
|
||||
// Update Source Option Only
|
||||
if (autocompleteOptions.source)
|
||||
$element.autocomplete('option', 'source', autocompleteOptions.source);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n\r\n var vm;\r\n var urlUndetectedPageThumbnail" +
|
||||
" = \'");
|
||||
|
||||
|
||||
#line 63 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
|
||||
Write(new HtmlString(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFile(null, false, true))));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\';\r\n var urlUndetectedPagePreview = \'");
|
||||
|
||||
|
||||
#line 64 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
|
||||
Write(new HtmlString(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFile(null, false, false))));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\';\r\n var urlUndetectedPageSource = \'");
|
||||
|
||||
|
||||
#line 65 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
|
||||
Write(new HtmlString(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFile(null, true, false))));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\';\r\n var urlDataIdLookupService = \'");
|
||||
|
||||
|
||||
#line 66 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
|
||||
Write(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedDataIdLookup()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\';\r\n var urlImporterUndetectedAssign = \'");
|
||||
|
||||
|
||||
#line 67 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
|
||||
Write(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedAssign()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\';\r\n var urlImporterUndetectedDelete = \'");
|
||||
|
||||
|
||||
#line 68 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
|
||||
Write(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedDelete()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\';\r\n var $undetectedPageDialog = $(\'#undetectedPageDialog\').dialog({\r\n " +
|
||||
" modal: true,\r\n height: 820,\r\n width: 800,\r\n " +
|
||||
" resizable: false,\r\n autoOpen: false\r\n });\r\n\r\n $di" +
|
||||
"alogRemove = $(\'#dialogRemove\').dialog({\r\n resizable: false,\r\n " +
|
||||
" height: 140,\r\n modal: true,\r\n autoOpen: false\r\n " +
|
||||
" });\r\n\r\n function pageViewModel() {\r\n var self = this;\r\n\r\n " +
|
||||
" self.selectedUndetectedPage = ko.observable(null);\r\n self.un" +
|
||||
"detectedPages = ko.observableArray();\r\n self.noUndetectedPages = ko.c" +
|
||||
"omputed(function () { return self.undetectedPages().length == 0 });\r\n " +
|
||||
" self.selectNextPage = function () {\r\n var oldSelected = self.sel" +
|
||||
"ectedUndetectedPage();\r\n var oldSelectedIndex = vm.undetectedPage" +
|
||||
"s.indexOf(oldSelected);\r\n\r\n if (vm.undetectedPages().length > 1) " +
|
||||
"{\r\n if (oldSelectedIndex > vm.undetectedPages().length - 1)\r\n" +
|
||||
" vm.selectedUndetectedPage(vm.undetectedPages()[oldSelect" +
|
||||
"edIndex + 1]);\r\n else\r\n vm.selectedUnd" +
|
||||
"etectedPage(vm.undetectedPages()[oldSelectedIndex - 1]);\r\n } else" +
|
||||
" {\r\n $undetectedPageDialog.dialog(\'close\');\r\n " +
|
||||
" vm.selectedUndetectedPage(null);\r\n }\r\n }\r\n " +
|
||||
"}\r\n\r\n function undetectedPageViewModel(id, timestamp, timestampFuzzy) {\r\n" +
|
||||
" var self = this;\r\n\r\n self.id = id;\r\n self.time" +
|
||||
"stamp = timestamp;\r\n self.timestampFuzzy = timestampFuzzy;\r\n " +
|
||||
" self.thumbnailUrl = \"url(\" + urlUndetectedPageThumbnail + \"&id=\" + id + \")\";\r" +
|
||||
"\n self.previewUrl = \"url(\" + urlUndetectedPagePreview + \"&id=\" + id +" +
|
||||
" \")\";\r\n self.sourceUrl = urlUndetectedPageSource + \"&id=\" + id;\r\n " +
|
||||
" self.select = function (e, d) {\r\n vm.selectedUndetectedPa" +
|
||||
"ge(self);\r\n $undetectedPageDialog.dialog(\'open\');\r\n }\r" +
|
||||
"\n\r\n // Dialog Properties\r\n self.dialogTemplateId = ko.obse" +
|
||||
"rvable(null);\r\n self.dialogDataId = ko.observable(null);\r\n " +
|
||||
" self.dialogDataIdService = ko.computed(function () {\r\n return ur" +
|
||||
"lDataIdLookupService + self.dialogTemplateId();\r\n });\r\n se" +
|
||||
"lf.deletePage = function () {\r\n $undetectedPageDialog.dialog(\'opt" +
|
||||
"ion\', \'disabled\', true);\r\n\r\n $dialogRemove.dialog(\'option\', \'butt" +
|
||||
"ons\', {\r\n \"Remove\": function () {\r\n $d" +
|
||||
"ialogRemove.dialog(\"close\");\r\n var data = { id: self.id }" +
|
||||
";\r\n $.ajax({\r\n url: urlImporte" +
|
||||
"rUndetectedDelete,\r\n dataType: \'json\',\r\n " +
|
||||
" data: data,\r\n type: \'POST\',\r\n " +
|
||||
" success: function (d) {\r\n if (" +
|
||||
"d == \'OK\') {\r\n vm.selectNextPage();\r\n " +
|
||||
" vm.undetectedPages.remove(self);\r\n " +
|
||||
" } else {\r\n alert(\'Unable to del" +
|
||||
"ete page: \' + d);\r\n }\r\n " +
|
||||
" $undetectedPageDialog.dialog(\'option\', \'disabled\', false);\r\n " +
|
||||
" },\r\n error: function (jqXHR, textStatus" +
|
||||
", errorThrown) {\r\n alert(\'Unable to delete page: " +
|
||||
"\' + errorThrown);\r\n $undetectedPageDialog.dialog(" +
|
||||
"\'option\', \'disabled\', false);\r\n }\r\n " +
|
||||
" });\r\n },\r\n \"Cancel\": function () {\r\n" +
|
||||
" $dialogRemove.dialog(\"close\");\r\n " +
|
||||
"$undetectedPageDialog.dialog(\'option\', \'disabled\', false);\r\n " +
|
||||
"}\r\n });\r\n\r\n $dialogRemove.dialog(\'open\');\r\n\r\n " +
|
||||
" return false;\r\n }\r\n self.assignPage = function " +
|
||||
"() {\r\n var dtId = self.dialogTemplateId();\r\n var d" +
|
||||
"Id = self.dialogDataId();\r\n if (!dtId || !dId) {\r\n " +
|
||||
" alert(\'Please specify a valid Document Type and Data Id\');\r\n " +
|
||||
" } else {\r\n $undetectedPageDialog.dialog(\'option\', \'disabled\'" +
|
||||
", true);\r\n\r\n var data = { id: self.id, DocumentTemplateId: dt" +
|
||||
"Id, DataId: dId };\r\n\r\n $.ajax({\r\n url:" +
|
||||
" urlImporterUndetectedAssign,\r\n dataType: \'json\',\r\n " +
|
||||
" data: data,\r\n type: \'POST\',\r\n " +
|
||||
" success: function (d) {\r\n if (d == \'OK\'" +
|
||||
") {\r\n vm.selectNextPage();\r\n " +
|
||||
" vm.undetectedPages.remove(self);\r\n } else " +
|
||||
"{\r\n alert(\'Unable to assign page: \' + d);\r\n " +
|
||||
" }\r\n $undetectedPageDialog.dialo" +
|
||||
"g(\'option\', \'disabled\', false);\r\n },\r\n " +
|
||||
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
|
||||
" alert(\'Unable to assign page: \' + errorThrown);\r\n " +
|
||||
" $undetectedPageDialog.dialog(\'option\', \'disabled\', false);\r\n " +
|
||||
" }\r\n });\r\n\r\n }\r\n return fa" +
|
||||
"lse;\r\n };\r\n }\r\n\r\n function init() {\r\n vm = n" +
|
||||
"ew pageViewModel();\r\n\r\n $.ajax({\r\n url: \'");
|
||||
|
||||
|
||||
#line 202 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
|
||||
Write(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFiles()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"',
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
success: init_loadedContent,
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to load content: ' + errorThrown);
|
||||
}
|
||||
});
|
||||
}
|
||||
function init_loadedContent(content) {
|
||||
if (content.length > 0) {
|
||||
for (var i = 0; i < content.length; i++) {
|
||||
var c = content[i];
|
||||
var up = new undetectedPageViewModel(c.Id, c.Timestamp, c.TimestampFuzzy);
|
||||
vm.undetectedPages.push(up);
|
||||
}
|
||||
}
|
||||
|
||||
ko.applyBindings(vm);
|
||||
init_loadedOpen();
|
||||
}
|
||||
function init_loadedOpen() {
|
||||
var fileId = window.location.hash;
|
||||
if (fileId) {
|
||||
fileId = fileId.substr(1);
|
||||
for (var i = 0; i < vm.undetectedPages().length; i++) {
|
||||
var up = vm.undetectedPages()[i];
|
||||
if (up.id == fileId) {
|
||||
up.select();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
init();
|
||||
|
||||
});
|
||||
</script>
|
||||
");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
|
||||
@@ -1,75 +1,75 @@
|
||||
@model IEnumerable<Disco.BI.Expressions.Expression>
|
||||
<div class="expressionsTable">
|
||||
@if (Model.Count() > 0)
|
||||
{
|
||||
<table class="expressionsTable">
|
||||
<tr>
|
||||
<th>
|
||||
Name
|
||||
</th>
|
||||
<th>
|
||||
Expression
|
||||
</th>
|
||||
<th>
|
||||
Errors Allowed
|
||||
</th>
|
||||
</tr>
|
||||
@foreach (var expression in Model.Where(m => m.IsDynamic))
|
||||
{
|
||||
var expressionParts = expression.Where(e => e.IsDynamic).ToArray();
|
||||
<tr>
|
||||
<td rowspan="@(expressionParts.Length)">
|
||||
@expression.Name
|
||||
</td>
|
||||
@if (expressionParts[0].ParseError)
|
||||
{
|
||||
<td class="parseError">
|
||||
@expressionParts[0].Source
|
||||
<div class="code">
|
||||
<strong>Expression Compilation Error:</strong><br />
|
||||
@expressionParts[0].ParseErrorMessage
|
||||
</div>
|
||||
</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td>
|
||||
@expressionParts[0].Source
|
||||
</td>
|
||||
}
|
||||
<td>
|
||||
@(expressionParts[0].ErrorsAllowed ? "Yes" : "No")
|
||||
</td>
|
||||
</tr>
|
||||
for (int expressionIndex = 1; expressionIndex < expressionParts.Length; expressionIndex++)
|
||||
{
|
||||
<tr>
|
||||
@if (expressionParts[expressionIndex].ParseError)
|
||||
{
|
||||
<td class="parseError">
|
||||
@expressionParts[expressionIndex].Source
|
||||
<div class="code">
|
||||
<strong>Expression Compilation Error:</strong><br />
|
||||
@expressionParts[expressionIndex].ParseErrorMessage
|
||||
</div>
|
||||
</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td>
|
||||
@expressionParts[expressionIndex].Source
|
||||
</td>
|
||||
}
|
||||
<td>
|
||||
@(expressionParts[expressionIndex].ErrorsAllowed ? "Yes" : "No")
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</table>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">No Expressions Found</span>
|
||||
}
|
||||
</div>
|
||||
@model IEnumerable<Disco.BI.Expressions.Expression>
|
||||
<div class="expressionsTable">
|
||||
@if (Model.Count() > 0)
|
||||
{
|
||||
<table class="expressionsTable">
|
||||
<tr>
|
||||
<th>
|
||||
Name
|
||||
</th>
|
||||
<th>
|
||||
Expression
|
||||
</th>
|
||||
<th>
|
||||
Errors Allowed
|
||||
</th>
|
||||
</tr>
|
||||
@foreach (var expression in Model.Where(m => m.IsDynamic))
|
||||
{
|
||||
var expressionParts = expression.Where(e => e.IsDynamic).ToArray();
|
||||
<tr>
|
||||
<td rowspan="@(expressionParts.Length)">
|
||||
@expression.Name
|
||||
</td>
|
||||
@if (expressionParts[0].ParseError)
|
||||
{
|
||||
<td class="parseError">
|
||||
@expressionParts[0].Source
|
||||
<div class="code">
|
||||
<strong>Expression Compilation Error:</strong><br />
|
||||
@expressionParts[0].ParseErrorMessage
|
||||
</div>
|
||||
</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td>
|
||||
@expressionParts[0].Source
|
||||
</td>
|
||||
}
|
||||
<td>
|
||||
@(expressionParts[0].ErrorsAllowed ? "Yes" : "No")
|
||||
</td>
|
||||
</tr>
|
||||
for (int expressionIndex = 1; expressionIndex < expressionParts.Length; expressionIndex++)
|
||||
{
|
||||
<tr>
|
||||
@if (expressionParts[expressionIndex].ParseError)
|
||||
{
|
||||
<td class="parseError">
|
||||
@expressionParts[expressionIndex].Source
|
||||
<div class="code">
|
||||
<strong>Expression Compilation Error:</strong><br />
|
||||
@expressionParts[expressionIndex].ParseErrorMessage
|
||||
</div>
|
||||
</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td>
|
||||
@expressionParts[expressionIndex].Source
|
||||
</td>
|
||||
}
|
||||
<td>
|
||||
@(expressionParts[expressionIndex].ErrorsAllowed ? "Yes" : "No")
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</table>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">No Expressions Found</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -1,346 +1,346 @@
|
||||
#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/_ExpressionsTable.cshtml")]
|
||||
public class ExpressionsTable : System.Web.Mvc.WebViewPage<IEnumerable<Disco.BI.Expressions.Expression>>
|
||||
{
|
||||
public ExpressionsTable()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
WriteLiteral("<div");
|
||||
|
||||
WriteLiteral(" class=\"expressionsTable\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 3 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 3 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
if (Model.Count() > 0)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <table");
|
||||
|
||||
WriteLiteral(" class=\"expressionsTable\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
<tr>
|
||||
<th>
|
||||
Name
|
||||
</th>
|
||||
<th>
|
||||
Expression
|
||||
</th>
|
||||
<th>
|
||||
Errors Allowed
|
||||
</th>
|
||||
</tr>
|
||||
");
|
||||
|
||||
|
||||
#line 17 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 17 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
foreach (var expression in Model.Where(m => m.IsDynamic))
|
||||
{
|
||||
var expressionParts = expression.Where(e => e.IsDynamic).ToArray();
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <td");
|
||||
|
||||
WriteAttribute("rowspan", Tuple.Create(" rowspan=\"", 647), Tuple.Create("\"", 682)
|
||||
|
||||
#line 21 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 657), Tuple.Create<System.Object, System.Int32>(expressionParts.Length
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 657), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 22 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
Write(expression.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 24 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 24 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
if (expressionParts[0].ParseError)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td");
|
||||
|
||||
WriteLiteral(" class=\"parseError\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 27 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
Write(expressionParts[0].Source);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"code\"");
|
||||
|
||||
WriteLiteral(">\r\n <strong>Expression Compilation Error:</strong>" +
|
||||
"<br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 30 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
Write(expressionParts[0].ParseErrorMessage);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 37 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
Write(expressionParts[0].Source);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 39 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 41 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
Write(expressionParts[0].ErrorsAllowed ? "Yes" : "No");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 44 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
for (int expressionIndex = 1; expressionIndex < expressionParts.Length; expressionIndex++)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n");
|
||||
|
||||
|
||||
#line 47 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 47 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
if (expressionParts[expressionIndex].ParseError)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td");
|
||||
|
||||
WriteLiteral(" class=\"parseError\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 50 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
Write(expressionParts[expressionIndex].Source);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"code\"");
|
||||
|
||||
WriteLiteral(">\r\n <strong>Expression Compilation Error:</strong>" +
|
||||
"<br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
Write(expressionParts[expressionIndex].ParseErrorMessage);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 56 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 60 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
Write(expressionParts[expressionIndex].Source);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 62 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 64 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
Write(expressionParts[expressionIndex].ErrorsAllowed ? "Yes" : "No");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 67 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </table>\r\n");
|
||||
|
||||
|
||||
#line 70 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">No Expressions Found</span>\r\n");
|
||||
|
||||
|
||||
#line 74 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
#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/_ExpressionsTable.cshtml")]
|
||||
public class ExpressionsTable : System.Web.Mvc.WebViewPage<IEnumerable<Disco.BI.Expressions.Expression>>
|
||||
{
|
||||
public ExpressionsTable()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
WriteLiteral("<div");
|
||||
|
||||
WriteLiteral(" class=\"expressionsTable\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 3 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 3 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
if (Model.Count() > 0)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <table");
|
||||
|
||||
WriteLiteral(" class=\"expressionsTable\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
<tr>
|
||||
<th>
|
||||
Name
|
||||
</th>
|
||||
<th>
|
||||
Expression
|
||||
</th>
|
||||
<th>
|
||||
Errors Allowed
|
||||
</th>
|
||||
</tr>
|
||||
");
|
||||
|
||||
|
||||
#line 17 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 17 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
foreach (var expression in Model.Where(m => m.IsDynamic))
|
||||
{
|
||||
var expressionParts = expression.Where(e => e.IsDynamic).ToArray();
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <td");
|
||||
|
||||
WriteAttribute("rowspan", Tuple.Create(" rowspan=\"", 647), Tuple.Create("\"", 682)
|
||||
|
||||
#line 21 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 657), Tuple.Create<System.Object, System.Int32>(expressionParts.Length
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 657), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 22 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
Write(expression.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 24 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 24 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
if (expressionParts[0].ParseError)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td");
|
||||
|
||||
WriteLiteral(" class=\"parseError\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 27 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
Write(expressionParts[0].Source);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"code\"");
|
||||
|
||||
WriteLiteral(">\r\n <strong>Expression Compilation Error:</strong>" +
|
||||
"<br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 30 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
Write(expressionParts[0].ParseErrorMessage);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 37 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
Write(expressionParts[0].Source);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 39 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 41 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
Write(expressionParts[0].ErrorsAllowed ? "Yes" : "No");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 44 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
for (int expressionIndex = 1; expressionIndex < expressionParts.Length; expressionIndex++)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n");
|
||||
|
||||
|
||||
#line 47 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 47 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
if (expressionParts[expressionIndex].ParseError)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td");
|
||||
|
||||
WriteLiteral(" class=\"parseError\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 50 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
Write(expressionParts[expressionIndex].Source);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"code\"");
|
||||
|
||||
WriteLiteral(">\r\n <strong>Expression Compilation Error:</strong>" +
|
||||
"<br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
Write(expressionParts[expressionIndex].ParseErrorMessage);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 56 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 60 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
Write(expressionParts[expressionIndex].Source);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 62 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 64 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
Write(expressionParts[expressionIndex].ErrorsAllowed ? "Yes" : "No");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 67 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </table>\r\n");
|
||||
|
||||
|
||||
#line 70 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">No Expressions Found</span>\r\n");
|
||||
|
||||
|
||||
#line 74 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
|
||||
Reference in New Issue
Block a user