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

This commit is contained in:
per ploug
2014-11-25 14:41:50 +01:00
31 changed files with 403 additions and 408 deletions

View File

@@ -1,82 +0,0 @@
/**
* @ngdoc service
* @name umbraco.resources.stylesheetResource
* @description service to retrieve available stylesheets
*
*
**/
function templateResource($q, $http, umbRequestHelper) {
//the factory object returned
return {
/**
* @ngdoc method
* @name umbraco.resources.stylesheetResource#getAll
* @methodOf umbraco.resources.stylesheetResource
*
* @description
* Gets all registered stylesheets
*
* ##usage
* <pre>
* stylesheetResource.getAll()
* .then(function(stylesheets) {
* alert('its here!');
* });
* </pre>
*
* @returns {Promise} resourcePromise object containing the stylesheets.
*
*/
getAll: function () {
return umbRequestHelper.resourcePromise(
$http.get(
umbRequestHelper.getApiUrl(
"templateApiBaseUrl",
"GetAll")),
'Failed to retrieve stylesheets ');
},
/**
* @ngdoc method
* @name umbraco.resources.stylesheetResource#getRulesByName
* @methodOf umbraco.resources.stylesheetResource
*
* @description
* Returns all defined child rules for a stylesheet with a given name
*
* ##usage
* <pre>
* stylesheetResource.getRulesByName("ie7stylesheet")
* .then(function(rules) {
* alert('its here!');
* });
* </pre>
*
* @returns {Promise} resourcePromise object containing the rules.
*
*/
getById: function (id) {
return umbRequestHelper.resourcePromise(
$http.get(
umbRequestHelper.getApiUrl(
"templateApiBaseUrl",
"GetById",
[{ id: id }])),
'Failed to retreive template ');
},
saveAndRender: function(html, templateId, pageId){
return umbRequestHelper.resourcePromise(
$http.post(
umbRequestHelper.getApiUrl(
"templateApiBaseUrl",
"PostSaveAndRender"),
{templateId: templateId, pageId: pageId, html: html }),
'Failed to retreive template ');
}
};
}
angular.module('umbraco.resources').factory('templateResource', templateResource);

View File

@@ -1,14 +1,17 @@
<div ng-controller="Umbraco.Installer.PackagesController">
<div ng-controller="Umbraco.Installer.PackagesController" id="starterKits">
<h1>Install a starter website</h1>
<p>
Installing a starter website helps you learn how Umbraco works, and gives you a solid
and simple foundation to build on top of.
</p>
<small ng-if="!packages || packages.length == 0">Loading...</small>
<ul class="thumbnails">
<ul class="thumbnails">
<li class="span3" ng-repeat="pck in packages">
<a href ng-click="setPackageAndContinue(pck.id)" class="thumbnail">
<small>Loading...</small>
<img ng-src="http://our.umbraco.org{{pck.thumbnail}}" alt="{{pck.name}}">
</a>
</li>

View File

@@ -288,4 +288,21 @@ select {
width:100%;
overflow:auto;
border:none;
}
#starterKits .thumbnails{
min-height:128px;
}
#starterKits a.thumbnail {
position:relative;
height:98px;
}
#starterKits a.thumbnail small {
position:absolute;
z-index: 50;
top:10px;
left:10px;
}
#starterKits a.thumbnail img {
position:relative;
z-index:100;
}

View File

@@ -1,4 +1,4 @@
function listViewController($rootScope, $scope, $routeParams, $injector, notificationsService, iconHelper, dialogService, editorState, localizationService, $location) {
function listViewController($rootScope, $scope, $routeParams, $injector, notificationsService, iconHelper, dialogService, editorState, localizationService, $location, appState) {
//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
@@ -12,7 +12,8 @@ function listViewController($rootScope, $scope, $routeParams, $injector, notific
//Now we need to check if this is for media, members or content because that will depend on the resources we use
var contentResource, getContentTypesCallback, getListResultsCallback, deleteItemCallback, getIdCallback, createEditUrlCallback;
if ($scope.model.config.entityType && $scope.model.config.entityType === "member") {
//check the config for the entity type, or the current section name (since the config is only set in c#, not in pre-vals)
if (($scope.model.config.entityType && $scope.model.config.entityType === "member") || (appState.getSectionState("currentSection") === "member")) {
$scope.entityType = "member";
contentResource = $injector.get('memberResource');
getContentTypesCallback = $injector.get('memberTypeResource').getTypes;
@@ -26,7 +27,8 @@ function listViewController($rootScope, $scope, $routeParams, $injector, notific
};
}
else {
if ($scope.model.config.entityType && $scope.model.config.entityType === "media") {
//check the config for the entity type, or the current section name (since the config is only set in c#, not in pre-vals)
if (($scope.model.config.entityType && $scope.model.config.entityType === "media") || (appState.getSectionState("currentSection") === "media")) {
$scope.entityType = "media";
contentResource = $injector.get('mediaResource');
getContentTypesCallback = $injector.get('mediaTypeResource').getAllowedTypes;