feature: user details are individually exported; shared export field renderer
This commit is contained in:
@@ -687,21 +687,21 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
[DiscoAuthorize(Claims.Device.Actions.Export)]
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public virtual ActionResult Export(ExportModel Model)
|
||||
public virtual ActionResult Export(ExportModel model)
|
||||
{
|
||||
if (Model == null || Model.Options == null)
|
||||
if (model == null || model.Options == null)
|
||||
throw new ArgumentNullException("Model");
|
||||
|
||||
// Write Options to Configuration
|
||||
Database.DiscoConfiguration.Devices.LastExportOptions = Model.Options;
|
||||
Database.DiscoConfiguration.Devices.LastExportOptions = model.Options;
|
||||
Database.SaveChanges();
|
||||
|
||||
// Start Export
|
||||
var exportContext = new DeviceExport(Model.Options);
|
||||
var exportContext = new DeviceExport(model.Options);
|
||||
var taskContext = ExportTask.ScheduleNowCacheResult(exportContext, id => Url.Action(MVC.Device.Export(id, null, null)));
|
||||
|
||||
// Try waiting for completion
|
||||
if (taskContext.TaskStatus.WaitUntilFinished(TimeSpan.FromSeconds(1)))
|
||||
if (taskContext.TaskStatus.WaitUntilFinished(TimeSpan.FromSeconds(2)))
|
||||
return RedirectToAction(MVC.Device.Export(taskContext.Id, null, null));
|
||||
else
|
||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(taskContext.TaskStatus.SessionId));
|
||||
@@ -729,9 +729,11 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
[DiscoAuthorizeAll(Claims.Config.ManageSavedExports, Claims.Device.Actions.Export)]
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public virtual ActionResult SaveExport(ExportModel Model)
|
||||
public virtual ActionResult SaveExport(ExportModel model)
|
||||
{
|
||||
var export = new DeviceExport(Model.Options);
|
||||
Database.DiscoConfiguration.Devices.LastExportOptions = model.Options;
|
||||
|
||||
var export = new DeviceExport(model.Options);
|
||||
var savedExport = SavedExports.SaveExport(export, Database, CurrentUser);
|
||||
|
||||
return RedirectToAction(MVC.Config.Export.Create(savedExport.Id));
|
||||
|
||||
@@ -404,20 +404,20 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
[DiscoAuthorize(Claims.Config.DeviceFlag.Export)]
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public virtual ActionResult Export(ExportModel Model)
|
||||
public virtual ActionResult Export(ExportModel model)
|
||||
{
|
||||
if (Model == null || Model.Options == null)
|
||||
throw new ArgumentNullException(nameof(Model));
|
||||
if (model == null || model.Options == null)
|
||||
throw new ArgumentNullException(nameof(model));
|
||||
|
||||
Database.DiscoConfiguration.DeviceFlags.LastExportOptions = Model.Options;
|
||||
Database.DiscoConfiguration.DeviceFlags.LastExportOptions = model.Options;
|
||||
Database.SaveChanges();
|
||||
|
||||
// Start Export
|
||||
var exportContext = new DeviceFlagExport(Model.Options);
|
||||
var exportContext = new DeviceFlagExport(model.Options);
|
||||
var taskContext = ExportTask.ScheduleNowCacheResult(exportContext, id => Url.Action(MVC.Config.DeviceFlag.Export(id, null, null)));
|
||||
|
||||
// Try waiting for completion
|
||||
if (taskContext.TaskStatus.WaitUntilFinished(TimeSpan.FromSeconds(1)))
|
||||
if (taskContext.TaskStatus.WaitUntilFinished(TimeSpan.FromSeconds(2)))
|
||||
return RedirectToAction(MVC.Config.DeviceFlag.Export(taskContext.Id, null, null));
|
||||
else
|
||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(taskContext.TaskStatus.SessionId));
|
||||
@@ -445,11 +445,11 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
[DiscoAuthorizeAll(Claims.Config.ManageSavedExports, Claims.Config.DeviceFlag.Export)]
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public virtual ActionResult SaveExport(ExportModel Model)
|
||||
public virtual ActionResult SaveExport(ExportModel model)
|
||||
{
|
||||
Database.DiscoConfiguration.DeviceFlags.LastExportOptions = Model.Options;
|
||||
Database.DiscoConfiguration.DeviceFlags.LastExportOptions = model.Options;
|
||||
|
||||
var export = new DeviceFlagExport(Model.Options);
|
||||
var export = new DeviceFlagExport(model.Options);
|
||||
var savedExport = SavedExports.SaveExport(export, Database, CurrentUser);
|
||||
|
||||
return RedirectToAction(MVC.Config.Export.Create(savedExport.Id));
|
||||
|
||||
@@ -11,7 +11,6 @@ using Disco.Services.Plugins;
|
||||
using Disco.Services.Plugins.Features.DocumentHandlerProvider;
|
||||
using Disco.Services.Tasks;
|
||||
using Disco.Services.Users;
|
||||
using Disco.Services.Users.UserFlags;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web.Areas.API.Models.DocumentTemplate;
|
||||
using Disco.Web.Areas.Config.Models.DocumentTemplate;
|
||||
@@ -1453,25 +1452,25 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
[DiscoAuthorize(Claims.Config.DocumentTemplate.Export)]
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public virtual ActionResult Export(ExportModel Model)
|
||||
public virtual ActionResult Export(ExportModel model)
|
||||
{
|
||||
if (Model == null || Model.Options == null)
|
||||
throw new ArgumentNullException(nameof(Model));
|
||||
if (model == null || model.Options == null)
|
||||
throw new ArgumentNullException(nameof(model));
|
||||
|
||||
var templateId = default(string);
|
||||
if (Model.Options.DocumentTemplateIds.Count == 1)
|
||||
templateId = Model.Options.DocumentTemplateIds.First();
|
||||
if (model.Options.DocumentTemplateIds.Count == 1)
|
||||
templateId = model.Options.DocumentTemplateIds.First();
|
||||
|
||||
Database.DiscoConfiguration.Documents.LastExportOptions = Model.Options;
|
||||
Database.DiscoConfiguration.Documents.LastExportOptions = model.Options;
|
||||
Database.SaveChanges();
|
||||
|
||||
// Start Export
|
||||
var exportContext = new DocumentExport(Model.Options);
|
||||
var taskContext = ExportTask.ScheduleNowCacheResult(exportContext, id => Url.Action(MVC.Config.DocumentTemplate.Export(templateId, id)));
|
||||
var exportContext = new DocumentExport(model.Options);
|
||||
var taskContext = ExportTask.ScheduleNowCacheResult(exportContext, id => Url.Action(MVC.Config.DocumentTemplate.Export(null, id)));
|
||||
|
||||
// Try waiting for completion
|
||||
if (taskContext.TaskStatus.WaitUntilFinished(TimeSpan.FromSeconds(1)))
|
||||
return RedirectToAction(MVC.Config.DocumentTemplate.Export(templateId, taskContext.Id));
|
||||
if (taskContext.TaskStatus.WaitUntilFinished(TimeSpan.FromSeconds(2)))
|
||||
return RedirectToAction(MVC.Config.DocumentTemplate.Export(null, taskContext.Id));
|
||||
else
|
||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(taskContext.TaskStatus.SessionId));
|
||||
}
|
||||
@@ -1495,11 +1494,11 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
[DiscoAuthorizeAll(Claims.Config.ManageSavedExports, Claims.Config.DocumentTemplate.Export)]
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public virtual ActionResult SaveExport(ExportModel Model)
|
||||
public virtual ActionResult SaveExport(ExportModel model)
|
||||
{
|
||||
Database.DiscoConfiguration.Documents.LastExportOptions = Model.Options;
|
||||
Database.DiscoConfiguration.Documents.LastExportOptions = model.Options;
|
||||
|
||||
var export = new DocumentExport(Model.Options);
|
||||
var export = new DocumentExport(model.Options);
|
||||
var savedExport = SavedExports.SaveExport(export, Database, CurrentUser);
|
||||
|
||||
return RedirectToAction(MVC.Config.Export.Create(savedExport.Id));
|
||||
|
||||
@@ -2182,7 +2182,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
var taskContext = ExportTask.ScheduleNowCacheResult(exportContext, id => Url.Action(MVC.Job.Export(id)));
|
||||
|
||||
// Try waiting for completion
|
||||
if (taskContext.TaskStatus.WaitUntilFinished(TimeSpan.FromSeconds(1)))
|
||||
if (taskContext.TaskStatus.WaitUntilFinished(TimeSpan.FromSeconds(2)))
|
||||
return RedirectToAction(MVC.Job.Export(taskContext.Id));
|
||||
else
|
||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(taskContext.TaskStatus.SessionId));
|
||||
@@ -2210,9 +2210,13 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
[DiscoAuthorizeAll(Claims.Config.ManageSavedExports, Claims.Job.Actions.Export)]
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public virtual ActionResult SaveExport(ExportModel Model)
|
||||
public virtual ActionResult SaveExport(ExportModel model)
|
||||
{
|
||||
var export = new JobExport(Model.Options);
|
||||
// Write Options to Configuration
|
||||
Database.DiscoConfiguration.JobPreferences.LastExportOptions = model.Options;
|
||||
Database.SaveChanges();
|
||||
|
||||
var export = new JobExport(model.Options);
|
||||
var savedExport = SavedExports.SaveExport(export, Database, CurrentUser);
|
||||
|
||||
return RedirectToAction(MVC.Config.Export.Create(savedExport.Id));
|
||||
|
||||
@@ -409,20 +409,20 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
[DiscoAuthorize(Claims.Config.UserFlag.Export)]
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public virtual ActionResult Export(ExportModel Model)
|
||||
public virtual ActionResult Export(ExportModel model)
|
||||
{
|
||||
if (Model == null || Model.Options == null)
|
||||
throw new ArgumentNullException(nameof(Model));
|
||||
if (model == null || model.Options == null)
|
||||
throw new ArgumentNullException(nameof(model));
|
||||
|
||||
Database.DiscoConfiguration.UserFlags.LastExportOptions = Model.Options;
|
||||
Database.DiscoConfiguration.UserFlags.LastExportOptions = model.Options;
|
||||
Database.SaveChanges();
|
||||
|
||||
// Start Export
|
||||
var exportContext = new UserFlagExport(Model.Options);
|
||||
var exportContext = new UserFlagExport(model.Options);
|
||||
var taskContext = ExportTask.ScheduleNowCacheResult(exportContext, id => Url.Action(MVC.Config.UserFlag.Export(id, null, null)));
|
||||
|
||||
// Try waiting for completion
|
||||
if (taskContext.TaskStatus.WaitUntilFinished(TimeSpan.FromSeconds(1)))
|
||||
if (taskContext.TaskStatus.WaitUntilFinished(TimeSpan.FromSeconds(2)))
|
||||
return RedirectToAction(MVC.Config.UserFlag.Export(taskContext.Id, null, null));
|
||||
else
|
||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(taskContext.TaskStatus.SessionId));
|
||||
@@ -447,11 +447,11 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
[DiscoAuthorizeAll(Claims.Config.ManageSavedExports, Claims.Config.UserFlag.Export)]
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public virtual ActionResult SaveExport(ExportModel Model)
|
||||
public virtual ActionResult SaveExport(ExportModel model)
|
||||
{
|
||||
Database.DiscoConfiguration.UserFlags.LastExportOptions = Model.Options;
|
||||
Database.DiscoConfiguration.UserFlags.LastExportOptions = model.Options;
|
||||
|
||||
var export = new UserFlagExport(Model.Options);
|
||||
var export = new UserFlagExport(model.Options);
|
||||
var savedExport = SavedExports.SaveExport(export, Database, CurrentUser);
|
||||
|
||||
return RedirectToAction(MVC.Config.Export.Create(savedExport.Id));
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Disco.Models.Areas.Config.UI.DeviceFlag;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.Services.Devices.DeviceFlag;
|
||||
using Disco.Models.Services.Users.UserFlags;
|
||||
using Disco.Models.UI.Config.DeviceFlag;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Devices.DeviceFlags;
|
||||
@@ -9,6 +10,7 @@ using Disco.Services.Extensions;
|
||||
using Disco.Services.Plugins.Features.UIExtension;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web.Areas.Config.Models.DeviceFlag;
|
||||
using Disco.Web.Models.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -129,6 +131,9 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
DeviceFlags = DeviceFlagService.GetDeviceFlags(),
|
||||
};
|
||||
|
||||
m.Fields = ExportFieldsModel.Create(m.Options, DeviceFlagExportOptions.DefaultOptions(), nameof(DeviceFlagExportOptions.CurrentOnly));
|
||||
m.Fields.AddCustomUserDetails(o => o.UserDetailCustom);
|
||||
|
||||
if (ExportTask.TryFromCache(exportId, out var context))
|
||||
{
|
||||
m.ExportId = context.Id;
|
||||
|
||||
@@ -3,7 +3,6 @@ using Disco.Data.Repository;
|
||||
using Disco.Models.Areas.Config.UI.UserFlag;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.Services.Documents;
|
||||
using Disco.Models.Services.Exporting;
|
||||
using Disco.Models.UI.Config.DocumentTemplate;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
@@ -306,27 +305,8 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
DocumentTemplates = Database.DocumentTemplates.OrderBy(d => d.Id).ToList(),
|
||||
};
|
||||
|
||||
m.Fields = ExportFieldsModel.Create(m.Options, nameof(DocumentExportOptions.LatestOnly));
|
||||
|
||||
var userCustomDetailKeys = Database.UserDetails.Where(d => d.Scope == "Details").Select(d => d.Key).Distinct().OrderBy(k => k).ToList();
|
||||
if (userCustomDetailKeys.Any())
|
||||
{
|
||||
var group = new ExportOptionGroup("User Custom Details");
|
||||
foreach (var key in userCustomDetailKeys)
|
||||
{
|
||||
group.Add(new ExportOptionField()
|
||||
{
|
||||
GroupName = group.Name,
|
||||
Name = key,
|
||||
DisplayName = key.TrimEnd('*', '&'),
|
||||
Description = $"{key} custom detail for the user associated with the document instance",
|
||||
Checked = false,
|
||||
Key = "UserDetailCustom",
|
||||
Value = key,
|
||||
});
|
||||
}
|
||||
m.Fields.FieldGroups.Add(group);
|
||||
}
|
||||
m.Fields = ExportFieldsModel.Create(m.Options, DocumentExportOptions.DefaultOptions(), nameof(DocumentExportOptions.LatestOnly));
|
||||
m.Fields.AddCustomUserDetails(o => o.UserDetailCustom);
|
||||
|
||||
if (ExportTask.TryFromCache(exportId, out var context))
|
||||
{
|
||||
@@ -340,6 +320,7 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
|
||||
if (template != null)
|
||||
{
|
||||
m.Options.DocumentTemplateIds.Clear();
|
||||
m.Options.DocumentTemplateIds.Add(template.Id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ using Disco.Services.Plugins.Features.UIExtension;
|
||||
using Disco.Services.Users.UserFlags;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web.Areas.Config.Models.UserFlag;
|
||||
using Disco.Web.Models.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -132,6 +133,9 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
UserFlags = UserFlagService.GetUserFlags(),
|
||||
};
|
||||
|
||||
m.Fields = ExportFieldsModel.Create(m.Options, UserFlagExportOptions.DefaultOptions(), nameof(UserFlagExportOptions.CurrentOnly));
|
||||
m.Fields.AddCustomUserDetails(o => o.UserDetailCustom);
|
||||
|
||||
if (ExportTask.TryFromCache(exportId, out var context))
|
||||
{
|
||||
m.ExportId = exportId;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Disco.Models.Areas.Config.UI.DeviceFlag;
|
||||
using Disco.Models.Services.Devices.DeviceFlag;
|
||||
using Disco.Models.Services.Exporting;
|
||||
using Disco.Models.UI.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -14,5 +15,7 @@ namespace Disco.Web.Areas.Config.Models.DeviceFlag
|
||||
public ExportResult ExportResult { get; set; }
|
||||
|
||||
public List<Disco.Models.Repository.DeviceFlag> DeviceFlags { get; set; }
|
||||
|
||||
public SharedExportFieldsModel<DeviceFlagExportOptions> Fields { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Disco.Models.Areas.Config.UI.UserFlag;
|
||||
using Disco.Models.Services.Exporting;
|
||||
using Disco.Models.Services.Users.UserFlags;
|
||||
using Disco.Models.UI.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -14,5 +15,7 @@ namespace Disco.Web.Areas.Config.Models.UserFlag
|
||||
public ExportResult ExportResult { get; set; }
|
||||
|
||||
public List<Disco.Models.Repository.UserFlag> UserFlags { get; set; }
|
||||
|
||||
public SharedExportFieldsModel<UserFlagExportOptions> Fields { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,6 @@
|
||||
Authorization.RequireAny(Claims.Config.DeviceFlag.Export);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Flags", MVC.Config.DeviceFlag.Index(null), "Export");
|
||||
|
||||
var optionsMetadata = ModelMetadata.FromLambdaExpression(m => m.Options, ViewData);
|
||||
var optionGroups = optionsMetadata.Properties.Where(p => p.ShortDisplayName != null && p.ModelType == typeof(bool) && p.PropertyName != "CurrentOnly")
|
||||
.GroupBy(m => m.ShortDisplayName);
|
||||
}
|
||||
<div id="DeviceFlag_Export">
|
||||
@using (Html.BeginForm(MVC.API.DeviceFlag.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.DeviceFlag.SaveExport()) }))
|
||||
@@ -48,89 +44,21 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="DeviceFlag_Export_Fields" class="form" style="width: 570px; margin-top: 15px;">
|
||||
<h2>Export Fields <a id="DeviceFlag_Export_Fields_Defaults" href="#">(Defaults)</a></h2>
|
||||
<table>
|
||||
@foreach (var optionGroup in optionGroups)
|
||||
{
|
||||
var optionFields = optionGroup.ToList();
|
||||
var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2);
|
||||
<tr>
|
||||
<th style="width: 120px;">
|
||||
@optionGroup.Key
|
||||
@if (optionFields.Count > 2)
|
||||
{
|
||||
<span style="display: block;" class="select"><a class="selectAll" href="#">ALL</a> | <a class="selectNone" href="#">NONE</a></span>
|
||||
}
|
||||
</th>
|
||||
<td>
|
||||
<div class="DeviceFlag_Export_Fields_Group">
|
||||
<table class="none">
|
||||
<tr>
|
||||
<td style="width: 50%">
|
||||
<ul class="none">
|
||||
@foreach (var optionItem in optionFields.Take(itemsPerColumn))
|
||||
{
|
||||
<li title="@optionItem.Description">
|
||||
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null) /><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</td>
|
||||
<td style="width: 50%">
|
||||
<ul class="none">
|
||||
@foreach (var optionItem in optionFields.Skip(itemsPerColumn))
|
||||
{
|
||||
<li title="@optionItem.Description">
|
||||
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null) /><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
@Html.Partial(MVC.Shared.Views._ExportFields, Model.Fields.FieldGroups)
|
||||
<script>
|
||||
$(function () {
|
||||
var exportDefaultFields = ['Name', 'AddedDate', 'UserId', 'UserDisplayName', 'Comments'];
|
||||
var $exportFields = $('#DeviceFlag_Export_Fields');
|
||||
var $exportScope = $('#DeviceFlag_Export_Scope');
|
||||
var $form = $exportScope.closest('form');
|
||||
var $exportingDialog = null;
|
||||
const $exportFields = $('#Export_Fields');
|
||||
const $form = $exportFields.closest('form');
|
||||
let $exportingDialog = null;
|
||||
|
||||
$exportFields.on('click', 'a.selectAll,a.selectNone', function () {
|
||||
var $this = $(this);
|
||||
|
||||
$this.closest('tr').find('input').prop('checked', $this.is('.selectAll'));
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#DeviceFlag_Export_Fields_Defaults').click(function () {
|
||||
|
||||
$exportFields.find('input').prop('checked', false);
|
||||
|
||||
$.each(exportDefaultFields, function (index, value) {
|
||||
$('#Options_' + value).prop('checked', true);
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
// Submit Validation
|
||||
function submitHandler() {
|
||||
var exportFieldCount = $exportFields.find('input:checked').length;
|
||||
$.validator.unobtrusive.parse($form);
|
||||
$form.data("validator").settings.submitHandler = function () {
|
||||
const exportFieldCount = $exportFields.find('input:checked').length;
|
||||
|
||||
if (exportFieldCount > 0) {
|
||||
|
||||
if ($exportingDialog == null) {
|
||||
$exportingDialog = $('#DeviceFlag_Export_Exporting').dialog({
|
||||
if (!$exportingDialog) {
|
||||
$exportingDialog = $('#Export_Exporting').dialog({
|
||||
width: 400,
|
||||
height: 164,
|
||||
resizable: false,
|
||||
@@ -141,24 +69,16 @@
|
||||
$exportingDialog.dialog('open');
|
||||
|
||||
$form[0].submit();
|
||||
return;
|
||||
}
|
||||
else
|
||||
alert('Select at least one field to export.');
|
||||
}
|
||||
$.validator.unobtrusive.parse($form);
|
||||
$form.data("validator").settings.submitHandler = submitHandler;
|
||||
|
||||
$('#DeviceFlag_Export_Download_Dialog').dialog({
|
||||
width: 400,
|
||||
height: 164,
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: true
|
||||
});
|
||||
$('#DeviceFlag_Export_Button').click(function () {
|
||||
alert('Select at least one field to export.');
|
||||
};
|
||||
|
||||
$('#DeviceFlag_Export_Button').on('click', function () {
|
||||
$form.submit();
|
||||
});
|
||||
$('#DeviceFlag_Export_Save_Button').click(function () {
|
||||
$('#DeviceFlag_Export_Save_Button').on('click', function () {
|
||||
$form.attr('action', $form[0].dataset.saveaction);
|
||||
$form.submit();
|
||||
});
|
||||
@@ -168,7 +88,7 @@
|
||||
</div>
|
||||
@if (Model.ExportId.HasValue)
|
||||
{
|
||||
<div id="DeviceFlag_Export_Download_Dialog" class="dialog" title="Export Device Flags">
|
||||
<div id="Export_Download_Dialog" class="dialog" title="Export Device Flags">
|
||||
@if (Model.ExportResult.RecordCount == 0)
|
||||
{
|
||||
<h4>No records matched the filter criteria</h4>
|
||||
@@ -181,7 +101,7 @@
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
$('#DeviceFlag_Export_Download_Dialog')
|
||||
$('#Export_Download_Dialog')
|
||||
.dialog({
|
||||
width: 400,
|
||||
height: 164,
|
||||
@@ -192,7 +112,7 @@
|
||||
});
|
||||
</script>
|
||||
}
|
||||
<div id="DeviceFlag_Export_Exporting" class="dialog" title="Exporting Device Flags...">
|
||||
<div id="Export_Exporting" class="dialog" title="Exporting Device Flags...">
|
||||
<h4><i class="fa fa-lg fa-cog fa-spin" title="Please Wait"></i>Exporting device flags...</h4>
|
||||
</div>
|
||||
<div class="actionBar">
|
||||
|
||||
@@ -56,10 +56,6 @@ namespace Disco.Web.Areas.Config.Views.DeviceFlag
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Flags", MVC.Config.DeviceFlag.Index(null), "Export");
|
||||
|
||||
var optionsMetadata = ModelMetadata.FromLambdaExpression(m => m.Options, ViewData);
|
||||
var optionGroups = optionsMetadata.Properties.Where(p => p.ShortDisplayName != null && p.ModelType == typeof(bool) && p.PropertyName != "CurrentOnly")
|
||||
.GroupBy(m => m.ShortDisplayName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -70,13 +66,13 @@ WriteLiteral(" id=\"DeviceFlag_Export\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 13 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 9 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 13 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 9 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
using (Html.BeginForm(MVC.API.DeviceFlag.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.DeviceFlag.SaveExport()) }))
|
||||
{
|
||||
|
||||
@@ -84,14 +80,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 15 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 11 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 15 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 11 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -114,13 +110,13 @@ WriteLiteral(">\r\n Device Flags:\r\n
|
||||
" <td>\r\n");
|
||||
|
||||
|
||||
#line 24 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 20 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 24 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 20 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
foreach (var flag in Model.DeviceFlags)
|
||||
{
|
||||
|
||||
@@ -136,20 +132,20 @@ WriteLiteral(" id=\"Options_DeviceFlagIds\"");
|
||||
|
||||
WriteLiteral(" name=\"Options.DeviceFlagIds\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 1375), Tuple.Create("\"", 1391)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 1084), Tuple.Create("\"", 1100)
|
||||
|
||||
#line 28 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1383), Tuple.Create<System.Object, System.Int32>(flag.Id
|
||||
#line 24 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1092), Tuple.Create<System.Object, System.Int32>(flag.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1383), false)
|
||||
, 1092), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 28 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 24 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
Write(((bool)Model.Options.DeviceFlagIds.Contains(flag.Id)) ? "checked " : null);
|
||||
|
||||
|
||||
@@ -157,31 +153,31 @@ WriteLiteral(" ");
|
||||
#line hidden
|
||||
WriteLiteral(" />\r\n <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1512), Tuple.Create("\"", 1565)
|
||||
, Tuple.Create(Tuple.Create("", 1520), Tuple.Create("fa", 1520), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1522), Tuple.Create("fa-", 1523), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1221), Tuple.Create("\"", 1274)
|
||||
, Tuple.Create(Tuple.Create("", 1229), Tuple.Create("fa", 1229), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1231), Tuple.Create("fa-", 1232), true)
|
||||
|
||||
#line 29 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1526), Tuple.Create<System.Object, System.Int32>(flag.Icon
|
||||
#line 25 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1235), Tuple.Create<System.Object, System.Int32>(flag.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1526), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1538), Tuple.Create("fa-lg", 1539), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1544), Tuple.Create("d-", 1545), true)
|
||||
, 1235), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1247), Tuple.Create("fa-lg", 1248), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1253), Tuple.Create("d-", 1254), true)
|
||||
|
||||
#line 29 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1547), Tuple.Create<System.Object, System.Int32>(flag.IconColour
|
||||
#line 25 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1256), Tuple.Create<System.Object, System.Int32>(flag.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1547), false)
|
||||
, 1256), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n <span>");
|
||||
|
||||
|
||||
#line 30 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 26 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
Write(flag.Name);
|
||||
|
||||
|
||||
@@ -191,7 +187,7 @@ WriteLiteral("</span>\r\n </label>\r\n
|
||||
"div>\r\n");
|
||||
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 29 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -201,7 +197,7 @@ WriteLiteral(" </td>\r\n </tr>\r\n
|
||||
" <th>");
|
||||
|
||||
|
||||
#line 37 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 33 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
Write(Html.LabelFor(m => m.Options.CurrentOnly));
|
||||
|
||||
|
||||
@@ -212,7 +208,7 @@ WriteLiteral("</th>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 39 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 35 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
Write(Html.CheckBoxFor(m => m.Options.CurrentOnly));
|
||||
|
||||
|
||||
@@ -223,7 +219,7 @@ WriteLiteral("\r\n <p>Uncheck to include all historical d
|
||||
"r>\r\n <th>");
|
||||
|
||||
|
||||
#line 44 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 40 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
Write(Html.LabelFor(m => m.Options.Format));
|
||||
|
||||
|
||||
@@ -234,7 +230,7 @@ WriteLiteral("</th>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 46 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 42 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
Write(Html.DropDownListFor(m => m.Options.Format, Enum.GetNames(typeof(Disco.Models.Exporting.ExportFormat)).Select(v => new SelectListItem() { Value = v, Text = v })));
|
||||
|
||||
|
||||
@@ -243,372 +239,49 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n " +
|
||||
" </div>\r\n");
|
||||
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"DeviceFlag_Export_Fields\"");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 570px; margin-top: 15px;\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>Export Fields <a");
|
||||
|
||||
WriteLiteral(" id=\"DeviceFlag_Export_Fields_Defaults\"");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(">(Defaults)</a></h2>\r\n <table>\r\n");
|
||||
|
||||
|
||||
#line 54 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
|
||||
#line 47 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 54 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
foreach (var optionGroup in optionGroups)
|
||||
{
|
||||
var optionFields = optionGroup.ToList();
|
||||
var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2);
|
||||
#line 47 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
Write(Html.Partial(MVC.Shared.Views._ExportFields, Model.Fields.FieldGroups));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 120px;\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 60 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
Write(optionGroup.Key);
|
||||
#line 47 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 61 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 61 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
if (optionFields.Count > 2)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" style=\"display: block;\"");
|
||||
|
||||
WriteLiteral(" class=\"select\"");
|
||||
|
||||
WriteLiteral("><a");
|
||||
|
||||
WriteLiteral(" class=\"selectAll\"");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(">ALL</a> | <a");
|
||||
|
||||
WriteLiteral(" class=\"selectNone\"");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(">NONE</a></span>\r\n");
|
||||
|
||||
|
||||
#line 64 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </th>\r\n <td>\r\n " +
|
||||
" <div");
|
||||
|
||||
WriteLiteral(" class=\"DeviceFlag_Export_Fields_Group\"");
|
||||
|
||||
WriteLiteral(">\r\n <table");
|
||||
|
||||
WriteLiteral(" class=\"none\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n " +
|
||||
" <td");
|
||||
|
||||
WriteLiteral(" style=\"width: 50%\"");
|
||||
|
||||
WriteLiteral(">\r\n <ul");
|
||||
|
||||
WriteLiteral(" class=\"none\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 72 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 72 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
foreach (var optionItem in optionFields.Take(itemsPerColumn))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 3955), Tuple.Create("\"", 3986)
|
||||
|
||||
#line 74 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3963), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3963), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"checkbox\"");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 4068), Tuple.Create("\"", 4105)
|
||||
, Tuple.Create(Tuple.Create("", 4073), Tuple.Create("Options_", 4073), true)
|
||||
|
||||
#line 75 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4081), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4081), false)
|
||||
);
|
||||
|
||||
WriteAttribute("name", Tuple.Create(" name=\"", 4106), Tuple.Create("\"", 4145)
|
||||
, Tuple.Create(Tuple.Create("", 4113), Tuple.Create("Options.", 4113), true)
|
||||
|
||||
#line 75 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4121), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4121), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" value=\"true\"");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 75 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
Write(((bool)optionItem.Model) ? "checked " : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 4216), Tuple.Create("\"", 4254)
|
||||
, Tuple.Create(Tuple.Create("", 4222), Tuple.Create("Options_", 4222), true)
|
||||
|
||||
#line 75 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4230), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4230), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 75 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
Write(optionItem.DisplayName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</label>\r\n </li>\r\n");
|
||||
|
||||
|
||||
#line 77 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </ul>\r\n " +
|
||||
" </td>\r\n <td");
|
||||
|
||||
WriteLiteral(" style=\"width: 50%\"");
|
||||
|
||||
WriteLiteral(">\r\n <ul");
|
||||
|
||||
WriteLiteral(" class=\"none\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 82 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 82 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
foreach (var optionItem in optionFields.Skip(itemsPerColumn))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4843), Tuple.Create("\"", 4874)
|
||||
|
||||
#line 84 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4851), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4851), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"checkbox\"");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 4956), Tuple.Create("\"", 4993)
|
||||
, Tuple.Create(Tuple.Create("", 4961), Tuple.Create("Options_", 4961), true)
|
||||
|
||||
#line 85 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4969), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4969), false)
|
||||
);
|
||||
|
||||
WriteAttribute("name", Tuple.Create(" name=\"", 4994), Tuple.Create("\"", 5033)
|
||||
, Tuple.Create(Tuple.Create("", 5001), Tuple.Create("Options.", 5001), true)
|
||||
|
||||
#line 85 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5009), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5009), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" value=\"true\"");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 85 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
Write(((bool)optionItem.Model) ? "checked " : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 5104), Tuple.Create("\"", 5142)
|
||||
, Tuple.Create(Tuple.Create("", 5110), Tuple.Create("Options_", 5110), true)
|
||||
|
||||
#line 85 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5118), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5118), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 85 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
Write(optionItem.DisplayName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</label>\r\n </li>\r\n");
|
||||
WriteLiteral(" <script>\r\n $(function () {\r\n const $exportField" +
|
||||
"s = $(\'#Export_Fields\');\r\n const $form = $exportFields.closest(\'f" +
|
||||
"orm\');\r\n let $exportingDialog = null;\r\n\r\n $.valida" +
|
||||
"tor.unobtrusive.parse($form);\r\n $form.data(\"validator\").settings." +
|
||||
"submitHandler = function () {\r\n const exportFieldCount = $exp" +
|
||||
"ortFields.find(\'input:checked\').length;\r\n\r\n if (exportFieldCo" +
|
||||
"unt > 0) {\r\n\r\n if (!$exportingDialog) {\r\n " +
|
||||
" $exportingDialog = $(\'#Export_Exporting\').dialog({\r\n " +
|
||||
" width: 400,\r\n height: 164,\r\n " +
|
||||
" resizable: false,\r\n mo" +
|
||||
"dal: true,\r\n autoOpen: false\r\n " +
|
||||
" });\r\n }\r\n $exportingDialo" +
|
||||
"g.dialog(\'open\');\r\n\r\n $form[0].submit();\r\n " +
|
||||
" return;\r\n }\r\n\r\n alert(\'Select at " +
|
||||
"least one field to export.\');\r\n };\r\n\r\n $(\'#DeviceF" +
|
||||
"lag_Export_Button\').on(\'click\', function () {\r\n $form.submit(" +
|
||||
");\r\n });\r\n $(\'#DeviceFlag_Export_Save_Button\').on(" +
|
||||
"\'click\', function () {\r\n $form.attr(\'action\', $form[0].datase" +
|
||||
"t.saveaction);\r\n $form.submit();\r\n });\r\n " +
|
||||
" });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 87 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@" </ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
");
|
||||
|
||||
|
||||
#line 95 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </table>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <script>\r\n $(function () {\r\n var exportDefaultF" +
|
||||
"ields = [\'Name\', \'AddedDate\', \'UserId\', \'UserDisplayName\', \'Comments\'];\r\n " +
|
||||
" var $exportFields = $(\'#DeviceFlag_Export_Fields\');\r\n va" +
|
||||
"r $exportScope = $(\'#DeviceFlag_Export_Scope\');\r\n var $form = $ex" +
|
||||
"portScope.closest(\'form\');\r\n var $exportingDialog = null;\r\n\r\n " +
|
||||
" $exportFields.on(\'click\', \'a.selectAll,a.selectNone\', function () {\r" +
|
||||
"\n var $this = $(this);\r\n\r\n $this.closest(\'" +
|
||||
"tr\').find(\'input\').prop(\'checked\', $this.is(\'.selectAll\'));\r\n\r\n " +
|
||||
" return false;\r\n });\r\n\r\n $(\'#DeviceFlag_Export_F" +
|
||||
"ields_Defaults\').click(function () {\r\n\r\n $exportFields.find(\'" +
|
||||
"input\').prop(\'checked\', false);\r\n\r\n $.each(exportDefaultField" +
|
||||
"s, function (index, value) {\r\n $(\'#Options_\' + value).pro" +
|
||||
"p(\'checked\', true);\r\n });\r\n\r\n return false" +
|
||||
";\r\n });\r\n\r\n // Submit Validation\r\n " +
|
||||
"function submitHandler() {\r\n var exportFieldCount = $exportFi" +
|
||||
"elds.find(\'input:checked\').length;\r\n\r\n if (exportFieldCount >" +
|
||||
" 0) {\r\n\r\n if ($exportingDialog == null) {\r\n " +
|
||||
" $exportingDialog = $(\'#DeviceFlag_Export_Exporting\').dialog({\r\n " +
|
||||
" width: 400,\r\n height" +
|
||||
": 164,\r\n resizable: false,\r\n " +
|
||||
" modal: true,\r\n autoOpen: false\r\n " +
|
||||
" });\r\n }\r\n $e" +
|
||||
"xportingDialog.dialog(\'open\');\r\n\r\n $form[0].submit();\r\n " +
|
||||
" }\r\n else\r\n alert(\'Se" +
|
||||
"lect at least one field to export.\');\r\n }\r\n $.vali" +
|
||||
"dator.unobtrusive.parse($form);\r\n $form.data(\"validator\").setting" +
|
||||
"s.submitHandler = submitHandler;\r\n\r\n $(\'#DeviceFlag_Export_Downlo" +
|
||||
"ad_Dialog\').dialog({\r\n width: 400,\r\n heigh" +
|
||||
"t: 164,\r\n resizable: false,\r\n modal: true," +
|
||||
"\r\n autoOpen: true\r\n });\r\n $(\'#D" +
|
||||
"eviceFlag_Export_Button\').click(function () {\r\n $form.submit(" +
|
||||
");\r\n });\r\n $(\'#DeviceFlag_Export_Save_Button\').cli" +
|
||||
"ck(function () {\r\n $form.attr(\'action\', $form[0].dataset.save" +
|
||||
"action);\r\n $form.submit();\r\n });\r\n " +
|
||||
"});\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 167 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -617,7 +290,7 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 169 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 89 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
if (Model.ExportId.HasValue)
|
||||
{
|
||||
|
||||
@@ -626,7 +299,7 @@ WriteLiteral("</div>\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"DeviceFlag_Export_Download_Dialog\"");
|
||||
WriteLiteral(" id=\"Export_Download_Dialog\"");
|
||||
|
||||
WriteLiteral(" class=\"dialog\"");
|
||||
|
||||
@@ -635,13 +308,13 @@ WriteLiteral(" title=\"Export Device Flags\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 172 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 92 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 172 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 92 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
if (Model.ExportResult.RecordCount == 0)
|
||||
{
|
||||
|
||||
@@ -651,7 +324,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
||||
|
||||
|
||||
#line 175 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 95 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -662,7 +335,7 @@ WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
||||
WriteLiteral(" <h4>");
|
||||
|
||||
|
||||
#line 178 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 98 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
Write(Model.ExportResult.RecordCount);
|
||||
|
||||
|
||||
@@ -671,7 +344,7 @@ WriteLiteral(" <h4>");
|
||||
WriteLiteral(" record");
|
||||
|
||||
|
||||
#line 178 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 98 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
Write(Model.ExportResult.RecordCount != 1 ? "s" : null);
|
||||
|
||||
|
||||
@@ -681,14 +354,14 @@ WriteLiteral(" were successfully exported.</h4>\r\n");
|
||||
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 8823), Tuple.Create("\"", 8898)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 4299), Tuple.Create("\"", 4374)
|
||||
|
||||
#line 179 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 8830), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceFlag.ExportRetrieve(Model.ExportId.Value))
|
||||
#line 99 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4306), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceFlag.ExportRetrieve(Model.ExportId.Value))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 8830), false)
|
||||
, 4306), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
@@ -700,7 +373,7 @@ WriteLiteral(" class=\"fa fa-download fa-lg\"");
|
||||
WriteLiteral("></i>Download Device Flag Export</a>\r\n");
|
||||
|
||||
|
||||
#line 180 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 100 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -710,7 +383,7 @@ WriteLiteral(" </div>\r\n");
|
||||
|
||||
WriteLiteral(@" <script>
|
||||
$(function () {
|
||||
$('#DeviceFlag_Export_Download_Dialog')
|
||||
$('#Export_Download_Dialog')
|
||||
.dialog({
|
||||
width: 400,
|
||||
height: 164,
|
||||
@@ -723,7 +396,7 @@ WriteLiteral(@" <script>
|
||||
");
|
||||
|
||||
|
||||
#line 194 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 114 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -731,7 +404,7 @@ WriteLiteral(@" <script>
|
||||
#line hidden
|
||||
WriteLiteral("<div");
|
||||
|
||||
WriteLiteral(" id=\"DeviceFlag_Export_Exporting\"");
|
||||
WriteLiteral(" id=\"Export_Exporting\"");
|
||||
|
||||
WriteLiteral(" class=\"dialog\"");
|
||||
|
||||
@@ -750,13 +423,13 @@ WriteLiteral(" class=\"actionBar\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 199 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 119 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 199 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 119 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
if (Authorization.Has(Claims.Config.ManageSavedExports))
|
||||
{
|
||||
|
||||
@@ -774,7 +447,7 @@ WriteLiteral(" class=\"button\"");
|
||||
WriteLiteral(">Save Export</button>\r\n");
|
||||
|
||||
|
||||
#line 202 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 122 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -795,7 +468,7 @@ WriteLiteral(" title=\"Requires Manage Saved Exports Permission\"");
|
||||
WriteLiteral(">Save Export</button>\r\n");
|
||||
|
||||
|
||||
#line 206 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
#line 126 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@using Disco.Web.Areas.Config.Models.DocumentTemplate;
|
||||
@using Disco.Services.Exporting;
|
||||
@model ExportModel
|
||||
@{
|
||||
Authorization.Require(Claims.Config.DocumentTemplate.Export);
|
||||
@@ -10,7 +9,7 @@
|
||||
@using (Html.BeginForm(MVC.API.DocumentTemplate.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.DocumentTemplate.SaveExport()) }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<div id="DocumentTemplate_Export_Scope" class="form" style="width: 570px">
|
||||
<div id="Export_Scope" class="form" style="width: 570px">
|
||||
<h2>Export Scope</h2>
|
||||
<table>
|
||||
<tr>
|
||||
@@ -58,127 +57,12 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="DocumentTemplate_Export_Fields" class="form" style="width: 570px; margin-top: 15px;">
|
||||
<h2>Export Fields <a id="DocumentTemplate_Export_Fields_Defaults" href="#">(Defaults)</a></h2>
|
||||
<table>
|
||||
@foreach (var optionGroup in Model.Fields.FieldGroups)
|
||||
{
|
||||
var optionFields = optionGroup.ToList();
|
||||
var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2);
|
||||
<tr>
|
||||
<th style="width: 120px;">
|
||||
@optionGroup.Name
|
||||
@if (optionFields.Count > 2)
|
||||
{
|
||||
<span style="display: block;" class="select"><a class="selectAll" href="#">ALL</a> | <a class="selectNone" href="#">NONE</a></span>
|
||||
}
|
||||
</th>
|
||||
<td>
|
||||
<div class="DocumentTemplate_Export_Fields_Group">
|
||||
<table class="none">
|
||||
<tr>
|
||||
<td style="width: 50%">
|
||||
<ul class="none">
|
||||
@foreach (var optionItem in optionFields.Take(itemsPerColumn))
|
||||
{
|
||||
<li title="@optionItem.Description">
|
||||
<input type="checkbox" id="Options_@optionItem.Name" name="Options.@(optionItem.Key ?? optionItem.Name)" value="@(optionItem.Value ?? "true")" @((optionItem.Checked) ? "checked " : null) /><label for="Options_@optionItem.Name">@optionItem.DisplayName</label>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</td>
|
||||
<td style="width: 50%">
|
||||
<ul class="none">
|
||||
@foreach (var optionItem in optionFields.Skip(itemsPerColumn))
|
||||
{
|
||||
<li title="@optionItem.Description">
|
||||
<input type="checkbox" id="Options_@optionItem.Name" name="Options.@(optionItem.Key ?? optionItem.Name)" value="@(optionItem.Value ?? "true")" @((optionItem.Checked) ? "checked " : null) /><label for="Options_@optionItem.Name">@optionItem.DisplayName</label>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
var exportDefaultFields = ['Id', 'Description', 'Scope', 'AttachmentId', 'AttachmentCreatedUser', 'AttachmentCreatedDate', 'AttachmentComments', 'DeviceSerialNumber', 'JobId', 'JobStatus', 'JobType', 'UserId', 'UserDisplayName'];
|
||||
var $exportFields = $('#DocumentTemplate_Export_Fields');
|
||||
var $exportScope = $('#DocumentTemplate_Export_Scope');
|
||||
var $form = $exportScope.closest('form');
|
||||
var $exportingDialog = null;
|
||||
|
||||
$exportFields.on('click', 'a.selectAll,a.selectNone', function () {
|
||||
var $this = $(this);
|
||||
|
||||
$this.closest('tr').find('input').prop('checked', $this.is('.selectAll'));
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#DocumentTemplate_Export_Fields_Defaults').click(function () {
|
||||
|
||||
$exportFields.find('input').prop('checked', false);
|
||||
|
||||
$.each(exportDefaultFields, function (index, value) {
|
||||
$('#Options_' + value).prop('checked', true);
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
// Submit Validation
|
||||
function submitHandler() {
|
||||
var exportFieldCount = $exportFields.find('input:checked').length;
|
||||
|
||||
if (exportFieldCount > 0) {
|
||||
|
||||
if ($exportingDialog == null) {
|
||||
$exportingDialog = $('#DocumentTemplate_Export_Exporting').dialog({
|
||||
width: 400,
|
||||
height: 164,
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
}
|
||||
$exportingDialog.dialog('open');
|
||||
|
||||
$form[0].submit();
|
||||
}
|
||||
else
|
||||
alert('Select at least one field to export.');
|
||||
}
|
||||
$.validator.unobtrusive.parse($form);
|
||||
$form.data("validator").settings.submitHandler = submitHandler;
|
||||
|
||||
$('#DocumentTemplate_Export_Download_Dialog').dialog({
|
||||
width: 400,
|
||||
height: 164,
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: true
|
||||
});
|
||||
$('#DocumentTemplate_Export_Button').click(function () {
|
||||
$form.submit();
|
||||
});
|
||||
$('#DocumentTemplate_Export_Save_Button').click(function () {
|
||||
$form.attr('action', $form[0].dataset.saveaction);
|
||||
$form.submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@Html.Partial(MVC.Shared.Views._ExportFields, Model.Fields.FieldGroups)
|
||||
}
|
||||
</div>
|
||||
@if (Model.ExportId.HasValue)
|
||||
{
|
||||
<div id="DocumentTemplate_Export_Download_Dialog" class="dialog" title="Export Document Instances">
|
||||
<div id="Export_Download_Dialog" class="dialog" title="Export Document Instances">
|
||||
@if (Model.ExportResult.RecordCount == 0)
|
||||
{
|
||||
<h4>No records matched the filter criteria</h4>
|
||||
@@ -191,7 +75,7 @@
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
$('#DocumentTemplate_Export_Download_Dialog')
|
||||
$('#Export_Download_Dialog')
|
||||
.dialog({
|
||||
width: 400,
|
||||
height: 164,
|
||||
@@ -202,7 +86,7 @@
|
||||
});
|
||||
</script>
|
||||
}
|
||||
<div id="DocumentTemplate_Export_Exporting" class="dialog" title="Exporting Document Instances...">
|
||||
<div id="Export_Exporting" class="dialog" title="Exporting Document Instances...">
|
||||
<h4><i class="fa fa-lg fa-cog fa-spin" title="Please Wait"></i>Exporting document instances...</h4>
|
||||
</div>
|
||||
<div class="actionBar">
|
||||
@@ -216,4 +100,42 @@
|
||||
}
|
||||
|
||||
<button type="button" id="DocumentTemplate_Export_Button" class="button">Export Now</button>
|
||||
<script>
|
||||
$(function () {
|
||||
const $form = $('#Export_Scope').closest('form');
|
||||
let $exportingDialog = null;
|
||||
|
||||
$.validator.unobtrusive.parse($form);
|
||||
$form.data("validator").settings.submitHandler = function () {
|
||||
const exportFieldCount = $('#Export_Fields').find('input:checked').length;
|
||||
|
||||
if (exportFieldCount > 0) {
|
||||
|
||||
if (!$exportingDialog) {
|
||||
$exportingDialog = $('#Export_Exporting').dialog({
|
||||
width: 400,
|
||||
height: 164,
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
}
|
||||
$exportingDialog.dialog('open');
|
||||
|
||||
$form[0].submit();
|
||||
return;
|
||||
}
|
||||
|
||||
alert('Select at least one field to export.');
|
||||
}
|
||||
|
||||
$('#DocumentTemplate_Export_Button').on('click', function () {
|
||||
$form.submit();
|
||||
});
|
||||
$('#DocumentTemplate_Export_Save_Button').on('click', function () {
|
||||
$form.attr('action', $form[0].dataset.saveaction);
|
||||
$form.submit();
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -30,12 +30,6 @@ namespace Disco.Web.Areas.Config.Views.DocumentTemplate
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
using Disco.Services.Exporting;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web;
|
||||
|
||||
@@ -56,7 +50,7 @@ namespace Disco.Web.Areas.Config.Views.DocumentTemplate
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 4 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 3 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Config.DocumentTemplate.Export);
|
||||
|
||||
@@ -72,13 +66,13 @@ WriteLiteral(" id=\"DocumentTemplate_Export\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 10 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 9 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 10 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 9 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
using (Html.BeginForm(MVC.API.DocumentTemplate.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.DocumentTemplate.SaveExport()) }))
|
||||
{
|
||||
|
||||
@@ -86,14 +80,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 12 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 11 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 12 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 11 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -101,7 +95,7 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"DocumentTemplate_Export_Scope\"");
|
||||
WriteLiteral(" id=\"Export_Scope\"");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
@@ -124,13 +118,13 @@ WriteLiteral(" class=\"tableData\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 22 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 21 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 22 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 21 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
|
||||
var index = 0;
|
||||
foreach (var document in Model.DocumentTemplates)
|
||||
@@ -145,33 +139,33 @@ WriteLiteral(" <tr>\r\n
|
||||
|
||||
WriteLiteral(" type=\"checkbox\"");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 1353), Tuple.Create("\"", 1392)
|
||||
, Tuple.Create(Tuple.Create("", 1358), Tuple.Create("Options_DocumentTemplateIds_", 1358), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 1302), Tuple.Create("\"", 1341)
|
||||
, Tuple.Create(Tuple.Create("", 1307), Tuple.Create("Options_DocumentTemplateIds_", 1307), true)
|
||||
|
||||
#line 29 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1386), Tuple.Create<System.Object, System.Int32>(index
|
||||
#line 28 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1335), Tuple.Create<System.Object, System.Int32>(index
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1386), false)
|
||||
, 1335), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" name=\"Options.DocumentTemplateIds\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 1428), Tuple.Create("\"", 1448)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 1377), Tuple.Create("\"", 1397)
|
||||
|
||||
#line 29 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1436), Tuple.Create<System.Object, System.Int32>(document.Id
|
||||
#line 28 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1385), Tuple.Create<System.Object, System.Int32>(document.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1436), false)
|
||||
, 1385), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 29 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 28 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
Write(((bool)Model.Options.DocumentTemplateIds.Contains(document.Id)) ? "checked " : null);
|
||||
|
||||
|
||||
@@ -180,7 +174,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" />\r\n <strong>");
|
||||
|
||||
|
||||
#line 30 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 29 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
Write(document.Id);
|
||||
|
||||
|
||||
@@ -190,21 +184,21 @@ WriteLiteral("</strong>\r\n </label>\
|
||||
" </td>\r\n <td>\r\n " +
|
||||
" <label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 1817), Tuple.Create("\"", 1857)
|
||||
, Tuple.Create(Tuple.Create("", 1823), Tuple.Create("Options_DocumentTemplateIds_", 1823), true)
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 1766), Tuple.Create("\"", 1806)
|
||||
, Tuple.Create(Tuple.Create("", 1772), Tuple.Create("Options_DocumentTemplateIds_", 1772), true)
|
||||
|
||||
#line 34 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1851), Tuple.Create<System.Object, System.Int32>(index
|
||||
#line 33 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1800), Tuple.Create<System.Object, System.Int32>(index
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1851), false)
|
||||
, 1800), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 34 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 33 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
Write(document.Description);
|
||||
|
||||
|
||||
@@ -216,7 +210,7 @@ WriteLiteral("</label>\r\n </td>\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 37 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 36 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
Write(document.Scope);
|
||||
|
||||
|
||||
@@ -226,7 +220,7 @@ WriteLiteral("\r\n </td>\r\n
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 40 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 39 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
index++;
|
||||
}
|
||||
|
||||
@@ -237,7 +231,7 @@ WriteLiteral("\r\n </table>\r\n </td>\
|
||||
"tr>\r\n <tr>\r\n <th>");
|
||||
|
||||
|
||||
#line 47 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 46 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
Write(Html.LabelFor(m => m.Options.LatestOnly));
|
||||
|
||||
|
||||
@@ -248,7 +242,7 @@ WriteLiteral("</th>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 49 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 48 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
Write(Html.CheckBoxFor(m => m.Options.LatestOnly));
|
||||
|
||||
|
||||
@@ -259,7 +253,7 @@ WriteLiteral("\r\n <p>Uncheck to include all document ins
|
||||
" <th>");
|
||||
|
||||
|
||||
#line 54 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 53 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
Write(Html.LabelFor(m => m.Options.Format));
|
||||
|
||||
|
||||
@@ -270,7 +264,7 @@ WriteLiteral("</th>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 56 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 55 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
Write(Html.DropDownListFor(m => m.Options.Format, Enum.GetNames(typeof(Disco.Models.Exporting.ExportFormat)).Select(v => new SelectListItem() { Value = v, Text = v })));
|
||||
|
||||
|
||||
@@ -279,390 +273,22 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n " +
|
||||
" </div>\r\n");
|
||||
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"DocumentTemplate_Export_Fields\"");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 570px; margin-top: 15px;\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>Export Fields <a");
|
||||
|
||||
WriteLiteral(" id=\"DocumentTemplate_Export_Fields_Defaults\"");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(">(Defaults)</a></h2>\r\n <table>\r\n");
|
||||
|
||||
|
||||
#line 64 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
|
||||
#line 60 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 64 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
foreach (var optionGroup in Model.Fields.FieldGroups)
|
||||
{
|
||||
var optionFields = optionGroup.ToList();
|
||||
var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2);
|
||||
#line 60 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
Write(Html.Partial(MVC.Shared.Views._ExportFields, Model.Fields.FieldGroups));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 120px;\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 70 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
Write(optionGroup.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 71 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 71 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
if (optionFields.Count > 2)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" style=\"display: block;\"");
|
||||
|
||||
WriteLiteral(" class=\"select\"");
|
||||
|
||||
WriteLiteral("><a");
|
||||
|
||||
WriteLiteral(" class=\"selectAll\"");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(">ALL</a> | <a");
|
||||
|
||||
WriteLiteral(" class=\"selectNone\"");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(">NONE</a></span>\r\n");
|
||||
|
||||
|
||||
#line 74 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </th>\r\n <td>\r\n " +
|
||||
" <div");
|
||||
|
||||
WriteLiteral(" class=\"DocumentTemplate_Export_Fields_Group\"");
|
||||
|
||||
WriteLiteral(">\r\n <table");
|
||||
|
||||
WriteLiteral(" class=\"none\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n " +
|
||||
" <td");
|
||||
|
||||
WriteLiteral(" style=\"width: 50%\"");
|
||||
|
||||
WriteLiteral(">\r\n <ul");
|
||||
|
||||
WriteLiteral(" class=\"none\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 82 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 82 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
foreach (var optionItem in optionFields.Take(itemsPerColumn))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4509), Tuple.Create("\"", 4540)
|
||||
|
||||
#line 84 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4517), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4517), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"checkbox\"");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 4622), Tuple.Create("\"", 4651)
|
||||
, Tuple.Create(Tuple.Create("", 4627), Tuple.Create("Options_", 4627), true)
|
||||
|
||||
#line 85 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4635), Tuple.Create<System.Object, System.Int32>(optionItem.Name
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4635), false)
|
||||
);
|
||||
|
||||
WriteAttribute("name", Tuple.Create(" name=\"", 4652), Tuple.Create("\"", 4703)
|
||||
, Tuple.Create(Tuple.Create("", 4659), Tuple.Create("Options.", 4659), true)
|
||||
|
||||
#line 85 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4667), Tuple.Create<System.Object, System.Int32>(optionItem.Key ?? optionItem.Name
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4667), false)
|
||||
);
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 4704), Tuple.Create("\"", 4741)
|
||||
|
||||
#line 85 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4712), Tuple.Create<System.Object, System.Int32>(optionItem.Value ?? "true"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4712), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 85 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
Write((optionItem.Checked) ? "checked " : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 4795), Tuple.Create("\"", 4825)
|
||||
, Tuple.Create(Tuple.Create("", 4801), Tuple.Create("Options_", 4801), true)
|
||||
|
||||
#line 85 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4809), Tuple.Create<System.Object, System.Int32>(optionItem.Name
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4809), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 85 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
Write(optionItem.DisplayName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</label>\r\n </li>\r\n");
|
||||
|
||||
|
||||
#line 87 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </ul>\r\n " +
|
||||
" </td>\r\n <td");
|
||||
|
||||
WriteLiteral(" style=\"width: 50%\"");
|
||||
|
||||
WriteLiteral(">\r\n <ul");
|
||||
|
||||
WriteLiteral(" class=\"none\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 92 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 92 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
foreach (var optionItem in optionFields.Skip(itemsPerColumn))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 5414), Tuple.Create("\"", 5445)
|
||||
|
||||
#line 94 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5422), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5422), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"checkbox\"");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 5527), Tuple.Create("\"", 5556)
|
||||
, Tuple.Create(Tuple.Create("", 5532), Tuple.Create("Options_", 5532), true)
|
||||
|
||||
#line 95 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5540), Tuple.Create<System.Object, System.Int32>(optionItem.Name
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5540), false)
|
||||
);
|
||||
|
||||
WriteAttribute("name", Tuple.Create(" name=\"", 5557), Tuple.Create("\"", 5608)
|
||||
, Tuple.Create(Tuple.Create("", 5564), Tuple.Create("Options.", 5564), true)
|
||||
|
||||
#line 95 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5572), Tuple.Create<System.Object, System.Int32>(optionItem.Key ?? optionItem.Name
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5572), false)
|
||||
);
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 5609), Tuple.Create("\"", 5646)
|
||||
|
||||
#line 95 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5617), Tuple.Create<System.Object, System.Int32>(optionItem.Value ?? "true"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5617), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 95 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
Write((optionItem.Checked) ? "checked " : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 5700), Tuple.Create("\"", 5730)
|
||||
, Tuple.Create(Tuple.Create("", 5706), Tuple.Create("Options_", 5706), true)
|
||||
|
||||
#line 95 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5714), Tuple.Create<System.Object, System.Int32>(optionItem.Name
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5714), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 95 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
Write(optionItem.DisplayName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</label>\r\n </li>\r\n");
|
||||
|
||||
|
||||
#line 97 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@" </ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
");
|
||||
|
||||
|
||||
#line 105 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </table>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <script>\r\n $(function () {\r\n var exportDefaultF" +
|
||||
"ields = [\'Id\', \'Description\', \'Scope\', \'AttachmentId\', \'AttachmentCreatedUser\', " +
|
||||
"\'AttachmentCreatedDate\', \'AttachmentComments\', \'DeviceSerialNumber\', \'JobId\', \'J" +
|
||||
"obStatus\', \'JobType\', \'UserId\', \'UserDisplayName\'];\r\n var $export" +
|
||||
"Fields = $(\'#DocumentTemplate_Export_Fields\');\r\n var $exportScope" +
|
||||
" = $(\'#DocumentTemplate_Export_Scope\');\r\n var $form = $exportScop" +
|
||||
"e.closest(\'form\');\r\n var $exportingDialog = null;\r\n\r\n " +
|
||||
" $exportFields.on(\'click\', \'a.selectAll,a.selectNone\', function () {\r\n " +
|
||||
" var $this = $(this);\r\n\r\n $this.closest(\'tr\').fin" +
|
||||
"d(\'input\').prop(\'checked\', $this.is(\'.selectAll\'));\r\n\r\n retur" +
|
||||
"n false;\r\n });\r\n\r\n $(\'#DocumentTemplate_Export_Fie" +
|
||||
"lds_Defaults\').click(function () {\r\n\r\n $exportFields.find(\'in" +
|
||||
"put\').prop(\'checked\', false);\r\n\r\n $.each(exportDefaultFields," +
|
||||
" function (index, value) {\r\n $(\'#Options_\' + value).prop(" +
|
||||
"\'checked\', true);\r\n });\r\n\r\n return false;\r" +
|
||||
"\n });\r\n\r\n // Submit Validation\r\n fu" +
|
||||
"nction submitHandler() {\r\n var exportFieldCount = $exportFiel" +
|
||||
"ds.find(\'input:checked\').length;\r\n\r\n if (exportFieldCount > 0" +
|
||||
") {\r\n\r\n if ($exportingDialog == null) {\r\n " +
|
||||
" $exportingDialog = $(\'#DocumentTemplate_Export_Exporting\').dialog({\r" +
|
||||
"\n width: 400,\r\n he" +
|
||||
"ight: 164,\r\n resizable: false,\r\n " +
|
||||
" modal: true,\r\n autoOpen: false\r\n " +
|
||||
" });\r\n }\r\n " +
|
||||
" $exportingDialog.dialog(\'open\');\r\n\r\n $form[0].submit();" +
|
||||
"\r\n }\r\n else\r\n alert" +
|
||||
"(\'Select at least one field to export.\');\r\n }\r\n $." +
|
||||
"validator.unobtrusive.parse($form);\r\n $form.data(\"validator\").set" +
|
||||
"tings.submitHandler = submitHandler;\r\n\r\n $(\'#DocumentTemplate_Exp" +
|
||||
"ort_Download_Dialog\').dialog({\r\n width: 400,\r\n " +
|
||||
" height: 164,\r\n resizable: false,\r\n mo" +
|
||||
"dal: true,\r\n autoOpen: true\r\n });\r\n " +
|
||||
" $(\'#DocumentTemplate_Export_Button\').click(function () {\r\n " +
|
||||
" $form.submit();\r\n });\r\n $(\'#DocumentTemplate_Ex" +
|
||||
"port_Save_Button\').click(function () {\r\n $form.attr(\'action\'," +
|
||||
" $form[0].dataset.saveaction);\r\n $form.submit();\r\n " +
|
||||
" });\r\n });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 177 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 60 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -671,7 +297,7 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 179 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 63 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
if (Model.ExportId.HasValue)
|
||||
{
|
||||
|
||||
@@ -680,7 +306,7 @@ WriteLiteral("</div>\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"DocumentTemplate_Export_Download_Dialog\"");
|
||||
WriteLiteral(" id=\"Export_Download_Dialog\"");
|
||||
|
||||
WriteLiteral(" class=\"dialog\"");
|
||||
|
||||
@@ -689,13 +315,13 @@ WriteLiteral(" title=\"Export Document Instances\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 182 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 66 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 182 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 66 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
if (Model.ExportResult.RecordCount == 0)
|
||||
{
|
||||
|
||||
@@ -705,7 +331,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
||||
|
||||
|
||||
#line 185 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 69 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -716,7 +342,7 @@ WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
||||
WriteLiteral(" <h4>");
|
||||
|
||||
|
||||
#line 188 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 72 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
Write(Model.ExportResult.RecordCount);
|
||||
|
||||
|
||||
@@ -725,7 +351,7 @@ WriteLiteral(" <h4>");
|
||||
WriteLiteral(" record");
|
||||
|
||||
|
||||
#line 188 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 72 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
Write(Model.ExportResult.RecordCount != 1 ? "s" : null);
|
||||
|
||||
|
||||
@@ -735,14 +361,14 @@ WriteLiteral(" were successfully exported.</h4>\r\n");
|
||||
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 9605), Tuple.Create("\"", 9686)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 3517), Tuple.Create("\"", 3598)
|
||||
|
||||
#line 189 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 9612), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DocumentTemplate.ExportRetrieve(Model.ExportId.Value))
|
||||
#line 73 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3524), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DocumentTemplate.ExportRetrieve(Model.ExportId.Value))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 9612), false)
|
||||
, 3524), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
@@ -754,7 +380,7 @@ WriteLiteral(" class=\"fa fa-download fa-lg\"");
|
||||
WriteLiteral("></i>Download Document Instance Export</a>\r\n");
|
||||
|
||||
|
||||
#line 190 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 74 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -764,7 +390,7 @@ WriteLiteral(" </div>\r\n");
|
||||
|
||||
WriteLiteral(@" <script>
|
||||
$(function () {
|
||||
$('#DocumentTemplate_Export_Download_Dialog')
|
||||
$('#Export_Download_Dialog')
|
||||
.dialog({
|
||||
width: 400,
|
||||
height: 164,
|
||||
@@ -777,7 +403,7 @@ WriteLiteral(@" <script>
|
||||
");
|
||||
|
||||
|
||||
#line 204 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 88 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -785,7 +411,7 @@ WriteLiteral(@" <script>
|
||||
#line hidden
|
||||
WriteLiteral("<div");
|
||||
|
||||
WriteLiteral(" id=\"DocumentTemplate_Export_Exporting\"");
|
||||
WriteLiteral(" id=\"Export_Exporting\"");
|
||||
|
||||
WriteLiteral(" class=\"dialog\"");
|
||||
|
||||
@@ -804,13 +430,13 @@ WriteLiteral(" class=\"actionBar\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 209 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 93 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 209 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 93 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
if (Authorization.Has(Claims.Config.ManageSavedExports))
|
||||
{
|
||||
|
||||
@@ -828,7 +454,7 @@ WriteLiteral(" class=\"button\"");
|
||||
WriteLiteral(">Save Export</button>\r\n");
|
||||
|
||||
|
||||
#line 212 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 96 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -849,7 +475,7 @@ WriteLiteral(" title=\"Requires Manage Saved Exports Permission\"");
|
||||
WriteLiteral(">Save Export</button>\r\n");
|
||||
|
||||
|
||||
#line 216 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
#line 100 "..\..\Areas\Config\Views\DocumentTemplate\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -863,7 +489,47 @@ WriteLiteral(" id=\"DocumentTemplate_Export_Button\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(">Export Now</button>\r\n</div>\r\n");
|
||||
WriteLiteral(@">Export Now</button>
|
||||
<script>
|
||||
$(function () {
|
||||
const $form = $('#Export_Scope').closest('form');
|
||||
let $exportingDialog = null;
|
||||
|
||||
$.validator.unobtrusive.parse($form);
|
||||
$form.data(""validator"").settings.submitHandler = function () {
|
||||
const exportFieldCount = $('#Export_Fields').find('input:checked').length;
|
||||
|
||||
if (exportFieldCount > 0) {
|
||||
|
||||
if (!$exportingDialog) {
|
||||
$exportingDialog = $('#Export_Exporting').dialog({
|
||||
width: 400,
|
||||
height: 164,
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
}
|
||||
$exportingDialog.dialog('open');
|
||||
|
||||
$form[0].submit();
|
||||
return;
|
||||
}
|
||||
|
||||
alert('Select at least one field to export.');
|
||||
}
|
||||
|
||||
$('#DocumentTemplate_Export_Button').on('click', function () {
|
||||
$form.submit();
|
||||
});
|
||||
$('#DocumentTemplate_Export_Save_Button').on('click', function () {
|
||||
$form.attr('action', $form[0].dataset.saveaction);
|
||||
$form.submit();
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</div>
|
||||
");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,6 @@
|
||||
Authorization.RequireAny(Claims.Config.UserFlag.Export);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "User Flags", MVC.Config.UserFlag.Index(null), "Export");
|
||||
|
||||
var optionsMetadata = ModelMetadata.FromLambdaExpression(m => m.Options, ViewData);
|
||||
var optionGroups = optionsMetadata.Properties.Where(p => p.ShortDisplayName != null && p.ModelType == typeof(bool) && p.PropertyName != "CurrentOnly")
|
||||
.GroupBy(m => m.ShortDisplayName);
|
||||
}
|
||||
<div id="UserFlag_Export">
|
||||
@using (Html.BeginForm(MVC.API.UserFlag.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.UserFlag.SaveExport()) }))
|
||||
@@ -48,89 +44,21 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="UserFlag_Export_Fields" class="form" style="width: 570px; margin-top: 15px;">
|
||||
<h2>Export Fields <a id="UserFlag_Export_Fields_Defaults" href="#">(Defaults)</a></h2>
|
||||
<table>
|
||||
@foreach (var optionGroup in optionGroups)
|
||||
{
|
||||
var optionFields = optionGroup.ToList();
|
||||
var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2);
|
||||
<tr>
|
||||
<th style="width: 120px;">
|
||||
@optionGroup.Key
|
||||
@if (optionFields.Count > 2)
|
||||
{
|
||||
<span style="display: block;" class="select"><a class="selectAll" href="#">ALL</a> | <a class="selectNone" href="#">NONE</a></span>
|
||||
}
|
||||
</th>
|
||||
<td>
|
||||
<div class="UserFlag_Export_Fields_Group">
|
||||
<table class="none">
|
||||
<tr>
|
||||
<td style="width: 50%">
|
||||
<ul class="none">
|
||||
@foreach (var optionItem in optionFields.Take(itemsPerColumn))
|
||||
{
|
||||
<li title="@optionItem.Description">
|
||||
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null) /><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</td>
|
||||
<td style="width: 50%">
|
||||
<ul class="none">
|
||||
@foreach (var optionItem in optionFields.Skip(itemsPerColumn))
|
||||
{
|
||||
<li title="@optionItem.Description">
|
||||
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null) /><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
@Html.Partial(MVC.Shared.Views._ExportFields, Model.Fields.FieldGroups)
|
||||
<script>
|
||||
$(function () {
|
||||
var exportDefaultFields = ['Name', 'AddedDate', 'UserId', 'UserDisplayName', 'Comments'];
|
||||
var $exportFields = $('#UserFlag_Export_Fields');
|
||||
var $exportScope = $('#UserFlag_Export_Scope');
|
||||
var $form = $exportScope.closest('form');
|
||||
var $exportingDialog = null;
|
||||
const $exportFields = $('#Export_Fields');
|
||||
const $form = $exportFields.closest('form');
|
||||
let $exportingDialog = null;
|
||||
|
||||
$exportFields.on('click', 'a.selectAll,a.selectNone', function () {
|
||||
var $this = $(this);
|
||||
|
||||
$this.closest('tr').find('input').prop('checked', $this.is('.selectAll'));
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#UserFlag_Export_Fields_Defaults').click(function () {
|
||||
|
||||
$exportFields.find('input').prop('checked', false);
|
||||
|
||||
$.each(exportDefaultFields, function (index, value) {
|
||||
$('#Options_' + value).prop('checked', true);
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
// Submit Validation
|
||||
function submitHandler() {
|
||||
var exportFieldCount = $exportFields.find('input:checked').length;
|
||||
$.validator.unobtrusive.parse($form);
|
||||
$form.data("validator").settings.submitHandler = function () {
|
||||
const exportFieldCount = $exportFields.find('input:checked').length;
|
||||
|
||||
if (exportFieldCount > 0) {
|
||||
|
||||
if ($exportingDialog == null) {
|
||||
$exportingDialog = $('#UserFlag_Export_Exporting').dialog({
|
||||
$exportingDialog = $('#Export_Exporting').dialog({
|
||||
width: 400,
|
||||
height: 164,
|
||||
resizable: false,
|
||||
@@ -141,24 +69,16 @@
|
||||
$exportingDialog.dialog('open');
|
||||
|
||||
$form[0].submit();
|
||||
return;
|
||||
}
|
||||
else
|
||||
alert('Select at least one field to export.');
|
||||
}
|
||||
$.validator.unobtrusive.parse($form);
|
||||
$form.data("validator").settings.submitHandler = submitHandler;
|
||||
|
||||
$('#UserFlag_Export_Download_Dialog').dialog({
|
||||
width: 400,
|
||||
height: 164,
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: true
|
||||
});
|
||||
$('#UserFlag_Export_Button').click(function () {
|
||||
alert('Select at least one field to export.');
|
||||
};
|
||||
|
||||
$('#UserFlag_Export_Button').on('click', function () {
|
||||
$form.submit();
|
||||
});
|
||||
$('#UserFlag_Export_Save_Button').click(function () {
|
||||
$('#UserFlag_Export_Save_Button').on('click', function () {
|
||||
$form.attr('action', $form[0].dataset.saveaction);
|
||||
$form.submit();
|
||||
});
|
||||
@@ -168,7 +88,7 @@
|
||||
</div>
|
||||
@if (Model.ExportId.HasValue)
|
||||
{
|
||||
<div id="UserFlag_Export_Download_Dialog" class="dialog" title="Export User Flags">
|
||||
<div id="Export_Download_Dialog" class="dialog" title="Export User Flags">
|
||||
@if (Model.ExportResult.RecordCount == 0)
|
||||
{
|
||||
<h4>No records matched the filter criteria</h4>
|
||||
@@ -181,7 +101,7 @@
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
$('#UserFlag_Export_Download_Dialog')
|
||||
$('#Export_Download_Dialog')
|
||||
.dialog({
|
||||
width: 400,
|
||||
height: 164,
|
||||
@@ -192,7 +112,7 @@
|
||||
});
|
||||
</script>
|
||||
}
|
||||
<div id="UserFlag_Export_Exporting" class="dialog" title="Exporting User Flags...">
|
||||
<div id="Export_Exporting" class="dialog" title="Exporting User Flags...">
|
||||
<h4><i class="fa fa-lg fa-cog fa-spin" title="Please Wait"></i>Exporting user flags...</h4>
|
||||
</div>
|
||||
<div class="actionBar">
|
||||
|
||||
@@ -56,10 +56,6 @@ namespace Disco.Web.Areas.Config.Views.UserFlag
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "User Flags", MVC.Config.UserFlag.Index(null), "Export");
|
||||
|
||||
var optionsMetadata = ModelMetadata.FromLambdaExpression(m => m.Options, ViewData);
|
||||
var optionGroups = optionsMetadata.Properties.Where(p => p.ShortDisplayName != null && p.ModelType == typeof(bool) && p.PropertyName != "CurrentOnly")
|
||||
.GroupBy(m => m.ShortDisplayName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -70,13 +66,13 @@ WriteLiteral(" id=\"UserFlag_Export\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 13 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 9 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 13 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 9 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
using (Html.BeginForm(MVC.API.UserFlag.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.UserFlag.SaveExport()) }))
|
||||
{
|
||||
|
||||
@@ -84,14 +80,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 15 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 11 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 15 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 11 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -114,13 +110,13 @@ WriteLiteral(">\r\n User Flags:\r\n </
|
||||
" <td>\r\n");
|
||||
|
||||
|
||||
#line 24 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 20 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 24 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 20 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
foreach (var userFlag in Model.UserFlags)
|
||||
{
|
||||
|
||||
@@ -136,20 +132,20 @@ WriteLiteral(" id=\"Options_UserFlagIds\"");
|
||||
|
||||
WriteLiteral(" name=\"Options.UserFlagIds\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 1355), Tuple.Create("\"", 1375)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 1064), Tuple.Create("\"", 1084)
|
||||
|
||||
#line 28 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1363), Tuple.Create<System.Object, System.Int32>(userFlag.Id
|
||||
#line 24 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1072), Tuple.Create<System.Object, System.Int32>(userFlag.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1363), false)
|
||||
, 1072), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 28 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 24 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
Write(((bool)Model.Options.UserFlagIds.Contains(userFlag.Id)) ? "checked " : null);
|
||||
|
||||
|
||||
@@ -157,31 +153,31 @@ WriteLiteral(" ");
|
||||
#line hidden
|
||||
WriteLiteral(" />\r\n <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1498), Tuple.Create("\"", 1559)
|
||||
, Tuple.Create(Tuple.Create("", 1506), Tuple.Create("fa", 1506), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1508), Tuple.Create("fa-", 1509), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1207), Tuple.Create("\"", 1268)
|
||||
, Tuple.Create(Tuple.Create("", 1215), Tuple.Create("fa", 1215), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1217), Tuple.Create("fa-", 1218), true)
|
||||
|
||||
#line 29 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1512), Tuple.Create<System.Object, System.Int32>(userFlag.Icon
|
||||
#line 25 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1221), Tuple.Create<System.Object, System.Int32>(userFlag.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1512), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1528), Tuple.Create("fa-lg", 1529), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1534), Tuple.Create("d-", 1535), true)
|
||||
, 1221), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1237), Tuple.Create("fa-lg", 1238), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1243), Tuple.Create("d-", 1244), true)
|
||||
|
||||
#line 29 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1537), Tuple.Create<System.Object, System.Int32>(userFlag.IconColour
|
||||
#line 25 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1246), Tuple.Create<System.Object, System.Int32>(userFlag.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1537), false)
|
||||
, 1246), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n <span>");
|
||||
|
||||
|
||||
#line 30 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 26 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
Write(userFlag.Name);
|
||||
|
||||
|
||||
@@ -191,7 +187,7 @@ WriteLiteral("</span>\r\n </label>\r\n
|
||||
"div>\r\n");
|
||||
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 29 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -201,7 +197,7 @@ WriteLiteral(" </td>\r\n </tr>\r\n
|
||||
" <th>");
|
||||
|
||||
|
||||
#line 37 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 33 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
Write(Html.LabelFor(m => m.Options.CurrentOnly));
|
||||
|
||||
|
||||
@@ -212,7 +208,7 @@ WriteLiteral("</th>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 39 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 35 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
Write(Html.CheckBoxFor(m => m.Options.CurrentOnly));
|
||||
|
||||
|
||||
@@ -223,7 +219,7 @@ WriteLiteral("\r\n <p>Uncheck to include all historical u
|
||||
"\r\n <th>");
|
||||
|
||||
|
||||
#line 44 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 40 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
Write(Html.LabelFor(m => m.Options.Format));
|
||||
|
||||
|
||||
@@ -234,7 +230,7 @@ WriteLiteral("</th>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 46 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 42 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
Write(Html.DropDownListFor(m => m.Options.Format, Enum.GetNames(typeof(Disco.Models.Exporting.ExportFormat)).Select(v => new SelectListItem() { Value = v, Text = v })));
|
||||
|
||||
|
||||
@@ -243,372 +239,49 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n " +
|
||||
" </div>\r\n");
|
||||
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"UserFlag_Export_Fields\"");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 570px; margin-top: 15px;\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>Export Fields <a");
|
||||
|
||||
WriteLiteral(" id=\"UserFlag_Export_Fields_Defaults\"");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(">(Defaults)</a></h2>\r\n <table>\r\n");
|
||||
|
||||
|
||||
#line 54 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
|
||||
#line 47 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 54 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
foreach (var optionGroup in optionGroups)
|
||||
{
|
||||
var optionFields = optionGroup.ToList();
|
||||
var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2);
|
||||
#line 47 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
Write(Html.Partial(MVC.Shared.Views._ExportFields, Model.Fields.FieldGroups));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 120px;\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 60 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
Write(optionGroup.Key);
|
||||
#line 47 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 61 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 61 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
if (optionFields.Count > 2)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" style=\"display: block;\"");
|
||||
|
||||
WriteLiteral(" class=\"select\"");
|
||||
|
||||
WriteLiteral("><a");
|
||||
|
||||
WriteLiteral(" class=\"selectAll\"");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(">ALL</a> | <a");
|
||||
|
||||
WriteLiteral(" class=\"selectNone\"");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(">NONE</a></span>\r\n");
|
||||
|
||||
|
||||
#line 64 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </th>\r\n <td>\r\n " +
|
||||
" <div");
|
||||
|
||||
WriteLiteral(" class=\"UserFlag_Export_Fields_Group\"");
|
||||
|
||||
WriteLiteral(">\r\n <table");
|
||||
|
||||
WriteLiteral(" class=\"none\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n " +
|
||||
" <td");
|
||||
|
||||
WriteLiteral(" style=\"width: 50%\"");
|
||||
|
||||
WriteLiteral(">\r\n <ul");
|
||||
|
||||
WriteLiteral(" class=\"none\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 72 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 72 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
foreach (var optionItem in optionFields.Take(itemsPerColumn))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 3945), Tuple.Create("\"", 3976)
|
||||
|
||||
#line 74 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3953), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3953), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"checkbox\"");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 4058), Tuple.Create("\"", 4095)
|
||||
, Tuple.Create(Tuple.Create("", 4063), Tuple.Create("Options_", 4063), true)
|
||||
|
||||
#line 75 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4071), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4071), false)
|
||||
);
|
||||
|
||||
WriteAttribute("name", Tuple.Create(" name=\"", 4096), Tuple.Create("\"", 4135)
|
||||
, Tuple.Create(Tuple.Create("", 4103), Tuple.Create("Options.", 4103), true)
|
||||
|
||||
#line 75 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4111), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4111), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" value=\"true\"");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 75 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
Write(((bool)optionItem.Model) ? "checked " : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 4206), Tuple.Create("\"", 4244)
|
||||
, Tuple.Create(Tuple.Create("", 4212), Tuple.Create("Options_", 4212), true)
|
||||
|
||||
#line 75 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4220), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4220), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 75 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
Write(optionItem.DisplayName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</label>\r\n </li>\r\n");
|
||||
|
||||
|
||||
#line 77 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </ul>\r\n " +
|
||||
" </td>\r\n <td");
|
||||
|
||||
WriteLiteral(" style=\"width: 50%\"");
|
||||
|
||||
WriteLiteral(">\r\n <ul");
|
||||
|
||||
WriteLiteral(" class=\"none\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 82 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 82 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
foreach (var optionItem in optionFields.Skip(itemsPerColumn))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4833), Tuple.Create("\"", 4864)
|
||||
|
||||
#line 84 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4841), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4841), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"checkbox\"");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 4946), Tuple.Create("\"", 4983)
|
||||
, Tuple.Create(Tuple.Create("", 4951), Tuple.Create("Options_", 4951), true)
|
||||
|
||||
#line 85 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4959), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4959), false)
|
||||
);
|
||||
|
||||
WriteAttribute("name", Tuple.Create(" name=\"", 4984), Tuple.Create("\"", 5023)
|
||||
, Tuple.Create(Tuple.Create("", 4991), Tuple.Create("Options.", 4991), true)
|
||||
|
||||
#line 85 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4999), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4999), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" value=\"true\"");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 85 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
Write(((bool)optionItem.Model) ? "checked " : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 5094), Tuple.Create("\"", 5132)
|
||||
, Tuple.Create(Tuple.Create("", 5100), Tuple.Create("Options_", 5100), true)
|
||||
|
||||
#line 85 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5108), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5108), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 85 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
Write(optionItem.DisplayName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</label>\r\n </li>\r\n");
|
||||
WriteLiteral(" <script>\r\n $(function () {\r\n const $exportField" +
|
||||
"s = $(\'#Export_Fields\');\r\n const $form = $exportFields.closest(\'f" +
|
||||
"orm\');\r\n let $exportingDialog = null;\r\n\r\n $.valida" +
|
||||
"tor.unobtrusive.parse($form);\r\n $form.data(\"validator\").settings." +
|
||||
"submitHandler = function () {\r\n const exportFieldCount = $exp" +
|
||||
"ortFields.find(\'input:checked\').length;\r\n\r\n if (exportFieldCo" +
|
||||
"unt > 0) {\r\n\r\n if ($exportingDialog == null) {\r\n " +
|
||||
" $exportingDialog = $(\'#Export_Exporting\').dialog({\r\n " +
|
||||
" width: 400,\r\n height: 164," +
|
||||
"\r\n resizable: false,\r\n " +
|
||||
" modal: true,\r\n autoOpen: false\r\n " +
|
||||
" });\r\n }\r\n $exporti" +
|
||||
"ngDialog.dialog(\'open\');\r\n\r\n $form[0].submit();\r\n " +
|
||||
" return;\r\n }\r\n\r\n alert(\'Sel" +
|
||||
"ect at least one field to export.\');\r\n };\r\n\r\n $(\'#" +
|
||||
"UserFlag_Export_Button\').on(\'click\', function () {\r\n $form.su" +
|
||||
"bmit();\r\n });\r\n $(\'#UserFlag_Export_Save_Button\')." +
|
||||
"on(\'click\', function () {\r\n $form.attr(\'action\', $form[0].dat" +
|
||||
"aset.saveaction);\r\n $form.submit();\r\n });\r\n " +
|
||||
" });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 87 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@" </ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
");
|
||||
|
||||
|
||||
#line 95 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </table>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <script>\r\n $(function () {\r\n var exportDefaultF" +
|
||||
"ields = [\'Name\', \'AddedDate\', \'UserId\', \'UserDisplayName\', \'Comments\'];\r\n " +
|
||||
" var $exportFields = $(\'#UserFlag_Export_Fields\');\r\n var " +
|
||||
"$exportScope = $(\'#UserFlag_Export_Scope\');\r\n var $form = $export" +
|
||||
"Scope.closest(\'form\');\r\n var $exportingDialog = null;\r\n\r\n " +
|
||||
" $exportFields.on(\'click\', \'a.selectAll,a.selectNone\', function () {\r\n " +
|
||||
" var $this = $(this);\r\n\r\n $this.closest(\'tr\')" +
|
||||
".find(\'input\').prop(\'checked\', $this.is(\'.selectAll\'));\r\n\r\n r" +
|
||||
"eturn false;\r\n });\r\n\r\n $(\'#UserFlag_Export_Fields_" +
|
||||
"Defaults\').click(function () {\r\n\r\n $exportFields.find(\'input\'" +
|
||||
").prop(\'checked\', false);\r\n\r\n $.each(exportDefaultFields, fun" +
|
||||
"ction (index, value) {\r\n $(\'#Options_\' + value).prop(\'che" +
|
||||
"cked\', true);\r\n });\r\n\r\n return false;\r\n " +
|
||||
" });\r\n\r\n // Submit Validation\r\n functi" +
|
||||
"on submitHandler() {\r\n var exportFieldCount = $exportFields.f" +
|
||||
"ind(\'input:checked\').length;\r\n\r\n if (exportFieldCount > 0) {\r" +
|
||||
"\n\r\n if ($exportingDialog == null) {\r\n " +
|
||||
" $exportingDialog = $(\'#UserFlag_Export_Exporting\').dialog({\r\n " +
|
||||
" width: 400,\r\n height: 164,\r\n" +
|
||||
" resizable: false,\r\n " +
|
||||
" modal: true,\r\n autoOpen: false\r\n " +
|
||||
" });\r\n }\r\n $exporting" +
|
||||
"Dialog.dialog(\'open\');\r\n\r\n $form[0].submit();\r\n " +
|
||||
" }\r\n else\r\n alert(\'Select at " +
|
||||
"least one field to export.\');\r\n }\r\n $.validator.un" +
|
||||
"obtrusive.parse($form);\r\n $form.data(\"validator\").settings.submit" +
|
||||
"Handler = submitHandler;\r\n\r\n $(\'#UserFlag_Export_Download_Dialog\'" +
|
||||
").dialog({\r\n width: 400,\r\n height: 164,\r\n " +
|
||||
" resizable: false,\r\n modal: true,\r\n " +
|
||||
" autoOpen: true\r\n });\r\n $(\'#UserFlag_Ex" +
|
||||
"port_Button\').click(function () {\r\n $form.submit();\r\n " +
|
||||
" });\r\n $(\'#UserFlag_Export_Save_Button\').click(function ()" +
|
||||
" {\r\n $form.attr(\'action\', $form[0].dataset.saveaction);\r\n " +
|
||||
" $form.submit();\r\n });\r\n });\r\n <" +
|
||||
"/script>\r\n");
|
||||
|
||||
|
||||
#line 167 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -617,7 +290,7 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 169 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 89 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
if (Model.ExportId.HasValue)
|
||||
{
|
||||
|
||||
@@ -626,7 +299,7 @@ WriteLiteral("</div>\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"UserFlag_Export_Download_Dialog\"");
|
||||
WriteLiteral(" id=\"Export_Download_Dialog\"");
|
||||
|
||||
WriteLiteral(" class=\"dialog\"");
|
||||
|
||||
@@ -635,13 +308,13 @@ WriteLiteral(" title=\"Export User Flags\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 172 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 92 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 172 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 92 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
if (Model.ExportResult.RecordCount == 0)
|
||||
{
|
||||
|
||||
@@ -651,7 +324,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
||||
|
||||
|
||||
#line 175 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 95 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -662,7 +335,7 @@ WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
||||
WriteLiteral(" <h4>");
|
||||
|
||||
|
||||
#line 178 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 98 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
Write(Model.ExportResult.RecordCount);
|
||||
|
||||
|
||||
@@ -671,7 +344,7 @@ WriteLiteral(" <h4>");
|
||||
WriteLiteral(" record");
|
||||
|
||||
|
||||
#line 178 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 98 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
Write(Model.ExportResult.RecordCount != 1 ? "s" : null);
|
||||
|
||||
|
||||
@@ -681,14 +354,14 @@ WriteLiteral(" were successfully exported.</h4>\r\n");
|
||||
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 8795), Tuple.Create("\"", 8868)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 4296), Tuple.Create("\"", 4369)
|
||||
|
||||
#line 179 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 8802), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.UserFlag.ExportRetrieve(Model.ExportId.Value))
|
||||
#line 99 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4303), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.UserFlag.ExportRetrieve(Model.ExportId.Value))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 8802), false)
|
||||
, 4303), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
@@ -700,7 +373,7 @@ WriteLiteral(" class=\"fa fa-download fa-lg\"");
|
||||
WriteLiteral("></i>Download User Flag Export</a>\r\n");
|
||||
|
||||
|
||||
#line 180 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 100 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -710,7 +383,7 @@ WriteLiteral(" </div>\r\n");
|
||||
|
||||
WriteLiteral(@" <script>
|
||||
$(function () {
|
||||
$('#UserFlag_Export_Download_Dialog')
|
||||
$('#Export_Download_Dialog')
|
||||
.dialog({
|
||||
width: 400,
|
||||
height: 164,
|
||||
@@ -723,7 +396,7 @@ WriteLiteral(@" <script>
|
||||
");
|
||||
|
||||
|
||||
#line 194 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 114 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -731,7 +404,7 @@ WriteLiteral(@" <script>
|
||||
#line hidden
|
||||
WriteLiteral("<div");
|
||||
|
||||
WriteLiteral(" id=\"UserFlag_Export_Exporting\"");
|
||||
WriteLiteral(" id=\"Export_Exporting\"");
|
||||
|
||||
WriteLiteral(" class=\"dialog\"");
|
||||
|
||||
@@ -750,13 +423,13 @@ WriteLiteral(" class=\"actionBar\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 199 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 119 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 199 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 119 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
if (Authorization.Has(Claims.Config.ManageSavedExports))
|
||||
{
|
||||
|
||||
@@ -774,7 +447,7 @@ WriteLiteral(" class=\"button\"");
|
||||
WriteLiteral(">Save Export</button>\r\n");
|
||||
|
||||
|
||||
#line 202 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 122 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -795,7 +468,7 @@ WriteLiteral(" title=\"Requires Manage Saved Exports Permission\"");
|
||||
WriteLiteral(">Save Export</button>\r\n");
|
||||
|
||||
|
||||
#line 206 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
#line 126 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4721,6 +4721,7 @@ header .watermark,
|
||||
background-color: #888;
|
||||
}
|
||||
#QuickSearchMenu {
|
||||
width: 190px !important;
|
||||
max-height: 400px;
|
||||
font-size: 0.9em;
|
||||
background: none;
|
||||
@@ -4750,6 +4751,9 @@ header .watermark,
|
||||
position: relative;
|
||||
border-left: 1px solid #D1D1D1;
|
||||
border-right: 1px solid #D1D1D1;
|
||||
overflow-x: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
#layout_PageHeading a {
|
||||
text-decoration: none;
|
||||
@@ -6037,4 +6041,32 @@ i.clipboard-button {
|
||||
}
|
||||
i.clipboard-button:hover {
|
||||
color: #9e9e9e;
|
||||
}
|
||||
#Export_Exporting {
|
||||
padding-top: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
#Export_Exporting i {
|
||||
margin-right: 10px;
|
||||
color: #1e6dab;
|
||||
}
|
||||
#Export_Download_Dialog {
|
||||
padding-top: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
#Export_Download_Dialog h4 {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
#Export_Download_Dialog a {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
#Export_Fields #Export_Fields_Defaults {
|
||||
font-size: 0.75em;
|
||||
}
|
||||
#Export_Fields th {
|
||||
font-size: 1.05em;
|
||||
}
|
||||
#Export_Fields th span {
|
||||
margin-top: 4px;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -1827,24 +1827,6 @@ h1.Config_DocumentTemplates {
|
||||
margin-top: 4px;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
#UserFlag_Export_Download_Dialog {
|
||||
padding-top: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
#UserFlag_Export_Download_Dialog h4 {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
#UserFlag_Export_Download_Dialog a {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
#UserFlag_Export_Exporting {
|
||||
padding-top: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
#UserFlag_Export_Exporting i {
|
||||
margin-right: 10px;
|
||||
color: #1e6dab;
|
||||
}
|
||||
#Config_DeviceFlags_Show #DeviceFlag_OnAssignmentExpression,
|
||||
#Config_DeviceFlags_Show #DeviceFlag_OnUnassignmentExpression {
|
||||
height: 16px;
|
||||
@@ -1975,34 +1957,6 @@ h1.Config_DocumentTemplates {
|
||||
#Config_DeviceFlags_BulkAssign_AssignDialog.loading > form {
|
||||
display: none;
|
||||
}
|
||||
#DeviceFlag_Export #DeviceFlag_Export_Fields #DeviceFlag_Export_Fields_Defaults {
|
||||
font-size: 0.75em;
|
||||
}
|
||||
#DeviceFlag_Export #DeviceFlag_Export_Fields th {
|
||||
font-size: 1.05em;
|
||||
}
|
||||
#DeviceFlag_Export #DeviceFlag_Export_Fields th span {
|
||||
margin-top: 4px;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
#DeviceFlag_Export_Download_Dialog {
|
||||
padding-top: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
#DeviceFlag_Export_Download_Dialog h4 {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
#DeviceFlag_Export_Download_Dialog a {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
#DeviceFlag_Export_Exporting {
|
||||
padding-top: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
#DeviceFlag_Export_Exporting i {
|
||||
margin-right: 10px;
|
||||
color: #1e6dab;
|
||||
}
|
||||
#DocumentTemplate_BulkGenerate .actions {
|
||||
padding-bottom: 0.5em;
|
||||
text-align: right;
|
||||
@@ -2076,22 +2030,4 @@ h1.Config_DocumentTemplates {
|
||||
#DocumentTemplate_Export #DocumentTemplate_Export_Fields th span {
|
||||
margin-top: 4px;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
#DocumentTemplate_Export_Download_Dialog {
|
||||
padding-top: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
#DocumentTemplate_Export_Download_Dialog h4 {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
#DocumentTemplate_Export_Download_Dialog a {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
#DocumentTemplate_Export_Exporting {
|
||||
padding-top: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
#DocumentTemplate_Export_Exporting i {
|
||||
margin-right: 10px;
|
||||
color: #1e6dab;
|
||||
}
|
||||
@@ -2175,29 +2175,6 @@ h1.Config_DocumentTemplates {
|
||||
}
|
||||
}
|
||||
|
||||
#UserFlag_Export_Download_Dialog {
|
||||
padding-top: 20px;
|
||||
text-align: center;
|
||||
|
||||
h4 {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
a {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
#UserFlag_Export_Exporting {
|
||||
padding-top: 50px;
|
||||
text-align: center;
|
||||
|
||||
i {
|
||||
margin-right: 10px;
|
||||
color: @StatusInformation;
|
||||
}
|
||||
}
|
||||
|
||||
#Config_DeviceFlags_Show {
|
||||
|
||||
#DeviceFlag_OnAssignmentExpression, #DeviceFlag_OnUnassignmentExpression {
|
||||
@@ -2374,46 +2351,6 @@ h1.Config_DocumentTemplates {
|
||||
}
|
||||
}
|
||||
|
||||
#DeviceFlag_Export {
|
||||
#DeviceFlag_Export_Fields {
|
||||
#DeviceFlag_Export_Fields_Defaults {
|
||||
font-size: .75em;
|
||||
}
|
||||
|
||||
th {
|
||||
font-size: 1.05em;
|
||||
|
||||
span {
|
||||
margin-top: 4px;
|
||||
font-size: .8em;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#DeviceFlag_Export_Download_Dialog {
|
||||
padding-top: 20px;
|
||||
text-align: center;
|
||||
|
||||
h4 {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
a {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
#DeviceFlag_Export_Exporting {
|
||||
padding-top: 50px;
|
||||
text-align: center;
|
||||
|
||||
i {
|
||||
margin-right: 10px;
|
||||
color: @StatusInformation;
|
||||
}
|
||||
}
|
||||
|
||||
#DocumentTemplate_BulkGenerate {
|
||||
.actions {
|
||||
padding-bottom: .5em;
|
||||
@@ -2514,26 +2451,3 @@ h1.Config_DocumentTemplates {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#DocumentTemplate_Export_Download_Dialog {
|
||||
padding-top: 20px;
|
||||
text-align: center;
|
||||
|
||||
h4 {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
a {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
#DocumentTemplate_Export_Exporting {
|
||||
padding-top: 50px;
|
||||
text-align: center;
|
||||
|
||||
i {
|
||||
margin-right: 10px;
|
||||
color: @StatusInformation;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -536,34 +536,6 @@
|
||||
margin-top: 10px;
|
||||
display: none;
|
||||
}
|
||||
#Devices_Export #Devices_Export_Fields #Devices_Export_Fields_Defaults {
|
||||
font-size: 0.75em;
|
||||
}
|
||||
#Devices_Export #Devices_Export_Fields th {
|
||||
font-size: 1.05em;
|
||||
}
|
||||
#Devices_Export #Devices_Export_Fields th span {
|
||||
margin-top: 4px;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
#Devices_Export_Download_Dialog {
|
||||
padding-top: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
#Devices_Export_Download_Dialog h4 {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
#Devices_Export_Download_Dialog a {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
#Devices_Export_Exporting {
|
||||
padding-top: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
#Devices_Export_Exporting i {
|
||||
margin-right: 10px;
|
||||
color: #1e6dab;
|
||||
}
|
||||
#Devices_Import #ImportFile {
|
||||
width: 96%;
|
||||
margin-bottom: 8px;
|
||||
|
||||
@@ -556,44 +556,6 @@
|
||||
margin-top: 10px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#Devices_Export_Fields {
|
||||
#Devices_Export_Fields_Defaults {
|
||||
font-size: .75em;
|
||||
}
|
||||
|
||||
th {
|
||||
font-size: 1.05em;
|
||||
|
||||
span {
|
||||
margin-top: 4px;
|
||||
font-size: .8em;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Devices_Export_Download_Dialog {
|
||||
padding-top: 20px;
|
||||
text-align: center;
|
||||
|
||||
h4 {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
a {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
#Devices_Export_Exporting {
|
||||
padding-top: 50px;
|
||||
text-align: center;
|
||||
|
||||
i {
|
||||
margin-right: 10px;
|
||||
color: @StatusInformation;
|
||||
}
|
||||
}
|
||||
|
||||
#Devices_Import {
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -1010,22 +1010,4 @@
|
||||
#Jobs_Export #Jobs_Export_Fields th span {
|
||||
margin-top: 4px;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
#Jobs_Export_Download_Dialog {
|
||||
padding-top: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
#Jobs_Export_Download_Dialog h4 {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
#Jobs_Export_Download_Dialog a {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
#Jobs_Export_Exporting {
|
||||
padding-top: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
#Jobs_Export_Exporting i {
|
||||
margin-right: 10px;
|
||||
color: #1e6dab;
|
||||
}
|
||||
@@ -1112,26 +1112,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Jobs_Export_Download_Dialog {
|
||||
padding-top: 20px;
|
||||
text-align: center;
|
||||
|
||||
h4 {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
a {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
#Jobs_Export_Exporting {
|
||||
padding-top: 50px;
|
||||
text-align: center;
|
||||
|
||||
i {
|
||||
margin-right: 10px;
|
||||
color: @StatusInformation;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -289,6 +289,7 @@ header .watermark,
|
||||
background-color: #888;
|
||||
}
|
||||
#QuickSearchMenu {
|
||||
width: 190px !important;
|
||||
max-height: 400px;
|
||||
font-size: 0.9em;
|
||||
background: none;
|
||||
@@ -318,6 +319,9 @@ header .watermark,
|
||||
position: relative;
|
||||
border-left: 1px solid #D1D1D1;
|
||||
border-right: 1px solid #D1D1D1;
|
||||
overflow-x: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
#layout_PageHeading a {
|
||||
text-decoration: none;
|
||||
@@ -1605,4 +1609,32 @@ i.clipboard-button {
|
||||
}
|
||||
i.clipboard-button:hover {
|
||||
color: #9e9e9e;
|
||||
}
|
||||
#Export_Exporting {
|
||||
padding-top: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
#Export_Exporting i {
|
||||
margin-right: 10px;
|
||||
color: #1e6dab;
|
||||
}
|
||||
#Export_Download_Dialog {
|
||||
padding-top: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
#Export_Download_Dialog h4 {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
#Export_Download_Dialog a {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
#Export_Fields #Export_Fields_Defaults {
|
||||
font-size: 0.75em;
|
||||
}
|
||||
#Export_Fields th {
|
||||
font-size: 1.05em;
|
||||
}
|
||||
#Export_Fields th span {
|
||||
margin-top: 4px;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
@@ -217,6 +217,7 @@ header, #header {
|
||||
}
|
||||
|
||||
#QuickSearchMenu {
|
||||
width: 190px !important;
|
||||
max-height: 400px;
|
||||
font-size: .9em;
|
||||
background: none;
|
||||
@@ -253,6 +254,9 @@ header, #header {
|
||||
position: relative;
|
||||
border-left: 1px solid @BackgroundColour;
|
||||
border-right: 1px solid @BackgroundColour;
|
||||
overflow-x: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
@@ -1710,3 +1714,41 @@ i.clipboard-button {
|
||||
color: @ButtonHoverColour;
|
||||
}
|
||||
}
|
||||
|
||||
#Export_Exporting {
|
||||
padding-top: 50px;
|
||||
text-align: center;
|
||||
|
||||
i {
|
||||
margin-right: 10px;
|
||||
color: @StatusInformation;
|
||||
}
|
||||
}
|
||||
|
||||
#Export_Download_Dialog {
|
||||
padding-top: 20px;
|
||||
text-align: center;
|
||||
|
||||
h4 {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
a {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
#Export_Fields {
|
||||
#Export_Fields_Defaults {
|
||||
font-size: .75em;
|
||||
}
|
||||
|
||||
th {
|
||||
font-size: 1.05em;
|
||||
|
||||
span {
|
||||
margin-top: 4px;
|
||||
font-size: .8em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -1,5 +1,6 @@
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.Services.Devices;
|
||||
using Disco.Models.Services.Documents;
|
||||
using Disco.Models.Services.Jobs.JobLists;
|
||||
using Disco.Models.UI.Device;
|
||||
using Disco.Services;
|
||||
@@ -11,6 +12,7 @@ using Disco.Services.Plugins.Features.DetailsProvider;
|
||||
using Disco.Services.Plugins.Features.UIExtension;
|
||||
using Disco.Services.Users;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web.Models.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Entity;
|
||||
@@ -111,8 +113,8 @@ namespace Disco.Web.Controllers
|
||||
#endregion
|
||||
|
||||
#region Export
|
||||
|
||||
[DiscoAuthorizeAny(Claims.Device.Actions.Export), HttpGet]
|
||||
[HttpGet]
|
||||
[DiscoAuthorize(Claims.Device.Actions.Export)]
|
||||
public virtual ActionResult Export(Guid? exportId, DeviceExportTypes? exportType, int? exportTypeTargetId)
|
||||
{
|
||||
var m = new Models.Device.ExportModel()
|
||||
@@ -123,6 +125,9 @@ namespace Disco.Web.Controllers
|
||||
DeviceProfiles = Database.DeviceProfiles.OrderBy(dp => dp.Name).Select(dp => new { Key = dp.Id, Value = dp.Name }).ToList().Select(i => new KeyValuePair<int, string>(i.Key, i.Value))
|
||||
};
|
||||
|
||||
m.Fields = ExportFieldsModel.Create(m.Options, DeviceExportOptions.DefaultOptions());
|
||||
m.Fields.AddCustomUserDetails(o => o.UserDetailCustom, m.Fields.FieldGroups.FindIndex(g => g.Name == "Assigned User") + 1);
|
||||
|
||||
if (ExportTask.TryFromCache(exportId, out var context))
|
||||
{
|
||||
m.ExportId = context.Id;
|
||||
@@ -136,7 +141,7 @@ namespace Disco.Web.Controllers
|
||||
}
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<DeviceExportModel>(this.ControllerContext, m);
|
||||
UIExtensions.ExecuteExtensions<DeviceExportModel>(ControllerContext, m);
|
||||
|
||||
return View(m);
|
||||
}
|
||||
|
||||
@@ -975,6 +975,11 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Queues.cshtml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\Shared\_ExportFields.generated.cs">
|
||||
<DependentUpon>_ExportFields.cshtml</DependentUpon>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="Views\Shared\_CustomDetailValueRender.generated.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
@@ -2465,6 +2470,10 @@
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>Licence.generated.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="Views\Shared\_ExportFields.cshtml">
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>_ExportFields.generated.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="Views\Shared\_CustomDetailValueRender.cshtml">
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>_CustomDetailValueRender.generated.cs</LastGenOutput>
|
||||
|
||||
@@ -546,7 +546,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_Export
|
||||
{
|
||||
public readonly string Model = "Model";
|
||||
public readonly string model = "model";
|
||||
}
|
||||
static readonly ActionParamsClass_ExportRetrieve s_params_ExportRetrieve = new ActionParamsClass_ExportRetrieve();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
@@ -562,7 +562,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_SaveExport
|
||||
{
|
||||
public readonly string Model = "Model";
|
||||
public readonly string model = "model";
|
||||
}
|
||||
static readonly ViewsClass s_views = new ViewsClass();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
@@ -915,14 +915,14 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void ExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Models.Device.ExportModel Model);
|
||||
partial void ExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Models.Device.ExportModel model);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult Export(Disco.Web.Models.Device.ExportModel Model)
|
||||
public override System.Web.Mvc.ActionResult Export(Disco.Web.Models.Device.ExportModel model)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Export);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Model", Model);
|
||||
ExportOverride(callInfo, Model);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
|
||||
ExportOverride(callInfo, model);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
@@ -939,14 +939,14 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void SaveExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Models.Device.ExportModel Model);
|
||||
partial void SaveExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Models.Device.ExportModel model);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult SaveExport(Disco.Web.Models.Device.ExportModel Model)
|
||||
public override System.Web.Mvc.ActionResult SaveExport(Disco.Web.Models.Device.ExportModel model)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.SaveExport);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Model", Model);
|
||||
SaveExportOverride(callInfo, Model);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
|
||||
SaveExportOverride(callInfo, model);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -349,7 +349,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_Export
|
||||
{
|
||||
public readonly string Model = "Model";
|
||||
public readonly string model = "model";
|
||||
}
|
||||
static readonly ActionParamsClass_ExportRetrieve s_params_ExportRetrieve = new ActionParamsClass_ExportRetrieve();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
@@ -365,7 +365,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_SaveExport
|
||||
{
|
||||
public readonly string Model = "Model";
|
||||
public readonly string model = "model";
|
||||
}
|
||||
static readonly ViewsClass s_views = new ViewsClass();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
@@ -571,14 +571,14 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void ExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.DeviceFlag.ExportModel Model);
|
||||
partial void ExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.DeviceFlag.ExportModel model);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult Export(Disco.Web.Areas.Config.Models.DeviceFlag.ExportModel Model)
|
||||
public override System.Web.Mvc.ActionResult Export(Disco.Web.Areas.Config.Models.DeviceFlag.ExportModel model)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Export);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Model", Model);
|
||||
ExportOverride(callInfo, Model);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
|
||||
ExportOverride(callInfo, model);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
@@ -595,14 +595,14 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void SaveExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.DeviceFlag.ExportModel Model);
|
||||
partial void SaveExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.DeviceFlag.ExportModel model);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult SaveExport(Disco.Web.Areas.Config.Models.DeviceFlag.ExportModel Model)
|
||||
public override System.Web.Mvc.ActionResult SaveExport(Disco.Web.Areas.Config.Models.DeviceFlag.ExportModel model)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.SaveExport);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Model", Model);
|
||||
SaveExportOverride(callInfo, Model);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
|
||||
SaveExportOverride(callInfo, model);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -758,7 +758,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_Export
|
||||
{
|
||||
public readonly string Model = "Model";
|
||||
public readonly string model = "model";
|
||||
}
|
||||
static readonly ActionParamsClass_ExportRetrieve s_params_ExportRetrieve = new ActionParamsClass_ExportRetrieve();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
@@ -774,7 +774,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_SaveExport
|
||||
{
|
||||
public readonly string Model = "Model";
|
||||
public readonly string model = "model";
|
||||
}
|
||||
static readonly ViewsClass s_views = new ViewsClass();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
@@ -1314,14 +1314,14 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void ExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.DocumentTemplate.ExportModel Model);
|
||||
partial void ExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.DocumentTemplate.ExportModel model);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult Export(Disco.Web.Areas.Config.Models.DocumentTemplate.ExportModel Model)
|
||||
public override System.Web.Mvc.ActionResult Export(Disco.Web.Areas.Config.Models.DocumentTemplate.ExportModel model)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Export);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Model", Model);
|
||||
ExportOverride(callInfo, Model);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
|
||||
ExportOverride(callInfo, model);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
@@ -1338,14 +1338,14 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void SaveExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.DocumentTemplate.ExportModel Model);
|
||||
partial void SaveExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.DocumentTemplate.ExportModel model);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult SaveExport(Disco.Web.Areas.Config.Models.DocumentTemplate.ExportModel Model)
|
||||
public override System.Web.Mvc.ActionResult SaveExport(Disco.Web.Areas.Config.Models.DocumentTemplate.ExportModel model)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.SaveExport);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Model", Model);
|
||||
SaveExportOverride(callInfo, Model);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
|
||||
SaveExportOverride(callInfo, model);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -1293,7 +1293,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_SaveExport
|
||||
{
|
||||
public readonly string Model = "Model";
|
||||
public readonly string model = "model";
|
||||
}
|
||||
static readonly ViewsClass s_views = new ViewsClass();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
@@ -2257,14 +2257,14 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void SaveExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Models.Job.ExportModel Model);
|
||||
partial void SaveExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Models.Job.ExportModel model);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult SaveExport(Disco.Web.Models.Job.ExportModel Model)
|
||||
public override System.Web.Mvc.ActionResult SaveExport(Disco.Web.Models.Job.ExportModel model)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.SaveExport);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Model", Model);
|
||||
SaveExportOverride(callInfo, Model);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
|
||||
SaveExportOverride(callInfo, model);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -349,7 +349,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_Export
|
||||
{
|
||||
public readonly string Model = "Model";
|
||||
public readonly string model = "model";
|
||||
}
|
||||
static readonly ActionParamsClass_ExportRetrieve s_params_ExportRetrieve = new ActionParamsClass_ExportRetrieve();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
@@ -365,7 +365,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_SaveExport
|
||||
{
|
||||
public readonly string Model = "Model";
|
||||
public readonly string model = "model";
|
||||
}
|
||||
static readonly ViewsClass s_views = new ViewsClass();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
@@ -571,14 +571,14 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void ExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.UserFlag.ExportModel Model);
|
||||
partial void ExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.UserFlag.ExportModel model);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult Export(Disco.Web.Areas.Config.Models.UserFlag.ExportModel Model)
|
||||
public override System.Web.Mvc.ActionResult Export(Disco.Web.Areas.Config.Models.UserFlag.ExportModel model)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Export);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Model", Model);
|
||||
ExportOverride(callInfo, Model);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
|
||||
ExportOverride(callInfo, model);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
@@ -595,14 +595,14 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void SaveExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.UserFlag.ExportModel Model);
|
||||
partial void SaveExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.UserFlag.ExportModel model);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult SaveExport(Disco.Web.Areas.Config.Models.UserFlag.ExportModel Model)
|
||||
public override System.Web.Mvc.ActionResult SaveExport(Disco.Web.Areas.Config.Models.UserFlag.ExportModel model)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.SaveExport);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Model", Model);
|
||||
SaveExportOverride(callInfo, Model);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
|
||||
SaveExportOverride(callInfo, model);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ namespace T4MVC
|
||||
public readonly string _CustomDetailValueRender = "_CustomDetailValueRender";
|
||||
public readonly string _DialogLayout = "_DialogLayout";
|
||||
public readonly string _EmptyLayout = "_EmptyLayout";
|
||||
public readonly string _ExportFields = "_ExportFields";
|
||||
public readonly string _GenerateDocumentControl = "_GenerateDocumentControl";
|
||||
public readonly string _JobTable = "_JobTable";
|
||||
public readonly string _JobTableRender = "_JobTableRender";
|
||||
@@ -52,6 +53,7 @@ namespace T4MVC
|
||||
public readonly string _CustomDetailValueRender = "~/Views/Shared/_CustomDetailValueRender.cshtml";
|
||||
public readonly string _DialogLayout = "~/Views/Shared/_DialogLayout.cshtml";
|
||||
public readonly string _EmptyLayout = "~/Views/Shared/_EmptyLayout.cshtml";
|
||||
public readonly string _ExportFields = "~/Views/Shared/_ExportFields.cshtml";
|
||||
public readonly string _GenerateDocumentControl = "~/Views/Shared/_GenerateDocumentControl.cshtml";
|
||||
public readonly string _JobTable = "~/Views/Shared/_JobTable.cshtml";
|
||||
public readonly string _JobTableRender = "~/Views/Shared/_JobTableRender.cshtml";
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Disco.Models.Services.Devices;
|
||||
using Disco.Models.Services.Exporting;
|
||||
using Disco.Models.UI.Device;
|
||||
using Disco.Models.UI.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -16,5 +17,7 @@ namespace Disco.Web.Models.Device
|
||||
public IEnumerable<KeyValuePair<int, string>> DeviceBatches { get; set; }
|
||||
public IEnumerable<KeyValuePair<int, string>> DeviceModels { get; set; }
|
||||
public IEnumerable<KeyValuePair<int, string>> DeviceProfiles { get; set; }
|
||||
|
||||
public SharedExportFieldsModel<DeviceExportOptions> Fields { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,21 @@
|
||||
using Disco.Models.Services.Exporting;
|
||||
using Disco.Data.Repository;
|
||||
using Disco.Models.Services.Exporting;
|
||||
using Disco.Models.UI.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Web.Models.Shared
|
||||
{
|
||||
public static class ExportFieldsModel
|
||||
{
|
||||
public static ExportFieldsModel<V> Create<V>(V options, params string[] ignoreProperties)
|
||||
public static ExportFieldsModel<V> Create<V>(V options, V defaultOptions, params string[] ignoreProperties)
|
||||
where V : IExportOptions
|
||||
{
|
||||
return new ExportFieldsModel<V>(options, ignoreProperties);
|
||||
return new ExportFieldsModel<V>(options, defaultOptions, ignoreProperties);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,28 +24,37 @@ namespace Disco.Web.Models.Shared
|
||||
public T Options { get; set; }
|
||||
public List<ExportOptionGroup> FieldGroups { get; set; }
|
||||
|
||||
public ExportFieldsModel(T options, params string[] ignoreProperties)
|
||||
public ExportFieldsModel(T options, T defaultOptions, params string[] ignoreProperties)
|
||||
{
|
||||
FieldGroups = GetFields(options, ignoreProperties);
|
||||
Options = options;
|
||||
FieldGroups = GetFields(options, defaultOptions, ignoreProperties);
|
||||
}
|
||||
|
||||
private static List<ExportOptionGroup> GetFields(T options, params string[] ignoreProperties)
|
||||
private static List<ExportOptionGroup> GetFields(T options, T defaultOptions, params string[] ignoreProperties)
|
||||
{
|
||||
var viewData = new ViewDataDictionary<IExportOptions>(options);
|
||||
var metaData = ModelMetadata.FromLambdaExpression(o => o, viewData);
|
||||
var properties = new List<ExportOptionField>();
|
||||
|
||||
var properties = metaData.Properties
|
||||
.Where(p => p.ShortDisplayName != null && p.ModelType == typeof(bool) && !ignoreProperties.Contains(p.PropertyName));
|
||||
foreach (var prop in typeof(T).GetProperties(System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public))
|
||||
{
|
||||
if (prop.PropertyType != typeof(bool) || ignoreProperties.Contains(prop.Name))
|
||||
continue;
|
||||
|
||||
var display = prop.GetCustomAttributes(typeof(DisplayAttribute), false).FirstOrDefault() as DisplayAttribute;
|
||||
if (display == null)
|
||||
continue;
|
||||
|
||||
properties.Add(new ExportOptionField()
|
||||
{
|
||||
GroupName = display.GroupName,
|
||||
Name = prop.Name,
|
||||
DisplayName = display.Name,
|
||||
Description = display.Description,
|
||||
IsDefault = (bool)prop.GetValue(defaultOptions),
|
||||
IsChecked = (bool)prop.GetValue(options),
|
||||
});
|
||||
}
|
||||
|
||||
return properties
|
||||
.Select(p => new ExportOptionField()
|
||||
{
|
||||
GroupName = p.ShortDisplayName,
|
||||
Name = p.PropertyName,
|
||||
DisplayName = p.DisplayName,
|
||||
Description = p.Description,
|
||||
Checked = (bool)p.Model,
|
||||
})
|
||||
.GroupBy(p => p.GroupName)
|
||||
.Select(g =>
|
||||
{
|
||||
@@ -51,5 +64,39 @@ namespace Disco.Web.Models.Shared
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public void AddCustomUserDetails(Expression<Func<T, List<string>>> modelAccessor, int groupIndex = -1)
|
||||
{
|
||||
List<string> userCustomDetailKeys;
|
||||
using (var database = new DiscoDataContext())
|
||||
userCustomDetailKeys = database.UserDetails.Where(d => d.Scope == "Details").Select(d => d.Key).Distinct().OrderBy(k => k).ToList();
|
||||
|
||||
if (userCustomDetailKeys.Any())
|
||||
{
|
||||
var fieldKey = ((MemberExpression)modelAccessor.Body).Member.Name;
|
||||
var checkedKeys = modelAccessor.Compile().Invoke(Options);
|
||||
|
||||
var group = new ExportOptionGroup("User Custom Details");
|
||||
foreach (var key in userCustomDetailKeys)
|
||||
{
|
||||
var displayName = key.TrimEnd('*', '&');
|
||||
group.Add(new ExportOptionField()
|
||||
{
|
||||
GroupName = group.Name,
|
||||
Name = key,
|
||||
DisplayName = displayName,
|
||||
Description = $"{displayName} custom detail for the user",
|
||||
IsChecked = checkedKeys?.Contains(key) ?? false,
|
||||
CustomKey = fieldKey,
|
||||
CustomValue = key,
|
||||
});
|
||||
}
|
||||
|
||||
if (groupIndex < 0)
|
||||
FieldGroups.Add(group);
|
||||
else
|
||||
FieldGroups.Insert(groupIndex, group);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,11 +3,7 @@
|
||||
@{
|
||||
Authorization.RequireAny(Claims.Device.Actions.Export);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Devices", MVC.Device.Index(), "Export Devices");
|
||||
|
||||
var optionsMetadata = ModelMetadata.FromLambdaExpression(m => m.Options, ViewData);
|
||||
var optionGroups = optionsMetadata.Properties.Where(p => p.ShortDisplayName != null && p.ModelType == typeof(bool))
|
||||
.GroupBy(m => m.ShortDisplayName);
|
||||
ViewBag.Title = Html.ToBreadcrumb("Devices", MVC.Device.Index(), "Export");
|
||||
}
|
||||
<div id="Devices_Export">
|
||||
@using (Html.BeginForm(MVC.API.Device.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.Device.SaveExport()) }))
|
||||
@@ -41,64 +37,15 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="Devices_Export_Fields" class="form" style="width: 570px; margin-top: 15px;">
|
||||
<h2>Export Fields <a id="Devices_Export_Fields_Defaults" href="#">(Defaults)</a></h2>
|
||||
<table>
|
||||
@foreach (var optionGroup in optionGroups)
|
||||
{
|
||||
var optionFields = optionGroup.ToList();
|
||||
var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2);
|
||||
<tr>
|
||||
<th style="width: 120px;">
|
||||
@optionGroup.Key
|
||||
@if (optionFields.Count > 2)
|
||||
{
|
||||
<span style="display: block;" class="select"><a class="selectAll" href="#">ALL</a> | <a class="selectNone" href="#">NONE</a></span>
|
||||
}
|
||||
</th>
|
||||
<td>
|
||||
<div class="Devices_Export_Fields_Group">
|
||||
<table class="none">
|
||||
<tr>
|
||||
<td style="width: 50%">
|
||||
<ul class="none">
|
||||
@foreach (var optionItem in optionFields.Take(itemsPerColumn))
|
||||
{
|
||||
<li title="@optionItem.Description">
|
||||
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null) /><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</td>
|
||||
<td style="width: 50%">
|
||||
<ul class="none">
|
||||
@foreach (var optionItem in optionFields.Skip(itemsPerColumn))
|
||||
{
|
||||
<li title="@optionItem.Description">
|
||||
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null) /><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
@Html.Partial(MVC.Shared.Views._ExportFields, Model.Fields.FieldGroups)
|
||||
<script>
|
||||
$(function () {
|
||||
var exportDefaultFields = ['DeviceSerialNumber', 'ModelId', 'ProfileId', 'BatchId', 'AssignedUserId', 'DeviceLocation', 'DeviceAssetNumber'];
|
||||
var $exportFields = $('#Devices_Export_Fields');
|
||||
var $exportType = $('#Options_ExportType');
|
||||
var $exportTypeTargetContainers = $('#Devices_Export_Type').find('.Devices_Export_Type_Target');
|
||||
var $form = $exportType.closest('form');
|
||||
var $exportingDialog = null;
|
||||
const $exportType = $('#Options_ExportType');
|
||||
const $exportTypeTargetContainers = $('#Devices_Export_Type').find('.Devices_Export_Type_Target');
|
||||
const $form = $exportType.closest('form');
|
||||
let $exportingDialog = null;
|
||||
|
||||
function exportTypeChange() {
|
||||
$exportType.on('change', function () {
|
||||
$exportTypeTargetContainers.hide();
|
||||
$exportTypeTargetContainers.find('select').prop('disabled', true);
|
||||
|
||||
@@ -113,37 +60,14 @@
|
||||
$('#Devices_Export_Type_Target_Model').show().find('select').prop('disabled', false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
$exportType.change(exportTypeChange);
|
||||
exportTypeChange();
|
||||
|
||||
$exportFields.on('click', 'a.selectAll,a.selectNone', function () {
|
||||
var $this = $(this);
|
||||
|
||||
$this.closest('tr').find('input').prop('checked', $this.is('.selectAll'));
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#Devices_Export_Fields_Defaults').click(function () {
|
||||
|
||||
$exportFields.find('input').prop('checked', false);
|
||||
|
||||
$.each(exportDefaultFields, function (index, value) {
|
||||
$('#Options_' + value).prop('checked', true);
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
// Submit Validation
|
||||
function submitHandler() {
|
||||
var exportFieldCount = $exportFields.find('input:checked').length;
|
||||
}).trigger('change');
|
||||
|
||||
$.validator.unobtrusive.parse($form);
|
||||
$form.data("validator").settings.submitHandler = function () {
|
||||
const exportFieldCount = $('#Export_Fields').find('input:checked').length;
|
||||
if (exportFieldCount > 0) {
|
||||
|
||||
if ($exportingDialog == null) {
|
||||
$exportingDialog = $('#Devices_Export_Exporting').dialog({
|
||||
$exportingDialog = $('#Export_Exporting').dialog({
|
||||
width: 400,
|
||||
height: 164,
|
||||
resizable: false,
|
||||
@@ -154,24 +78,16 @@
|
||||
$exportingDialog.dialog('open');
|
||||
|
||||
$form[0].submit();
|
||||
return;
|
||||
}
|
||||
else
|
||||
alert('Select at least one field to export.');
|
||||
}
|
||||
$.validator.unobtrusive.parse($form);
|
||||
$form.data("validator").settings.submitHandler = submitHandler;
|
||||
|
||||
$('#Devices_Export_Download_Dialog').dialog({
|
||||
width: 400,
|
||||
height: 164,
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: true
|
||||
});
|
||||
$('#Devices_Export_Button').click(function () {
|
||||
alert('Select at least one field to export.');
|
||||
};
|
||||
|
||||
$('#Devices_Export_Button').on('click', function () {
|
||||
$form.submit();
|
||||
});
|
||||
$('#Devices_Export_Save_Button').click(function () {
|
||||
$('#Devices_Export_Save_Button').on('click', function () {
|
||||
$form.attr('action', $form[0].dataset.saveaction);
|
||||
$form.submit();
|
||||
});
|
||||
@@ -181,7 +97,7 @@
|
||||
</div>
|
||||
@if (Model.ExportId.HasValue)
|
||||
{
|
||||
<div id="Devices_Export_Download_Dialog" class="dialog" title="Export Devices">
|
||||
<div id="Export_Download_Dialog" class="dialog" title="Export Devices">
|
||||
@if (Model.ExportResult.RecordCount == 0)
|
||||
{
|
||||
<h4>No records matched the filter criteria</h4>
|
||||
@@ -194,7 +110,7 @@
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
$('#Devices_Export_Download_Dialog')
|
||||
$('#Export_Download_Dialog')
|
||||
.dialog({
|
||||
width: 400,
|
||||
height: 164,
|
||||
@@ -205,7 +121,7 @@
|
||||
});
|
||||
</script>
|
||||
}
|
||||
<div id="Devices_Export_Exporting" class="dialog" title="Exporting Devices...">
|
||||
<div id="Export_Exporting" class="dialog" title="Exporting Devices...">
|
||||
<h4><i class="fa fa-lg fa-cog fa-spin" title="Please Wait"></i>Exporting devices...</h4>
|
||||
</div>
|
||||
<div class="actionBar">
|
||||
|
||||
@@ -54,11 +54,7 @@ namespace Disco.Web.Views.Device
|
||||
|
||||
Authorization.RequireAny(Claims.Device.Actions.Export);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Devices", MVC.Device.Index(), "Export Devices");
|
||||
|
||||
var optionsMetadata = ModelMetadata.FromLambdaExpression(m => m.Options, ViewData);
|
||||
var optionGroups = optionsMetadata.Properties.Where(p => p.ShortDisplayName != null && p.ModelType == typeof(bool))
|
||||
.GroupBy(m => m.ShortDisplayName);
|
||||
ViewBag.Title = Html.ToBreadcrumb("Devices", MVC.Device.Index(), "Export");
|
||||
|
||||
|
||||
#line default
|
||||
@@ -70,13 +66,13 @@ WriteLiteral(" id=\"Devices_Export\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 13 "..\..\Views\Device\Export.cshtml"
|
||||
#line 9 "..\..\Views\Device\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 13 "..\..\Views\Device\Export.cshtml"
|
||||
#line 9 "..\..\Views\Device\Export.cshtml"
|
||||
using (Html.BeginForm(MVC.API.Device.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.Device.SaveExport()) }))
|
||||
{
|
||||
|
||||
@@ -84,14 +80,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 15 "..\..\Views\Device\Export.cshtml"
|
||||
#line 11 "..\..\Views\Device\Export.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 15 "..\..\Views\Device\Export.cshtml"
|
||||
#line 11 "..\..\Views\Device\Export.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -116,7 +112,7 @@ WriteLiteral(">\r\n Type:\r\n </th>\r\
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\Device\Export.cshtml"
|
||||
#line 20 "..\..\Views\Device\Export.cshtml"
|
||||
Write(Html.DropDownListFor(m => m.Options.ExportType, Enum.GetNames(typeof(Disco.Models.Services.Devices.DeviceExportTypes)).Select(t => new SelectListItem() { Text = t, Value = t })));
|
||||
|
||||
|
||||
@@ -133,7 +129,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 26 "..\..\Views\Device\Export.cshtml"
|
||||
#line 22 "..\..\Views\Device\Export.cshtml"
|
||||
Write(Html.DropDownListFor(m => m.Options.ExportTypeTargetId, Model.DeviceBatches.Select(i => new SelectListItem() { Value = i.Key.ToString(), Text = i.Value })));
|
||||
|
||||
|
||||
@@ -150,7 +146,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 29 "..\..\Views\Device\Export.cshtml"
|
||||
#line 25 "..\..\Views\Device\Export.cshtml"
|
||||
Write(Html.DropDownListFor(m => m.Options.ExportTypeTargetId, Model.DeviceModels.Select(i => new SelectListItem() { Value = i.Key.ToString(), Text = i.Value })));
|
||||
|
||||
|
||||
@@ -167,7 +163,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 32 "..\..\Views\Device\Export.cshtml"
|
||||
#line 28 "..\..\Views\Device\Export.cshtml"
|
||||
Write(Html.DropDownListFor(m => m.Options.ExportTypeTargetId, Model.DeviceProfiles.Select(i => new SelectListItem() { Value = i.Key.ToString(), Text = i.Value })));
|
||||
|
||||
|
||||
@@ -177,7 +173,7 @@ WriteLiteral("\r\n </div>\r\n </td>\r\
|
||||
">\r\n <tr>\r\n <th>");
|
||||
|
||||
|
||||
#line 37 "..\..\Views\Device\Export.cshtml"
|
||||
#line 33 "..\..\Views\Device\Export.cshtml"
|
||||
Write(Html.LabelFor(m => m.Options.Format));
|
||||
|
||||
|
||||
@@ -188,7 +184,7 @@ WriteLiteral("</th>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\Device\Export.cshtml"
|
||||
#line 35 "..\..\Views\Device\Export.cshtml"
|
||||
Write(Html.DropDownListFor(m => m.Options.Format, Enum.GetNames(typeof(Disco.Models.Exporting.ExportFormat)).Select(v => new SelectListItem() { Value = v, Text = v })));
|
||||
|
||||
|
||||
@@ -197,385 +193,62 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n " +
|
||||
" </div>\r\n");
|
||||
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"Devices_Export_Fields\"");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 570px; margin-top: 15px;\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>Export Fields <a");
|
||||
|
||||
WriteLiteral(" id=\"Devices_Export_Fields_Defaults\"");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(">(Defaults)</a></h2>\r\n <table>\r\n");
|
||||
|
||||
|
||||
#line 47 "..\..\Views\Device\Export.cshtml"
|
||||
|
||||
#line 40 "..\..\Views\Device\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 47 "..\..\Views\Device\Export.cshtml"
|
||||
foreach (var optionGroup in optionGroups)
|
||||
{
|
||||
var optionFields = optionGroup.ToList();
|
||||
var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2);
|
||||
#line 40 "..\..\Views\Device\Export.cshtml"
|
||||
Write(Html.Partial(MVC.Shared.Views._ExportFields, Model.Fields.FieldGroups));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 120px;\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 53 "..\..\Views\Device\Export.cshtml"
|
||||
Write(optionGroup.Key);
|
||||
#line 40 "..\..\Views\Device\Export.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
WriteLiteral(" <script>\r\n $(function () {\r\n const $exportType " +
|
||||
"= $(\'#Options_ExportType\');\r\n const $exportTypeTargetContainers =" +
|
||||
" $(\'#Devices_Export_Type\').find(\'.Devices_Export_Type_Target\');\r\n " +
|
||||
" const $form = $exportType.closest(\'form\');\r\n let $exportingDialo" +
|
||||
"g = null;\r\n\r\n $exportType.on(\'change\', function () {\r\n " +
|
||||
" $exportTypeTargetContainers.hide();\r\n $exportTypeTar" +
|
||||
"getContainers.find(\'select\').prop(\'disabled\', true);\r\n\r\n swit" +
|
||||
"ch ($exportType.val()) {\r\n case \'Batch\':\r\n " +
|
||||
" $(\'#Devices_Export_Type_Target_Batch\').show().find(\'select\').prop(\'" +
|
||||
"disabled\', false);\r\n break;\r\n " +
|
||||
"case \'Profile\':\r\n $(\'#Devices_Export_Type_Target_Prof" +
|
||||
"ile\').show().find(\'select\').prop(\'disabled\', false);\r\n " +
|
||||
" break;\r\n case \'Model\':\r\n $(\'" +
|
||||
"#Devices_Export_Type_Target_Model\').show().find(\'select\').prop(\'disabled\', false" +
|
||||
");\r\n break;\r\n }\r\n }" +
|
||||
").trigger(\'change\');\r\n\r\n $.validator.unobtrusive.parse($form);\r\n " +
|
||||
" $form.data(\"validator\").settings.submitHandler = function () {\r\n " +
|
||||
" const exportFieldCount = $(\'#Export_Fields\').find(\'input:chec" +
|
||||
"ked\').length;\r\n if (exportFieldCount > 0) {\r\n " +
|
||||
" if ($exportingDialog == null) {\r\n $exportingD" +
|
||||
"ialog = $(\'#Export_Exporting\').dialog({\r\n width: " +
|
||||
"400,\r\n height: 164,\r\n " +
|
||||
" resizable: false,\r\n modal: true,\r\n " +
|
||||
" autoOpen: false\r\n });\r\n " +
|
||||
" }\r\n $exportingDialog.dialog(\'open\');\r\n\r\n " +
|
||||
" $form[0].submit();\r\n return;\r\n " +
|
||||
" }\r\n\r\n alert(\'Select at least one field to expo" +
|
||||
"rt.\');\r\n };\r\n\r\n $(\'#Devices_Export_Button\').on(\'cl" +
|
||||
"ick\', function () {\r\n $form.submit();\r\n });\r\n " +
|
||||
" $(\'#Devices_Export_Save_Button\').on(\'click\', function () {\r\n " +
|
||||
" $form.attr(\'action\', $form[0].dataset.saveaction);\r\n " +
|
||||
" $form.submit();\r\n });\r\n });\r\n </script>\r" +
|
||||
"\n");
|
||||
|
||||
|
||||
#line 54 "..\..\Views\Device\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 54 "..\..\Views\Device\Export.cshtml"
|
||||
if (optionFields.Count > 2)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" style=\"display: block;\"");
|
||||
|
||||
WriteLiteral(" class=\"select\"");
|
||||
|
||||
WriteLiteral("><a");
|
||||
|
||||
WriteLiteral(" class=\"selectAll\"");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(">ALL</a> | <a");
|
||||
|
||||
WriteLiteral(" class=\"selectNone\"");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(">NONE</a></span>\r\n");
|
||||
|
||||
|
||||
#line 57 "..\..\Views\Device\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </th>\r\n <td>\r\n " +
|
||||
" <div");
|
||||
|
||||
WriteLiteral(" class=\"Devices_Export_Fields_Group\"");
|
||||
|
||||
WriteLiteral(">\r\n <table");
|
||||
|
||||
WriteLiteral(" class=\"none\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n " +
|
||||
" <td");
|
||||
|
||||
WriteLiteral(" style=\"width: 50%\"");
|
||||
|
||||
WriteLiteral(">\r\n <ul");
|
||||
|
||||
WriteLiteral(" class=\"none\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 65 "..\..\Views\Device\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 65 "..\..\Views\Device\Export.cshtml"
|
||||
foreach (var optionItem in optionFields.Take(itemsPerColumn))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4003), Tuple.Create("\"", 4034)
|
||||
|
||||
#line 67 "..\..\Views\Device\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4011), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4011), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"checkbox\"");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 4116), Tuple.Create("\"", 4153)
|
||||
, Tuple.Create(Tuple.Create("", 4121), Tuple.Create("Options_", 4121), true)
|
||||
|
||||
#line 68 "..\..\Views\Device\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4129), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4129), false)
|
||||
);
|
||||
|
||||
WriteAttribute("name", Tuple.Create(" name=\"", 4154), Tuple.Create("\"", 4193)
|
||||
, Tuple.Create(Tuple.Create("", 4161), Tuple.Create("Options.", 4161), true)
|
||||
|
||||
#line 68 "..\..\Views\Device\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4169), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4169), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" value=\"true\"");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 68 "..\..\Views\Device\Export.cshtml"
|
||||
Write(((bool)optionItem.Model) ? "checked " : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 4264), Tuple.Create("\"", 4302)
|
||||
, Tuple.Create(Tuple.Create("", 4270), Tuple.Create("Options_", 4270), true)
|
||||
|
||||
#line 68 "..\..\Views\Device\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4278), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4278), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 68 "..\..\Views\Device\Export.cshtml"
|
||||
Write(optionItem.DisplayName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</label>\r\n </li>\r\n");
|
||||
|
||||
|
||||
#line 70 "..\..\Views\Device\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </ul>\r\n " +
|
||||
" </td>\r\n <td");
|
||||
|
||||
WriteLiteral(" style=\"width: 50%\"");
|
||||
|
||||
WriteLiteral(">\r\n <ul");
|
||||
|
||||
WriteLiteral(" class=\"none\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 75 "..\..\Views\Device\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 75 "..\..\Views\Device\Export.cshtml"
|
||||
foreach (var optionItem in optionFields.Skip(itemsPerColumn))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4891), Tuple.Create("\"", 4922)
|
||||
|
||||
#line 77 "..\..\Views\Device\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4899), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4899), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"checkbox\"");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 5004), Tuple.Create("\"", 5041)
|
||||
, Tuple.Create(Tuple.Create("", 5009), Tuple.Create("Options_", 5009), true)
|
||||
|
||||
#line 78 "..\..\Views\Device\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5017), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5017), false)
|
||||
);
|
||||
|
||||
WriteAttribute("name", Tuple.Create(" name=\"", 5042), Tuple.Create("\"", 5081)
|
||||
, Tuple.Create(Tuple.Create("", 5049), Tuple.Create("Options.", 5049), true)
|
||||
|
||||
#line 78 "..\..\Views\Device\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5057), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5057), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" value=\"true\"");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 78 "..\..\Views\Device\Export.cshtml"
|
||||
Write(((bool)optionItem.Model) ? "checked " : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 5152), Tuple.Create("\"", 5190)
|
||||
, Tuple.Create(Tuple.Create("", 5158), Tuple.Create("Options_", 5158), true)
|
||||
|
||||
#line 78 "..\..\Views\Device\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5166), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5166), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 78 "..\..\Views\Device\Export.cshtml"
|
||||
Write(optionItem.DisplayName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</label>\r\n </li>\r\n");
|
||||
|
||||
|
||||
#line 80 "..\..\Views\Device\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@" </ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
");
|
||||
|
||||
|
||||
#line 88 "..\..\Views\Device\Export.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </table>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <script>\r\n $(function () {\r\n var exportDefaultF" +
|
||||
"ields = [\'DeviceSerialNumber\', \'ModelId\', \'ProfileId\', \'BatchId\', \'AssignedUserI" +
|
||||
"d\', \'DeviceLocation\', \'DeviceAssetNumber\'];\r\n var $exportFields =" +
|
||||
" $(\'#Devices_Export_Fields\');\r\n var $exportType = $(\'#Options_Exp" +
|
||||
"ortType\');\r\n var $exportTypeTargetContainers = $(\'#Devices_Export" +
|
||||
"_Type\').find(\'.Devices_Export_Type_Target\');\r\n var $form = $expor" +
|
||||
"tType.closest(\'form\');\r\n var $exportingDialog = null;\r\n\r\n " +
|
||||
" function exportTypeChange() {\r\n $exportTypeTargetCont" +
|
||||
"ainers.hide();\r\n $exportTypeTargetContainers.find(\'select\').p" +
|
||||
"rop(\'disabled\', true);\r\n\r\n switch ($exportType.val()) {\r\n " +
|
||||
" case \'Batch\':\r\n $(\'#Devices_Expor" +
|
||||
"t_Type_Target_Batch\').show().find(\'select\').prop(\'disabled\', false);\r\n " +
|
||||
" break;\r\n case \'Profile\':\r\n " +
|
||||
" $(\'#Devices_Export_Type_Target_Profile\').show().find(\'select\').pr" +
|
||||
"op(\'disabled\', false);\r\n break;\r\n " +
|
||||
" case \'Model\':\r\n $(\'#Devices_Export_Type_Target_Mo" +
|
||||
"del\').show().find(\'select\').prop(\'disabled\', false);\r\n " +
|
||||
" break;\r\n }\r\n }\r\n $exportType." +
|
||||
"change(exportTypeChange);\r\n exportTypeChange();\r\n\r\n " +
|
||||
" $exportFields.on(\'click\', \'a.selectAll,a.selectNone\', function () {\r\n " +
|
||||
" var $this = $(this);\r\n\r\n $this.closest(\'tr\').find(" +
|
||||
"\'input\').prop(\'checked\', $this.is(\'.selectAll\'));\r\n\r\n return " +
|
||||
"false;\r\n });\r\n\r\n $(\'#Devices_Export_Fields_Default" +
|
||||
"s\').click(function () {\r\n\r\n $exportFields.find(\'input\').prop(" +
|
||||
"\'checked\', false);\r\n\r\n $.each(exportDefaultFields, function (" +
|
||||
"index, value) {\r\n $(\'#Options_\' + value).prop(\'checked\', " +
|
||||
"true);\r\n });\r\n\r\n return false;\r\n " +
|
||||
" });\r\n\r\n // Submit Validation\r\n function subm" +
|
||||
"itHandler() {\r\n var exportFieldCount = $exportFields.find(\'in" +
|
||||
"put:checked\').length;\r\n\r\n if (exportFieldCount > 0) {\r\n\r\n " +
|
||||
" if ($exportingDialog == null) {\r\n " +
|
||||
" $exportingDialog = $(\'#Devices_Export_Exporting\').dialog({\r\n " +
|
||||
" width: 400,\r\n height: 164,\r\n " +
|
||||
" resizable: false,\r\n modal" +
|
||||
": true,\r\n autoOpen: false\r\n " +
|
||||
" });\r\n }\r\n $exportingDialog.d" +
|
||||
"ialog(\'open\');\r\n\r\n $form[0].submit();\r\n " +
|
||||
" }\r\n else\r\n alert(\'Select at least on" +
|
||||
"e field to export.\');\r\n }\r\n $.validator.unobtrusiv" +
|
||||
"e.parse($form);\r\n $form.data(\"validator\").settings.submitHandler " +
|
||||
"= submitHandler;\r\n\r\n $(\'#Devices_Export_Download_Dialog\').dialog(" +
|
||||
"{\r\n width: 400,\r\n height: 164,\r\n " +
|
||||
" resizable: false,\r\n modal: true,\r\n " +
|
||||
" autoOpen: true\r\n });\r\n $(\'#Devices_Export_Butto" +
|
||||
"n\').click(function () {\r\n $form.submit();\r\n })" +
|
||||
";\r\n $(\'#Devices_Export_Save_Button\').click(function () {\r\n " +
|
||||
" $form.attr(\'action\', $form[0].dataset.saveaction);\r\n " +
|
||||
" $form.submit();\r\n });\r\n });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 180 "..\..\Views\Device\Export.cshtml"
|
||||
#line 96 "..\..\Views\Device\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -584,7 +257,7 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 182 "..\..\Views\Device\Export.cshtml"
|
||||
#line 98 "..\..\Views\Device\Export.cshtml"
|
||||
if (Model.ExportId.HasValue)
|
||||
{
|
||||
|
||||
@@ -593,7 +266,7 @@ WriteLiteral("</div>\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"Devices_Export_Download_Dialog\"");
|
||||
WriteLiteral(" id=\"Export_Download_Dialog\"");
|
||||
|
||||
WriteLiteral(" class=\"dialog\"");
|
||||
|
||||
@@ -602,13 +275,13 @@ WriteLiteral(" title=\"Export Devices\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 185 "..\..\Views\Device\Export.cshtml"
|
||||
#line 101 "..\..\Views\Device\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 185 "..\..\Views\Device\Export.cshtml"
|
||||
#line 101 "..\..\Views\Device\Export.cshtml"
|
||||
if (Model.ExportResult.RecordCount == 0)
|
||||
{
|
||||
|
||||
@@ -618,7 +291,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
||||
|
||||
|
||||
#line 188 "..\..\Views\Device\Export.cshtml"
|
||||
#line 104 "..\..\Views\Device\Export.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -629,7 +302,7 @@ WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
||||
WriteLiteral(" <h4>");
|
||||
|
||||
|
||||
#line 191 "..\..\Views\Device\Export.cshtml"
|
||||
#line 107 "..\..\Views\Device\Export.cshtml"
|
||||
Write(Model.ExportResult.RecordCount);
|
||||
|
||||
|
||||
@@ -638,7 +311,7 @@ WriteLiteral(" <h4>");
|
||||
WriteLiteral(" record");
|
||||
|
||||
|
||||
#line 191 "..\..\Views\Device\Export.cshtml"
|
||||
#line 107 "..\..\Views\Device\Export.cshtml"
|
||||
Write(Model.ExportResult.RecordCount != 1 ? "s" : null);
|
||||
|
||||
|
||||
@@ -648,14 +321,14 @@ WriteLiteral(" were successfully exported.</h4>\r\n");
|
||||
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 9958), Tuple.Create("\"", 10029)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 5389), Tuple.Create("\"", 5460)
|
||||
|
||||
#line 192 "..\..\Views\Device\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 9965), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.ExportRetrieve(Model.ExportId.Value))
|
||||
#line 108 "..\..\Views\Device\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5396), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.ExportRetrieve(Model.ExportId.Value))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 9965), false)
|
||||
, 5396), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
@@ -667,7 +340,7 @@ WriteLiteral(" class=\"fa fa-download fa-lg\"");
|
||||
WriteLiteral("></i>Download Device Export</a>\r\n");
|
||||
|
||||
|
||||
#line 193 "..\..\Views\Device\Export.cshtml"
|
||||
#line 109 "..\..\Views\Device\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -677,7 +350,7 @@ WriteLiteral(" </div>\r\n");
|
||||
|
||||
WriteLiteral(@" <script>
|
||||
$(function () {
|
||||
$('#Devices_Export_Download_Dialog')
|
||||
$('#Export_Download_Dialog')
|
||||
.dialog({
|
||||
width: 400,
|
||||
height: 164,
|
||||
@@ -690,7 +363,7 @@ WriteLiteral(@" <script>
|
||||
");
|
||||
|
||||
|
||||
#line 207 "..\..\Views\Device\Export.cshtml"
|
||||
#line 123 "..\..\Views\Device\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -698,7 +371,7 @@ WriteLiteral(@" <script>
|
||||
#line hidden
|
||||
WriteLiteral("<div");
|
||||
|
||||
WriteLiteral(" id=\"Devices_Export_Exporting\"");
|
||||
WriteLiteral(" id=\"Export_Exporting\"");
|
||||
|
||||
WriteLiteral(" class=\"dialog\"");
|
||||
|
||||
@@ -717,13 +390,13 @@ WriteLiteral(" class=\"actionBar\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 212 "..\..\Views\Device\Export.cshtml"
|
||||
#line 128 "..\..\Views\Device\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 212 "..\..\Views\Device\Export.cshtml"
|
||||
#line 128 "..\..\Views\Device\Export.cshtml"
|
||||
if (Authorization.Has(Claims.Config.ManageSavedExports))
|
||||
{
|
||||
|
||||
@@ -741,7 +414,7 @@ WriteLiteral(" class=\"button\"");
|
||||
WriteLiteral(">Save Export</button>\r\n");
|
||||
|
||||
|
||||
#line 215 "..\..\Views\Device\Export.cshtml"
|
||||
#line 131 "..\..\Views\Device\Export.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -762,7 +435,7 @@ WriteLiteral(" title=\"Requires Manage Saved Exports Permission\"");
|
||||
WriteLiteral(">Save Export</button>\r\n");
|
||||
|
||||
|
||||
#line 219 "..\..\Views\Device\Export.cshtml"
|
||||
#line 135 "..\..\Views\Device\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
|
||||
if (exportFieldCount > 0) {
|
||||
|
||||
const $exportingDialog = $('#Devices_Export_Exporting').dialog({
|
||||
const $exportingDialog = $('#Export_Exporting').dialog({
|
||||
width: 400,
|
||||
height: 164,
|
||||
resizable: false,
|
||||
@@ -239,13 +239,6 @@
|
||||
alert('Select at least one field to export.');
|
||||
};
|
||||
|
||||
$('#Devices_Export_Download_Dialog').dialog({
|
||||
width: 400,
|
||||
height: 164,
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: true
|
||||
});
|
||||
$('#Jobs_Export_Button').click(function () {
|
||||
$form.submit();
|
||||
});
|
||||
@@ -259,7 +252,7 @@
|
||||
</div>
|
||||
@if (Model.ExportId.HasValue)
|
||||
{
|
||||
<div id="Jobs_Export_Download_Dialog" class="dialog" title="Export Jobs">
|
||||
<div id="Export_Download_Dialog" class="dialog" title="Export Jobs">
|
||||
@if (Model.ExportResult.RecordCount == 0)
|
||||
{
|
||||
<h4>No records matched the filter criteria</h4>
|
||||
@@ -272,7 +265,7 @@
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
$('#Jobs_Export_Download_Dialog')
|
||||
$('#Export_Download_Dialog')
|
||||
.dialog({
|
||||
width: 400,
|
||||
height: 164,
|
||||
@@ -283,7 +276,7 @@
|
||||
});
|
||||
</script>
|
||||
}
|
||||
<div id="Jobs_Export_Exporting" class="dialog" title="Exporting Jobs...">
|
||||
<div id="Export_Exporting" class="dialog" title="Exporting Jobs...">
|
||||
<h4><i class="fa fa-lg fa-cog fa-spin" title="Please Wait"></i>Exporting jobs...</h4>
|
||||
</div>
|
||||
<div class="actionBar">
|
||||
|
||||
@@ -936,24 +936,20 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
|
||||
"e($form);\r\n $form.data(\"validator\").settings.submitHandler = func" +
|
||||
"tion () {\r\n var exportFieldCount = $exportFields.find(\'input:" +
|
||||
"checked\').length;\r\n\r\n if (exportFieldCount > 0) {\r\n\r\n " +
|
||||
" const $exportingDialog = $(\'#Devices_Export_Exporting\').dialog({" +
|
||||
"\r\n width: 400,\r\n height: 1" +
|
||||
"64,\r\n resizable: false,\r\n " +
|
||||
"modal: true,\r\n autoOpen: true\r\n " +
|
||||
" });\r\n\r\n $form[0].submit();\r\n }\r\n " +
|
||||
" else\r\n alert(\'Select at least one field t" +
|
||||
"o export.\');\r\n };\r\n\r\n $(\'#Devices_Export_Download_" +
|
||||
"Dialog\').dialog({\r\n width: 400,\r\n height: " +
|
||||
"164,\r\n resizable: false,\r\n modal: true,\r\n " +
|
||||
" autoOpen: true\r\n });\r\n $(\'#Jobs" +
|
||||
"_Export_Button\').click(function () {\r\n $form.submit();\r\n " +
|
||||
" });\r\n $(\'#Jobs_Export_Save_Button\').click(function () " +
|
||||
"{\r\n $form.attr(\'action\', $form[0].dataset.saveaction);\r\n " +
|
||||
" $form.submit();\r\n });\r\n });\r\n </" +
|
||||
"script>\r\n");
|
||||
" const $exportingDialog = $(\'#Export_Exporting\').dialog({\r\n " +
|
||||
" width: 400,\r\n height: 164,\r\n " +
|
||||
" resizable: false,\r\n modal: t" +
|
||||
"rue,\r\n autoOpen: true\r\n });\r\n\r" +
|
||||
"\n $form[0].submit();\r\n }\r\n " +
|
||||
" else\r\n alert(\'Select at least one field to export" +
|
||||
".\');\r\n };\r\n\r\n $(\'#Jobs_Export_Button\').click(funct" +
|
||||
"ion () {\r\n $form.submit();\r\n });\r\n " +
|
||||
" $(\'#Jobs_Export_Save_Button\').click(function () {\r\n $form" +
|
||||
".attr(\'action\', $form[0].dataset.saveaction);\r\n $form.submit(" +
|
||||
");\r\n });\r\n });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 258 "..\..\Views\Job\Export.cshtml"
|
||||
#line 251 "..\..\Views\Job\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -962,7 +958,7 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 260 "..\..\Views\Job\Export.cshtml"
|
||||
#line 253 "..\..\Views\Job\Export.cshtml"
|
||||
if (Model.ExportId.HasValue)
|
||||
{
|
||||
|
||||
@@ -971,7 +967,7 @@ WriteLiteral("</div>\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"Jobs_Export_Download_Dialog\"");
|
||||
WriteLiteral(" id=\"Export_Download_Dialog\"");
|
||||
|
||||
WriteLiteral(" class=\"dialog\"");
|
||||
|
||||
@@ -980,13 +976,13 @@ WriteLiteral(" title=\"Export Jobs\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 263 "..\..\Views\Job\Export.cshtml"
|
||||
#line 256 "..\..\Views\Job\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 263 "..\..\Views\Job\Export.cshtml"
|
||||
#line 256 "..\..\Views\Job\Export.cshtml"
|
||||
if (Model.ExportResult.RecordCount == 0)
|
||||
{
|
||||
|
||||
@@ -996,7 +992,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
||||
|
||||
|
||||
#line 266 "..\..\Views\Job\Export.cshtml"
|
||||
#line 259 "..\..\Views\Job\Export.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1007,7 +1003,7 @@ WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
||||
WriteLiteral(" <h4>");
|
||||
|
||||
|
||||
#line 269 "..\..\Views\Job\Export.cshtml"
|
||||
#line 262 "..\..\Views\Job\Export.cshtml"
|
||||
Write(Model.ExportResult.RecordCount);
|
||||
|
||||
|
||||
@@ -1016,7 +1012,7 @@ WriteLiteral(" <h4>");
|
||||
WriteLiteral(" record");
|
||||
|
||||
|
||||
#line 269 "..\..\Views\Job\Export.cshtml"
|
||||
#line 262 "..\..\Views\Job\Export.cshtml"
|
||||
Write(Model.ExportResult.RecordCount != 1 ? "s" : null);
|
||||
|
||||
|
||||
@@ -1026,14 +1022,14 @@ WriteLiteral(" were successfully exported.</h4>\r\n");
|
||||
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 14696), Tuple.Create("\"", 14764)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 14423), Tuple.Create("\"", 14491)
|
||||
|
||||
#line 270 "..\..\Views\Job\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 14703), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.ExportRetrieve(Model.ExportId.Value))
|
||||
#line 263 "..\..\Views\Job\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 14430), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.ExportRetrieve(Model.ExportId.Value))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 14703), false)
|
||||
, 14430), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
@@ -1045,7 +1041,7 @@ WriteLiteral(" class=\"fa fa-download fa-lg\"");
|
||||
WriteLiteral("></i>Download Job Export</a>\r\n");
|
||||
|
||||
|
||||
#line 271 "..\..\Views\Job\Export.cshtml"
|
||||
#line 264 "..\..\Views\Job\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1055,7 +1051,7 @@ WriteLiteral(" </div>\r\n");
|
||||
|
||||
WriteLiteral(@" <script>
|
||||
$(function () {
|
||||
$('#Jobs_Export_Download_Dialog')
|
||||
$('#Export_Download_Dialog')
|
||||
.dialog({
|
||||
width: 400,
|
||||
height: 164,
|
||||
@@ -1068,7 +1064,7 @@ WriteLiteral(@" <script>
|
||||
");
|
||||
|
||||
|
||||
#line 285 "..\..\Views\Job\Export.cshtml"
|
||||
#line 278 "..\..\Views\Job\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1076,7 +1072,7 @@ WriteLiteral(@" <script>
|
||||
#line hidden
|
||||
WriteLiteral("<div");
|
||||
|
||||
WriteLiteral(" id=\"Jobs_Export_Exporting\"");
|
||||
WriteLiteral(" id=\"Export_Exporting\"");
|
||||
|
||||
WriteLiteral(" class=\"dialog\"");
|
||||
|
||||
@@ -1095,13 +1091,13 @@ WriteLiteral(" class=\"actionBar\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 290 "..\..\Views\Job\Export.cshtml"
|
||||
#line 283 "..\..\Views\Job\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 290 "..\..\Views\Job\Export.cshtml"
|
||||
#line 283 "..\..\Views\Job\Export.cshtml"
|
||||
if (Authorization.Has(Claims.Config.ManageSavedExports))
|
||||
{
|
||||
|
||||
@@ -1119,7 +1115,7 @@ WriteLiteral(" class=\"button\"");
|
||||
WriteLiteral(">Save Export</button>\r\n");
|
||||
|
||||
|
||||
#line 293 "..\..\Views\Job\Export.cshtml"
|
||||
#line 286 "..\..\Views\Job\Export.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1140,7 +1136,7 @@ WriteLiteral(" title=\"Requires Manage Saved Exports Permission\"");
|
||||
WriteLiteral(">Save Export</button>\r\n");
|
||||
|
||||
|
||||
#line 297 "..\..\Views\Job\Export.cshtml"
|
||||
#line 290 "..\..\Views\Job\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
@using Disco.Models.Services.Exporting;
|
||||
@using System.Collections.Generic;
|
||||
@model List<ExportOptionGroup>
|
||||
@{
|
||||
var optionId = 0;
|
||||
}
|
||||
<div id="Export_Fields" class="form" style="width: 570px; margin-top: 15px;">
|
||||
<h2>Export Fields <a id="Export_Fields_Defaults" href="#">(Defaults)</a></h2>
|
||||
<table>
|
||||
@foreach (var optionGroup in Model)
|
||||
{
|
||||
var optionFields = optionGroup.ToList();
|
||||
var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2);
|
||||
<tr>
|
||||
<th style="width: 120px;">
|
||||
@optionGroup.Name
|
||||
@if (optionFields.Count > 2)
|
||||
{
|
||||
<span style="display: block;" class="select"><a class="selectAll" href="#">ALL</a> | <a class="selectNone" href="#">NONE</a></span>
|
||||
}
|
||||
</th>
|
||||
<td>
|
||||
<div class="Export_Fields_Group">
|
||||
<table class="none">
|
||||
<tr>
|
||||
<td style="width: 50%">
|
||||
<ul class="none">
|
||||
@foreach (var optionItem in optionFields.Take(itemsPerColumn))
|
||||
{
|
||||
<li title="@optionItem.Description">
|
||||
<input type="checkbox" id="Export_Field_Option_@optionId" name="Options.@(optionItem.CustomKey ?? optionItem.Name)" value="@(optionItem.CustomValue ?? "true")" @(optionItem.IsDefault ? " data-default" : null) @((optionItem.IsChecked) ? " checked " : null) /><label for="Export_Field_Option_@optionId">@optionItem.DisplayName</label>
|
||||
</li>
|
||||
optionId++;
|
||||
}
|
||||
</ul>
|
||||
</td>
|
||||
<td style="width: 50%">
|
||||
<ul class="none">
|
||||
@foreach (var optionItem in optionFields.Skip(itemsPerColumn))
|
||||
{
|
||||
<li title="@optionItem.Description">
|
||||
<input type="checkbox" id="Export_Field_Option_@optionId" name="Options.@(optionItem.CustomKey ?? optionItem.Name)" value="@(optionItem.CustomValue ?? "true")" @(optionItem.IsDefault ? " data-default" : null) @((optionItem.IsChecked) ? " checked " : null) /><label for="Export_Field_Option_@optionId">@optionItem.DisplayName</label>
|
||||
</li>
|
||||
optionId++;
|
||||
}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
var $exportFields = $('#Export_Fields');
|
||||
var $form = $exportFields.closest('form');
|
||||
var $exportingDialog = null;
|
||||
|
||||
$exportFields.on('click', 'a.selectAll,a.selectNone', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
const $this = $(this);
|
||||
$this.closest('tr').find('input').prop('checked', $this.is('.selectAll'));
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#Export_Fields_Defaults').click(function (e) {
|
||||
e.preventDefault();
|
||||
$exportFields.find('input').prop('checked', false);
|
||||
$exportFields.find('input[data-default]').prop('checked', true);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,450 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Shared
|
||||
{
|
||||
using System;
|
||||
|
||||
#line 2 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
using System.Collections.Generic;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
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;
|
||||
using Disco.Models.Repository;
|
||||
|
||||
#line 1 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
using Disco.Models.Services.Exporting;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Shared/_ExportFields.cshtml")]
|
||||
public partial class _ExportFields : Disco.Services.Web.WebViewPage<List<ExportOptionGroup>>
|
||||
{
|
||||
public _ExportFields()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 4 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
|
||||
var optionId = 0;
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"Export_Fields\"");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 570px; margin-top: 15px;\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>Export Fields <a");
|
||||
|
||||
WriteLiteral(" id=\"Export_Fields_Defaults\"");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(">(Defaults)</a></h2>\r\n <table>\r\n");
|
||||
|
||||
|
||||
#line 10 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 10 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
foreach (var optionGroup in Model)
|
||||
{
|
||||
var optionFields = optionGroup.ToList();
|
||||
var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 120px;\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 16 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
Write(optionGroup.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 17 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
if (optionFields.Count > 2)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" style=\"display: block;\"");
|
||||
|
||||
WriteLiteral(" class=\"select\"");
|
||||
|
||||
WriteLiteral("><a");
|
||||
|
||||
WriteLiteral(" class=\"selectAll\"");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(">ALL</a> | <a");
|
||||
|
||||
WriteLiteral(" class=\"selectNone\"");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(">NONE</a></span>\r\n");
|
||||
|
||||
|
||||
#line 20 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </th>\r\n <td>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"Export_Fields_Group\"");
|
||||
|
||||
WriteLiteral(">\r\n <table");
|
||||
|
||||
WriteLiteral(" class=\"none\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <td");
|
||||
|
||||
WriteLiteral(" style=\"width: 50%\"");
|
||||
|
||||
WriteLiteral(">\r\n <ul");
|
||||
|
||||
WriteLiteral(" class=\"none\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 28 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 28 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
foreach (var optionItem in optionFields.Take(itemsPerColumn))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1349), Tuple.Create("\"", 1380)
|
||||
|
||||
#line 30 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1357), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1357), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"checkbox\"");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 1454), Tuple.Create("\"", 1488)
|
||||
, Tuple.Create(Tuple.Create("", 1459), Tuple.Create("Export_Field_Option_", 1459), true)
|
||||
|
||||
#line 31 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1479), Tuple.Create<System.Object, System.Int32>(optionId
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1479), false)
|
||||
);
|
||||
|
||||
WriteAttribute("name", Tuple.Create(" name=\"", 1489), Tuple.Create("\"", 1546)
|
||||
, Tuple.Create(Tuple.Create("", 1496), Tuple.Create("Options.", 1496), true)
|
||||
|
||||
#line 31 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1504), Tuple.Create<System.Object, System.Int32>(optionItem.CustomKey ?? optionItem.Name
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1504), false)
|
||||
);
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 1547), Tuple.Create("\"", 1590)
|
||||
|
||||
#line 31 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1555), Tuple.Create<System.Object, System.Int32>(optionItem.CustomValue ?? "true"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1555), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
Write(optionItem.IsDefault ? " data-default" : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
Write((optionItem.IsChecked) ? " checked " : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 1696), Tuple.Create("\"", 1731)
|
||||
, Tuple.Create(Tuple.Create("", 1702), Tuple.Create("Export_Field_Option_", 1702), true)
|
||||
|
||||
#line 31 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1722), Tuple.Create<System.Object, System.Int32>(optionId
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1722), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
Write(optionItem.DisplayName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</label>\r\n </li>\r\n");
|
||||
|
||||
|
||||
#line 33 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
optionId++;
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </ul>\r\n </td>\r" +
|
||||
"\n <td");
|
||||
|
||||
WriteLiteral(" style=\"width: 50%\"");
|
||||
|
||||
WriteLiteral(">\r\n <ul");
|
||||
|
||||
WriteLiteral(" class=\"none\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 39 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
foreach (var optionItem in optionFields.Skip(itemsPerColumn))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2305), Tuple.Create("\"", 2336)
|
||||
|
||||
#line 41 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2313), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2313), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"checkbox\"");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 2410), Tuple.Create("\"", 2444)
|
||||
, Tuple.Create(Tuple.Create("", 2415), Tuple.Create("Export_Field_Option_", 2415), true)
|
||||
|
||||
#line 42 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2435), Tuple.Create<System.Object, System.Int32>(optionId
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2435), false)
|
||||
);
|
||||
|
||||
WriteAttribute("name", Tuple.Create(" name=\"", 2445), Tuple.Create("\"", 2502)
|
||||
, Tuple.Create(Tuple.Create("", 2452), Tuple.Create("Options.", 2452), true)
|
||||
|
||||
#line 42 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2460), Tuple.Create<System.Object, System.Int32>(optionItem.CustomKey ?? optionItem.Name
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2460), false)
|
||||
);
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 2503), Tuple.Create("\"", 2546)
|
||||
|
||||
#line 42 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2511), Tuple.Create<System.Object, System.Int32>(optionItem.CustomValue ?? "true"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2511), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 42 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
Write(optionItem.IsDefault ? " data-default" : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 42 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
Write((optionItem.IsChecked) ? " checked " : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 2652), Tuple.Create("\"", 2687)
|
||||
, Tuple.Create(Tuple.Create("", 2658), Tuple.Create("Export_Field_Option_", 2658), true)
|
||||
|
||||
#line 42 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2678), Tuple.Create<System.Object, System.Int32>(optionId
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2678), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 42 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
Write(optionItem.DisplayName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</label>\r\n </li>\r\n");
|
||||
|
||||
|
||||
#line 44 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
optionId++;
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </ul>\r\n </td>\r" +
|
||||
"\n </tr>\r\n </table>\r\n " +
|
||||
" </div>\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 53 "..\..\Views\Shared\_ExportFields.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@" </table>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
var $exportFields = $('#Export_Fields');
|
||||
var $form = $exportFields.closest('form');
|
||||
var $exportingDialog = null;
|
||||
|
||||
$exportFields.on('click', 'a.selectAll,a.selectNone', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
const $this = $(this);
|
||||
$this.closest('tr').find('input').prop('checked', $this.is('.selectAll'));
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#Export_Fields_Defaults').click(function (e) {
|
||||
e.preventDefault();
|
||||
$exportFields.find('input').prop('checked', false);
|
||||
$exportFields.find('input[data-default]').prop('checked', true);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class="page">
|
||||
<header>
|
||||
<div id="heading">
|
||||
<a href="@Url.Action(MVC.Job.Index())"><i title="Disco ICT - Jobs"></i></a>
|
||||
<a href="@Url.Action(MVC.Job.Index())"><i title="Disco ICT"></i></a>
|
||||
</div>
|
||||
<nav>
|
||||
<ul id="menu">
|
||||
|
||||
@@ -135,7 +135,7 @@ WriteAttribute("href", Tuple.Create(" href=\"", 688), Tuple.Create("\"", 723)
|
||||
|
||||
WriteLiteral("><i");
|
||||
|
||||
WriteLiteral(" title=\"Disco ICT - Jobs\"");
|
||||
WriteLiteral(" title=\"Disco ICT\"");
|
||||
|
||||
WriteLiteral("></i></a>\r\n </div>\r\n <nav>\r\n <ul");
|
||||
|
||||
@@ -143,15 +143,15 @@ WriteLiteral(" id=\"menu\"");
|
||||
|
||||
WriteLiteral(">\r\n <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 857), Tuple.Create("\"", 947)
|
||||
, Tuple.Create(Tuple.Create("", 865), Tuple.Create("d-sm", 865), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 850), Tuple.Create("\"", 940)
|
||||
, Tuple.Create(Tuple.Create("", 858), Tuple.Create("d-sm", 858), true)
|
||||
|
||||
#line 24 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 869), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Job.Name ? " active" : null
|
||||
, Tuple.Create(Tuple.Create("", 862), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Job.Name ? " active" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 869), false)
|
||||
, 862), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -208,37 +208,37 @@ WriteLiteral("></i><a>Queues</a>\r\n <ul>\r\n
|
||||
#line hidden
|
||||
WriteLiteral(" <li><a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1688), Tuple.Create("\"", 1745)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1681), Tuple.Create("\"", 1738)
|
||||
|
||||
#line 35 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1695), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Job.Queue(queueToken.JobQueue.Id))
|
||||
, Tuple.Create(Tuple.Create("", 1688), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Job.Queue(queueToken.JobQueue.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1695), false)
|
||||
, 1688), false)
|
||||
);
|
||||
|
||||
WriteLiteral("><i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1749), Tuple.Create("\"", 1832)
|
||||
, Tuple.Create(Tuple.Create("", 1757), Tuple.Create("fa", 1757), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1759), Tuple.Create("fa-", 1760), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1742), Tuple.Create("\"", 1825)
|
||||
, Tuple.Create(Tuple.Create("", 1750), Tuple.Create("fa", 1750), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1752), Tuple.Create("fa-", 1753), true)
|
||||
|
||||
#line 35 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1763), Tuple.Create<System.Object, System.Int32>(queueToken.JobQueue.Icon
|
||||
, Tuple.Create(Tuple.Create("", 1756), Tuple.Create<System.Object, System.Int32>(queueToken.JobQueue.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1763), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1790), Tuple.Create("fa-fw", 1791), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1796), Tuple.Create("d-", 1797), true)
|
||||
, 1756), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1783), Tuple.Create("fa-fw", 1784), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1789), Tuple.Create("d-", 1790), true)
|
||||
|
||||
#line 35 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1799), Tuple.Create<System.Object, System.Int32>(queueToken.JobQueue.IconColour
|
||||
, Tuple.Create(Tuple.Create("", 1792), Tuple.Create<System.Object, System.Int32>(queueToken.JobQueue.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1799), false)
|
||||
, 1792), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>");
|
||||
@@ -718,14 +718,14 @@ WriteLiteral(" </ul>\r\n </li>\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 6912), Tuple.Create("\"", 7000)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 6905), Tuple.Create("\"", 6993)
|
||||
|
||||
#line 111 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6920), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Device.Name ? "active" : null
|
||||
, Tuple.Create(Tuple.Create("", 6913), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Device.Name ? "active" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6920), false)
|
||||
, 6913), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -758,14 +758,14 @@ WriteLiteral(" ");
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 7213), Tuple.Create("\"", 7299)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 7206), Tuple.Create("\"", 7292)
|
||||
|
||||
#line 115 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 7221), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.User.Name ? "active" : null
|
||||
, Tuple.Create(Tuple.Create("", 7214), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.User.Name ? "active" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 7221), false)
|
||||
, 7214), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -788,15 +788,15 @@ WriteLiteral("</li>\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 7413), Tuple.Create("\"", 7511)
|
||||
, Tuple.Create(Tuple.Create("", 7421), Tuple.Create("moveRight", 7421), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 7406), Tuple.Create("\"", 7504)
|
||||
, Tuple.Create(Tuple.Create("", 7414), Tuple.Create("moveRight", 7414), true)
|
||||
|
||||
#line 117 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 7430), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Public.Name ? " active" : null
|
||||
, Tuple.Create(Tuple.Create("", 7423), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Public.Name ? " active" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 7430), false)
|
||||
, 7423), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -826,14 +826,14 @@ WriteLiteral("</li>\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 7689), Tuple.Create("\"", 7777)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 7682), Tuple.Create("\"", 7770)
|
||||
|
||||
#line 120 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 7697), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Config.Name ? "active" : null
|
||||
, Tuple.Create(Tuple.Create("", 7690), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Config.Name ? "active" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 7697), false)
|
||||
, 7690), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
Reference in New Issue
Block a user