diff --git a/Disco.BI/BI/Extensions/DeviceExtensions.cs b/Disco.BI/BI/Extensions/DeviceExtensions.cs index ae611ca7..bed7ff3d 100644 --- a/Disco.BI/BI/Extensions/DeviceExtensions.cs +++ b/Disco.BI/BI/Extensions/DeviceExtensions.cs @@ -223,6 +223,17 @@ namespace Disco.BI.Extensions return r.Value.ReasonMessage(); } + public static string StatusCode(this Device Device) + { + if (Device.DecommissionedDate.HasValue) + return "Decommissioned"; + + if (!Device.EnrolledDate.HasValue) + return "NotEnrolled"; + + return "Active"; + } + public static string Status(this Device Device) { if (Device.DecommissionedDate.HasValue) diff --git a/Disco.Web/App_Code/AjaxHelpers.cshtml b/Disco.Web/App_Code/AjaxHelpers.cshtml index 2f49ec43..cedbe674 100644 --- a/Disco.Web/App_Code/AjaxHelpers.cshtml +++ b/Disco.Web/App_Code/AjaxHelpers.cshtml @@ -3,30 +3,27 @@ @using Disco.Web; @using Disco.Services.Web; @helper AjaxLoader(string id = null) - { - Html.GetPageHelper().BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons"); - +{ + Html.GetPageHelper().BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons"); + } @helper AjaxSave() - { - Html.GetPageHelper().BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons"); - +{ + } @helper AjaxRemove() - { - Html.GetPageHelper().BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons"); - +{ + } @helper JsonDate(DateTime? date) +{ + if (date.HasValue) { - if (date.HasValue) - { - var d = date.Value; + var d = date.Value; @(new HtmlString(string.Format("new Date({0}, {1}, {2}, {3}, {4}, {5})", d.Year, d.Month - 1, d.Day, d.Hour, d.Minute, d.Second))) - } - else - { + } + else + { @(new HtmlString("null")) - } + } } \ No newline at end of file diff --git a/Disco.Web/App_Code/AjaxHelpers.generated.cs b/Disco.Web/App_Code/AjaxHelpers.generated.cs index cb0a9a50..9c7974a2 100644 --- a/Disco.Web/App_Code/AjaxHelpers.generated.cs +++ b/Disco.Web/App_Code/AjaxHelpers.generated.cs @@ -47,47 +47,47 @@ namespace Disco.Web { public static System.Web.WebPages.HelperResult AjaxLoader(string id = null) - { +{ return new System.Web.WebPages.HelperResult(__razor_helper_writer => { #line 6 "..\..\App_Code\AjaxHelpers.cshtml" - - Html.GetPageHelper().BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons"); + + Html.GetPageHelper().BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons"); #line default #line hidden -WriteLiteralTo(@__razor_helper_writer, " "); +WriteLiteralTo(@__razor_helper_writer, " class=\"ajaxLoading\" title=\"Loading...\">"); -WriteLiteralTo(@__razor_helper_writer, "\r\n"); +WriteLiteralTo(@__razor_helper_writer, " class=\"fa fa-check fa-lg hidden ajaxOk\" title=\"Ok\">\r\n"); -#line 10 "..\..\App_Code\AjaxHelpers.cshtml" +#line 9 "..\..\App_Code\AjaxHelpers.cshtml" #line default #line hidden @@ -98,23 +98,23 @@ WriteLiteralTo(@__razor_helper_writer, " class=\"ajaxHelperIcon ajaxOk\"\r\n public static System.Web.WebPages.HelperResult AjaxSave() - { +{ return new System.Web.WebPages.HelperResult(__razor_helper_writer => { -#line 12 "..\..\App_Code\AjaxHelpers.cshtml" - - Html.GetPageHelper().BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons"); +#line 11 "..\..\App_Code\AjaxHelpers.cshtml" + #line default #line hidden -WriteLiteralTo(@__razor_helper_writer, " \r\n"); +WriteLiteralTo(@__razor_helper_writer, " " + +"\r\n"); -#line 15 "..\..\App_Code\AjaxHelpers.cshtml" +#line 13 "..\..\App_Code\AjaxHelpers.cshtml" #line default #line hidden @@ -125,23 +125,22 @@ WriteLiteralTo(@__razor_helper_writer, " { -#line 17 "..\..\App_Code\AjaxHelpers.cshtml" - - Html.GetPageHelper().BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons"); +#line 15 "..\..\App_Code\AjaxHelpers.cshtml" + #line default #line hidden -WriteLiteralTo(@__razor_helper_writer, " \r\n"); +WriteLiteralTo(@__razor_helper_writer, " \r\n"); -#line 20 "..\..\App_Code\AjaxHelpers.cshtml" +#line 17 "..\..\App_Code\AjaxHelpers.cshtml" #line default #line hidden @@ -152,48 +151,48 @@ WriteLiteralTo(@__razor_helper_writer, " { -#line 22 "..\..\App_Code\AjaxHelpers.cshtml" - - if (date.HasValue) - { - var d = date.Value; +#line 19 "..\..\App_Code\AjaxHelpers.cshtml" + + if (date.HasValue) + { + var d = date.Value; #line default #line hidden -#line 26 "..\..\App_Code\AjaxHelpers.cshtml" +#line 23 "..\..\App_Code\AjaxHelpers.cshtml" WriteTo(@__razor_helper_writer, new HtmlString(string.Format("new Date({0}, {1}, {2}, {3}, {4}, {5})", d.Year, d.Month - 1, d.Day, d.Hour, d.Minute, d.Second))); #line default #line hidden -#line 26 "..\..\App_Code\AjaxHelpers.cshtml" +#line 23 "..\..\App_Code\AjaxHelpers.cshtml" - } - else - { + } + else + { #line default #line hidden -#line 30 "..\..\App_Code\AjaxHelpers.cshtml" +#line 27 "..\..\App_Code\AjaxHelpers.cshtml" WriteTo(@__razor_helper_writer, new HtmlString("null")); #line default #line hidden -#line 30 "..\..\App_Code\AjaxHelpers.cshtml" +#line 27 "..\..\App_Code\AjaxHelpers.cshtml" - } + } #line default #line hidden diff --git a/Disco.Web/Areas/Config/Views/AuthorizationRole/Show.cshtml b/Disco.Web/Areas/Config/Views/AuthorizationRole/Show.cshtml index 759c05e2..c0e99021 100644 --- a/Disco.Web/Areas/Config/Views/AuthorizationRole/Show.cshtml +++ b/Disco.Web/Areas/Config/Views/AuthorizationRole/Show.cshtml @@ -50,11 +50,11 @@ var displayName = sg.Id == sg.Name ? sg.Id : string.Format("{0} [{1}]", sg.Name, sg.Id);
  • @if (sg.IsGroup) { - @displayName + @displayName } else { - @displayName + @displayName }
  • } @@ -67,7 +67,15 @@ @@ -168,9 +176,17 @@ }).done(function(response){ if (response){ if (list.find('li[data-subjectid="'+response.Id+'"]').length == 0){ + + var liIcon = $('').addClass('fa fa-lg'); + if (response.Type === 'user') + liIcon.addClass('fa-user'); + else + liIcon.addClass('fa-users'); + var li = $('
  • ') + .append(liIcon) .append($('').text(response.Id == response.Name ? response.Id : response.Name + ' [' + response.Id + ']')) - .append($('').addClass('remove')) + .append($('').addClass('fa fa-times-circle remove')) .addClass(response.Type) .attr('data-subjectid', response.Id) .attr('data-subjectstatus', 'new'); @@ -292,7 +308,7 @@ @Html.ActionLinkButton("Delete", MVC.API.AuthorizationRole.Delete(Model.Token.Role.Id, true), "Config_AuthRoles_Actions_Delete_Button")

    - + This item will be permanently deleted and cannot be recovered.

    Are you sure? diff --git a/Disco.Web/Areas/Config/Views/AuthorizationRole/Show.generated.cs b/Disco.Web/Areas/Config/Views/AuthorizationRole/Show.generated.cs index afe949ae..97a02982 100644 --- a/Disco.Web/Areas/Config/Views/AuthorizationRole/Show.generated.cs +++ b/Disco.Web/Areas/Config/Views/AuthorizationRole/Show.generated.cs @@ -206,20 +206,32 @@ WriteLiteral(">"); #line 51 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" if (sg.IsGroup) { - + + + #line default + #line hidden +WriteLiteral("
    "); + + + #line 53 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" + #line default #line hidden #line 53 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" - Write(displayName); + Write(displayName); #line default #line hidden #line 53 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" - + } else { @@ -229,22 +241,26 @@ WriteLiteral(">"); #line hidden WriteLiteral(" (Url.Action(MVC.User.Show(sg.Id)) + , Tuple.Create(Tuple.Create("", 2764), Tuple.Create(Url.Action(MVC.User.Show(sg.Id)) #line default #line hidden -, 2731), false) -, Tuple.Create(Tuple.Create("", 2766), Tuple.Create("#UserDetailTab-Authorization", 2766), true) +, 2764), false) +, Tuple.Create(Tuple.Create("", 2799), Tuple.Create("#UserDetailTab-Authorization", 2799), true) ); -WriteLiteral(">"); +WriteLiteral(">
    "); #line 57 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" - Write(displayName); + Write(displayName); #line default @@ -319,26 +335,27 @@ WriteLiteral(">\r\n"); #line 68 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" foreach (var sg in Model.Subjects) { + var displayName = sg.Id == sg.Name ? sg.Id : string.Format("{0} [{1}]", sg.Name, sg.Id); #line default #line hidden WriteLiteral(" (sg.IsGroup ? "group" : "user" + #line 71 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" +, Tuple.Create(Tuple.Create("", 3886), Tuple.Create(sg.IsGroup ? "group" : "user" #line default #line hidden -, 3695), false) +, 3886), false) ); WriteLiteral(" data-subjectid=\""); - #line 70 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" + #line 71 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" Write(sg.Id); @@ -349,20 +366,76 @@ WriteLiteral("\""); WriteLiteral(">"); - #line 70 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" - Write(sg.Id == sg.Name ? sg.Id : string.Format("{0} [{1}]", sg.Name, sg.Id)); + #line 71 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" + if (sg.IsGroup) + { #line default #line hidden -WriteLiteral("

  • \r\n"); +WriteLiteral(">"); - #line 71 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" + #line 73 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" + + + #line default + #line hidden + + #line 73 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" + Write(displayName); + + + #line default + #line hidden + + #line 73 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" + + } + else + { + + + #line default + #line hidden +WriteLiteral(" "); + + + #line 77 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" + + + #line default + #line hidden + + #line 77 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" + Write(displayName); + + + #line default + #line hidden + + #line 77 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" + + } + + #line default + #line hidden +WriteLiteral("\r\n"); + + + #line 79 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" } @@ -391,14 +464,14 @@ WriteLiteral(">Add\r\n \r\n WriteLiteral(" id=\"Config_AuthRoles_Subjects_Update_Dialog_Form\""); -WriteAttribute("action", Tuple.Create(" action=\"", 4386), Tuple.Create("\"", 4483) +WriteAttribute("action", Tuple.Create(" action=\"", 5163), Tuple.Create("\"", 5260) - #line 78 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" - , Tuple.Create(Tuple.Create("", 4395), Tuple.Create(Url.Action(MVC.API.AuthorizationRole.UpdateSubjects(Model.Token.Role.Id, null, true)) + #line 86 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" + , Tuple.Create(Tuple.Create("", 5172), Tuple.Create(Url.Action(MVC.API.AuthorizationRole.UpdateSubjects(Model.Token.Role.Id, null, true)) #line default #line hidden -, 4395), false) +, 5172), false) ); WriteLiteral(" method=\"post\""); @@ -425,7 +498,7 @@ WriteLiteral(">\r\n \r\n \')\r\n " + -" .append($(\'\').text(response.Id " + -"== response.Name ? response.Id : response.Name + \' [\' + response.Id + \']\'))\r\n " + -" .append($(\'\').addClass(\'remo" + -"ve\'))\r\n .addClass(response.Type)\r" + -"\n .attr(\'data-subjectid\', respons" + -"e.Id)\r\n .attr(\'data-subjectstatus" + -"\', \'new\');\r\n\r\n list.append(li);\r\n\r\n " + -" updateNoSubjects(); " + -" \r\n }else{\r\n " + -" alert(\'That subject has already been added\');" + -"\r\n }\r\n " + -" }else{\r\n alert(\'Unknown Id\');\r\n " + -" }\r\n }).fail(function(j" + -"qXHR, textStatus, errorThrown){\r\n alert(\'Erro" + -"r: \' + errorThrown);\r\n });\r\n " + -" }\r\n\r\n function updateNoSubjects(){\r\n " + -" if (list.find(\'li:visible\').length > 0)\r\n " + -" noSubjects.hide();\r\n else\r" + -"\n noSubjects.show();\r\n " + -" }\r\n\r\n function saveChanges(){\r\n " + -" var form = $(\'#Config_AuthRoles_Subjects_Update_Dialog_Form\').emp" + -"ty();\r\n\r\n list.find(\'li[data-subjectstatus!=\"remo" + -"ved\"]\').each(function(){\r\n var subjectId = $(" + -"this).attr(\'data-subjectid\');\r\n \r\n " + -" form.append($(\'\').attr({\r\n " + -" \'name\': \'Subjects\',\r\n \'" + -"type\': \'hidden\'\r\n }).val(subjectId));\r\n\r\n " + -" }).get();\r\n\r\n form.su" + -"bmit();\r\n\r\n dialog.dialog(\"disable\");\r\n " + -" dialog.dialog(\"option\", \"buttons\", null);\r\n " + -" }\r\n\r\n $(function(){\r\n " + -" $(\'#Config_AuthRoles_Subjects_Update\').click(showDialog);\r\n " + -" });\r\n\r\n })();\r\n \r\n \r\n \r\n \r\n \r" + -"\n \').addClass(\'fa fa-lg\');\r\n " + +" if (response.Type === \'user\')\r\n " + +" liIcon.addClass(\'fa-user\');\r\n " + +" else\r\n liIc" + +"on.addClass(\'fa-users\');\r\n\r\n var li =" + +" $(\'
  • \')\r\n .append(liIcon)\r\n " + +" .append($(\'\').text(response.I" + +"d == response.Name ? response.Id : response.Name + \' [\' + response.Id + \']\'))\r\n" + +" .append($(\'\').addClass(\'fa fa" + +"-times-circle remove\'))\r\n .addCla" + +"ss(response.Type)\r\n .attr(\'data-s" + +"ubjectid\', response.Id)\r\n .attr(\'" + +"data-subjectstatus\', \'new\');\r\n\r\n list" + +".append(li);\r\n\r\n updateNoSubjects(); " + +" \r\n " + +" }else{\r\n alert(\'That subject has alr" + +"eady been added\');\r\n }\r\n " + +" }else{\r\n alert(\'Unknow" + +"n Id\');\r\n }\r\n " + +"}).fail(function(jqXHR, textStatus, errorThrown){\r\n " + +" alert(\'Error: \' + errorThrown);\r\n });\r\n " + +" }\r\n\r\n function updateNoS" + +"ubjects(){\r\n if (list.find(\'li:visible\').length >" + +" 0)\r\n noSubjects.hide();\r\n " + +" else\r\n noSubjects.show();\r\n " + +" }\r\n\r\n function saveChanges(){\r" + +"\n var form = $(\'#Config_AuthRoles_Subjects_Update" + +"_Dialog_Form\').empty();\r\n\r\n list.find(\'li[data-su" + +"bjectstatus!=\"removed\"]\').each(function(){\r\n " + +"var subjectId = $(this).attr(\'data-subjectid\');\r\n " + +" \r\n form.append($(\'\').attr({\r\n " + +" \'name\': \'Subjects\',\r\n " + +" \'type\': \'hidden\'\r\n }).val(su" + +"bjectId));\r\n\r\n }).get();\r\n\r\n " + +" form.submit();\r\n\r\n dialog.dialog(\"disa" + +"ble\");\r\n dialog.dialog(\"option\", \"buttons\", null)" + +";\r\n }\r\n\r\n $(function(){\r\n " + +" $(\'#Config_AuthRoles_Subjects_Update\').click(show" + +"Dialog);\r\n });\r\n\r\n })();\r\n " + +" \r\n \r\n \r\n \r\n \r\n Save Changes"); - #line 232 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" + #line 248 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" Write(AjaxHelpers.AjaxLoader()); @@ -543,7 +622,7 @@ WriteLiteral("\r\n \r\n \r\n"); - #line 147 "..\..\Areas\Config\Views\Config\Index.cshtml" + #line 148 "..\..\Areas\Config\Views\Config\Index.cshtml" } diff --git a/Disco.Web/Areas/Config/Views/DeviceBatch/Show.cshtml b/Disco.Web/Areas/Config/Views/DeviceBatch/Show.cshtml index 2afd14a8..5dbd0672 100644 --- a/Disco.Web/Areas/Config/Views/DeviceBatch/Show.cshtml +++ b/Disco.Web/Areas/Config/Views/DeviceBatch/Show.cshtml @@ -134,7 +134,7 @@ { var missingCount = Model.DeviceBatch.UnitQuantity.Value - Model.DeviceCount;
    - + @Model.DeviceCount.ToString("n0") of @(Model.DeviceBatch.UnitQuantity.Value.ToString("n0")) purchased devices are managed by Disco. @missingCount.ToString("n0") @(missingCount == 1 ? "is" : "are") not managed.
    } diff --git a/Disco.Web/Areas/Config/Views/DeviceBatch/Show.generated.cs b/Disco.Web/Areas/Config/Views/DeviceBatch/Show.generated.cs index f55a2711..d957684d 100644 --- a/Disco.Web/Areas/Config/Views/DeviceBatch/Show.generated.cs +++ b/Disco.Web/Areas/Config/Views/DeviceBatch/Show.generated.cs @@ -504,13 +504,11 @@ WriteLiteral(" style=\"padding: 0.7em 0.7em; margin-top: 20px;\""); WriteLiteral(" class=\"ui-state-highlight ui-corner-all\""); -WriteLiteral(">\r\n \r\n
    \r\n"); +WriteLiteral(">\r\n"); WriteLiteral(" "); diff --git a/Disco.Web/Areas/Config/Views/DeviceModel/_DeviceComponentsTable.cshtml b/Disco.Web/Areas/Config/Views/DeviceModel/_DeviceComponentsTable.cshtml index a3f1e5e3..88fc1d52 100644 --- a/Disco.Web/Areas/Config/Views/DeviceModel/_DeviceComponentsTable.cshtml +++ b/Disco.Web/Areas/Config/Views/DeviceModel/_DeviceComponentsTable.cshtml @@ -29,10 +29,13 @@ - + + + + - + } @@ -47,7 +50,7 @@ var $deviceComponents = $('#deviceComponents'); $('#addDeviceComponent').click(function () { - var dc = $(''); + var dc = $(''); dc.find('input').focus(function () { $(this).select() }) dc.insertBefore($deviceComponents.find('tr').last()); dc.find('input.description').focus(); @@ -57,8 +60,8 @@ $deviceComponents.on('change', 'input', updateComponent); $deviceComponents.on('focus', 'input', function () { $(this).select(); }); - $deviceComponents.on('click', 'span.remove', removeComponent); - $deviceComponents.on('click', 'span.edit', editComponentJobTypes); + $deviceComponents.on('click', '.remove', removeComponent); + $deviceComponents.on('click', '.edit', editComponentJobTypes); function removeComponentConfirmed(id, row) { var data = { id: id }; @@ -194,9 +197,9 @@ success: function (d) { if (d.Result == 'OK') { if (d.Component.JobSubTypes.length > 0) { - edit$this.addClass('editAlert'); + edit$this.find('.fa-asterisk').removeClass('hidden'); } else { - edit$this.removeClass('editAlert'); + edit$this.find('.fa-asterisk').addClass('hidden'); } $dialogUpdateJobTypes.dialog("enable"); $dialogUpdateJobTypes.dialog("close"); @@ -266,7 +269,7 @@

    - + This item will be permanently deleted and cannot be recovered. Are you sure?

    diff --git a/Disco.Web/Areas/Config/Views/DeviceModel/_DeviceComponentsTable.generated.cs b/Disco.Web/Areas/Config/Views/DeviceModel/_DeviceComponentsTable.generated.cs index 580b792d..d322a95c 100644 --- a/Disco.Web/Areas/Config/Views/DeviceModel/_DeviceComponentsTable.generated.cs +++ b/Disco.Web/Areas/Config/Views/DeviceModel/_DeviceComponentsTable.generated.cs @@ -149,25 +149,36 @@ WriteAttribute("value", Tuple.Create(" value=\"", 1010), Tuple.Create("\"", 1042 WriteLiteral(" />\r\n \r\n \r\n \r\n \r\n (item.JobSubTypes.Count > 0 ? " editAlert" : string.Empty + #line 34 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" +, Tuple.Create(Tuple.Create("", 1271), Tuple.Create(item.JobSubTypes.Count == 0 ? " hidden" : string.Empty #line default #line hidden -, 1130), false) +, 1271), false) ); -WriteLiteral(">\r\n \r\n \r\n \r\n \r\n \r\n \r\n" + +" \r\n \r\n \r\n"); +WriteLiteral(">\r\n \r\n \r\n"); - #line 38 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" + #line 41 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" } @@ -194,7 +205,7 @@ WriteLiteral(@"> var $deviceComponents = $('#deviceComponents'); $('#addDeviceComponent').click(function () { - var dc = $(''); + var dc = $(''); dc.find('input').focus(function () { $(this).select() }) dc.insertBefore($deviceComponents.find('tr').last()); dc.find('input.description').focus(); @@ -204,8 +215,8 @@ WriteLiteral(@"> $deviceComponents.on('change', 'input', updateComponent); $deviceComponents.on('focus', 'input', function () { $(this).select(); }); - $deviceComponents.on('click', 'span.remove', removeComponent); - $deviceComponents.on('click', 'span.edit', editComponentJobTypes); + $deviceComponents.on('click', '.remove', removeComponent); + $deviceComponents.on('click', '.edit', editComponentJobTypes); function removeComponentConfirmed(id, row) { var data = { id: id }; @@ -213,7 +224,7 @@ WriteLiteral(@"> url: '"); - #line 66 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" + #line 69 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" Write(Url.Action(MVC.API.DeviceModel.ComponentRemove())); @@ -245,7 +256,7 @@ WriteLiteral("\',\r\n dataType: \'json\',\r\n " };\r\n $.ajax({\r\n url: \'"); - #line 108 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" + #line 111 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" Write(Url.Action(MVC.API.DeviceModel.ComponentUpdate())); @@ -280,7 +291,7 @@ WriteLiteral(@"', url: '"); - #line 134 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" + #line 137 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" Write(Url.Action(MVC.API.DeviceModel.ComponentAdd(null, null, null))); @@ -320,7 +331,7 @@ WriteLiteral(@"', url: '"); - #line 165 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" + #line 168 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" Write(Url.Action(MVC.API.DeviceModel.Component())); @@ -349,7 +360,7 @@ WriteLiteral("\',\r\n dataType: \'json\',\r\n " $.ajax({\r\n url: \'"); - #line 189 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" + #line 192 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" Write(Url.Action(MVC.API.DeviceModel.ComponentUpdateJobSubTypes())); @@ -361,40 +372,41 @@ WriteLiteral("\',\r\n dataType: \'json\', " 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(\'editAlert\');\r\n " + -" }\r\n $dialogUpdate" + -"JobTypes.dialog(\"enable\");\r\n $dia" + -"logUpdateJobTypes.dialog(\"close\");\r\n " + -"} else {\r\n alert(\'Unable to updat" + -"e 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: \' + textS" + -"tatus);\r\n }\r\n " + -" });\r\n };\r\n " + -" var buttons = $dialogUpdateJobTypes.dialog(\"option\", \"buttons\", buttons);\r\n " + -" $dialogUpdateJobTypes.dialog(\'open\');\r\n " + -" } else {\r\n alert(\'Unable to load c" + -"omponent: \' + d.Result);\r\n }\r\n " + -" },\r\n error: function (jqXHR, textStatus, errorThrown) {\r" + -"\n alert(\'Unable to load component: \' + textStatus);\r\n" + -" }\r\n });\r\n }\r\n\r\n " + -" }\r\n\r\n $(\"#dialogConfirmRemove\").dialog({\r\n resiza" + -"ble: false,\r\n height: 140,\r\n modal: true,\r\n " + -" autoOpen: false,\r\n buttons: {\r\n \"Remo" + -"ve\": 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 $(\'#dialogUpdateJobTypes\').dialog({\r\n resizab" + -"le: 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 $(t" + -"his).dialog(\"close\");\r\n }\r\n }\r\n });" + -"\r\n\r\n $(\'#CheckboxBulkSelect_dialogUpdateJobTypes\').checkboxBulkSelect" + -"({ parentSelector: \'div\' });\r\n });\r\n \r\n"); +" edit$this.find(\'.fa-asterisk\').removeClass(\'hidden\');" + +"\r\n } else {\r\n " + +" edit$this.find(\'.fa-asterisk\').addClass(\'hidden\'" + +");\r\n }\r\n " + +" $dialogUpdateJobTypes.dialog(\"enable\");\r\n " + +" $dialogUpdateJobTypes.dialog(\"close\");\r\n " + +" } else {\r\n " + +" alert(\'Unable to update component sub types: \' + d.Result);\r\n " + +" }\r\n " + +" },\r\n error: function (jqXHR, textStatus" + +", errorThrown) {\r\n alert(\'Unable to u" + +"pdate component sub types: \' + textStatus);\r\n " + +" }\r\n });\r\n " + +" };\r\n var buttons = $dialogUpdateJobTypes.dialog(" + +"\"option\", \"buttons\", buttons);\r\n $dialogUpdateJob" + +"Types.dialog(\'open\');\r\n } else {\r\n " + +" alert(\'Unable to load component: \' + d.Result);\r\n " + +" }\r\n },\r\n error: function" + +" (jqXHR, textStatus, errorThrown) {\r\n alert(\'Unable t" + +"o load component: \' + textStatus);\r\n }\r\n " + +" });\r\n }\r\n\r\n }\r\n\r\n $(\"#dialogConfirmRemov" + +"e\").dialog({\r\n resizable: false,\r\n height: 140,\r\n " + +" modal: true,\r\n autoOpen: false,\r\n b" + +"uttons: {\r\n \"Remove\": function () {\r\n " + +"$(this).dialog(\"close\");\r\n },\r\n Cancel: fu" + +"nction () {\r\n $(this).dialog(\"close\");\r\n " + +" }\r\n }\r\n });\r\n\r\n $(\'#dialogUpdateJobTypes" + +"\').dialog({\r\n resizable: false,\r\n modal: true,\r\n " + +" autoOpen: false,\r\n width: 550,\r\n but" + +"tons: {\r\n \"Save\": function () {\r\n $(th" + +"is).dialog(\"close\");\r\n },\r\n Cancel: functi" + +"on () {\r\n $(this).dialog(\"close\");\r\n }" + +"\r\n }\r\n });\r\n\r\n $(\'#CheckboxBulkSelect_dialo" + +"gUpdateJobTypes\').checkboxBulkSelect({ parentSelector: \'div\' });\r\n });\r\n " + +" \r\n"); WriteLiteral(" \r\n
    \r\n

    Hardware Non-Warranty Job Ty WriteLiteral(" "); - #line 262 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" + #line 265 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" Write(CommonHelpers.CheckBoxList("SubTypes", Model.JobSubTypes.ToSelectListItems(), 2)); @@ -427,17 +439,15 @@ WriteLiteral(" id=\"dialogConfirmRemove\""); WriteLiteral(" title=\"Delete this Component?\""); -WriteLiteral(">\r\n

    \r\n \r\n

    \r\n \r\n This item will be permanently deleted and cannot be recover" + -"ed. Are you sure?\r\n

    \r\n

    \r\n"); +WriteLiteral(">\r\n This item will be permanently deleted and cannot be recovered." + +" Are you sure?\r\n

    \r\n \r\n"); - #line 273 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" + #line 276 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" } else { @@ -452,7 +462,7 @@ WriteLiteral(" id=\"deviceComponents\""); WriteLiteral(" data-devicemodelid=\""); - #line 276 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" + #line 279 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" Write(Model.DeviceModelId.HasValue ? Model.DeviceModelId.Value.ToString() : string.Empty); @@ -465,13 +475,13 @@ WriteLiteral(">\r\n \r\n Description\r\n \r\n"); - #line 285 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" + #line 288 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" #line default #line hidden - #line 285 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" + #line 288 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" foreach (var item in Model.DeviceComponents) { @@ -483,7 +493,7 @@ WriteLiteral(" \r\n \r\n"); WriteLiteral(" "); - #line 289 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" + #line 292 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" Write(item.Description); @@ -507,7 +517,7 @@ WriteLiteral("\r\n \r\n \r\n"); WriteLiteral(" "); - #line 292 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" + #line 295 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" Write(item.Cost.ToString("C")); @@ -516,13 +526,13 @@ WriteLiteral(" "); WriteLiteral("\r\n \r\n \r\n"); - #line 295 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" + #line 298 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" #line default #line hidden - #line 295 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" + #line 298 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" if (item.JobSubTypes.Count > 0) { @@ -532,13 +542,13 @@ WriteLiteral("\r\n \r\n \r\n"); WriteLiteral("
      \r\n"); - #line 298 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" + #line 301 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" #line default #line hidden - #line 298 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" + #line 301 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" foreach (var jst in item.JobSubTypes) { @@ -548,7 +558,7 @@ WriteLiteral("
        \r\n"); WriteLiteral("
      • "); - #line 300 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" + #line 303 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" Write(jst.Description); @@ -557,7 +567,7 @@ WriteLiteral("
      • "); WriteLiteral("
      • \r\n"); - #line 301 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" + #line 304 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" } @@ -566,7 +576,7 @@ WriteLiteral("\r\n"); WriteLiteral("
      \r\n"); - #line 303 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" + #line 306 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" } else { @@ -581,7 +591,7 @@ WriteLiteral(" class=\"smallMessage\""); WriteLiteral("><None Specified>\r\n"); - #line 307 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" + #line 310 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" } @@ -590,7 +600,7 @@ WriteLiteral("><None Specified>\r\n"); WriteLiteral(" \r\n \r\n"); - #line 310 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" + #line 313 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" } @@ -599,7 +609,7 @@ WriteLiteral(" \r\n \r\n"); WriteLiteral(" \r\n"); - #line 312 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" + #line 315 "..\..\Areas\Config\Views\DeviceModel\_DeviceComponentsTable.cshtml" } #line default diff --git a/Disco.Web/Areas/Config/Views/DeviceProfile/Show.cshtml b/Disco.Web/Areas/Config/Views/DeviceProfile/Show.cshtml index 737bd4c6..e4479470 100644 --- a/Disco.Web/Areas/Config/Views/DeviceProfile/Show.cshtml +++ b/Disco.Web/Areas/Config/Views/DeviceProfile/Show.cshtml @@ -693,7 +693,7 @@ {

      - + This item will be permanently deleted and cannot be recovered. Are you sure?

      diff --git a/Disco.Web/Areas/Config/Views/DeviceProfile/Show.generated.cs b/Disco.Web/Areas/Config/Views/DeviceProfile/Show.generated.cs index fc9cb7af..a072b91a 100644 --- a/Disco.Web/Areas/Config/Views/DeviceProfile/Show.generated.cs +++ b/Disco.Web/Areas/Config/Views/DeviceProfile/Show.generated.cs @@ -1950,14 +1950,12 @@ WriteLiteral(" id=\"dialogConfirmDelete\""); WriteLiteral(" title=\"Delete this Device Profile?\""); -WriteLiteral(">\r\n

      \r\n \r\n

      \r\n \r\n This item will be permanently deleted and cannot be recover" + -"ed. Are you sure?\r\n

      \r\n \r\n"); +WriteLiteral(">\r\n This item will be permanently deleted and cannot be recovered." + +" Are you sure?\r\n

      \r\n \r\n"); WriteLiteral("