Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a4c1a59e23 | |||
| e164be1823 | |||
| f32451fffa | |||
| a541dbd038 | |||
| 69e0bb70e5 | |||
| c22a2623c2 | |||
| ec2edce74c | |||
| 4756551518 | |||
| e053b42950 |
@@ -20,6 +20,9 @@ namespace Archetype.Api
|
||||
[PluginController("ArchetypeApi")]
|
||||
public class ArchetypeDataTypeController : UmbracoAuthorizedJsonController
|
||||
{
|
||||
private static DateTime _lastVersionCheck;
|
||||
private const int IntervalInDaysBetweenVersionChecks = 7;
|
||||
|
||||
public IEnumerable<object> GetAllPropertyEditors()
|
||||
{
|
||||
return
|
||||
@@ -30,7 +33,7 @@ namespace Archetype.Api
|
||||
/// <summary>
|
||||
/// Gets all datatypes.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <returns>System.Object.</returns>
|
||||
public object GetAll()
|
||||
{
|
||||
var dataTypes = Services.DataTypeService.GetAllDataTypeDefinitions();
|
||||
@@ -139,7 +142,7 @@ namespace Archetype.Api
|
||||
[HttpPost]
|
||||
public object CheckForUpdates()
|
||||
{
|
||||
if (!ArchetypeGlobalSettings.Instance.CheckForUpdates)
|
||||
if (!ArchetypeGlobalSettings.Instance.CheckForUpdates || !IsItTimeToCheck())
|
||||
{
|
||||
return new
|
||||
{
|
||||
@@ -148,6 +151,7 @@ namespace Archetype.Api
|
||||
}
|
||||
|
||||
var updateNotificationModel = ArchetypeHelper.Instance.CheckForUpdates();
|
||||
_lastVersionCheck = DateTime.UtcNow;
|
||||
|
||||
return new
|
||||
{
|
||||
@@ -158,5 +162,10 @@ namespace Archetype.Api
|
||||
url = updateNotificationModel.Url
|
||||
};
|
||||
}
|
||||
|
||||
internal bool IsItTimeToCheck()
|
||||
{
|
||||
return _lastVersionCheck.AddDays(IntervalInDaysBetweenVersionChecks) < DateTime.UtcNow;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("1.17.0")]
|
||||
[assembly: AssemblyFileVersion("1.17.0")]
|
||||
[assembly: AssemblyVersion("1.17.1")]
|
||||
[assembly: AssemblyFileVersion("1.17.1")]
|
||||
|
||||
@@ -375,7 +375,7 @@
|
||||
margin-left: 0;
|
||||
}
|
||||
li {
|
||||
line-height: 0;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.show-validation.ng-invalid .control-group.error .control-label {
|
||||
|
||||
@@ -547,10 +547,11 @@ angular.module('umbraco.services').factory('archetypeLabelService', function (ar
|
||||
|
||||
if(datatype) {
|
||||
//try to get built-in label
|
||||
var templateLabelValue = getNativeLabel(datatype, rawValue, scope);
|
||||
var label = getNativeLabel(datatype, rawValue, scope);
|
||||
|
||||
//console.log("Native label...");
|
||||
//console.log(templateLabelValue);
|
||||
if (label) {
|
||||
templateLabelValue = label;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Archetype",
|
||||
"version": "1.17.0",
|
||||
"version": "1.17.1",
|
||||
"url": "http://github.com/kgiszewski/archetype/",
|
||||
"author": "Kevin Giszewski - Tom Fulton - Lee Kelleher - Matt Brailsford - Kenn Jacobsen - Nicholas Westby - Et. Al.",
|
||||
"authorUrl": "http://github.com/kgiszewski/archetype/",
|
||||
|
||||
Reference in New Issue
Block a user