Merge branch '7.1.0' of https://github.com/umbraco/Umbraco-CMS into 7.1.0
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
@ECHO OFF
|
||||
SET release=7.1.0
|
||||
SET comment=
|
||||
SET comment=beta
|
||||
SET version=%release%
|
||||
|
||||
IF [%comment%] EQU [] (SET version=%release%) ELSE (SET version=%release%-%comment%)
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Umbraco.Core.Configuration
|
||||
/// Gets the version comment (like beta or RC).
|
||||
/// </summary>
|
||||
/// <value>The version comment.</value>
|
||||
public static string CurrentComment { get { return ""; } }
|
||||
public static string CurrentComment { get { return "beta"; } }
|
||||
|
||||
// Get the version of the umbraco.dll by looking at a class in that dll
|
||||
// Had to do it like this due to medium trust issues, see: http://haacked.com/archive/2010/11/04/assembly-location-and-medium-trust.aspx
|
||||
|
||||
@@ -85,19 +85,34 @@ function tinyMceService(dialogService, $log, imageHelper, $http, $timeout, macro
|
||||
icon: 'custom icon-picture',
|
||||
tooltip: 'Media Picker',
|
||||
onclick: function () {
|
||||
|
||||
var selectedElm = editor.selection.getNode(),
|
||||
currentTarget;
|
||||
|
||||
|
||||
if(selectedElm.nodeName === 'IMG'){
|
||||
var img = $(selectedElm);
|
||||
currentTarget = {
|
||||
name: img.attr("alt"),
|
||||
url: img.attr("src"),
|
||||
id: img.attr("rel")
|
||||
};
|
||||
}
|
||||
|
||||
dialogService.mediaPicker({
|
||||
currentTarget: currentTarget,
|
||||
onlyImages: true,
|
||||
scope: $scope, callback: function (img) {
|
||||
|
||||
if (img) {
|
||||
var imagePropVal = imageHelper.getImagePropertyValue({ imageModel: img, scope: $scope });
|
||||
var data = {
|
||||
alt: "Some description",
|
||||
src: (imagePropVal) ? imagePropVal : "nothing.jpg",
|
||||
alt: img.name,
|
||||
src: (img.url) ? img.url : "nothing.jpg",
|
||||
rel: img.id,
|
||||
id: '__mcenew'
|
||||
};
|
||||
|
||||
|
||||
editor.insertContent(editor.dom.createHTML('img', data));
|
||||
|
||||
$timeout(function () {
|
||||
@@ -131,8 +146,6 @@ function tinyMceService(dialogService, $log, imageHelper, $http, $timeout, macro
|
||||
*/
|
||||
createLinkPicker: function (editor, $scope) {
|
||||
|
||||
|
||||
|
||||
/*
|
||||
editor.addButton('link', {
|
||||
icon: 'custom icon-link',
|
||||
|
||||
@@ -30,3 +30,8 @@ angular.module("umbraco.install").controller("Umbraco.InstallerController",
|
||||
installerService.gotoStep(0);
|
||||
};
|
||||
});
|
||||
|
||||
//this ensure that we start with a clean slate on every install and upgrade
|
||||
angular.module("umbraco.install").run(function($templateCache){
|
||||
$templateCache.removeAll();
|
||||
});
|
||||
@@ -1,7 +1,7 @@
|
||||
//used for the media picker dialog
|
||||
angular.module("umbraco")
|
||||
.controller("Umbraco.Dialogs.MediaPickerController",
|
||||
function ($scope, mediaResource, umbRequestHelper, entityResource, $log, imageHelper, eventsService, treeService, $cookies) {
|
||||
function ($scope, mediaResource, umbRequestHelper, entityResource, $log, mediaHelper, eventsService, treeService, $cookies) {
|
||||
|
||||
var dialogOptions = $scope.$parent.dialogOptions;
|
||||
$scope.onlyImages = dialogOptions.onlyImages;
|
||||
@@ -15,6 +15,12 @@ angular.module("umbraco")
|
||||
}
|
||||
};
|
||||
|
||||
//preload selected item
|
||||
$scope.target = undefined;
|
||||
if(dialogOptions.currentTarget){
|
||||
$scope.target = dialogOptions.currentTarget;
|
||||
}
|
||||
|
||||
$scope.submitFolder = function(e) {
|
||||
if (e.keyCode === 13) {
|
||||
e.preventDefault();
|
||||
@@ -57,6 +63,7 @@ angular.module("umbraco")
|
||||
.then(function(data) {
|
||||
|
||||
$scope.images = [];
|
||||
|
||||
$scope.searchTerm = "";
|
||||
if(data.items){
|
||||
$scope.images = data.items;
|
||||
@@ -64,9 +71,9 @@ angular.module("umbraco")
|
||||
|
||||
|
||||
//update the thumbnail property
|
||||
_.each($scope.images, function(img) {
|
||||
img.thumbnail = imageHelper.getThumbnail({ imageModel: img, scope: $scope });
|
||||
});
|
||||
//_.each($scope.images, function(img) {
|
||||
// img.thumbnail = imageHelper.getThumbnail({ imageModel: img, scope: $scope });
|
||||
//});
|
||||
|
||||
//reject all images that have an empty thumbnail - this can occur if there's an image item
|
||||
// that doesn't have an uploaded image.
|
||||
@@ -79,11 +86,9 @@ angular.module("umbraco")
|
||||
});
|
||||
|
||||
$scope.options.formData.currentFolder = folder.id;
|
||||
$scope.currentFolder = folder;
|
||||
|
||||
$scope.currentFolder = folder;
|
||||
};
|
||||
|
||||
|
||||
$scope.$on('fileuploadstop', function(event, files) {
|
||||
$scope.gotoFolder($scope.currentFolder);
|
||||
});
|
||||
@@ -100,13 +105,27 @@ angular.module("umbraco")
|
||||
$scope.select(image);
|
||||
image.cssclass = ($scope.dialogData.selection.indexOf(image) > -1) ? "selected" : "";
|
||||
}else {
|
||||
$scope.submit(image);
|
||||
|
||||
$scope.target= {};
|
||||
$scope.target.id = image.id;
|
||||
$scope.target.name = image.name;
|
||||
$scope.target.url = mediaHelper.resolveFile(image); // getMediaPropertyValue({mediaModel: image});
|
||||
|
||||
//$scope.submit(image);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
$scope.exitDetails = function(){
|
||||
if(!$scope.currentFolder){
|
||||
$scope.gotoFolder();
|
||||
}
|
||||
|
||||
$scope.target = undefined;
|
||||
};
|
||||
|
||||
$scope.selectFolder= function(folder) {
|
||||
if ($scope.multiPicker) {
|
||||
$scope.select(folder);
|
||||
@@ -132,5 +151,8 @@ angular.module("umbraco")
|
||||
};
|
||||
|
||||
//default root item
|
||||
$scope.gotoFolder();
|
||||
if(!$scope.target){
|
||||
$scope.gotoFolder();
|
||||
}
|
||||
|
||||
});
|
||||
@@ -1,7 +1,55 @@
|
||||
<form ng-controller="Umbraco.Dialogs.MediaPickerController" id="fileupload" method="POST" enctype="multipart/form-data"
|
||||
data-file-upload="options" data-file-upload-progress="" data-ng-class="{'fileupload-processing': processing() || loadingFiles}">
|
||||
|
||||
<div class="umb-panel umb-dialogs-mediapicker">
|
||||
<div class="umb-panel umb-dialogs-mediapicker" ng-if="target">
|
||||
<div class="umb-panel-body no-header with-footer compact">
|
||||
<umb-pane>
|
||||
<umb-control-group ng-if="target.url">
|
||||
<div class="thumbnail span6 clearfix">
|
||||
<img ng-src="{{target.url}}" />
|
||||
</div>
|
||||
</umb-control-group>
|
||||
|
||||
<umb-control-group label="@general_url">
|
||||
<input type="text"
|
||||
localize="placeholder"
|
||||
placeholder="@general_url"
|
||||
class="umb-editor umb-textstring"
|
||||
ng-model="target.url"
|
||||
ng-disabled="target.id"/>
|
||||
</umb-control-group>
|
||||
|
||||
<umb-control-group label="@content_titleOptional">
|
||||
|
||||
<input type="text"
|
||||
localize="placeholder"
|
||||
placeholder="@placeholders_entername"
|
||||
class="umb-editor umb-textstring"
|
||||
ng-model="target.name" />
|
||||
|
||||
</umb-control-group>
|
||||
</umb-pane>
|
||||
</div>
|
||||
|
||||
<div class="umb-panel-footer" >
|
||||
<div class="umb-el-wrap umb-panel-buttons">
|
||||
<div class="btn-toolbar umb-btn-toolbar pull-right">
|
||||
<a href ng-click="exitDetails()" class="btn btn-link">
|
||||
<localize key="general_cancel">Cancel</localize>
|
||||
</a>
|
||||
|
||||
<button
|
||||
class="btn btn-primary"
|
||||
ng-click="submit(target)">
|
||||
<localize key="general_insert">Insert</localize>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="umb-panel umb-dialogs-mediapicker" ng-hide="target">
|
||||
<div class="umb-panel-header">
|
||||
|
||||
<div class="umb-el-wrap umb-panel-buttons">
|
||||
@@ -64,23 +112,23 @@ data-file-upload="options" data-file-upload-progress="" data-ng-class="{'fileupl
|
||||
|
||||
|
||||
<div class="umb-panel-footer" >
|
||||
<div class="umb-el-wrap umb-panel-buttons">
|
||||
<div class="btn-toolbar umb-btn-toolbar pull-right">
|
||||
<div class="umb-el-wrap umb-panel-buttons">
|
||||
<div class="btn-toolbar umb-btn-toolbar pull-right">
|
||||
|
||||
<a href ng-click="close()" class="btn btn-link">
|
||||
<localize key="general_cancel">Cancel</localize>
|
||||
</a>
|
||||
<a href ng-click="close()" class="btn btn-link">
|
||||
<localize key="general_cancel">Cancel</localize>
|
||||
</a>
|
||||
|
||||
<button
|
||||
class="btn btn-primary"
|
||||
ng-show="multiPicker"
|
||||
ng-click="submit(dialogData.selection)">
|
||||
<localize key="buttons_select">Select</localize>({{dialogData.selection.length}})
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-primary"
|
||||
ng-show="multiPicker"
|
||||
ng-click="submit(dialogData.selection)">
|
||||
<localize key="buttons_select">Select</localize>({{dialogData.selection.length}})
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -15,10 +15,6 @@
|
||||
*/
|
||||
function fileUploadController($scope, $element, $compile, imageHelper, fileManager, umbRequestHelper, mediaHelper) {
|
||||
|
||||
mediaHelper.registerFileResolver("Umbraco.UploadField", function(property){
|
||||
return property.value;
|
||||
});
|
||||
|
||||
/** Clears the file collections when content is saving (if we need to clear) or after saved */
|
||||
function clearFiles() {
|
||||
//clear the files collection (we don't want to upload any!)
|
||||
@@ -127,4 +123,9 @@ function fileUploadController($scope, $element, $compile, imageHelper, fileManag
|
||||
});
|
||||
};
|
||||
angular.module("umbraco")
|
||||
.controller('Umbraco.PropertyEditors.FileUploadController', fileUploadController);
|
||||
.controller('Umbraco.PropertyEditors.FileUploadController', fileUploadController)
|
||||
.run(function(mediaHelper){
|
||||
mediaHelper.registerFileResolver("Umbraco.UploadField", function(property){
|
||||
return property.value;
|
||||
});
|
||||
});
|
||||
@@ -1,19 +1,11 @@
|
||||
//this controller simply tells the dialogs service to open a mediaPicker window
|
||||
//with a specified callback, this callback will receive an object with a selection on it
|
||||
angular.module('umbraco')
|
||||
|
||||
.controller("Umbraco.PropertyEditors.ImageCropperController",
|
||||
function ($rootScope, $routeParams, $scope, $log, mediaHelper, cropperHelper, $timeout, editorState, umbRequestHelper, fileManager) {
|
||||
|
||||
var config = $scope.model.config;
|
||||
mediaHelper.registerFileResolver("Umbraco.ImageCropper", function (property) {
|
||||
if (property.value.src) {
|
||||
return property.value.src;
|
||||
} else if (angular.isString(property.value)) {
|
||||
return property.value;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//move previously saved value to the editor
|
||||
if ($scope.model.value) {
|
||||
//backwards compat with the old file upload (incase some-one swaps them..)
|
||||
@@ -102,4 +94,13 @@ angular.module('umbraco')
|
||||
reader.readAsDataURL(args.files[0]);
|
||||
}
|
||||
});
|
||||
})
|
||||
.run(function(mediaHelper){
|
||||
mediaHelper.registerFileResolver("Umbraco.ImageCropper", function (property) {
|
||||
if (property.value.src) {
|
||||
return property.value.src;
|
||||
} else if (angular.isString(property.value)) {
|
||||
return property.value;
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -10,7 +10,7 @@ NOTES:
|
||||
* Compression/Combination/Minification is not enabled unless debug="false" is specified on the 'compiliation' element in the web.config
|
||||
* A new version will invalidate both client and server cache and create new persisted files
|
||||
-->
|
||||
<clientDependency version="394389720" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, umbraco">
|
||||
<clientDependency version="1469612626" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, umbraco">
|
||||
|
||||
<!--
|
||||
This section is used for Web Forms only, the enableCompositeFiles="true" is optional and by default is set to true.
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Web.UI;
|
||||
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Web.Install.InstallSteps;
|
||||
using Umbraco.Web.Install.Models;
|
||||
@@ -65,6 +66,12 @@ namespace Umbraco.Web.Install
|
||||
return _installationType ?? (_installationType = IsBrandNewInstall ? InstallationType.NewInstall : InstallationType.Upgrade).Value;
|
||||
}
|
||||
|
||||
internal void DeleteLegacyInstaller()
|
||||
{
|
||||
if(Directory.Exists( IOHelper.MapPath( SystemDirectories.Install )))
|
||||
Directory.Move(IOHelper.MapPath(SystemDirectories.Install), IOHelper.MapPath("~/app_data/temp/install_backup"));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if this is a brand new install meaning that there is no configured version and there is no configured database connection
|
||||
/// </summary>
|
||||
|
||||
@@ -103,6 +103,9 @@ namespace Umbraco.Web
|
||||
renderer.Initialize("Umbraco.DependencyPathRenderer", new NameValueCollection { { "compositeFileHandlerPath", "~/DependencyHandler.axd" } });
|
||||
ClientDependencySettings.Instance.MvcRendererCollection.Add(renderer);
|
||||
|
||||
InstallHelper insHelper = new InstallHelper(UmbracoContext.Current);
|
||||
insHelper.DeleteLegacyInstaller();
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user