initial source commit

This commit is contained in:
Gary Sharp
2013-02-01 12:35:28 +11:00
parent 543a005d31
commit 0a93429800
1103 changed files with 285609 additions and 0 deletions
@@ -0,0 +1,5 @@
@model Disco.Web.Areas.Config.Models.DeviceModel.DeviceComponentsModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Models", MVC.Config.DeviceModel.Index(null), "Generic Components");
}
@Html.Partial(MVC.Config.DeviceModel.Views._DeviceComponentsTable, Model)
@@ -0,0 +1,63 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceModel
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceModel/GenericComponents.cshtml")]
public class GenericComponents : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceModel.DeviceComponentsModel>
{
public GenericComponents()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DeviceModel\GenericComponents.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Models", MVC.Config.DeviceModel.Index(null), "Generic Components");
#line default
#line hidden
WriteLiteral("\r\n");
#line 5 "..\..\Areas\Config\Views\DeviceModel\GenericComponents.cshtml"
Write(Html.Partial(MVC.Config.DeviceModel.Views._DeviceComponentsTable, Model));
#line default
#line hidden
}
}
}
#pragma warning restore 1591
@@ -0,0 +1,46 @@
@model Disco.Web.Areas.Config.Models.DeviceModel.IndexModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Models");
}
<table class="tableData">
<tr>
<th>
Name/Description
</th>
<th>
Manufacturer
</th>
<th>
Model
</th>
<th>
Type
</th>
<th>
Device Count
</th>
</tr>
@foreach (var item in Model.DeviceModels)
{
<tr>
<td>
@Html.ActionLink(item.ToString(), MVC.Config.DeviceModel.Index(item.Id))
</td>
<td>
@Html.DisplayFor(modelItem => item.Manufacturer)
</td>
<td>
@Html.DisplayFor(modelItem => item.Model)
</td>
<td>
@Html.DisplayFor(modelItem => item.ModelType)
</td>
<td>
@item.DeviceCount.ToString("n0")
</td>
</tr>
}
</table>
<div class="actionBar">
@Html.ActionLinkButton("Generic Components", MVC.Config.DeviceModel.GenericComponents())
</div>
@@ -0,0 +1,173 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceModel
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceModel/Index.cshtml")]
public class Index : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceModel.IndexModel>
{
public Index()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Models");
#line default
#line hidden
WriteLiteral("\r\n<table");
WriteLiteral(" class=\"tableData\"");
WriteLiteral(@">
<tr>
<th>
Name/Description
</th>
<th>
Manufacturer
</th>
<th>
Model
</th>
<th>
Type
</th>
<th>
Device Count
</th>
</tr>
");
#line 23 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
#line default
#line hidden
#line 23 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
foreach (var item in Model.DeviceModels)
{
#line default
#line hidden
WriteLiteral(" <tr>\r\n <td>\r\n");
WriteLiteral(" ");
#line 27 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
Write(Html.ActionLink(item.ToString(), MVC.Config.DeviceModel.Index(item.Id)));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 30 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
Write(Html.DisplayFor(modelItem => item.Manufacturer));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 33 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
Write(Html.DisplayFor(modelItem => item.Model));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 36 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
Write(Html.DisplayFor(modelItem => item.ModelType));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 39 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
Write(item.DeviceCount.ToString("n0"));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
#line 42 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
}
#line default
#line hidden
WriteLiteral("</table>\r\n<div");
WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 45 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
Write(Html.ActionLinkButton("Generic Components", MVC.Config.DeviceModel.GenericComponents()));
#line default
#line hidden
WriteLiteral("\r\n</div>");
}
}
}
#pragma warning restore 1591
@@ -0,0 +1,205 @@
@model Disco.Web.Areas.Config.Models.DeviceModel.ShowModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Models", MVC.Config.DeviceModel.Index(null), Model.DeviceModel.ToString());
}
<div class="form" style="width: 530px">
<table>
<tr>
<th style="width: 150px">
Id:
</th>
<td>
@Html.DisplayFor(model => model.DeviceModel.Id)
</td>
</tr>
<tr>
<th>
Description:
</th>
<td>@Html.EditorFor(model => model.DeviceModel.Description)
@AjaxHelpers.AjaxSave()
@AjaxHelpers.AjaxLoader()
</td>
</tr>
<tr>
<th>
Manufacturer:
</th>
<td>
@Html.DisplayFor(model => model.DeviceModel.Manufacturer)
</td>
</tr>
<tr>
<th>
Model:
</th>
<td>
@Html.DisplayFor(model => model.DeviceModel.Model)
</td>
</tr>
<tr>
<th>
Default Purchase Date:
</th>
<td>
@Html.EditorFor(model => model.DeviceModel.DefaultPurchaseDate)
@AjaxHelpers.AjaxLoader()
</td>
</tr>
<tr>
<th>
Default Warranty Provider:
</th>
<td>
@Html.DropDownListFor(model => model.DeviceModel.DefaultWarrantyProvider, Model.WarrantyProviders.ToSelectListItems(Model.DeviceModel.DefaultWarrantyProvider, true, "None"))
@AjaxHelpers.AjaxLoader()
</td>
</tr>
<tr>
<th>
Type:
</th>
<td>
@Html.DisplayFor(model => model.DeviceModel.ModelType)
</td>
</tr>
<tr>
<th>
Image:
</th>
<td>
<img alt="Model Image" src="@Url.Action(MVC.API.DeviceModel.Image(Model.DeviceModel.Id, Model.DeviceModel.ImageHash()))" />
</td>
</tr>
<tr>
<th>
<label for="DeviceModel_Image">
Update Image:
</label>
</th>
<td>
@using (Html.BeginForm(MVC.API.DeviceModel.Image(Model.DeviceModel.Id, true, null), FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<input type="file" name="Image" id="Image" style="width: 250px;" />
<input class="button" type="submit" value="Update" />
}
</td>
</tr>
</table>
<script type="text/javascript">
$(function () {
var $Description = $('#DeviceModel_Description');
var $DescriptionAjaxSave = $Description.next('.ajaxSave');
$Description
.watermark('Model Description')
.focus(function () { $Description.select() })
.keydown(function (e) {
$DescriptionAjaxSave.show();
if (e.which == 13) {
$(this).blur();
}
}).blur(function () {
$DescriptionAjaxSave.hide();
})
.change(function () {
$DescriptionAjaxSave.hide();
var $ajaxLoading = $DescriptionAjaxSave.next('.ajaxLoading').show();
var data = { Description: $Description.val() };
$.ajax({
url: '@Url.Action(MVC.API.DeviceModel.UpdateDescription(Model.DeviceModel.Id))',
dataType: 'json',
data: data,
success: function (d) {
if (d == 'OK') {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
} else {
$ajaxLoading.hide();
alert('Unable to update description: ' + d);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to update description: ' + textStatus);
$ajaxLoading.hide();
}
});
});
});
</script>
<script type="text/javascript">
$(function () {
var $dataField = $('#DeviceModel_DefaultPurchaseDate');
var $ajaxLoading = $dataField.next('.ajaxLoading');
var dateFieldValue = $dataField.val();
var dateFieldChangeToken = null;
$dataField
.watermark('None')
.datepicker({
changeYear: true,
changeMonth: true,
dateFormat: 'yy/mm/dd'
})
.change(function () {
var dateText = $dataField.val();
if (dateFieldValue.toLowerCase() != dateText.toLowerCase()) {
dateFieldValue = dateText;
if (dateFieldChangeToken)
window.clearTimeout(dateFieldChangeToken);
dateFieldChangeToken = window.setTimeout(function () {
$ajaxLoading.show();
var data = {};
data['DefaultPurchaseDate'] = dateFieldValue;
$.getJSON('@(Url.Action(MVC.API.DeviceModel.UpdateDefaultPurchaseDate(Model.DeviceModel.Id)))', data, function (response, result) {
if (result != 'success' || response != 'OK') {
alert('Unable to change Date:\n' + response);
$ajaxLoading.hide();
} else {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
}
})
dateFieldChangeToken = null;
}, 500);
}
}).focus(function () {
$(this).select();
});
});
</script>
<script type="text/javascript">
$(function () {
var $DefaultWarrantyProvider = $('#DeviceModel_DefaultWarrantyProvider');
var $ajaxLoading = $DefaultWarrantyProvider.next('.ajaxLoading');
$DefaultWarrantyProvider
.change(function () {
$ajaxLoading.show();
var data = { DefaultWarrantyProvider: $DefaultWarrantyProvider.val() };
$.ajax({
url: '@Url.Action(MVC.API.DeviceModel.UpdateDefaultWarrantyProvider(Model.DeviceModel.Id))',
dataType: 'json',
data: data,
success: function (d) {
if (d == 'OK') {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
} else {
$ajaxLoading.hide();
alert('Unable to default warranty provider: ' + d);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to default warranty provider: ' + textStatus);
$ajaxLoading.hide();
}
});
});
});
</script>
</div>
<h2>
Components</h2>
@Html.Partial(MVC.Config.DeviceModel.Views._DeviceComponentsTable, Model.DeviceComponentsModel)
<div class="actionBar">
@if (Model.CanDelete)
{
@Html.ActionLinkButton("Delete", MVC.API.DeviceModel.Delete(Model.DeviceModel.Id, true), "buttonDelete")
}
@Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceModel.Id.ToString(), "DeviceModel"))
</div>
@@ -0,0 +1,458 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceModel
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceModel/Show.cshtml")]
public class Show : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceModel.ShowModel>
{
public Show()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Models", MVC.Config.DeviceModel.Index(null), Model.DeviceModel.ToString());
#line default
#line hidden
WriteLiteral("\r\n<div");
WriteLiteral(" class=\"form\"");
WriteLiteral(" style=\"width: 530px\"");
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th");
WriteLiteral(" style=\"width: 150px\"");
WriteLiteral(">\r\n Id:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 12 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.DisplayFor(model => model.DeviceModel.Id));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Description:\r\n </th>\r\n <td>");
#line 19 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceModel.Description));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 20 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(AjaxHelpers.AjaxSave());
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 21 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Manufacturer:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 29 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.DisplayFor(model => model.DeviceModel.Manufacturer));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Model:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 37 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.DisplayFor(model => model.DeviceModel.Model));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Default Purchase Date:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 45 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceModel.DefaultPurchaseDate));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 46 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Default Warranty Provider:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 54 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.DropDownListFor(model => model.DeviceModel.DefaultWarrantyProvider, Model.WarrantyProviders.ToSelectListItems(Model.DeviceModel.DefaultWarrantyProvider, true, "None")));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 55 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Type:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 63 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.DisplayFor(model => model.DeviceModel.ModelType));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Image:\r\n </th>\r\n <td>\r\n <img");
WriteLiteral(" alt=\"Model Image\"");
WriteAttribute("src", Tuple.Create(" src=\"", 2151), Tuple.Create("\"", 2248)
#line 71 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
, Tuple.Create(Tuple.Create("", 2157), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(Model.DeviceModel.Id, Model.DeviceModel.ImageHash()))
#line default
#line hidden
, 2157), false)
);
WriteLiteral(" />\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" <label");
WriteLiteral(" for=\"DeviceModel_Image\"");
WriteLiteral(">\r\n Update Image:\r\n </label>\r\n </th>" +
"\r\n <td>\r\n");
#line 81 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line default
#line hidden
#line 81 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
using (Html.BeginForm(MVC.API.DeviceModel.Image(Model.DeviceModel.Id, true, null), FormMethod.Post, new { enctype = "multipart/form-data" }))
{
#line default
#line hidden
WriteLiteral(" <input");
WriteLiteral(" type=\"file\"");
WriteLiteral(" name=\"Image\"");
WriteLiteral(" id=\"Image\"");
WriteLiteral(" style=\"width: 250px;\"");
WriteLiteral(" />\r\n");
WriteLiteral(" <input");
WriteLiteral(" class=\"button\"");
WriteLiteral(" type=\"submit\"");
WriteLiteral(" value=\"Update\"");
WriteLiteral(" />\r\n");
#line 85 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n </table>\r\n <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
var $Description = $('#DeviceModel_Description');
var $DescriptionAjaxSave = $Description.next('.ajaxSave');
$Description
.watermark('Model Description')
.focus(function () { $Description.select() })
.keydown(function (e) {
$DescriptionAjaxSave.show();
if (e.which == 13) {
$(this).blur();
}
}).blur(function () {
$DescriptionAjaxSave.hide();
})
.change(function () {
$DescriptionAjaxSave.hide();
var $ajaxLoading = $DescriptionAjaxSave.next('.ajaxLoading').show();
var data = { Description: $Description.val() };
$.ajax({
url: '");
#line 109 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Url.Action(MVC.API.DeviceModel.UpdateDescription(Model.DeviceModel.Id)));
#line default
#line hidden
WriteLiteral(@"',
dataType: 'json',
data: data,
success: function (d) {
if (d == 'OK') {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
} else {
$ajaxLoading.hide();
alert('Unable to update description: ' + d);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to update description: ' + textStatus);
$ajaxLoading.hide();
}
});
});
});
</script>
<script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
var $dataField = $('#DeviceModel_DefaultPurchaseDate');
var $ajaxLoading = $dataField.next('.ajaxLoading');
var dateFieldValue = $dataField.val();
var dateFieldChangeToken = null;
$dataField
.watermark('None')
.datepicker({
changeYear: true,
changeMonth: true,
dateFormat: 'yy/mm/dd'
})
.change(function () {
var dateText = $dataField.val();
if (dateFieldValue.toLowerCase() != dateText.toLowerCase()) {
dateFieldValue = dateText;
if (dateFieldChangeToken)
window.clearTimeout(dateFieldChangeToken);
dateFieldChangeToken = window.setTimeout(function () {
$ajaxLoading.show();
var data = {};
data['DefaultPurchaseDate'] = dateFieldValue;
$.getJSON('");
#line 151 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Url.Action(MVC.API.DeviceModel.UpdateDefaultPurchaseDate(Model.DeviceModel.Id)));
#line default
#line hidden
WriteLiteral(@"', data, function (response, result) {
if (result != 'success' || response != 'OK') {
alert('Unable to change Date:\n' + response);
$ajaxLoading.hide();
} else {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
}
})
dateFieldChangeToken = null;
}, 500);
}
}).focus(function () {
$(this).select();
});
});
</script>
<script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
var $DefaultWarrantyProvider = $('#DeviceModel_DefaultWarrantyProvider');
var $ajaxLoading = $DefaultWarrantyProvider.next('.ajaxLoading');
$DefaultWarrantyProvider
.change(function () {
$ajaxLoading.show();
var data = { DefaultWarrantyProvider: $DefaultWarrantyProvider.val() };
$.ajax({
url: '");
#line 176 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Url.Action(MVC.API.DeviceModel.UpdateDefaultWarrantyProvider(Model.DeviceModel.Id)));
#line default
#line hidden
WriteLiteral(@"',
dataType: 'json',
data: data,
success: function (d) {
if (d == 'OK') {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
} else {
$ajaxLoading.hide();
alert('Unable to default warranty provider: ' + d);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to default warranty provider: ' + textStatus);
$ajaxLoading.hide();
}
});
});
});
</script>
</div>
<h2>
Components</h2>
");
#line 198 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.Partial(MVC.Config.DeviceModel.Views._DeviceComponentsTable, Model.DeviceComponentsModel));
#line default
#line hidden
WriteLiteral("\r\n<div");
WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n");
#line 200 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line default
#line hidden
#line 200 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
if (Model.CanDelete)
{
#line default
#line hidden
#line 202 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.ActionLinkButton("Delete", MVC.API.DeviceModel.Delete(Model.DeviceModel.Id, true), "buttonDelete"));
#line default
#line hidden
#line 202 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
}
#line default
#line hidden
WriteLiteral(" ");
#line 204 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceModel.Id.ToString(), "DeviceModel")));
#line default
#line hidden
WriteLiteral("\r\n</div>\r\n");
}
}
}
#pragma warning restore 1591
@@ -0,0 +1,270 @@
@model Disco.Web.Areas.Config.Models.DeviceModel.DeviceComponentsModel
@{
Html.BundleDeferred("~/ClientScripts/Modules/Disco-jQueryExtensions");
}
<table id="deviceComponents" data-devicemodelid="@(Model.DeviceModelId.HasValue ? Model.DeviceModelId.Value.ToString() : string.Empty)">
<tr>
<th>
Description
</th>
<th>
Cost
</th>
<th>
Job Types
</th>
<th class="actions">
&nbsp;
</th>
</tr>
@foreach (var item in Model.DeviceComponents)
{
<tr data-devicecomponentid="@item.Id">
<td>
<input type="text" class="description" value="@item.Description" />
</td>
<td>
<input type="text" class="cost" value="@item.Cost.ToString("C")" />
</td>
<td>
<span class="edit@(item.JobSubTypes.Count > 0 ? " editAlert" : string.Empty)"></span>
</td>
<td>
<span class="remove"></span>
</td>
</tr>
}
<tr>
<td colspan="4">
<a href="#" id="addDeviceComponent">Add Component</a>
</td>
</tr>
</table>
<script type="text/javascript">
$(function () {
var $deviceComponents = $('#deviceComponents');
$('#addDeviceComponent').click(function () {
var dc = $('<tr><td><input type="text" class="description" /></td><td><input type="text" class="cost" /></td><td><span class="edit"></span></td><td><span class="remove"></span></td></tr>');
dc.find('input').focus(function () { $(this).select() })
dc.insertBefore($deviceComponents.find('tr').last());
dc.find('input.description').focus();
return false;
});
var removeComponentConfirmed = function (id, row) {
var data = { id: id };
$.ajax({
url: '@Url.Action(MVC.API.DeviceModel.ComponentRemove())',
dataType: 'json',
data: data,
success: function (d) {
if (d == 'OK') {
row.remove();
} else {
alert('Unable to remove component: ' + d);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to remove component: ' + textStatus);
}
});
}
var removeComponent = function () {
var componentRow = $(this).closest('tr');
var id = componentRow.attr('data-devicecomponentid');
if (id) {
var dialog = $("#dialogConfirmRemove");
var buttons = dialog.dialog("option", "buttons");
buttons['Remove'] = function () { removeComponentConfirmed(id, componentRow); $(this).dialog("close"); };
var buttons = dialog.dialog("option", "buttons", buttons);
dialog.dialog('open');
} else {
// New - Remove
componentRow.remove();
}
}
var updateComponent = function () {
var componentRow = $(this).closest('tr');
componentRow.find('input').attr('disabled', true).addClass('updating');
var id = componentRow.attr('data-devicecomponentid');
if (id) {
// Update
var data = {
id: id,
Description: componentRow.find('input.description').val(),
Cost: componentRow.find('input.cost').val()
};
$.ajax({
url: '@Url.Action(MVC.API.DeviceModel.ComponentUpdate())',
dataType: 'json',
type: 'POST',
data: data,
success: function (d) {
componentRow.find('input').attr('disabled', false).removeClass('updating');
if (d.Result == 'OK') {
componentRow.find('input.description').val(d.Component.Description);
componentRow.find('input.cost').val(d.Component.Cost);
} else {
alert('Unable to update component: ' + d.Result);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to update component: ' + textStatus);
}
});
} else {
// Add
id = componentRow.closest('table').attr('data-devicemodelid');
var data = {
id: id,
Description: componentRow.find('input.description').val(),
Cost: componentRow.find('input.cost').val()
};
$.ajax({
url: '@Url.Action(MVC.API.DeviceModel.ComponentAdd(null, null, null))',
dataType: 'json',
type: 'POST',
data: data,
success: function (d) {
componentRow.find('input').attr('disabled', false).removeClass('updating');
if (d.Result == 'OK') {
componentRow.attr('data-devicecomponentid', d.Component.Id);
componentRow.find('input.description').val(d.Component.Description);
componentRow.find('input.cost').val(d.Component.Cost);
} else {
alert('Unable to add component: ' + d.Result);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to add component: ' + textStatus);
}
});
}
}
var editComponentJobTypes = function () {
var edit$this = $(this);
var componentRow = edit$this.closest('tr');
var id = componentRow.attr('data-devicecomponentid');
if (id) {
var data = {
id: id
};
$.ajax({
url: '@Url.Action(MVC.API.DeviceModel.Component())',
dataType: 'json',
data: data,
success: function (d) {
componentRow.find('input').attr('disabled', false).removeClass('updating');
if (d.Result == 'OK') {
$dialogUpdateJobTypes = $('#dialogUpdateJobTypes');
$dialogUpdateJobTypes.find('input:checked').each(function () { $(this).attr('checked', false) });
for (var i = 0; i < d.Component.JobSubTypes.length; i++) {
var sjt = d.Component.JobSubTypes[i];
$dialogUpdateJobTypes.find('#SubTypes_' + sjt).attr('checked', true);
}
$('#CheckboxBulkSelect_dialogUpdateJobTypes').checkboxBulkSelect('update');
var buttons = $dialogUpdateJobTypes.dialog("option", "buttons");
buttons['Save'] = function () {
$dialogUpdateJobTypes.dialog("disable");
var selectedSJTs = [];
$dialogUpdateJobTypes.find('input:checked').each(function () { selectedSJTs.push($(this).val()) });
var data = {
id: id,
JobSubTypes: selectedSJTs
};
$.ajax({
url: '@Url.Action(MVC.API.DeviceModel.ComponentUpdateJobSubTypes())',
dataType: 'json',
type: 'POST',
traditional: true,
data: data,
success: function (d) {
if (d.Result == 'OK') {
if (d.Component.JobSubTypes.length > 0) {
edit$this.addClass('editAlert');
} else {
edit$this.removeClass('editAlert');
}
$dialogUpdateJobTypes.dialog("enable");
$dialogUpdateJobTypes.dialog("close");
} else {
alert('Unable to update component sub types: ' + d.Result);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to update component sub types: ' + textStatus);
}
});
};
var buttons = $dialogUpdateJobTypes.dialog("option", "buttons", buttons);
$dialogUpdateJobTypes.dialog('open');
} else {
alert('Unable to load component: ' + d.Result);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to load component: ' + textStatus);
}
});
}
}
$("#dialogConfirmRemove").dialog({
resizable: false,
height: 140,
modal: true,
autoOpen: false,
buttons: {
"Remove": function () {
$(this).dialog("close");
},
Cancel: function () {
$(this).dialog("close");
}
}
});
$('#dialogUpdateJobTypes').dialog({
resizable: false,
modal: true,
autoOpen: false,
width: 550,
buttons: {
"Save": function () {
$(this).dialog("close");
},
Cancel: function () {
$(this).dialog("close");
}
}
});
$('#CheckboxBulkSelect_dialogUpdateJobTypes').checkboxBulkSelect({ parentSelector: 'div' });
$deviceComponents.find('input').live('change', updateComponent).focus(function () { $(this).select() });
$deviceComponents.find('span.remove').live('click', removeComponent);
$deviceComponents.find('span.edit').live('click', editComponentJobTypes);
});
</script>
<div id="dialogUpdateJobTypes" title="Update Job Types">
<div>
<h2>
Hardware Non-Warranty Job Types</h2>
@CommonHelpers.CheckBoxList("SubTypes", Model.JobSubTypes.ToSelectListItems(), 2)
<br />
<span id="CheckboxBulkSelect_dialogUpdateJobTypes" class="checkboxBulkSelectContainer">
</span>
</div>
</div>
<div id="dialogConfirmRemove" title="Delete this Component?">
<p>
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
This item will be permanently deleted and cannot be recovered. Are you sure?</p>
</div>
@@ -0,0 +1,412 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceModel
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceModel/_DeviceComponentsTable.cshtml")]
public class DeviceComponentsTable : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceModel.DeviceComponentsModel>
{
public DeviceComponentsTable()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml"
Html.BundleDeferred("~/ClientScripts/Modules/Disco-jQueryExtensions");
#line default
#line hidden
WriteLiteral("\r\n<table");
WriteLiteral(" id=\"deviceComponents\"");
WriteLiteral(" data-devicemodelid=\"");
#line 5 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml"
Write(Model.DeviceModelId.HasValue ? Model.DeviceModelId.Value.ToString() : string.Empty);
#line default
#line hidden
WriteLiteral("\"");
WriteLiteral(">\r\n <tr>\r\n <th>\r\n Description\r\n </th>\r\n <th>\r\n" +
" Cost\r\n </th>\r\n <th>\r\n Job Types\r\n </" +
"th>\r\n <th");
WriteLiteral(" class=\"actions\"");
WriteLiteral(">\r\n &nbsp;\r\n </th>\r\n </tr>\r\n");
#line 20 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml"
#line default
#line hidden
#line 20 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml"
foreach (var item in Model.DeviceComponents)
{
#line default
#line hidden
WriteLiteral(" <tr");
WriteLiteral(" data-devicecomponentid=\"");
#line 22 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml"
Write(item.Id);
#line default
#line hidden
WriteLiteral("\"");
WriteLiteral(">\r\n <td>\r\n <input");
WriteLiteral(" type=\"text\"");
WriteLiteral(" class=\"description\"");
WriteAttribute("value", Tuple.Create(" value=\"", 710), Tuple.Create("\"", 735)
#line 24 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml"
, Tuple.Create(Tuple.Create("", 718), Tuple.Create<System.Object, System.Int32>(item.Description
#line default
#line hidden
, 718), false)
);
WriteLiteral(" />\r\n </td>\r\n <td>\r\n <input");
WriteLiteral(" type=\"text\"");
WriteLiteral(" class=\"cost\"");
WriteAttribute("value", Tuple.Create(" value=\"", 825), Tuple.Create("\"", 857)
#line 27 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml"
, Tuple.Create(Tuple.Create("", 833), Tuple.Create<System.Object, System.Int32>(item.Cost.ToString("C")
#line default
#line hidden
, 833), false)
);
WriteLiteral(" />\r\n </td>\r\n <td>\r\n <span");
WriteAttribute("class", Tuple.Create(" class=\"", 921), Tuple.Create("\"", 992)
, Tuple.Create(Tuple.Create("", 929), Tuple.Create("edit", 929), true)
#line 30 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml"
, Tuple.Create(Tuple.Create("", 933), Tuple.Create<System.Object, System.Int32>(item.JobSubTypes.Count > 0 ? " editAlert" : string.Empty
#line default
#line hidden
, 933), false)
);
WriteLiteral("></span>\r\n </td>\r\n <td>\r\n <span");
WriteLiteral(" class=\"remove\"");
WriteLiteral("></span>\r\n </td>\r\n </tr>\r\n");
#line 36 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml"
}
#line default
#line hidden
WriteLiteral(" <tr>\r\n <td");
WriteLiteral(" colspan=\"4\"");
WriteLiteral(">\r\n <a");
WriteLiteral(" href=\"#\"");
WriteLiteral(" id=\"addDeviceComponent\"");
WriteLiteral(">Add Component</a>\r\n </td>\r\n </tr>\r\n</table>\r\n<script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
var $deviceComponents = $('#deviceComponents');
$('#addDeviceComponent').click(function () {
var dc = $('<tr><td><input type=""text"" class=""description"" /></td><td><input type=""text"" class=""cost"" /></td><td><span class=""edit""></span></td><td><span class=""remove""></span></td></tr>');
dc.find('input').focus(function () { $(this).select() })
dc.insertBefore($deviceComponents.find('tr').last());
dc.find('input.description').focus();
return false;
});
var removeComponentConfirmed = function (id, row) {
var data = { id: id };
$.ajax({
url: '");
#line 58 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml"
Write(Url.Action(MVC.API.DeviceModel.ComponentRemove()));
#line default
#line hidden
WriteLiteral("\',\r\n dataType: \'json\',\r\n data: data,\r\n " +
" success: function (d) {\r\n if (d == \'OK\') {\r\n " +
" row.remove();\r\n } else {\r\n a" +
"lert(\'Unable to remove component: \' + d);\r\n }\r\n " +
" },\r\n error: function (jqXHR, textStatus, errorThrown) {\r\n " +
" alert(\'Unable to remove component: \' + textStatus);\r\n " +
" }\r\n });\r\n }\r\n var removeComponent = function () {\r\n " +
" var componentRow = $(this).closest(\'tr\');\r\n var id = compo" +
"nentRow.attr(\'data-devicecomponentid\');\r\n if (id) {\r\n " +
"var dialog = $(\"#dialogConfirmRemove\");\r\n var buttons = dialog.di" +
"alog(\"option\", \"buttons\");\r\n buttons[\'Remove\'] = function () { re" +
"moveComponentConfirmed(id, componentRow); $(this).dialog(\"close\"); };\r\n " +
" var buttons = dialog.dialog(\"option\", \"buttons\", buttons);\r\n " +
" dialog.dialog(\'open\');\r\n } else {\r\n // New - Remove" +
"\r\n componentRow.remove();\r\n }\r\n }\r\n var " +
"updateComponent = function () {\r\n var componentRow = $(this).closest(" +
"\'tr\');\r\n componentRow.find(\'input\').attr(\'disabled\', true).addClass(\'" +
"updating\');\r\n\r\n var id = componentRow.attr(\'data-devicecomponentid\');" +
"\r\n if (id) {\r\n // Update\r\n var data = {" +
"\r\n id: id,\r\n Description: componentRow.fin" +
"d(\'input.description\').val(),\r\n Cost: componentRow.find(\'inpu" +
"t.cost\').val()\r\n };\r\n $.ajax({\r\n " +
" url: \'");
#line 100 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml"
Write(Url.Action(MVC.API.DeviceModel.ComponentUpdate()));
#line default
#line hidden
WriteLiteral(@"',
dataType: 'json',
type: 'POST',
data: data,
success: function (d) {
componentRow.find('input').attr('disabled', false).removeClass('updating');
if (d.Result == 'OK') {
componentRow.find('input.description').val(d.Component.Description);
componentRow.find('input.cost').val(d.Component.Cost);
} else {
alert('Unable to update component: ' + d.Result);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to update component: ' + textStatus);
}
});
} else {
// Add
id = componentRow.closest('table').attr('data-devicemodelid');
var data = {
id: id,
Description: componentRow.find('input.description').val(),
Cost: componentRow.find('input.cost').val()
};
$.ajax({
url: '");
#line 126 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml"
Write(Url.Action(MVC.API.DeviceModel.ComponentAdd(null, null, null)));
#line default
#line hidden
WriteLiteral(@"',
dataType: 'json',
type: 'POST',
data: data,
success: function (d) {
componentRow.find('input').attr('disabled', false).removeClass('updating');
if (d.Result == 'OK') {
componentRow.attr('data-devicecomponentid', d.Component.Id);
componentRow.find('input.description').val(d.Component.Description);
componentRow.find('input.cost').val(d.Component.Cost);
} else {
alert('Unable to add component: ' + d.Result);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to add component: ' + textStatus);
}
});
}
}
var editComponentJobTypes = function () {
var edit$this = $(this);
var componentRow = edit$this.closest('tr');
var id = componentRow.attr('data-devicecomponentid');
if (id) {
var data = {
id: id
};
$.ajax({
url: '");
#line 157 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml"
Write(Url.Action(MVC.API.DeviceModel.Component()));
#line default
#line hidden
WriteLiteral("\',\r\n dataType: \'json\',\r\n data: data,\r\n " +
" success: function (d) {\r\n componentRow.fin" +
"d(\'input\').attr(\'disabled\', false).removeClass(\'updating\');\r\n " +
" if (d.Result == \'OK\') {\r\n $dialogUpdateJobTypes " +
"= $(\'#dialogUpdateJobTypes\');\r\n $dialogUpdateJobTypes" +
".find(\'input:checked\').each(function () { $(this).attr(\'checked\', false) });\r\n " +
" for (var i = 0; i < d.Component.JobSubTypes.length; i+" +
"+) {\r\n var sjt = d.Component.JobSubTypes[i];\r\n " +
" $dialogUpdateJobTypes.find(\'#SubTypes_\' + sjt).attr" +
"(\'checked\', true);\r\n }\r\n $" +
"(\'#CheckboxBulkSelect_dialogUpdateJobTypes\').checkboxBulkSelect(\'update\');\r\n " +
" var buttons = $dialogUpdateJobTypes.dialog(\"option\", \"bu" +
"ttons\");\r\n buttons[\'Save\'] = function () {\r\n " +
" $dialogUpdateJobTypes.dialog(\"disable\");\r\n " +
" var selectedSJTs = [];\r\n $dialog" +
"UpdateJobTypes.find(\'input:checked\').each(function () { selectedSJTs.push($(this" +
").val()) });\r\n\r\n var data = {\r\n " +
" id: id,\r\n JobSubTypes: sele" +
"ctedSJTs\r\n };\r\n $." +
"ajax({\r\n url: \'");
#line 181 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml"
Write(Url.Action(MVC.API.DeviceModel.ComponentUpdateJobSubTypes()));
#line default
#line hidden
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
" type: \'POST\',\r\n traditional: tr" +
"ue,\r\n data: data,\r\n " +
" success: function (d) {\r\n if (d" +
".Result == \'OK\') {\r\n if (d.Component." +
"JobSubTypes.length > 0) {\r\n edit$" +
"this.addClass(\'editAlert\');\r\n } else " +
"{\r\n edit$this.removeClass(\'editAl" +
"ert\');\r\n }\r\n " +
" $dialogUpdateJobTypes.dialog(\"enable\");\r\n " +
" $dialogUpdateJobTypes.dialog(\"close\");\r\n " +
" } else {\r\n al" +
"ert(\'Unable to update component sub types: \' + d.Result);\r\n " +
" }\r\n },\r\n " +
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
" alert(\'Unable to update component sub types: \' + t" +
"extStatus);\r\n }\r\n " +
" });\r\n };\r\n var buttons" +
" = $dialogUpdateJobTypes.dialog(\"option\", \"buttons\", buttons);\r\n " +
" $dialogUpdateJobTypes.dialog(\'open\');\r\n } els" +
"e {\r\n alert(\'Unable to load component: \' + d.Result);" +
"\r\n }\r\n },\r\n error: " +
"function (jqXHR, textStatus, errorThrown) {\r\n alert(\'Unab" +
"le to load component: \' + textStatus);\r\n }\r\n }" +
");\r\n }\r\n\r\n }\r\n\r\n $(\"#dialogConfirmRemove\").dialog({\r\n " +
" resizable: false,\r\n height: 140,\r\n modal: true,\r" +
"\n autoOpen: false,\r\n buttons: {\r\n \"Remove\":" +
" function () {\r\n $(this).dialog(\"close\");\r\n }," +
"\r\n Cancel: function () {\r\n $(this).dialog(\"clo" +
"se\");\r\n }\r\n }\r\n });\r\n\r\n $(\'#dialogUpdate" +
"JobTypes\').dialog({\r\n resizable: false,\r\n modal: true,\r\n " +
" autoOpen: false,\r\n width: 550,\r\n buttons: {\r\n " +
" \"Save\": function () {\r\n $(this).dialog(\"close\");" +
"\r\n },\r\n Cancel: function () {\r\n " +
" $(this).dialog(\"close\");\r\n }\r\n }\r\n });\r\n\r\n " +
" $(\'#CheckboxBulkSelect_dialogUpdateJobTypes\').checkboxBulkSelect({ parentSel" +
"ector: \'div\' });\r\n\r\n $deviceComponents.find(\'input\').live(\'change\', updat" +
"eComponent).focus(function () { $(this).select() });\r\n $deviceComponents." +
"find(\'span.remove\').live(\'click\', removeComponent);\r\n $deviceComponents.f" +
"ind(\'span.edit\').live(\'click\', editComponentJobTypes);\r\n\r\n });\r\n</script>\r\n<d" +
"iv");
WriteLiteral(" id=\"dialogUpdateJobTypes\"");
WriteLiteral(" title=\"Update Job Types\"");
WriteLiteral(">\r\n <div>\r\n <h2>\r\n Hardware Non-Warranty Job Types</h2>\r\n");
WriteLiteral(" ");
#line 260 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml"
Write(CommonHelpers.CheckBoxList("SubTypes", Model.JobSubTypes.ToSelectListItems(), 2));
#line default
#line hidden
WriteLiteral("\r\n <br />\r\n <span");
WriteLiteral(" id=\"CheckboxBulkSelect_dialogUpdateJobTypes\"");
WriteLiteral(" class=\"checkboxBulkSelectContainer\"");
WriteLiteral(">\r\n </span>\r\n </div>\r\n</div>\r\n<div");
WriteLiteral(" id=\"dialogConfirmRemove\"");
WriteLiteral(" title=\"Delete this Component?\"");
WriteLiteral(">\r\n <p>\r\n <span");
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
WriteLiteral(" style=\"float: left; margin: 0 7px 20px 0;\"");
WriteLiteral("></span>\r\n This item will be permanently deleted and cannot be recovered. " +
"Are you sure?</p>\r\n</div>\r\n");
}
}
}
#pragma warning restore 1591