Merge branch '7.0.0' of https://github.com/umbraco/Umbraco-CMS into 7.0.0

This commit is contained in:
Sebastiaan Janssen
2013-11-05 12:01:15 +01:00
20 changed files with 201 additions and 94 deletions

View File

@@ -1,32 +1,32 @@
@ECHO OFF
SET release=7.0.0
SET comment=RC
SET version=%release%
IF [%comment%] EQU [] (SET version=%release%) ELSE (SET version=%release%-%comment%)
ReplaceIISExpressPortNumber.exe ..\src\Umbraco.Web.UI\Umbraco.Web.UI.csproj %release%
%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe "Build.proj" /p:BUILD_RELEASE=%release% /p:BUILD_COMMENT=%comment%
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\App_Code\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\App_Data\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\App_Plugins\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\css\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\macroScripts\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\masterpages\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\media\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\scripts\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\usercontrols\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\Views\Partials\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\Views\MacroPartials\dummy.txt
..\src\.nuget\NuGet.exe pack NuSpecs\UmbracoCms.Core.nuspec -Version %version%
..\src\.nuget\NuGet.exe pack NuSpecs\UmbracoCms.nuspec -Version %version%
IF ERRORLEVEL 1 GOTO :showerror
GOTO :EOF
:showerror
PAUSE
@ECHO OFF
SET release=7.0.0
SET comment=RC
SET version=%release%
IF [%comment%] EQU [] (SET version=%release%) ELSE (SET version=%release%-%comment%)
ReplaceIISExpressPortNumber.exe ..\src\Umbraco.Web.UI\Umbraco.Web.UI.csproj %release%
%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe "Build.proj" /p:BUILD_RELEASE=%release% /p:BUILD_COMMENT=%comment%
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\App_Code\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\App_Data\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\App_Plugins\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\css\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\macroScripts\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\masterpages\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\media\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\scripts\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\usercontrols\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\Views\Partials\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\Views\MacroPartials\dummy.txt
..\src\.nuget\NuGet.exe pack NuSpecs\UmbracoCms.Core.nuspec -Version %version%
..\src\.nuget\NuGet.exe pack NuSpecs\UmbracoCms.nuspec -Version %version%
IF ERRORLEVEL 1 GOTO :showerror
GOTO :EOF
:showerror
PAUSE

View File

@@ -131,10 +131,10 @@ namespace Umbraco.Core.Persistence.Migrations.Initial
private void CreateCmsContentTypeData()
{
_database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 532, NodeId = 1031, Alias = Constants.Conventions.MediaTypes.Folder, Icon = "folder.gif", Thumbnail = "folder.png", IsContainer = true, AllowAtRoot = true });
_database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 533, NodeId = 1032, Alias = Constants.Conventions.MediaTypes.Image, Icon = "mediaPhoto.gif", Thumbnail = "mediaPhoto.png" });
_database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 534, NodeId = 1033, Alias = Constants.Conventions.MediaTypes.File, Icon = "mediaFile.gif", Thumbnail = "mediaFile.png" });
_database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 531, NodeId = 1044, Alias = Constants.Conventions.MemberTypes.Member, Icon = "member.gif", Thumbnail = "folder.png" });
_database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 532, NodeId = 1031, Alias = Constants.Conventions.MediaTypes.Folder, Icon = "icon-folder", Thumbnail = "folder.png", IsContainer = true, AllowAtRoot = true });
_database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 533, NodeId = 1032, Alias = Constants.Conventions.MediaTypes.Image, Icon = "icon-picture", Thumbnail = "mediaPhoto.png" });
_database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 534, NodeId = 1033, Alias = Constants.Conventions.MediaTypes.File, Icon = "icon-document", Thumbnail = "mediaFile.png" });
_database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 531, NodeId = 1044, Alias = Constants.Conventions.MemberTypes.Member, Icon = "icon-user", Thumbnail = "folder.png" });
}
private void CreateUmbracoUserData()

View File

@@ -539,20 +539,6 @@ namespace Umbraco.Tests.PublishedContent
Assert.AreEqual("Custom data with same property name as the member name", asDynamic.GetPropertyValue("CreatorName"));
}
[Test]
public void GetPropertyValue_Reflected()
{
var asDynamic = GetDynamicNode(1174);
// NOTE: that test breaks because of U4-3094 fix in DynamicPublishedContent
// previously, DynamicPublishedContent.GetProperty would honor the '_' and '@' syntax.
// now that it's just using the original proper IPublishedContent way, it does not anymore
// I *think* it makes sense. Then kill that test. Do we all agree? - Stephan
Assert.AreEqual("admin", asDynamic.GetPropertyValue("@creatorName"));
Assert.AreEqual("admin", asDynamic.GetPropertyValue("@CreatorName"));
}
[Test]
public void Get_User_Property_With_Same_Name_As_Member_Property()
{
@@ -604,7 +590,11 @@ namespace Umbraco.Tests.PublishedContent
Assert.IsNotNull(result);
// ancestor-or-self has to be self!
Assert.AreEqual(1173, (int)result.Id);
// but that's not what the "legacy" razor macro engine does...
if (result is Umbraco.Web.Models.DynamicPublishedContent)
Assert.AreEqual(1173, (int)result.Id); // that one works
else
Assert.AreEqual(1046, (int)result.Id); // that one still is fubar
}
[Test]

View File

@@ -344,6 +344,34 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
parentId: parentId
}),
'Failed to add folder');
},
/**
* @ngdoc method
* @name umbraco.resources.mediaResource#emptyRecycleBin
* @methodOf umbraco.resources.mediaResource
*
* @description
* Empties the media recycle bin
*
* ##usage
* <pre>
* mediaResource.emptyRecycleBin()
* .then(function() {
* alert('its empty!');
* });
* </pre>
*
* @returns {Promise} resourcePromise object.
*
*/
emptyRecycleBin: function() {
return umbRequestHelper.resourcePromise(
$http.delete(
umbRequestHelper.getApiUrl(
"mediaApiBaseUrl",
"EmptyRecycleBin")),
'Failed to empty the recycle bin');
}
};
}

View File

@@ -7,7 +7,7 @@
// --------------------------------------------------
// Core
.btn, input[type=submit] {
.btn {
display: inline-block;
.ie7-inline-block();
padding: 4px 12px;

View File

@@ -184,6 +184,10 @@ i.small{
.icon-umb-members:before, .traymember:before {
content: "\e015";
}
.icon-umb-translation:before, .traytranslation:before {
content: "\e1fd";
}
.icon-tv:before {
content: "\e02e";

View File

@@ -7,9 +7,8 @@ data-file-upload-progress=""
data-ng-class="{'fileupload-processing': processing() || loadingFiles}">
<span class="btn fileinput-button umb-upload-button-big"
ng-class="{disabled: disabled}" ng-show="touchDevice || images.length === 0">
<span class="fileinput-button umb-upload-button-big"
ng-class="{disabled: disabled}">
<i class="icon icon-page-up"></i>
<p>Click to upload</p>
<input type="file" name="files[]" multiple ng-disabled="disabled">

View File

@@ -0,0 +1,8 @@
<div class="umb-dialog" ng-controller="Umbraco.Editors.Media.EmptyRecycleBinController">
<div class="umb-dialog-body">
<umb-confirm on-confirm="performDelete" on-cancel="cancel">
</umb-confirm>
</div>
</div>

View File

@@ -29,7 +29,7 @@ function mediaEditController($scope, $routeParams, mediaResource, navigationServ
// after the redirect, so we will bind all subscriptions which will show the server validation errors
// if there are any and then clear them so the collection no longer persists them.
serverValidationManager.executeAndClearAllSubscriptions();
navigationService.syncPath(data.path, true);
});
}
@@ -61,6 +61,7 @@ function mediaEditController($scope, $routeParams, mediaResource, navigationServ
rebindCallback: contentEditingHelper.reBindChangedProperties($scope.content, data)
});
navigationService.syncPath(data.path, true);
}, function(err) {
contentEditingHelper.handleSaveError({

View File

@@ -0,0 +1,30 @@
/**
* @ngdoc controller
* @name Umbraco.Editors.Media.EmptyRecycleBinController
* @function
*
* @description
* The controller for deleting media
*/
function MediaEmptyRecycleBinController($scope, mediaResource, treeService, navigationService) {
$scope.performDelete = function() {
//(used in the UI)
$scope.currentNode.loading = true;
mediaResource.emptyRecycleBin($scope.currentNode.id).then(function () {
$scope.currentNode.loading = false;
//TODO: Need to sync tree, etc...
treeService.removeChildNodes($scope.currentNode);
navigationService.hideMenu();
});
};
$scope.cancel = function() {
navigationService.hideDialog();
};
}
angular.module("umbraco").controller("Umbraco.Editors.Media.EmptyRecycleBinController", MediaEmptyRecycleBinController);

View File

@@ -2,16 +2,15 @@
<div class="umb-pane">
<h5>Create a new member</h5>
<ul class="umb-actions umb-actions-child">
<li ng-repeat="docType in allowedTypes">
<a href="#members/member/edit/{{currentNode.id}}?doctype={{docType.alias}}&create=true" ng-click="nav.hideNavigation()">
<a href="#member/member/edit/{{currentNode.id}}?doctype={{docType.alias}}&create=true" ng-click="nav.hideNavigation()">
<i class="large {{docType.icon}}"></i>
<i class="large icon-users"></i>
<span class="menu-label">{{docType.name}}
<small>{{docType.description}}</small>
<small>{{docType.description}}</small>
</span>
</a>
</li>

View File

@@ -9,6 +9,7 @@
function MemberEditController($scope, $routeParams, $location, $q, $window, memberResource, entityResource, navigationService, notificationsService, angularHelper, serverValidationManager, contentEditingHelper, fileManager, formHelper, treeService) {
$scope.nav = navigationService;
if ($routeParams.create) {
//we are creating so get an empty member item
@@ -37,6 +38,13 @@ function MemberEditController($scope, $routeParams, $location, $q, $window, memb
$scope.loaded = true;
$scope.content = data;
//build a path to sync the tree with
var path = data.name[0]+"," + data.key;
path = path.replace(/-/g,'');
navigationService.setActiveTreeType("member");
navigationService.syncPath(path.split(","), true);
//in one particular special case, after we've created a new item we redirect back to the edit
// route but there might be server validation errors in the collection which we need to display
// after the redirect, so we will bind all subscriptions which will show the server validation errors
@@ -47,6 +55,8 @@ function MemberEditController($scope, $routeParams, $location, $q, $window, memb
}
$scope.options = function(content){
if(!content.id){
return;

View File

@@ -1,5 +1,9 @@
<div ng-controller="Umbraco.PropertyEditors.ColorPickerController">
<div ng-hide="model.config.items.length === 0" >
<localize key="colorpicker_noColors">You havn't defined any colors</localize>
</div>
<ul class="thumbnails color-picker">
<li ng-repeat="(key, val) in model.config.items" ng-class="{active: model.value === val}">
<a ng-click="selectItem(val)" class="thumbnail" style="background-color:#{{val}}">

View File

@@ -7,14 +7,13 @@ data-file-upload-progress=""
ng-hide="creating"
data-ng-class="{'fileupload-processing': processing() || loadingFiles}">
<span class="fileinput-button umb-upload-button-big"
ng-show="touchDevice || images.length === 0"
<span class="fileinput-button umb-upload-button-big"
ng-hide="dropping"
ng-class="{disabled: disabled}">
<i class="icon icon-page-up"></i>
<p>Click to upload</p>
<input type="file" name="files[]" multiple ng-disabled="disabled">
</span>
<i class="icon icon-page-up"></i>
<p>Click to upload</p>
<input type="file" name="files[]" multiple ng-disabled="disabled">
</span>
<umb-upload-dropzone dropping="dropping" files="filesUploading">
</umb-upload-dropzone>
@@ -23,6 +22,7 @@ data-ng-class="{'fileupload-processing': processing() || loadingFiles}">
min-height="220"
min-width="220"
on-click="clickHandler"
ng-model="images"
/>
ng-model="images"/>
</form>

View File

@@ -24,32 +24,41 @@
})(jQuery);
</script>
<% } %>
<div id="starter-kit-progress" style="display: none;">
<h2>Installation in progress...</h2>
<div class="loader">
<div class="hold">
<div class="progress-bar">
</div>
<span class="progress-bar-value">0%</span>
</div>
<strong></strong>
</div>
</div>
<asp:Repeater ID="rep_starterKits" runat="server">
<HeaderTemplate>
<ul class="thumbnails">
</HeaderTemplate>
<ItemTemplate>
<li class="add-<%# ((Package)Container.DataItem).Text.Replace(" ","").ToLower() %>">
<div class="image">
<a href="#" class="single-tab selectStarterKit" title="Install <%# ((Package)Container.DataItem).Text %>" data-repoId="<%# ((Package)Container.DataItem).RepoGuid %>">
<div class="overlay">Install <%# ((Package)Container.DataItem).Text %></div>
<img src="http://our.umbraco.org<%# ((Package)Container.DataItem).Thumbnail %>" alt="<%# ((Package)Container.DataItem).Text %>">
</a>
<a class="zoom-in" title="Enlarge <%# ((Package)Container.DataItem).Text %>" href="#<%# ((Package)Container.DataItem).Text %>">Open</a>
</div>
</li>
<div id="<%# ((Package)Container.DataItem).Text %>" class="lb"><a href="#top"><img src="http://our.umbraco.org<%# ((Package)Container.DataItem).Thumbnail %>" alt="oh man" /></a></div>
<headertemplate>
<ul class="thumbnails">
</headertemplate>
<itemtemplate>
<li class="add-<%# ((Package)Container.DataItem).Text.Replace(" ","").ToLower() %>">
<div class="image">
</ItemTemplate>
<FooterTemplate>
<div class="overlay"><a href="#" class="single-tab selectStarterKit" data-name="<%# ((Package)Container.DataItem).Text %>" title="Install <%# ((Package)Container.DataItem).Text %>" data-repoid="<%# ((Package)Container.DataItem).RepoGuid %>">Install <%# ((Package)Container.DataItem).Text %></a></div>
<img src="http://our.umbraco.org<%# ((Package)Container.DataItem).Thumbnail %>" alt="<%# ((Package)Container.DataItem).Text %>">
<a class="zoom-in" title="Enlarge <%# ((Package)Container.DataItem).Text %>" href="#<%# ((Package)Container.DataItem).Text %>">Open</a>
</div>
</li>
<div id="<%# ((Package)Container.DataItem).Text %>" class="lb"><a href="#top"><img src="http://our.umbraco.org<%# ((Package)Container.DataItem).Thumbnail %>" alt="oh man" /></a></div>
</itemtemplate>
<footertemplate>
</ul>
<asp:LinkButton runat="server" ID="declineStarterKits" CssClass="declineKit" OnClientClick="return confirm('Are you sure you do not want to install a starter kit?');" OnClick="NextStep">
<asp:LinkButton runat="server" ID="declineStarterKits" CssClass="declineKit" OnClientClick="return confirm('Are you sure you do not want to install a starter kit?');" OnClick="NextStep">
No thanks, do not install a starterkit!
</asp:LinkButton>
</FooterTemplate>
</asp:LinkButton>
</footertemplate>
</asp:Repeater>
</asp:PlaceHolder>

View File

@@ -158,7 +158,7 @@
<key alias="type">Type</key>
<key alias="unPublish">Unpublish</key>
<key alias="updateDate">Last edited</key>
<key alias="updateDateDesc" version="7.0">Date/time this document was created</key>
<key alias="updateDateDesc" version="7.0">Date/time this document was edited</key>
<key alias="uploadClear">Remove file</key>
<key alias="urls">Link to document</key>
<key alias="memberof">Member of group(s)</key>
@@ -693,6 +693,9 @@ To manage your website, simply open the umbraco back office and start adding con
You can publish this page and all it's sub-pages by checking <em>publish all children</em> below.
]]></key>
</area>
<area alias="colorpicker">
<key alias="noColors">You have not configured any approved colors</key>
</area>
<area alias="relatedlinks">
<key alias="addExternal">Add external link</key>
<key alias="addInternal">Add internal link</key>

View File

@@ -183,11 +183,11 @@
<tr>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" CssClass="add-validator" runat="server" ControlToValidate="macroPropertyAliasNew" Display="Dynamic" ForeColor="#b94a48">Required<br/></asp:RequiredFieldValidator>
<asp:TextBox runat="server" ID="macroPropertyAliasNew" Text='New Alias' OnTextChanged="macroPropertyCreate" />
<asp:TextBox runat="server" ID="macroPropertyAliasNew" PlaceHolder='New Alias' OnTextChanged="macroPropertyCreate" />
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" CssClass="add-validator" runat="server" ControlToValidate="macroPropertyNameNew" Display="Dynamic" ForeColor="#b94a48">Required<br/></asp:RequiredFieldValidator>
<asp:TextBox runat="server" ID="macroPropertyNameNew" Text='New Name' />
<asp:TextBox runat="server" ID="macroPropertyNameNew" PlaceHolder='New Name' />
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" CssClass="add-validator" runat="server" ControlToValidate="macroPropertyTypeNew" Display="Dynamic" ForeColor="#b94a48">Required<br/></asp:RequiredFieldValidator>

View File

@@ -72,6 +72,14 @@
//bind to the click handler for each of the install starter kit buttons
this._opts.starterKits.click(function () {
// show status screen
$(".thumbnails").fadeOut();
$(".declineKit").fadeOut();
$("#starter-kit-progress").fadeIn();
// set progress
self._setProgress("5", "Downloading " + $(this).attr("data-name"));
//set the package id to install
self._packageId = $(this).attr("data-repoId");
self.downloadPackageFiles();

View File

@@ -358,6 +358,20 @@ namespace Umbraco.Web.Editors
//use the base method to map the rest of the properties
base.MapPropertyValues(contentItem);
}
/// <summary>
/// Empties the recycle bin
/// </summary>
/// <returns></returns>
[HttpDelete]
public HttpResponseMessage EmptyRecycleBin()
{
Services.MediaService.EmptyRecycleBin();
return Request.CreateResponse(HttpStatusCode.OK);
}
/// <summary>
/// Change the sort order for media

View File

@@ -20,7 +20,7 @@ namespace umbraco.cms.presentation.create.controls
protected void Page_Load(object sender, System.EventArgs e)
{
sbmt.Text = ui.Text("create");
rename.Text = ui.Text("name");
rename.Attributes["placeholder"] = ui.Text("name");
// Put user code to initialize the page here
}