Merge branch 'dev-v7' into temp8
# Conflicts: # src/SolutionInfo.cs # src/Umbraco.Core/Configuration/UmbracoVersion.cs # src/Umbraco.Core/IO/MediaFileSystem.cs # src/Umbraco.Core/Media/Exif/ImageFile.cs # src/Umbraco.Core/PropertyEditors/ValueConverters/TagsValueConverter.cs # src/Umbraco.Core/Services/MediaService.cs # src/Umbraco.Web.UI.Client/src/canvasdesigner.loader.js # src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbtoggle.directive.js # src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.controller.js # src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js # src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js # src/Umbraco.Web/Editors/ContentController.cs # src/Umbraco.Web/umbraco.presentation/umbraco/translation/details.aspx.cs
This commit is contained in:
@@ -3,57 +3,57 @@
|
|||||||
[string]$Directory
|
[string]$Directory
|
||||||
)
|
)
|
||||||
$workingDirectory = $Directory
|
$workingDirectory = $Directory
|
||||||
CD $workingDirectory
|
CD "$($workingDirectory)"
|
||||||
|
|
||||||
# Clone repo
|
# Clone repo
|
||||||
$fullGitUrl = "https://$env:GIT_URL/$env:GIT_REPOSITORYNAME.git"
|
$fullGitUrl = "https://$($env:GIT_URL)/$($env:GIT_REPOSITORYNAME).git"
|
||||||
git clone $fullGitUrl 2>&1 | % { $_.ToString() }
|
git clone $($fullGitUrl) $($env:GIT_REPOSITORYNAME) 2>&1 | % { $_.ToString() }
|
||||||
|
|
||||||
# Remove everything so that unzipping the release later will update everything
|
# Remove everything so that unzipping the release later will update everything
|
||||||
# Don't remove the readme file nor the git directory
|
# Don't remove the readme file nor the git directory
|
||||||
Write-Host "Cleaning up git directory before adding new version"
|
Write-Host "Cleaning up git directory before adding new version"
|
||||||
Remove-Item -Recurse $workingDirectory\$env:GIT_REPOSITORYNAME\* -Exclude README.md,.git
|
Remove-Item -Recurse "$($workingDirectory)\$($env:GIT_REPOSITORYNAME)\*" -Exclude README.md,.git
|
||||||
|
|
||||||
# Find release zip
|
# Find release zip
|
||||||
$zipsDir = "$workingDirectory\$env:BUILD_DEFINITIONNAME\zips"
|
$zipsDir = "$($workingDirectory)\$($env:BUILD_DEFINITIONNAME)\zips"
|
||||||
$pattern = "UmbracoCms.([0-9]{1,2}.[0-9]{1,3}.[0-9]{1,3}).zip"
|
$pattern = "UmbracoCms.([0-9]{1,2}.[0-9]{1,3}.[0-9]{1,3}).zip"
|
||||||
Write-Host "Searching for Umbraco release files in $workingDirectory\$zipsDir for a file with pattern $pattern"
|
Write-Host "Searching for Umbraco release files in $($zipsDir) for a file with pattern $($pattern)"
|
||||||
$file = (Get-ChildItem $zipsDir | Where-Object { $_.Name -match "$pattern" })
|
$file = (Get-ChildItem "$($zipsDir)" | Where-Object { $_.Name -match "$($pattern)" })
|
||||||
|
|
||||||
if($file)
|
if($file)
|
||||||
{
|
{
|
||||||
# Get release name
|
# Get release name
|
||||||
$version = [regex]::Match($file.Name, $pattern).captures.groups[1].value
|
$version = [regex]::Match($($file.Name), $($pattern)).captures.groups[1].value
|
||||||
$releaseName = "Umbraco $version"
|
$releaseName = "Umbraco $($version)"
|
||||||
Write-Host "Found $releaseName"
|
Write-Host "Found $($releaseName)"
|
||||||
|
|
||||||
# Unzip into repository to update release
|
# Unzip into repository to update release
|
||||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||||
Write-Host "Unzipping $($file.FullName) to $workingDirectory\$env:GIT_REPOSITORYNAME"
|
Write-Host "Unzipping $($file.FullName) to $($workingDirectory)\$($env:GIT_REPOSITORYNAME)"
|
||||||
[System.IO.Compression.ZipFile]::ExtractToDirectory("$($file.FullName)", "$workingDirectory\$env:GIT_REPOSITORYNAME")
|
[System.IO.Compression.ZipFile]::ExtractToDirectory("$($file.FullName)", "$($workingDirectory)\$($env:GIT_REPOSITORYNAME)")
|
||||||
|
|
||||||
# Telling git who we are
|
# Telling git who we are
|
||||||
git config --global user.email "coffee@umbraco.com" 2>&1 | % { $_.ToString() }
|
git config --global user.email "coffee@umbraco.com" 2>&1 | % { $_.ToString() }
|
||||||
git config --global user.name "Umbraco HQ" 2>&1 | % { $_.ToString() }
|
git config --global user.name "Umbraco HQ" 2>&1 | % { $_.ToString() }
|
||||||
|
|
||||||
# Commit
|
# Commit
|
||||||
CD $env:GIT_REPOSITORYNAME
|
CD "$($workingDirectory)\$($env:GIT_REPOSITORYNAME)"
|
||||||
Write-Host "Committing Umbraco $version Release from Build Output"
|
Write-Host "Committing Umbraco $($version) Release from Build Output"
|
||||||
|
|
||||||
git add . 2>&1 | % { $_.ToString() }
|
git add . 2>&1 | % { $_.ToString() }
|
||||||
git commit -m " Release $releaseName from Build Output" 2>&1 | % { $_.ToString() }
|
git commit -m " Release $($releaseName) from Build Output" 2>&1 | % { $_.ToString() }
|
||||||
|
|
||||||
# Tag the release
|
# Tag the release
|
||||||
git tag -a "v$version" -m "v$version"
|
git tag -a "v$($version)" -m "v$($version)"
|
||||||
|
|
||||||
# Push release to master
|
# Push release to master
|
||||||
$fullGitAuthUrl = "https://$($env:GIT_USERNAME):$GitHubPersonalAccessToken@$env:GIT_URL/$env:GIT_REPOSITORYNAME.git"
|
$fullGitAuthUrl = "https://$($env:GIT_USERNAME):$($GitHubPersonalAccessToken)@$($env:GIT_URL)/$($env:GIT_REPOSITORYNAME).git"
|
||||||
git push $fullGitAuthUrl 2>&1 | % { $_.ToString() }
|
git push $($fullGitAuthUrl) 2>&1 | % { $_.ToString() }
|
||||||
|
|
||||||
#Push tag to master
|
#Push tag to master
|
||||||
git push $fullGitAuthUrl --tags 2>&1 | % { $_.ToString() }
|
git push $($fullGitAuthUrl) --tags 2>&1 | % { $_.ToString() }
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Write-Error "Umbraco release file not found, searched in $workingDirectory\$zipsDir for a file with pattern $pattern - cancelling"
|
Write-Error "Umbraco release file not found, searched in $($workingDirectory)\$($zipsDir) for a file with pattern $($pattern) - canceling"
|
||||||
}
|
}
|
||||||
|
|||||||
-1
@@ -54,7 +54,6 @@
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
@param {boolean} checked Set to <code>true</code> or <code>false</code> to toggle the switch.
|
@param {boolean} checked Set to <code>true</code> or <code>false</code> to toggle the switch.
|
||||||
@param {boolean} disabled Set to <code>true</code> or <code>false</code> to disable the switch.
|
|
||||||
@param {callback} onClick The function which should be called when the toggle is clicked.
|
@param {callback} onClick The function which should be called when the toggle is clicked.
|
||||||
@param {string=} showLabels Set to <code>true</code> or <code>false</code> to show a "On" or "Off" label next to the switch.
|
@param {string=} showLabels Set to <code>true</code> or <code>false</code> to show a "On" or "Off" label next to the switch.
|
||||||
@param {string=} labelOn Set a custom label for when the switched is turned on. It will default to "On".
|
@param {string=} labelOn Set a custom label for when the switched is turned on. It will default to "On".
|
||||||
|
|||||||
+5
@@ -140,6 +140,11 @@ function ColorPickerController($scope) {
|
|||||||
if (!$scope.model.value)
|
if (!$scope.model.value)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Backwards compatibility, the color used to be stored as a hex value only
|
||||||
|
if (typeof $scope.model.value === "string") {
|
||||||
|
$scope.model.value = { value: $scope.model.value, label: $scope.model.value };
|
||||||
|
}
|
||||||
|
|
||||||
// Complex color (value and label)?
|
// Complex color (value and label)?
|
||||||
if (!$scope.model.value.hasOwnProperty("value"))
|
if (!$scope.model.value.hasOwnProperty("value"))
|
||||||
return;
|
return;
|
||||||
|
|||||||
+4
-1
@@ -98,7 +98,10 @@ function contentPickerController($scope, entityResource, editorState, iconHelper
|
|||||||
opacity: 0.7,
|
opacity: 0.7,
|
||||||
tolerance: "pointer",
|
tolerance: "pointer",
|
||||||
scroll: true,
|
scroll: true,
|
||||||
zIndex: 6000
|
zIndex: 6000,
|
||||||
|
update: function (e, ui) {
|
||||||
|
angularHelper.getCurrentForm($scope).$setDirty();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if ($scope.model.config) {
|
if ($scope.model.config) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
function listViewController($scope, $routeParams, $injector, $timeout, currentUserResource, notificationsService, iconHelper, editorState, localizationService, appState, $location, listViewHelper, navigationService, editorService, overlayService, languageResource) {
|
function listViewController($scope, $routeParams, $injector, $timeout, currentUserResource, notificationsService, iconHelper, editorState, localizationService, appState, $location, listViewHelper, navigationService, editorService, overlayService, languageResource, mediaHelper) {
|
||||||
|
|
||||||
//this is a quick check to see if we're in create mode, if so just exit - we cannot show children for content
|
//this is a quick check to see if we're in create mode, if so just exit - we cannot show children for content
|
||||||
// that isn't created yet, if we continue this will use the parent id in the route params which isn't what
|
// that isn't created yet, if we continue this will use the parent id in the route params which isn't what
|
||||||
@@ -279,10 +279,12 @@ function listViewController($scope, $routeParams, $injector, $timeout, currentUs
|
|||||||
$scope.listViewResultSet = data;
|
$scope.listViewResultSet = data;
|
||||||
|
|
||||||
//update all values for display
|
//update all values for display
|
||||||
|
var section = appState.getSectionState("currentSection");
|
||||||
if ($scope.listViewResultSet.items) {
|
if ($scope.listViewResultSet.items) {
|
||||||
_.each($scope.listViewResultSet.items, function (e, index) {
|
_.each($scope.listViewResultSet.items, function (e, index) {
|
||||||
setPropertyValues(e);
|
setPropertyValues(e);
|
||||||
if (e.contentTypeAlias === 'Folder') {
|
// create the folders collection (only for media list views)
|
||||||
|
if (section === "media" && !mediaHelper.hasFilePropertyType(e)) {
|
||||||
$scope.folders.push(e);
|
$scope.folders.push(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
|
|
||||||
/Umbraco/**
|
|
||||||
/Umbraco_Client/**
|
|
||||||
@@ -214,7 +214,6 @@
|
|||||||
<Content Include="Config\Splashes\noNodes.aspx" />
|
<Content Include="Config\Splashes\noNodes.aspx" />
|
||||||
<Content Include="Umbraco\Install\Views\Web.config" />
|
<Content Include="Umbraco\Install\Views\Web.config" />
|
||||||
<Content Include="App_Plugins\ModelsBuilder\package.manifest" />
|
<Content Include="App_Plugins\ModelsBuilder\package.manifest" />
|
||||||
<Content Include=".eslintignore" />
|
|
||||||
<None Include="Config\404handlers.Release.config">
|
<None Include="Config\404handlers.Release.config">
|
||||||
<DependentUpon>404handlers.config</DependentUpon>
|
<DependentUpon>404handlers.config</DependentUpon>
|
||||||
</None>
|
</None>
|
||||||
@@ -434,6 +433,12 @@
|
|||||||
<DevelopmentServerPort>8000</DevelopmentServerPort>
|
<DevelopmentServerPort>8000</DevelopmentServerPort>
|
||||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||||
<IISUrl>http://localhost:8000</IISUrl>
|
<IISUrl>http://localhost:8000</IISUrl>
|
||||||
|
<DevelopmentServerPort>7140</DevelopmentServerPort>
|
||||||
|
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||||
|
<IISUrl>http://localhost:7140</IISUrl>
|
||||||
|
<DevelopmentServerPort>7131</DevelopmentServerPort>
|
||||||
|
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||||
|
<IISUrl>http://localhost:7131</IISUrl>
|
||||||
<NTLMAuthentication>False</NTLMAuthentication>
|
<NTLMAuthentication>False</NTLMAuthentication>
|
||||||
<UseCustomServer>False</UseCustomServer>
|
<UseCustomServer>False</UseCustomServer>
|
||||||
<CustomServerUrl>
|
<CustomServerUrl>
|
||||||
|
|||||||
@@ -357,7 +357,9 @@ namespace Umbraco.Web.Editors
|
|||||||
var mapped = MapToDisplay(emptyContent);
|
var mapped = MapToDisplay(emptyContent);
|
||||||
// translate the content type name if applicable
|
// translate the content type name if applicable
|
||||||
mapped.ContentTypeName = Services.TextService.UmbracoDictionaryTranslate(mapped.ContentTypeName);
|
mapped.ContentTypeName = Services.TextService.UmbracoDictionaryTranslate(mapped.ContentTypeName);
|
||||||
mapped.DocumentType.Name = Services.TextService.UmbracoDictionaryTranslate(mapped.DocumentType.Name);
|
// if your user type doesn't have access to the Settings section it would not get this property mapped
|
||||||
|
if(mapped.DocumentType != null)
|
||||||
|
mapped.DocumentType.Name = Services.TextService.UmbracoDictionaryTranslate(mapped.DocumentType.Name);
|
||||||
|
|
||||||
//remove the listview app if it exists
|
//remove the listview app if it exists
|
||||||
mapped.ContentApps = mapped.ContentApps.Where(x => x.Alias != "umbListView").ToList();
|
mapped.ContentApps = mapped.ContentApps.Where(x => x.Alias != "umbListView").ToList();
|
||||||
|
|||||||
@@ -137,7 +137,8 @@ namespace Umbraco.Web.Media.Exif
|
|||||||
return new SvgFile(stream);
|
return new SvgFile(stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new NotValidImageFileException();
|
// We don't know
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ namespace Umbraco.Web.Media
|
|||||||
//Try to load with exif
|
//Try to load with exif
|
||||||
var jpgInfo = ImageFile.FromStream(stream);
|
var jpgInfo = ImageFile.FromStream(stream);
|
||||||
|
|
||||||
if (jpgInfo.Format != ImageFileFormat.Unknown
|
if (jpgInfo != null
|
||||||
|
&& jpgInfo.Format != ImageFileFormat.Unknown
|
||||||
&& jpgInfo.Properties.ContainsKey(ExifTag.PixelYDimension)
|
&& jpgInfo.Properties.ContainsKey(ExifTag.PixelYDimension)
|
||||||
&& jpgInfo.Properties.ContainsKey(ExifTag.PixelXDimension))
|
&& jpgInfo.Properties.ContainsKey(ExifTag.PixelXDimension))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,8 +7,7 @@ namespace Umbraco.Web.Media.TypeDetector
|
|||||||
public static bool IsOfType(Stream fileStream)
|
public static bool IsOfType(Stream fileStream)
|
||||||
{
|
{
|
||||||
var header = GetFileHeader(fileStream);
|
var header = GetFileHeader(fileStream);
|
||||||
|
return header != null && header[0] == 0xff && header[1] == 0xD8;
|
||||||
return header[0] == 0xff && header[1] == 0xD8;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,9 +7,13 @@ namespace Umbraco.Web.Media.TypeDetector
|
|||||||
public static byte[] GetFileHeader(Stream fileStream)
|
public static byte[] GetFileHeader(Stream fileStream)
|
||||||
{
|
{
|
||||||
fileStream.Seek(0, SeekOrigin.Begin);
|
fileStream.Seek(0, SeekOrigin.Begin);
|
||||||
byte[] header = new byte[8];
|
var header = new byte[8];
|
||||||
fileStream.Seek(0, SeekOrigin.Begin);
|
fileStream.Seek(0, SeekOrigin.Begin);
|
||||||
|
|
||||||
|
// Invalid header
|
||||||
|
if (fileStream.Read(header, 0, header.Length) != header.Length)
|
||||||
|
return null;
|
||||||
|
|
||||||
return header;
|
return header;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,17 +7,17 @@ namespace Umbraco.Web.Media.TypeDetector
|
|||||||
{
|
{
|
||||||
public static bool IsOfType(Stream fileStream)
|
public static bool IsOfType(Stream fileStream)
|
||||||
{
|
{
|
||||||
string tiffHeader = GetFileHeader(fileStream);
|
var tiffHeader = GetFileHeader(fileStream);
|
||||||
|
return tiffHeader != null && tiffHeader == "MM\x00\x2a" || tiffHeader == "II\x2a\x00";
|
||||||
return tiffHeader == "MM\x00\x2a" || tiffHeader == "II\x2a\x00";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetFileHeader(Stream fileStream)
|
public static string GetFileHeader(Stream fileStream)
|
||||||
{
|
{
|
||||||
var header = RasterizedTypeDetector.GetFileHeader(fileStream);
|
var header = RasterizedTypeDetector.GetFileHeader(fileStream);
|
||||||
|
if (header == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
string tiffHeader = Encoding.ASCII.GetString(header, 0, 4);
|
var tiffHeader = Encoding.ASCII.GetString(header, 0, 4);
|
||||||
|
|
||||||
return tiffHeader;
|
return tiffHeader;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user