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 = $('