From e7ff62afc721f24bda8a638ebcfcf2f7c4f92abb Mon Sep 17 00:00:00 2001 From: Gary Sharp Date: Tue, 2 Apr 2013 14:03:23 +1100 Subject: [PATCH] Update: Support Ajax and Form Post for All HNWAR --- Disco.BI/Properties/AssemblyInfo.cs | 4 +- Disco.Client/Properties/AssemblyInfo.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- Disco.Data/Properties/AssemblyInfo.cs | 4 +- Disco.Models/Properties/AssemblyInfo.cs | 4 +- Disco.Services/Properties/AssemblyInfo.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- .../Modules/Disco-PropertyChangeHelpers.js | 509 ++++++++++------- .../Disco-PropertyChangeHelpers.min.js | 2 +- .../Disco-PropertyChangeHelpers.min.js.map | 4 +- .../disco.propertychangehelpers.js | 511 +++++++++++------- Disco.Web/Properties/AssemblyInfo.cs | 4 +- Disco.Web/Views/Job/JobParts/Insurance.cshtml | 18 +- .../Views/Job/JobParts/Insurance.generated.cs | 193 +++---- .../Job/JobParts/NonWarrantyFinance.cshtml | 148 +---- .../JobParts/NonWarrantyFinance.generated.cs | 181 ++----- Disco.Web/Views/Job/JobParts/Repairs.cshtml | 42 +- .../Views/Job/JobParts/Repairs.generated.cs | 106 ++-- Disco.sln | 12 +- 19 files changed, 879 insertions(+), 879 deletions(-) diff --git a/Disco.BI/Properties/AssemblyInfo.cs b/Disco.BI/Properties/AssemblyInfo.cs index c77511df..c4a772ed 100644 --- a/Disco.BI/Properties/AssemblyInfo.cs +++ b/Disco.BI/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.0328.1100")] -[assembly: AssemblyFileVersion("1.2.0328.1100")] +[assembly: AssemblyVersion("1.2.0401.1659")] +[assembly: AssemblyFileVersion("1.2.0401.1659")] diff --git a/Disco.Client/Properties/AssemblyInfo.cs b/Disco.Client/Properties/AssemblyInfo.cs index d5ec2803..5eb77702 100644 --- a/Disco.Client/Properties/AssemblyInfo.cs +++ b/Disco.Client/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.0328.1059")] -[assembly: AssemblyFileVersion("1.2.0328.1059")] +[assembly: AssemblyVersion("1.2.0401.1659")] +[assembly: AssemblyFileVersion("1.2.0401.1659")] diff --git a/Disco.ClientBootstrapper/Properties/AssemblyInfo.cs b/Disco.ClientBootstrapper/Properties/AssemblyInfo.cs index ff1eec57..0e22d120 100644 --- a/Disco.ClientBootstrapper/Properties/AssemblyInfo.cs +++ b/Disco.ClientBootstrapper/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.0328.1059")] -[assembly: AssemblyFileVersion("1.2.0328.1059")] +[assembly: AssemblyVersion("1.2.0401.1659")] +[assembly: AssemblyFileVersion("1.2.0401.1659")] diff --git a/Disco.Data/Properties/AssemblyInfo.cs b/Disco.Data/Properties/AssemblyInfo.cs index cf9a03ec..a62e2986 100644 --- a/Disco.Data/Properties/AssemblyInfo.cs +++ b/Disco.Data/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.0328.1100")] -[assembly: AssemblyFileVersion("1.2.0328.1100")] +[assembly: AssemblyVersion("1.2.0401.1659")] +[assembly: AssemblyFileVersion("1.2.0401.1659")] diff --git a/Disco.Models/Properties/AssemblyInfo.cs b/Disco.Models/Properties/AssemblyInfo.cs index fd9bc625..d1311276 100644 --- a/Disco.Models/Properties/AssemblyInfo.cs +++ b/Disco.Models/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.0328.1100")] -[assembly: AssemblyFileVersion("1.2.0328.1100")] +[assembly: AssemblyVersion("1.2.0401.1659")] +[assembly: AssemblyFileVersion("1.2.0401.1659")] diff --git a/Disco.Services/Properties/AssemblyInfo.cs b/Disco.Services/Properties/AssemblyInfo.cs index e4a1f5d4..7f7018f7 100644 --- a/Disco.Services/Properties/AssemblyInfo.cs +++ b/Disco.Services/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.0328.1100")] -[assembly: AssemblyFileVersion("1.2.0328.1100")] +[assembly: AssemblyVersion("1.2.0401.1659")] +[assembly: AssemblyFileVersion("1.2.0401.1659")] diff --git a/Disco.Web.Extensions/Properties/AssemblyInfo.cs b/Disco.Web.Extensions/Properties/AssemblyInfo.cs index b3122b3e..f102b8f7 100644 --- a/Disco.Web.Extensions/Properties/AssemblyInfo.cs +++ b/Disco.Web.Extensions/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.0328.1100")] -[assembly: AssemblyFileVersion("1.2.0328.1100")] +[assembly: AssemblyVersion("1.2.0401.1659")] +[assembly: AssemblyFileVersion("1.2.0401.1659")] diff --git a/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.js b/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.js index 203f8056..32bfe0fb 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.js +++ b/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.js @@ -1,198 +1,327 @@ ///#source 1 1 /ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers/disco.propertychangehelpers.js if (!document.DiscoFunctions) { - document.DiscoFunctions = {}; + document.DiscoFunctions = {}; +} +if (!document.DiscoFunctions.PropertyChangeHelper) { + document.DiscoFunctions.PropertyValue = function (PropertyField) { + if (PropertyField[0].nodeName.toLowerCase() == 'input' && PropertyField.attr('type') == 'checkbox') { + return PropertyField.is(':checked'); + } + return PropertyField.val(); + }; + document.DiscoFunctions.PropertyChangeHelper = function (PropertyField, FieldWatermark, UpdateUrl, UpdatePropertyName) { + var fieldValue = document.DiscoFunctions.PropertyValue(PropertyField); + var fieldChangeToken = null; + var $ajaxSave = PropertyField.nextAll('.ajaxSave').first(); + var $ajaxLoading = PropertyField.nextAll('.ajaxLoading').first(); + var fieldChangeFunction = function () { + $ajaxSave.hide(); + var changedValue = document.DiscoFunctions.PropertyValue(PropertyField); + if (fieldValue != changedValue) { + fieldValue = changedValue; + if (fieldChangeToken) + window.clearTimeout(fieldChangeToken); + fieldChangeToken = window.setTimeout(function () { + $ajaxLoading.show(); + var data = {}; + data[UpdatePropertyName] = fieldValue; + $.getJSON(UpdateUrl, data, function (response, result) { + if (result != 'success' || response != 'OK') { + alert('Unable to change property "' + UpdatePropertyName + '":\n' + response); + $ajaxLoading.hide(); + } else { + $ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); + } + }) + fieldChangeToken = null; + }, 500); + }; + } + if (PropertyField[0].nodeName.toLowerCase() == 'input' && PropertyField.attr('type') == 'checkbox') { + PropertyField.click(fieldChangeFunction); + } else { + PropertyField.change(fieldChangeFunction); + } + // For Input Text Boxes + if (PropertyField[0].nodeName.toLowerCase() == 'input' && PropertyField.attr('type') == 'text') { + PropertyField.keydown(function (e) { + $ajaxSave.show(); + if (e.which == 13) { + $(this).blur(); + } + }) + .watermark(FieldWatermark) + .blur(function () { + $ajaxSave.hide(); + }).focus(function () { + $(this).select(); + }); + } + // For TextAreas + if (PropertyField[0].nodeName.toLowerCase() == 'textarea') { + PropertyField.keydown(function () { + $ajaxSave.show(); + }) + } } - if (!document.DiscoFunctions.PropertyChangeHelper){ - document.DiscoFunctions.PropertyValue = function(PropertyField){ - if (PropertyField[0].nodeName.toLowerCase()=='input' && PropertyField.attr('type')=='checkbox'){ - return PropertyField.is(':checked'); - } - return PropertyField.val(); - }; - document.DiscoFunctions.PropertyChangeHelper = function (PropertyField, FieldWatermark, UpdateUrl, UpdatePropertyName) { - var fieldValue = document.DiscoFunctions.PropertyValue(PropertyField); - var fieldChangeToken = null; - var $ajaxSave = PropertyField.nextAll('.ajaxSave').first(); - var $ajaxLoading = PropertyField.nextAll('.ajaxLoading').first(); - var fieldChangeFunction = function(){ - $ajaxSave.hide(); - var changedValue = document.DiscoFunctions.PropertyValue(PropertyField); - if (fieldValue != changedValue){ - fieldValue = changedValue; - if (fieldChangeToken) - window.clearTimeout(fieldChangeToken); - fieldChangeToken = window.setTimeout(function(){ - $ajaxLoading.show(); - var data = {}; - data[UpdatePropertyName] = fieldValue; - $.getJSON(UpdateUrl, data, function (response, result) { - if (result != 'success' || response != 'OK') { - alert('Unable to change property "' + UpdatePropertyName + '":\n' + response); - $ajaxLoading.hide(); - } else { - $ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); - } - }) - fieldChangeToken = null; - }, 500); - }; - } - if (PropertyField[0].nodeName.toLowerCase()=='input' && PropertyField.attr('type')=='checkbox'){ - PropertyField.click(fieldChangeFunction); - }else{ - PropertyField.change(fieldChangeFunction); - } - // For Input Text Boxes - if (PropertyField[0].nodeName.toLowerCase()=='input' && PropertyField.attr('type')=='text'){ - PropertyField.keydown(function(e){ - $ajaxSave.show(); - if (e.which == 13) { - $(this).blur(); - } - }) - .watermark(FieldWatermark) - .blur(function () { - $ajaxSave.hide(); - }).focus(function(){ - $(this).select(); - }); - } - // For TextAreas - if (PropertyField[0].nodeName.toLowerCase()=='textarea'){ - PropertyField.keydown(function(){ - $ajaxSave.show(); - }) - } - } - }; - if (!document.DiscoFunctions.DateChangeUserHelper){ - document.DiscoFunctions.DateChangeUserHelper = function (DateField, UserField, DateFieldWatermark, UpdateUrl, UpdatePropertyName, minDate, dateOnly) { - var dateFieldValue = DateField.val(); - var dateFieldChangeToken = null; - var $ajaxLoading = UserField.next('.ajaxLoading'); - DateField - .watermark(DateFieldWatermark) - .change(function(){ - var dateText = DateField.val(); - if (dateFieldValue.toLowerCase() != dateText.toLowerCase()){ - dateFieldValue = dateText; - if (dateFieldChangeToken) - window.clearTimeout(dateFieldChangeToken); - dateFieldChangeToken = window.setTimeout(function(){ - $ajaxLoading.show(); - var data = {}; - data[UpdatePropertyName] = dateFieldValue; - $.getJSON(UpdateUrl, data, function (response, result) { - if (result != 'success' || response.Result != 'OK') { - alert('Unable to change Date:\n' + response); - $ajaxLoading.hide(); - } else { - UserField.text('by ' + response.UserDescription); - $ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); - } - }) - dateFieldChangeToken = null; - }, 500); - } - }).focus(function(){ - $(this).select(); - }); - - if (dateOnly){ - DateField.datepicker({ - defaultDate: new Date(), - minDate: minDate, - changeYear: true, - changeMonth: true, - dateFormat: 'yy/mm/dd', - beforeShow: function(input, inst){ - $input = $(input); - if (!$input.val()){ - $input.datepicker('setDate', new Date()); - } - } - }); - }else{ - DateField.datetimepicker({ - defaultDate: new Date(), - ampm: true, - minDate: minDate, - changeYear: true, - changeMonth: true, - dateFormat: 'yy/mm/dd', - beforeShow: function(input, inst){ - $input = $(input); - if (!$input.val()){ - $input.datetimepicker('setDate', new Date()); - } - } - }); - } - - } - }; - if (!document.DiscoFunctions.DateChangeHelper){ - document.DiscoFunctions.DateChangeHelper = function (DateField, DateFieldWatermark, UpdateUrl, UpdatePropertyName, minDate, dateOnly) { - var dateFieldValue = DateField.val(); - var dateFieldChangeToken = null; - var $ajaxLoading = DateField.next('.ajaxLoading'); - DateField - .watermark(DateFieldWatermark) - .change(function(){ +}; +if (!document.DiscoFunctions.DateChangeUserHelper) { + document.DiscoFunctions.DateChangeUserHelper = function (DateField, UserField, DateFieldWatermark, UpdateUrl, UpdatePropertyName, minDate, dateOnly) { + var dateFieldValue = DateField.val(); + var dateFieldChangeToken = null; + var $ajaxLoading = UserField.next('.ajaxLoading'); + DateField + .watermark(DateFieldWatermark) + .change(function () { var dateText = DateField.val(); - if (dateFieldValue.toLowerCase() != dateText.toLowerCase()){ - dateFieldValue = dateText; - if (dateFieldChangeToken) - window.clearTimeout(dateFieldChangeToken); - dateFieldChangeToken = window.setTimeout(function(){ - $ajaxLoading.show(); - var data = {}; - data[UpdatePropertyName] = dateFieldValue; - $.getJSON(UpdateUrl, 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(); - }); - - if (dateOnly){ - DateField.datepicker({ - defaultDate: new Date(), - minDate: minDate, - changeYear: true, - changeMonth: true, - dateFormat: 'yy/mm/dd', - beforeShow: function(input, inst){ - $input = $(input); - if (!$input.val()){ - $input.datepicker('setDate', new Date()); + if (dateFieldValue.toLowerCase() != dateText.toLowerCase()) { + dateFieldValue = dateText; + if (dateFieldChangeToken) + window.clearTimeout(dateFieldChangeToken); + dateFieldChangeToken = window.setTimeout(function () { + $ajaxLoading.show(); + var data = {}; + data[UpdatePropertyName] = dateFieldValue; + $.getJSON(UpdateUrl, data, function (response, result) { + if (result != 'success' || response.Result != 'OK') { + alert('Unable to change Date:\n' + response); + $ajaxLoading.hide(); + } else { + UserField.text('by ' + response.UserDescription); + $ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); } - } - }); - }else{ - DateField.datetimepicker({ - defaultDate: new Date(), - ampm: true, - minDate: minDate, - changeYear: true, - changeMonth: true, - dateFormat: 'yy/mm/dd', - beforeShow: function(input, inst){ - $input = $(input); - if (!$input.val()){ - $input.datetimepicker('setDate', new Date()); - } - } - }); + }) + dateFieldChangeToken = null; + }, 500); } + }).focus(function () { + $(this).select(); + }); + + if (dateOnly) { + DateField.datepicker({ + defaultDate: new Date(), + minDate: minDate, + changeYear: true, + changeMonth: true, + dateFormat: 'yy/mm/dd', + beforeShow: function (input, inst) { + $input = $(input); + if (!$input.val()) { + $input.datepicker('setDate', new Date()); + } + } + }); + } else { + DateField.datetimepicker({ + defaultDate: new Date(), + ampm: true, + minDate: minDate, + changeYear: true, + changeMonth: true, + dateFormat: 'yy/mm/dd', + beforeShow: function (input, inst) { + $input = $(input); + if (!$input.val()) { + $input.datetimepicker('setDate', new Date()); + } + } + }); + } - }; } +}; +if (!document.DiscoFunctions.DateChangeHelper) { + document.DiscoFunctions.DateChangeHelper = function (DateField, DateFieldWatermark, UpdateUrl, UpdatePropertyName, minDate, dateOnly) { + var dateFieldValue = DateField.val(); + var dateFieldChangeToken = null; + var $ajaxLoading = DateField.next('.ajaxLoading'); + DateField + .watermark(DateFieldWatermark) + .change(function () { + var dateText = DateField.val(); + if (dateFieldValue.toLowerCase() != dateText.toLowerCase()) { + dateFieldValue = dateText; + if (dateFieldChangeToken) + window.clearTimeout(dateFieldChangeToken); + dateFieldChangeToken = window.setTimeout(function () { + $ajaxLoading.show(); + var data = {}; + data[UpdatePropertyName] = dateFieldValue; + $.getJSON(UpdateUrl, 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(); + }); + + if (dateOnly) { + DateField.datepicker({ + defaultDate: new Date(), + minDate: minDate, + changeYear: true, + changeMonth: true, + dateFormat: 'yy/mm/dd', + beforeShow: function (input, inst) { + $input = $(input); + if (!$input.val()) { + $input.datepicker('setDate', new Date()); + } + } + }); + } else { + DateField.datetimepicker({ + defaultDate: new Date(), + ampm: true, + minDate: minDate, + changeYear: true, + changeMonth: true, + dateFormat: 'yy/mm/dd', + beforeShow: function (input, inst) { + $input = $(input); + if (!$input.val()) { + $input.datetimepicker('setDate', new Date()); + } + } + }); + } + + }; +} +if (!document.DiscoFunctions.DateDialogCreateUpdater) +{ + var dialog, dialogForm, dialogHeader, dialogDateBox, dialogDatePropertyNameBox; + var updateUrl, friendlyName, dateField, userField, updatePropertyName, notSetDisplay, minDate, useAjax; + + function dateDialogGet() { + if (!dialog) { + dialog = $('
').attr({ 'class': 'dialog' }) + dialogForm = $('
').attr({ 'action': '/', 'method': 'post' }).appendTo(dialog); + var dialogBody = $('

').appendTo(dialogForm); + dialogHeader = $('

').attr('autofocus', 'autofocus').appendTo(dialogBody); + dialogDatePropertyNameBox = $('').attr({ 'type': 'hidden', 'name': 'key' }).appendTo(dialogBody); + dialogDateBox = $('').attr({ 'type': 'datetime', 'name': 'value' }).css({ 'display': 'block', 'margin-top': 15, 'margin-left': 'auto', 'margin-right': 'auto' }).appendTo(dialogBody); + $('').attr({ 'type': 'hidden', 'name': 'redirect' }).val('true').appendTo(dialogBody); + + dialog.dialog({ + resizable: false, + modal: true, + autoOpen: false, + buttons: { + "Update": dateDialogUpdate, + Cancel: function () { + $(this).dialog("close"); + } + }, + open: function () { + dialog.dialog('widget').find('.ui-dialog-buttonpane :tabbable:first').focus(); + } + }); + dialogDateBox.datetimepicker({ + defaultDate: new Date(), + ampm: true, + changeYear: true, + changeMonth: true, + dateFormat: 'yy/mm/dd', + }); + } + return dialog; + } + + function dateDialogUpdate() { + var dateValue = dialogDateBox.val(); + + if (useAjax) { + // Use Ajax + var $dateField, $userField; + $dateField = $('#' + dateField); + if (userField) + $userField = $('#' + userField); + + dialog.dialog("close"); + + var $ajaxLoading = ($userField ? $userField.next('.ajaxLoading') : $dateField.next('.ajaxLoading')).show(); + + var data = { + key: updatePropertyName, + value: dateValue + }; + $.getJSON(updateUrl, data, function (response, result) { + if (result != 'success' || response.Result != 'OK') { + alert('Unable to change ' + friendlyName + ' Date:\n' + response); + $ajaxLoading.hide(); + } else { + if (response.DateTimeFull) { + $dateField.attr('data-datetimeformatted', response.DateTimeJavascript) + .attr('data-discodatetime', response.DateTimeSortable) + .attr('title', response.DateTimeFull) + .text(response.DateTimeFriendly); + } else { + $dateField.attr('data-datetimeformatted', '') + .attr('data-discodatetime', '-1') + .attr('title', notSetDisplay) + .text(notSetDisplay); + } + if ($userField) + $userField.text('by ' + response.UserDescription); + $ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); + } + }) + } else { + // Post Form & Redirect + dialog.dialog("disable"); + dialog.dialog("option", "buttons", null); + + dialogDatePropertyNameBox.val(updatePropertyName); + dialogForm.attr('action', updateUrl); + dialogForm.submit(); + } + } + + function dateDialogOpen(UpdateUrl, FriendlyName, DateField, UserField, UpdatePropertyName, NotSetDisplay, MinDate, UseAjax) { + updateUrl = UpdateUrl; + friendlyName = FriendlyName; + dateField = DateField; + userField = UserField; + updatePropertyName = UpdatePropertyName; + notSetDisplay = NotSetDisplay; + minDate = MinDate; + useAjax = UseAjax; + + var d = dateDialogGet(); + + d.dialog('option', 'title', friendlyName); + dialogHeader.text(friendlyName + ' Date'); + + var dfVal = $('#' + DateField).attr('data-datetimeformatted'); + + if (dfVal) + dialogDateBox.datetimepicker('setDate', new Date(dfVal)); + else + dialogDateBox.datetimepicker('setDate', new Date()); + + if (MinDate) + dialogDateBox.datetimepicker('option', 'minDate', MinDate); + else + dialogDateBox.datetimepicker('option', 'minDate', null); + + d.dialog('open'); + } + + function dateDialogCreateUpdater(UpdateUrl, FriendlyName, DateField, UserField, UpdatePropertyName, NotSetDisplay, MinDate, UseAjax) { + $('').attr({ href: '#', 'class': 'button small', style: 'margin-right: 5px;' }).text('Update').click(function (event) { + event.preventDefault(); + dateDialogOpen(UpdateUrl, FriendlyName, DateField, UserField, UpdatePropertyName, NotSetDisplay, MinDate, UseAjax); + }).insertBefore('#' + DateField); + } + + document.DiscoFunctions.DateDialogCreateUpdater = dateDialogCreateUpdater; +} diff --git a/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.min.js b/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.min.js index 6b51aa07..50e87572 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.min.js +++ b/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.min.js @@ -1,2 +1,2 @@ -document.DiscoFunctions||(document.DiscoFunctions={}),document.DiscoFunctions.PropertyChangeHelper||(document.DiscoFunctions.PropertyValue=function(n){return n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="checkbox"?n.is(":checked"):n.val()},document.DiscoFunctions.PropertyChangeHelper=function(n,t,i,r){var e=document.DiscoFunctions.PropertyValue(n),u=null,f=n.nextAll(".ajaxSave").first(),o=n.nextAll(".ajaxLoading").first(),s=function(){f.hide();var t=document.DiscoFunctions.PropertyValue(n);e!=t&&(e=t,u&&window.clearTimeout(u),u=window.setTimeout(function(){o.show();var n={};n[r]=e,$.getJSON(i,n,function(n,t){t!="success"||n!="OK"?(alert('Unable to change property "'+r+'":\n'+n),o.hide()):o.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow")}),u=null},500))};n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="checkbox"?n.click(s):n.change(s),n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="text"&&n.keydown(function(n){f.show(),n.which==13&&$(this).blur()}).watermark(t).blur(function(){f.hide()}).focus(function(){$(this).select()}),n[0].nodeName.toLowerCase()=="textarea"&&n.keydown(function(){f.show()})}),document.DiscoFunctions.DateChangeUserHelper||(document.DiscoFunctions.DateChangeUserHelper=function(n,t,i,r,u,f,e){var s=n.val(),o=null,h=t.next(".ajaxLoading");n.watermark(i).change(function(){var i=n.val();s.toLowerCase()!=i.toLowerCase()&&(s=i,o&&window.clearTimeout(o),o=window.setTimeout(function(){h.show();var n={};n[u]=s,$.getJSON(r,n,function(n,i){i!="success"||n.Result!="OK"?(alert("Unable to change Date:\n"+n),h.hide()):(t.text("by "+n.UserDescription),h.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow"))}),o=null},500))}).focus(function(){$(this).select()}),e?n.datepicker({defaultDate:new Date,minDate:f,changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n),$input.val()||$input.datepicker("setDate",new Date)}}):n.datetimepicker({defaultDate:new Date,ampm:!0,minDate:f,changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n),$input.val()||$input.datetimepicker("setDate",new Date)}})}),document.DiscoFunctions.DateChangeHelper||(document.DiscoFunctions.DateChangeHelper=function(n,t,i,r,u,f){var o=n.val(),e=null,s=n.next(".ajaxLoading");n.watermark(t).change(function(){var t=n.val();o.toLowerCase()!=t.toLowerCase()&&(o=t,e&&window.clearTimeout(e),e=window.setTimeout(function(){s.show();var n={};n[r]=o,$.getJSON(i,n,function(n,t){t!="success"||n!="OK"?(alert("Unable to change Date:\n"+n),s.hide()):s.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow")}),e=null},500))}).focus(function(){$(this).select()}),f?n.datepicker({defaultDate:new Date,minDate:u,changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n),$input.val()||$input.datepicker("setDate",new Date)}}):n.datetimepicker({defaultDate:new Date,ampm:!0,minDate:u,changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n),$input.val()||$input.datetimepicker("setDate",new Date)}})}); +if(document.DiscoFunctions||(document.DiscoFunctions={}),document.DiscoFunctions.PropertyChangeHelper||(document.DiscoFunctions.PropertyValue=function(n){return n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="checkbox"?n.is(":checked"):n.val()},document.DiscoFunctions.PropertyChangeHelper=function(n,t,i,r){var e=document.DiscoFunctions.PropertyValue(n),u=null,f=n.nextAll(".ajaxSave").first(),o=n.nextAll(".ajaxLoading").first(),s=function(){f.hide();var t=document.DiscoFunctions.PropertyValue(n);e!=t&&(e=t,u&&window.clearTimeout(u),u=window.setTimeout(function(){o.show();var n={};n[r]=e,$.getJSON(i,n,function(n,t){t!="success"||n!="OK"?(alert('Unable to change property "'+r+'":\n'+n),o.hide()):o.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow")}),u=null},500))};n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="checkbox"?n.click(s):n.change(s),n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="text"&&n.keydown(function(n){f.show(),n.which==13&&$(this).blur()}).watermark(t).blur(function(){f.hide()}).focus(function(){$(this).select()}),n[0].nodeName.toLowerCase()=="textarea"&&n.keydown(function(){f.show()})}),document.DiscoFunctions.DateChangeUserHelper||(document.DiscoFunctions.DateChangeUserHelper=function(n,t,i,r,u,f,e){var s=n.val(),o=null,h=t.next(".ajaxLoading");n.watermark(i).change(function(){var i=n.val();s.toLowerCase()!=i.toLowerCase()&&(s=i,o&&window.clearTimeout(o),o=window.setTimeout(function(){h.show();var n={};n[u]=s,$.getJSON(r,n,function(n,i){i!="success"||n.Result!="OK"?(alert("Unable to change Date:\n"+n),h.hide()):(t.text("by "+n.UserDescription),h.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow"))}),o=null},500))}).focus(function(){$(this).select()}),e?n.datepicker({defaultDate:new Date,minDate:f,changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n),$input.val()||$input.datepicker("setDate",new Date)}}):n.datetimepicker({defaultDate:new Date,ampm:!0,minDate:f,changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n),$input.val()||$input.datetimepicker("setDate",new Date)}})}),document.DiscoFunctions.DateChangeHelper||(document.DiscoFunctions.DateChangeHelper=function(n,t,i,r,u,f){var o=n.val(),e=null,s=n.next(".ajaxLoading");n.watermark(t).change(function(){var t=n.val();o.toLowerCase()!=t.toLowerCase()&&(o=t,e&&window.clearTimeout(e),e=window.setTimeout(function(){s.show();var n={};n[r]=o,$.getJSON(i,n,function(n,t){t!="success"||n!="OK"?(alert("Unable to change Date:\n"+n),s.hide()):s.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow")}),e=null},500))}).focus(function(){$(this).select()}),f?n.datepicker({defaultDate:new Date,minDate:u,changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n),$input.val()||$input.datepicker("setDate",new Date)}}):n.datetimepicker({defaultDate:new Date,ampm:!0,minDate:u,changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n),$input.val()||$input.datetimepicker("setDate",new Date)}})}),!document.DiscoFunctions.DateDialogCreateUpdater){var dialog,dialogForm,dialogHeader,dialogDateBox,dialogDatePropertyNameBox,updateUrl,friendlyName,dateField,userField,updatePropertyName,notSetDisplay,minDate,useAjax;function dateDialogGet(){if(!dialog){dialog=$("
").attr({"class":"dialog"}),dialogForm=$("").attr({action:"/",method:"post"}).appendTo(dialog);var n=$("

").appendTo(dialogForm);dialogHeader=$("

").attr("autofocus","autofocus").appendTo(n),dialogDatePropertyNameBox=$("").attr({type:"hidden",name:"key"}).appendTo(n),dialogDateBox=$("").attr({type:"datetime",name:"value"}).css({display:"block","margin-top":15,"margin-left":"auto","margin-right":"auto"}).appendTo(n),$("").attr({type:"hidden",name:"redirect"}).val("true").appendTo(n),dialog.dialog({resizable:!1,modal:!0,autoOpen:!1,buttons:{Update:dateDialogUpdate,Cancel:function(){$(this).dialog("close")}},open:function(){dialog.dialog("widget").find(".ui-dialog-buttonpane :tabbable:first").focus()}}),dialogDateBox.datetimepicker({defaultDate:new Date,ampm:!0,changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd"})}return dialog}function dateDialogUpdate(){var u=dialogDateBox.val(),t,n,i,r;useAjax?(t=$("#"+dateField),userField&&(n=$("#"+userField)),dialog.dialog("close"),i=(n?n.next(".ajaxLoading"):t.next(".ajaxLoading")).show(),r={key:updatePropertyName,value:u},$.getJSON(updateUrl,r,function(r,u){u!="success"||r.Result!="OK"?(alert("Unable to change "+friendlyName+" Date:\n"+r),i.hide()):(r.DateTimeFull?t.attr("data-datetimeformatted",r.DateTimeJavascript).attr("data-discodatetime",r.DateTimeSortable).attr("title",r.DateTimeFull).text(r.DateTimeFriendly):t.attr("data-datetimeformatted","").attr("data-discodatetime","-1").attr("title",notSetDisplay).text(notSetDisplay),n&&n.text("by "+r.UserDescription),i.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow"))})):(dialog.dialog("disable"),dialog.dialog("option","buttons",null),dialogDatePropertyNameBox.val(updatePropertyName),dialogForm.attr("action",updateUrl),dialogForm.submit())}function dateDialogOpen(n,t,i,r,u,f,e,o){var s,h;updateUrl=n,friendlyName=t,dateField=i,userField=r,updatePropertyName=u,notSetDisplay=f,minDate=e,useAjax=o,s=dateDialogGet(),s.dialog("option","title",friendlyName),dialogHeader.text(friendlyName+" Date"),h=$("#"+i).attr("data-datetimeformatted"),h?dialogDateBox.datetimepicker("setDate",new Date(h)):dialogDateBox.datetimepicker("setDate",new Date),e?dialogDateBox.datetimepicker("option","minDate",e):dialogDateBox.datetimepicker("option","minDate",null),s.dialog("open")}function dateDialogCreateUpdater(n,t,i,r,u,f,e,o){$("").attr({href:"#","class":"button small",style:"margin-right: 5px;"}).text("Update").click(function(s){s.preventDefault(),dateDialogOpen(n,t,i,r,u,f,e,o)}).insertBefore("#"+i)}document.DiscoFunctions.DateDialogCreateUpdater=dateDialogCreateUpdater} //@ sourceMappingURL=Disco-PropertyChangeHelpers.min.js.map \ No newline at end of file diff --git a/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.min.js.map b/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.min.js.map index ad8b95c9..1a1e3fba 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.min.js.map +++ b/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.min.js.map @@ -2,7 +2,7 @@ "version":3, "file":"Disco-PropertyChangeHelpers.min.js", "lineCount":1, -"mappings":"AAAKA,QAAQC,e,GACLD,QAAQC,eAAgB,CAAE,CAAA,EAAE,CAE3BD,QAAQC,eAAeC,qB,GACxBF,QAAQC,eAAeE,cAAe,CAAEC,QAAQ,CAACC,CAAD,CAAe,CAI3D,OAHIA,CAAc,CAAA,CAAA,CAAEC,SAASC,YAAY,CAAA,CAAE,EAAE,OAAQ,EAAGF,CAAaG,KAAK,CAAC,MAAD,CAAQ,EAAE,U,CACzEH,CAAaI,GAAG,CAAC,UAAD,C,CAEpBJ,CAAaK,IAAI,CAAA,CAJmC,CAK9D,CACDV,QAAQC,eAAeC,qBAAsB,CAAES,QAAS,CAACN,CAAa,CAAEO,CAAc,CAAEC,CAAS,CAAEC,CAA3C,CAA+D,CACnH,IAAIC,EAAaf,QAAQC,eAAeE,cAAc,CAACE,CAAD,EAClDW,EAAmB,KACnBC,EAAYZ,CAAaa,QAAQ,CAAC,WAAD,CAAaC,MAAM,CAAA,EACpDC,EAAef,CAAaa,QAAQ,CAAC,cAAD,CAAgBC,MAAM,CAAA,EAC1DE,EAAsBA,QAAQ,CAAA,CAAE,CAC5BJ,CAASK,KAAK,CAAA,CAAE,CAChB,IAAIC,EAAevB,QAAQC,eAAeE,cAAc,CAACE,CAAD,CAAe,CACnEU,CAAW,EAAGQ,C,GACdR,CAAW,CAAEQ,CAAY,CACrBP,C,EACAQ,MAAMC,aAAa,CAACT,CAAD,CAAkB,CACzCA,CAAiB,CAAEQ,MAAME,WAAW,CAAC,QAAQ,CAAA,CAAE,CAC3CN,CAAYO,KAAK,CAAA,CAAE,CACnB,IAAIC,EAAO,CAAA,CAAE,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Yb,KAAK,CAACiB,YAAa,CAAE,OAAhB,CAAwB,CAErC4B,CAAM,CAAEzE,CAAC,CAAC,GAAI,CAAEmB,CAAP,CAAiBxC,KAAK,CAAC,wBAAD,C,CAE/B8F,CAAJ,CACI/B,aAAaP,eAAe,CAAC,SAAS,CAAE,IAAIJ,IAAI,CAAC0C,CAAD,CAApB,CADhC,CAGI/B,aAAaP,eAAe,CAAC,SAAS,CAAE,IAAIJ,IAAhB,C,CAE5BuC,CAAJ,CACI5B,aAAaP,eAAe,CAAC,QAAQ,CAAE,SAAS,CAAEmC,CAAtB,CADhC,CAGI5B,aAAaP,eAAe,CAAC,QAAQ,CAAE,SAAS,CAAE,IAAtB,C,CAEhCqC,CAACjC,OAAO,CAAC,MAAD,CA3BgH,CA8B5HmC,SAASA,uBAAuB,CAAC1F,CAAS,CAAEoF,CAAY,CAAEjD,CAAS,CAAEC,CAAS,CAAEnC,CAAkB,CAAEoF,CAAa,CAAEC,CAAO,CAAEC,CAA5F,CAAqG,CACjIvE,CAAC,CAAC,KAAD,CAAOrB,KAAK,CAAC,CAAE,IAAI,CAAE,GAAG,CAAE,OAAO,CAAE,cAAc,CAAE,KAAK,CAAE,oBAA7C,CAAD,CAAqEiD,KAAK,CAAC,QAAD,CAAUpB,MAAM,CAAC,QAAS,CAACmE,CAAD,CAAQ,CACrHA,CAAKC,eAAe,CAAA,CAAE,CACtBT,cAAc,CAACnF,CAAS,CAAEoF,CAAY,CAAEjD,CAAS,CAAEC,CAAS,CAAEnC,CAAkB,CAAEoF,CAAa,CAAEC,CAAO,CAAEC,CAA5F,CAFuG,CAAlB,CAGrGM,aAAa,CAAC,GAAI,CAAE1D,CAAP,CAJkH,CAOrIhD,QAAQC,eAAekE,wBAAyB,CAAEoC,uBA9HtD", "sources":["/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers/disco.propertychangehelpers.js"], -"names":["document","DiscoFunctions","PropertyChangeHelper","PropertyValue","document.DiscoFunctions.PropertyValue","PropertyField","nodeName","toLowerCase","attr","is","val","document.DiscoFunctions.PropertyChangeHelper","FieldWatermark","UpdateUrl","UpdatePropertyName","fieldValue","fieldChangeToken","$ajaxSave","nextAll","first","$ajaxLoading","fieldChangeFunction","hide","changedValue","window","clearTimeout","setTimeout","show","data","$","getJSON","response","result","alert","next","delay","fadeOut","click","change","keydown","e","which","blur","watermark","focus","select","DateChangeUserHelper","document.DiscoFunctions.DateChangeUserHelper","DateField","UserField","DateFieldWatermark","minDate","dateOnly","dateFieldValue","dateFieldChangeToken","dateText","Result","text","UserDescription","datepicker","Date","beforeShow","input","$input","datetimepicker","DateChangeHelper","document.DiscoFunctions.DateChangeHelper"] +"names":["document","DiscoFunctions","PropertyChangeHelper","PropertyValue","document.DiscoFunctions.PropertyValue","PropertyField","nodeName","toLowerCase","attr","is","val","document.DiscoFunctions.PropertyChangeHelper","FieldWatermark","UpdateUrl","UpdatePropertyName","fieldValue","fieldChangeToken","$ajaxSave","nextAll","first","$ajaxLoading","fieldChangeFunction","hide","changedValue","window","clearTimeout","setTimeout","show","data","$","getJSON","response","result","alert","next","delay","fadeOut","click","change","keydown","e","which","blur","watermark","focus","select","DateChangeUserHelper","document.DiscoFunctions.DateChangeUserHelper","DateField","UserField","DateFieldWatermark","minDate","dateOnly","dateFieldValue","dateFieldChangeToken","dateText","Result","text","UserDescription","datepicker","Date","beforeShow","input","$input","datetimepicker","DateChangeHelper","document.DiscoFunctions.DateChangeHelper","DateDialogCreateUpdater","dialog","dialogForm","dialogHeader","dialogDateBox","dialogDatePropertyNameBox","updateUrl","friendlyName","dateField","userField","updatePropertyName","notSetDisplay","useAjax","dateDialogGet","appendTo","dialogBody","css","dateDialogUpdate","Cancel","open","find","dateValue","$dateField","$userField","DateTimeFull","DateTimeJavascript","DateTimeSortable","DateTimeFriendly","submit","dateDialogOpen","FriendlyName","NotSetDisplay","MinDate","UseAjax","d","dfVal","dateDialogCreateUpdater","event","preventDefault","insertBefore"] } diff --git a/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers/disco.propertychangehelpers.js b/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers/disco.propertychangehelpers.js index 54cc615f..2f90fae5 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers/disco.propertychangehelpers.js +++ b/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers/disco.propertychangehelpers.js @@ -1,197 +1,326 @@ if (!document.DiscoFunctions) { - document.DiscoFunctions = {}; + document.DiscoFunctions = {}; +} +if (!document.DiscoFunctions.PropertyChangeHelper) { + document.DiscoFunctions.PropertyValue = function (PropertyField) { + if (PropertyField[0].nodeName.toLowerCase() == 'input' && PropertyField.attr('type') == 'checkbox') { + return PropertyField.is(':checked'); + } + return PropertyField.val(); + }; + document.DiscoFunctions.PropertyChangeHelper = function (PropertyField, FieldWatermark, UpdateUrl, UpdatePropertyName) { + var fieldValue = document.DiscoFunctions.PropertyValue(PropertyField); + var fieldChangeToken = null; + var $ajaxSave = PropertyField.nextAll('.ajaxSave').first(); + var $ajaxLoading = PropertyField.nextAll('.ajaxLoading').first(); + var fieldChangeFunction = function () { + $ajaxSave.hide(); + var changedValue = document.DiscoFunctions.PropertyValue(PropertyField); + if (fieldValue != changedValue) { + fieldValue = changedValue; + if (fieldChangeToken) + window.clearTimeout(fieldChangeToken); + fieldChangeToken = window.setTimeout(function () { + $ajaxLoading.show(); + var data = {}; + data[UpdatePropertyName] = fieldValue; + $.getJSON(UpdateUrl, data, function (response, result) { + if (result != 'success' || response != 'OK') { + alert('Unable to change property "' + UpdatePropertyName + '":\n' + response); + $ajaxLoading.hide(); + } else { + $ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); + } + }) + fieldChangeToken = null; + }, 500); + }; + } + if (PropertyField[0].nodeName.toLowerCase() == 'input' && PropertyField.attr('type') == 'checkbox') { + PropertyField.click(fieldChangeFunction); + } else { + PropertyField.change(fieldChangeFunction); + } + // For Input Text Boxes + if (PropertyField[0].nodeName.toLowerCase() == 'input' && PropertyField.attr('type') == 'text') { + PropertyField.keydown(function (e) { + $ajaxSave.show(); + if (e.which == 13) { + $(this).blur(); + } + }) + .watermark(FieldWatermark) + .blur(function () { + $ajaxSave.hide(); + }).focus(function () { + $(this).select(); + }); + } + // For TextAreas + if (PropertyField[0].nodeName.toLowerCase() == 'textarea') { + PropertyField.keydown(function () { + $ajaxSave.show(); + }) + } } - if (!document.DiscoFunctions.PropertyChangeHelper){ - document.DiscoFunctions.PropertyValue = function(PropertyField){ - if (PropertyField[0].nodeName.toLowerCase()=='input' && PropertyField.attr('type')=='checkbox'){ - return PropertyField.is(':checked'); - } - return PropertyField.val(); - }; - document.DiscoFunctions.PropertyChangeHelper = function (PropertyField, FieldWatermark, UpdateUrl, UpdatePropertyName) { - var fieldValue = document.DiscoFunctions.PropertyValue(PropertyField); - var fieldChangeToken = null; - var $ajaxSave = PropertyField.nextAll('.ajaxSave').first(); - var $ajaxLoading = PropertyField.nextAll('.ajaxLoading').first(); - var fieldChangeFunction = function(){ - $ajaxSave.hide(); - var changedValue = document.DiscoFunctions.PropertyValue(PropertyField); - if (fieldValue != changedValue){ - fieldValue = changedValue; - if (fieldChangeToken) - window.clearTimeout(fieldChangeToken); - fieldChangeToken = window.setTimeout(function(){ - $ajaxLoading.show(); - var data = {}; - data[UpdatePropertyName] = fieldValue; - $.getJSON(UpdateUrl, data, function (response, result) { - if (result != 'success' || response != 'OK') { - alert('Unable to change property "' + UpdatePropertyName + '":\n' + response); - $ajaxLoading.hide(); - } else { - $ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); - } - }) - fieldChangeToken = null; - }, 500); - }; - } - if (PropertyField[0].nodeName.toLowerCase()=='input' && PropertyField.attr('type')=='checkbox'){ - PropertyField.click(fieldChangeFunction); - }else{ - PropertyField.change(fieldChangeFunction); - } - // For Input Text Boxes - if (PropertyField[0].nodeName.toLowerCase()=='input' && PropertyField.attr('type')=='text'){ - PropertyField.keydown(function(e){ - $ajaxSave.show(); - if (e.which == 13) { - $(this).blur(); - } - }) - .watermark(FieldWatermark) - .blur(function () { - $ajaxSave.hide(); - }).focus(function(){ - $(this).select(); - }); - } - // For TextAreas - if (PropertyField[0].nodeName.toLowerCase()=='textarea'){ - PropertyField.keydown(function(){ - $ajaxSave.show(); - }) - } - } - }; - if (!document.DiscoFunctions.DateChangeUserHelper){ - document.DiscoFunctions.DateChangeUserHelper = function (DateField, UserField, DateFieldWatermark, UpdateUrl, UpdatePropertyName, minDate, dateOnly) { - var dateFieldValue = DateField.val(); - var dateFieldChangeToken = null; - var $ajaxLoading = UserField.next('.ajaxLoading'); - DateField - .watermark(DateFieldWatermark) - .change(function(){ - var dateText = DateField.val(); - if (dateFieldValue.toLowerCase() != dateText.toLowerCase()){ - dateFieldValue = dateText; - if (dateFieldChangeToken) - window.clearTimeout(dateFieldChangeToken); - dateFieldChangeToken = window.setTimeout(function(){ - $ajaxLoading.show(); - var data = {}; - data[UpdatePropertyName] = dateFieldValue; - $.getJSON(UpdateUrl, data, function (response, result) { - if (result != 'success' || response.Result != 'OK') { - alert('Unable to change Date:\n' + response); - $ajaxLoading.hide(); - } else { - UserField.text('by ' + response.UserDescription); - $ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); - } - }) - dateFieldChangeToken = null; - }, 500); - } - }).focus(function(){ - $(this).select(); - }); - - if (dateOnly){ - DateField.datepicker({ - defaultDate: new Date(), - minDate: minDate, - changeYear: true, - changeMonth: true, - dateFormat: 'yy/mm/dd', - beforeShow: function(input, inst){ - $input = $(input); - if (!$input.val()){ - $input.datepicker('setDate', new Date()); - } - } - }); - }else{ - DateField.datetimepicker({ - defaultDate: new Date(), - ampm: true, - minDate: minDate, - changeYear: true, - changeMonth: true, - dateFormat: 'yy/mm/dd', - beforeShow: function(input, inst){ - $input = $(input); - if (!$input.val()){ - $input.datetimepicker('setDate', new Date()); - } - } - }); - } - - } - }; - if (!document.DiscoFunctions.DateChangeHelper){ - document.DiscoFunctions.DateChangeHelper = function (DateField, DateFieldWatermark, UpdateUrl, UpdatePropertyName, minDate, dateOnly) { - var dateFieldValue = DateField.val(); - var dateFieldChangeToken = null; - var $ajaxLoading = DateField.next('.ajaxLoading'); - DateField - .watermark(DateFieldWatermark) - .change(function(){ +}; +if (!document.DiscoFunctions.DateChangeUserHelper) { + document.DiscoFunctions.DateChangeUserHelper = function (DateField, UserField, DateFieldWatermark, UpdateUrl, UpdatePropertyName, minDate, dateOnly) { + var dateFieldValue = DateField.val(); + var dateFieldChangeToken = null; + var $ajaxLoading = UserField.next('.ajaxLoading'); + DateField + .watermark(DateFieldWatermark) + .change(function () { var dateText = DateField.val(); - if (dateFieldValue.toLowerCase() != dateText.toLowerCase()){ - dateFieldValue = dateText; - if (dateFieldChangeToken) - window.clearTimeout(dateFieldChangeToken); - dateFieldChangeToken = window.setTimeout(function(){ - $ajaxLoading.show(); - var data = {}; - data[UpdatePropertyName] = dateFieldValue; - $.getJSON(UpdateUrl, 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(); - }); - - if (dateOnly){ - DateField.datepicker({ - defaultDate: new Date(), - minDate: minDate, - changeYear: true, - changeMonth: true, - dateFormat: 'yy/mm/dd', - beforeShow: function(input, inst){ - $input = $(input); - if (!$input.val()){ - $input.datepicker('setDate', new Date()); + if (dateFieldValue.toLowerCase() != dateText.toLowerCase()) { + dateFieldValue = dateText; + if (dateFieldChangeToken) + window.clearTimeout(dateFieldChangeToken); + dateFieldChangeToken = window.setTimeout(function () { + $ajaxLoading.show(); + var data = {}; + data[UpdatePropertyName] = dateFieldValue; + $.getJSON(UpdateUrl, data, function (response, result) { + if (result != 'success' || response.Result != 'OK') { + alert('Unable to change Date:\n' + response); + $ajaxLoading.hide(); + } else { + UserField.text('by ' + response.UserDescription); + $ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); } - } - }); - }else{ - DateField.datetimepicker({ - defaultDate: new Date(), - ampm: true, - minDate: minDate, - changeYear: true, - changeMonth: true, - dateFormat: 'yy/mm/dd', - beforeShow: function(input, inst){ - $input = $(input); - if (!$input.val()){ - $input.datetimepicker('setDate', new Date()); - } - } - }); + }) + dateFieldChangeToken = null; + }, 500); } + }).focus(function () { + $(this).select(); + }); - }; - } \ No newline at end of file + if (dateOnly) { + DateField.datepicker({ + defaultDate: new Date(), + minDate: minDate, + changeYear: true, + changeMonth: true, + dateFormat: 'yy/mm/dd', + beforeShow: function (input, inst) { + $input = $(input); + if (!$input.val()) { + $input.datepicker('setDate', new Date()); + } + } + }); + } else { + DateField.datetimepicker({ + defaultDate: new Date(), + ampm: true, + minDate: minDate, + changeYear: true, + changeMonth: true, + dateFormat: 'yy/mm/dd', + beforeShow: function (input, inst) { + $input = $(input); + if (!$input.val()) { + $input.datetimepicker('setDate', new Date()); + } + } + }); + } + + } +}; +if (!document.DiscoFunctions.DateChangeHelper) { + document.DiscoFunctions.DateChangeHelper = function (DateField, DateFieldWatermark, UpdateUrl, UpdatePropertyName, minDate, dateOnly) { + var dateFieldValue = DateField.val(); + var dateFieldChangeToken = null; + var $ajaxLoading = DateField.next('.ajaxLoading'); + DateField + .watermark(DateFieldWatermark) + .change(function () { + var dateText = DateField.val(); + if (dateFieldValue.toLowerCase() != dateText.toLowerCase()) { + dateFieldValue = dateText; + if (dateFieldChangeToken) + window.clearTimeout(dateFieldChangeToken); + dateFieldChangeToken = window.setTimeout(function () { + $ajaxLoading.show(); + var data = {}; + data[UpdatePropertyName] = dateFieldValue; + $.getJSON(UpdateUrl, 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(); + }); + + if (dateOnly) { + DateField.datepicker({ + defaultDate: new Date(), + minDate: minDate, + changeYear: true, + changeMonth: true, + dateFormat: 'yy/mm/dd', + beforeShow: function (input, inst) { + $input = $(input); + if (!$input.val()) { + $input.datepicker('setDate', new Date()); + } + } + }); + } else { + DateField.datetimepicker({ + defaultDate: new Date(), + ampm: true, + minDate: minDate, + changeYear: true, + changeMonth: true, + dateFormat: 'yy/mm/dd', + beforeShow: function (input, inst) { + $input = $(input); + if (!$input.val()) { + $input.datetimepicker('setDate', new Date()); + } + } + }); + } + + }; +} +if (!document.DiscoFunctions.DateDialogCreateUpdater) +{ + var dialog, dialogForm, dialogHeader, dialogDateBox, dialogDatePropertyNameBox; + var updateUrl, friendlyName, dateField, userField, updatePropertyName, notSetDisplay, minDate, useAjax; + + function dateDialogGet() { + if (!dialog) { + dialog = $('
').attr({ 'class': 'dialog' }) + dialogForm = $('').attr({ 'action': '/', 'method': 'post' }).appendTo(dialog); + var dialogBody = $('

').appendTo(dialogForm); + dialogHeader = $('

').attr('autofocus', 'autofocus').appendTo(dialogBody); + dialogDatePropertyNameBox = $('').attr({ 'type': 'hidden', 'name': 'key' }).appendTo(dialogBody); + dialogDateBox = $('').attr({ 'type': 'datetime', 'name': 'value' }).css({ 'display': 'block', 'margin-top': 15, 'margin-left': 'auto', 'margin-right': 'auto' }).appendTo(dialogBody); + $('').attr({ 'type': 'hidden', 'name': 'redirect' }).val('true').appendTo(dialogBody); + + dialog.dialog({ + resizable: false, + modal: true, + autoOpen: false, + buttons: { + "Update": dateDialogUpdate, + Cancel: function () { + $(this).dialog("close"); + } + }, + open: function () { + dialog.dialog('widget').find('.ui-dialog-buttonpane :tabbable:first').focus(); + } + }); + dialogDateBox.datetimepicker({ + defaultDate: new Date(), + ampm: true, + changeYear: true, + changeMonth: true, + dateFormat: 'yy/mm/dd', + }); + } + return dialog; + } + + function dateDialogUpdate() { + var dateValue = dialogDateBox.val(); + + if (useAjax) { + // Use Ajax + var $dateField, $userField; + $dateField = $('#' + dateField); + if (userField) + $userField = $('#' + userField); + + dialog.dialog("close"); + + var $ajaxLoading = ($userField ? $userField.next('.ajaxLoading') : $dateField.next('.ajaxLoading')).show(); + + var data = { + key: updatePropertyName, + value: dateValue + }; + $.getJSON(updateUrl, data, function (response, result) { + if (result != 'success' || response.Result != 'OK') { + alert('Unable to change ' + friendlyName + ' Date:\n' + response); + $ajaxLoading.hide(); + } else { + if (response.DateTimeFull) { + $dateField.attr('data-datetimeformatted', response.DateTimeJavascript) + .attr('data-discodatetime', response.DateTimeSortable) + .attr('title', response.DateTimeFull) + .text(response.DateTimeFriendly); + } else { + $dateField.attr('data-datetimeformatted', '') + .attr('data-discodatetime', '-1') + .attr('title', notSetDisplay) + .text(notSetDisplay); + } + if ($userField) + $userField.text('by ' + response.UserDescription); + $ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); + } + }) + } else { + // Post Form & Redirect + dialog.dialog("disable"); + dialog.dialog("option", "buttons", null); + + dialogDatePropertyNameBox.val(updatePropertyName); + dialogForm.attr('action', updateUrl); + dialogForm.submit(); + } + } + + function dateDialogOpen(UpdateUrl, FriendlyName, DateField, UserField, UpdatePropertyName, NotSetDisplay, MinDate, UseAjax) { + updateUrl = UpdateUrl; + friendlyName = FriendlyName; + dateField = DateField; + userField = UserField; + updatePropertyName = UpdatePropertyName; + notSetDisplay = NotSetDisplay; + minDate = MinDate; + useAjax = UseAjax; + + var d = dateDialogGet(); + + d.dialog('option', 'title', friendlyName); + dialogHeader.text(friendlyName + ' Date'); + + var dfVal = $('#' + DateField).attr('data-datetimeformatted'); + + if (dfVal) + dialogDateBox.datetimepicker('setDate', new Date(dfVal)); + else + dialogDateBox.datetimepicker('setDate', new Date()); + + if (MinDate) + dialogDateBox.datetimepicker('option', 'minDate', MinDate); + else + dialogDateBox.datetimepicker('option', 'minDate', null); + + d.dialog('open'); + } + + function dateDialogCreateUpdater(UpdateUrl, FriendlyName, DateField, UserField, UpdatePropertyName, NotSetDisplay, MinDate, UseAjax) { + $('').attr({ href: '#', 'class': 'button small', style: 'margin-right: 5px;' }).text('Update').click(function (event) { + event.preventDefault(); + dateDialogOpen(UpdateUrl, FriendlyName, DateField, UserField, UpdatePropertyName, NotSetDisplay, MinDate, UseAjax); + }).insertBefore('#' + DateField); + } + + document.DiscoFunctions.DateDialogCreateUpdater = dateDialogCreateUpdater; +} \ No newline at end of file diff --git a/Disco.Web/Properties/AssemblyInfo.cs b/Disco.Web/Properties/AssemblyInfo.cs index 10c5f3d8..3ecbcd15 100644 --- a/Disco.Web/Properties/AssemblyInfo.cs +++ b/Disco.Web/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.2.0328.1100")] -[assembly: AssemblyFileVersion("1.2.0328.1100")] +[assembly: AssemblyVersion("1.2.0401.1659")] +[assembly: AssemblyFileVersion("1.2.0401.1659")] diff --git a/Disco.Web/Views/Job/JobParts/Insurance.cshtml b/Disco.Web/Views/Job/JobParts/Insurance.cshtml index 41bdd234..21b8e5ce 100644 --- a/Disco.Web/Views/Job/JobParts/Insurance.cshtml +++ b/Disco.Web/Views/Job/JobParts/Insurance.cshtml @@ -2,6 +2,7 @@ @if (Model.Job.JobMetaNonWarranty.IsInsuranceClaim) { + Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers"); diff --git a/Disco.Web/Views/Job/JobParts/Insurance.generated.cs b/Disco.Web/Views/Job/JobParts/Insurance.generated.cs index d049feba..abddd69c 100644 --- a/Disco.Web/Views/Job/JobParts/Insurance.generated.cs +++ b/Disco.Web/Views/Job/JobParts/Insurance.generated.cs @@ -31,9 +31,9 @@ namespace Disco.Web.Views.Job.JobParts using Disco.Web; using Disco.Web.Extensions; - [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.4.0")] [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/Insurance.cshtml")] - public class Insurance : System.Web.Mvc.WebViewPage + public partial class Insurance : System.Web.Mvc.WebViewPage { public Insurance() { @@ -56,6 +56,7 @@ WriteLiteral(">\r\n"); #line 3 "..\..\Views\Job\JobParts\Insurance.cshtml" if (Model.Job.JobMetaNonWarranty.IsInsuranceClaim) { + Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers"); #line default @@ -69,7 +70,7 @@ WriteLiteral(">\r\n Date of Loss or Damage\r\n \r WriteLiteral(" "); - #line 10 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 11 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Html.EditorFor(m => m.Job.JobMetaInsurance.LossOrDamageDate)); @@ -80,7 +81,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 11 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 12 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxLoader()); @@ -99,7 +100,7 @@ WriteLiteral(@"> '"); - #line 18 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 19 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Url.Action(MVC.API.Job.UpdateInsuranceLossOrDamageDate(Model.Job.Id, null))); @@ -115,7 +116,7 @@ WriteLiteral(" \r\n \r\n \r\n m.Job.JobMetaInsurance.ThirdPartyCaused)); #line default #line hidden - #line 71 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 72 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Html.LabelFor(m => m.Job.JobMetaInsurance.ThirdPartyCaused)); @@ -244,7 +245,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 72 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 73 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxSave()); @@ -255,7 +256,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 73 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 74 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxLoader()); @@ -273,7 +274,7 @@ WriteLiteral(">\r\n
\r\n
\r\n WriteLiteral(" "); - #line 78 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 79 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Html.EditorFor(m => m.Job.JobMetaInsurance.ThirdPartyCausedName)); @@ -284,7 +285,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 79 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 80 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxSave()); @@ -295,7 +296,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 80 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 81 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxLoader()); @@ -307,7 +308,7 @@ WriteLiteral("\r\n
\r\n
\r\n WriteLiteral(" "); - #line 85 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 86 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Html.EditorFor(m => m.Job.JobMetaInsurance.ThirdPartyCausedWhy)); @@ -318,7 +319,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 86 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 87 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxSave()); @@ -329,7 +330,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 87 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 88 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxLoader()); @@ -367,7 +368,7 @@ WriteLiteral(@"> '"); - #line 115 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 116 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Url.Action(MVC.API.Job.UpdateInsuranceThirdPartyCaused(Model.Job.Id, null))); @@ -382,7 +383,7 @@ WriteLiteral(@"', '"); - #line 121 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 122 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Url.Action(MVC.API.Job.UpdateInsuranceThirdPartyCausedName(Model.Job.Id, null))); @@ -397,7 +398,7 @@ WriteLiteral(@"', '"); - #line 127 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 128 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Url.Action(MVC.API.Job.UpdateInsuranceThirdPartyCausedWhy(Model.Job.Id, null))); @@ -413,7 +414,7 @@ WriteLiteral("
\r\n \r\n \r\n WriteLiteral(" "); - #line 179 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 180 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Html.EditorFor(m => m.Job.JobMetaInsurance.PropertyLastSeenDate)); @@ -539,7 +540,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 180 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 181 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxLoader()); @@ -558,7 +559,7 @@ WriteLiteral(@"> '"); - #line 187 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 188 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Url.Action(MVC.API.Job.UpdateInsurancePropertyLastSeenDate(Model.Job.Id, null))); @@ -577,14 +578,14 @@ WriteLiteral(">\r\n  \r\n \r\n m.Job.JobMetaInsurance.PoliceNotified)); #line default #line hidden - #line 200 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 201 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Html.LabelFor(m => m.Job.JobMetaInsurance.PoliceNotified)); @@ -595,7 +596,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 201 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 202 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxSave()); @@ -606,7 +607,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 202 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 203 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxLoader()); @@ -624,7 +625,7 @@ WriteLiteral(">\r\n
\r\n
\r\n WriteLiteral(" "); - #line 207 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 208 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotifiedStation)); @@ -635,7 +636,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 208 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 209 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxSave()); @@ -646,7 +647,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 209 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 210 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxLoader()); @@ -658,7 +659,7 @@ WriteLiteral("\r\n
\r\n
\r\n WriteLiteral(" "); - #line 214 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 215 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotifiedDate)); @@ -669,7 +670,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 215 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 216 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxLoader()); @@ -681,7 +682,7 @@ WriteLiteral("\r\n
\r\n
\r\n WriteLiteral(" "); - #line 220 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 221 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotifiedCrimeReportNo)); @@ -692,7 +693,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 221 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 222 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxSave()); @@ -703,7 +704,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 222 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 223 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxLoader()); @@ -741,7 +742,7 @@ WriteLiteral(@"> '"); - #line 250 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 251 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Url.Action(MVC.API.Job.UpdateInsurancePoliceNotified(Model.Job.Id, null))); @@ -756,7 +757,7 @@ WriteLiteral(@"', '"); - #line 256 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 257 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Url.Action(MVC.API.Job.UpdateInsurancePoliceNotifiedStation(Model.Job.Id, null))); @@ -772,7 +773,7 @@ WriteLiteral(@"', '"); - #line 263 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 264 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Url.Action(MVC.API.Job.UpdateInsurancePoliceNotifiedDate(Model.Job.Id, null))); @@ -789,7 +790,7 @@ WriteLiteral(@"', '"); - #line 271 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 272 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Url.Action(MVC.API.Job.UpdateInsurancePoliceNotifiedCrimeReportNo(Model.Job.Id, null))); @@ -805,7 +806,7 @@ WriteLiteral("
\r\n \r\n \r\n WriteLiteral(" "); - #line 323 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 324 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Html.EditorFor(m => m.Job.JobMetaInsurance.DateOfPurchase)); @@ -929,7 +930,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 324 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 325 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxLoader()); @@ -948,7 +949,7 @@ WriteLiteral(@"> '"); - #line 331 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 332 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Url.Action(MVC.API.Job.UpdateInsuranceDateOfPurchase(Model.Job.Id, null))); @@ -964,8 +965,8 @@ WriteLiteral(" \r\n +"); - #line 356 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Model.Job.OpenedDate.ToJavascriptDate()); - - - #line default - #line hidden -WriteLiteral("\r\n );\r\n });\r\n \r" + -"\n \r\n \r\n"); - - - #line 362 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 358 "..\..\Views\Job\JobParts\Insurance.cshtml" } @@ -1042,13 +1027,13 @@ WriteLiteral(" style=\"padding: 8px; text-align: center\""); WriteLiteral(">\r\n"); - #line 369 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 365 "..\..\Views\Job\JobParts\Insurance.cshtml" #line default #line hidden - #line 369 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 365 "..\..\Views\Job\JobParts\Insurance.cshtml" if (Model.Job.JobMetaNonWarranty.IsInsuranceClaim) { @@ -1056,14 +1041,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 371 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 367 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Html.ActionLinkButton("Remove Insurance Claim", MVC.API.Job.UpdateNonWarrantyIsInsuranceClaim(Model.Job.Id, false, true))); #line default #line hidden - #line 371 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 367 "..\..\Views\Job\JobParts\Insurance.cshtml" } else @@ -1073,14 +1058,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 375 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 371 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Html.ActionLinkButton("Add Insurance Claim", MVC.API.Job.UpdateNonWarrantyIsInsuranceClaim(Model.Job.Id, true, true))); #line default #line hidden - #line 375 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 371 "..\..\Views\Job\JobParts\Insurance.cshtml" } diff --git a/Disco.Web/Views/Job/JobParts/NonWarrantyFinance.cshtml b/Disco.Web/Views/Job/JobParts/NonWarrantyFinance.cshtml index bfa2335d..df179ec1 100644 --- a/Disco.Web/Views/Job/JobParts/NonWarrantyFinance.cshtml +++ b/Disco.Web/Views/Job/JobParts/NonWarrantyFinance.cshtml @@ -1,4 +1,7 @@ @model Disco.Web.Models.Job.ShowModel +@{ + Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers"); +}
Date of Loss or Damage @@ -342,19 +343,14 @@ Claim Form Sent Date - @Html.EditorFor(m => m.Job.JobMetaInsurance.ClaimFormSentDate) + @CommonHelpers.FriendlyDate(Model.Job.JobMetaInsurance.ClaimFormSentDate, "Not Sent", "Job_JobMetaInsurance_ClaimFormSentDate") @(string.IsNullOrEmpty(Model.Job.JobMetaInsurance.ClaimFormSentUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaInsurance.ClaimFormSentUser.ToString())) - @AjaxHelpers.AjaxLoader() -
\r\n Event Location WriteLiteral(" "); - #line 31 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 32 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Html.EditorFor(m => m.Job.JobMetaInsurance.EventLocation)); @@ -126,7 +127,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 32 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 33 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxSave()); @@ -137,7 +138,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 33 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 34 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxLoader()); @@ -153,7 +154,7 @@ WriteLiteral(">\r\n $(function () {\r\n " \'"); - #line 39 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 40 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Url.Action(MVC.API.Job.UpdateInsuranceEventLocation(Model.Job.Id, null))); @@ -169,7 +170,7 @@ WriteLiteral("
\r\n Description\r\ WriteLiteral(" "); - #line 51 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 52 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Html.EditorFor(m => m.Job.JobMetaInsurance.Description)); @@ -180,7 +181,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 52 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 53 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxSave()); @@ -191,7 +192,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 53 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 54 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxLoader()); @@ -207,7 +208,7 @@ WriteLiteral(">\r\n $(function () {\r\n " \'"); - #line 59 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 60 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Url.Action(MVC.API.Job.UpdateInsuranceDescription(Model.Job.Id, null))); @@ -226,14 +227,14 @@ WriteLiteral(">\r\n  \r\n
\r\n Witnessed by ( WriteLiteral(" "); - #line 139 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 140 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Html.EditorFor(m => m.Job.JobMetaInsurance.WitnessesNamesAddresses)); @@ -424,7 +425,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 140 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 141 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxSave()); @@ -435,7 +436,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 141 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 142 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxLoader()); @@ -453,7 +454,7 @@ WriteLiteral(@"> '"); - #line 147 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 148 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Url.Action(MVC.API.Job.UpdateInsuranceWitnessesNamesAddresses(Model.Job.Id, null))); @@ -469,7 +470,7 @@ WriteLiteral("
\r\n Burglary/Theft WriteLiteral(" "); - #line 159 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 160 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Html.EditorFor(m => m.Job.JobMetaInsurance.BurglaryTheftMethodOfEntry)); @@ -480,7 +481,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 160 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 161 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxSave()); @@ -491,7 +492,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 161 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 162 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxLoader()); @@ -509,7 +510,7 @@ WriteLiteral(@"> '"); - #line 167 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 168 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Url.Action(MVC.API.Job.UpdateInsuranceBurglaryTheftMethodOfEntry(Model.Job.Id, null))); @@ -528,7 +529,7 @@ WriteLiteral(">\r\n Property Last Seen\r\n
\r\n Action to Reco WriteLiteral(" "); - #line 283 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 284 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Html.EditorFor(m => m.Job.JobMetaInsurance.RecoverReduceAction)); @@ -816,7 +817,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 284 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 285 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxSave()); @@ -827,7 +828,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 285 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 286 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxLoader()); @@ -843,7 +844,7 @@ WriteLiteral(">\r\n $(function () {\r\n " \'"); - #line 291 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 292 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Url.Action(MVC.API.Job.UpdateInsuranceRecoverReduceAction(Model.Job.Id, null))); @@ -859,7 +860,7 @@ WriteLiteral("
\r\n Other Interest WriteLiteral(" "); - #line 303 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 304 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Html.EditorFor(m => m.Job.JobMetaInsurance.OtherInterestedParties)); @@ -870,7 +871,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 304 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 305 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxSave()); @@ -881,7 +882,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 305 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 306 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(AjaxHelpers.AjaxLoader()); @@ -899,7 +900,7 @@ WriteLiteral(@"> '"); - #line 311 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 312 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(Url.Action(MVC.API.Job.UpdateInsuranceOtherInterestedParties(Model.Job.Id, null))); @@ -918,7 +919,7 @@ WriteLiteral(">\r\n Date of Purchase\r\n
\r\n Claim Form Sen WriteLiteral(" "); - #line 345 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaInsurance.ClaimFormSentDate)); + #line 346 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaInsurance.ClaimFormSentDate, "Not Sent", "Job_JobMetaInsurance_ClaimFormSentDate")); #line default @@ -977,58 +978,42 @@ WriteLiteral(" id=\"Job_JobMetaInsurance_ClaimFormSentUserId\""); WriteLiteral(">"); - #line 346 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 347 "..\..\Views\Job\JobParts\Insurance.cshtml" Write(string.IsNullOrEmpty(Model.Job.JobMetaInsurance.ClaimFormSentUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaInsurance.ClaimFormSentUser.ToString())); #line default #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); +WriteLiteral("\r\n + +
Accounting Charge Required @@ -104,146 +107,15 @@
diff --git a/Disco.Web/Views/Job/JobParts/NonWarrantyFinance.generated.cs b/Disco.Web/Views/Job/JobParts/NonWarrantyFinance.generated.cs index 68037d3f..7cd52265 100644 --- a/Disco.Web/Views/Job/JobParts/NonWarrantyFinance.generated.cs +++ b/Disco.Web/Views/Job/JobParts/NonWarrantyFinance.generated.cs @@ -40,7 +40,15 @@ namespace Disco.Web.Views.Job.JobParts } public override void Execute() { -WriteLiteral("