Merge remote-tracking branch 'origin/dev-v7' into user-group-permissions
# Conflicts: # .gitignore # build/UmbracoVersion.txt # src/SolutionInfo.cs # src/Umbraco.Core/Configuration/UmbracoVersion.cs # src/Umbraco.Web.UI/Umbraco.Web.UI.csproj # src/Umbraco.Web.UI/umbraco/config/lang/en.xml # src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx
This commit is contained in:
@@ -105,14 +105,14 @@ angular.module("umbraco.directives")
|
||||
});
|
||||
|
||||
//// INIT /////
|
||||
$image.load(function(){
|
||||
$timeout(function(){
|
||||
setDimensions();
|
||||
scope.loaded = true;
|
||||
if (scope.onImageLoaded) {
|
||||
scope.onImageLoaded();
|
||||
}
|
||||
});
|
||||
$image.load(function() {
|
||||
$timeout(function() {
|
||||
setDimensions();
|
||||
scope.loaded = true;
|
||||
if (angular.isFunction(scope.onImageLoaded)) {
|
||||
scope.onImageLoaded();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(window).on('resize.umbImageGravity', function(){
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
To read a report of changes between your current version <strong>{{installer.current.model.currentVersion}}</strong> and this version your upgrading to <strong>{{installer.current.model.newVersion}}</strong>
|
||||
To read a report of changes between your current version <strong>{{installer.current.model.currentVersion}}</strong> and this version you're upgrading to <strong>{{installer.current.model.newVersion}}</strong>
|
||||
</p>
|
||||
<p>
|
||||
<a ng-href="{{installer.current.model.reportUrl}}" target="_blank" class="btn btn-info">View Report</a>
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
(function () {
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
function QueryBuilderOverlayController($scope, templateQueryResource, localizationService) {
|
||||
|
||||
var everything = localizationService.localize("template_allContent");
|
||||
var myWebsite = localizationService.localize("template_websiteRoot");
|
||||
var everything = "";
|
||||
var myWebsite = "";
|
||||
var ascendingTranslation = "";
|
||||
var descendingTranslation = "";
|
||||
|
||||
var ascendingTranslation = localizationService.localize("template_ascending");
|
||||
var descendingTranslation = localizationService.localize("template_descending");
|
||||
|
||||
var vm = this;
|
||||
|
||||
vm.properties = [];
|
||||
@@ -21,34 +20,6 @@
|
||||
format: "YYYY-MM-DD"
|
||||
};
|
||||
|
||||
vm.query = {
|
||||
contentType: {
|
||||
name: everything
|
||||
},
|
||||
source: {
|
||||
name: myWebsite
|
||||
},
|
||||
filters: [
|
||||
{
|
||||
property: undefined,
|
||||
operator: undefined
|
||||
}
|
||||
],
|
||||
sort: {
|
||||
property: {
|
||||
alias: "",
|
||||
name: "",
|
||||
},
|
||||
direction: "ascending", //This is the value for sorting sent to server
|
||||
translation: {
|
||||
currentLabel: ascendingTranslation, //This is the localized UI value in the the dialog
|
||||
ascending: ascendingTranslation,
|
||||
descending: descendingTranslation
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
vm.chooseSource = chooseSource;
|
||||
vm.getPropertyOperators = getPropertyOperators;
|
||||
vm.addFilter = addFilter;
|
||||
@@ -63,21 +34,48 @@
|
||||
|
||||
function onInit() {
|
||||
|
||||
vm.query = {
|
||||
contentType: {
|
||||
name: everything
|
||||
},
|
||||
source: {
|
||||
name: myWebsite
|
||||
},
|
||||
filters: [
|
||||
{
|
||||
property: undefined,
|
||||
operator: undefined
|
||||
}
|
||||
],
|
||||
sort: {
|
||||
property: {
|
||||
alias: "",
|
||||
name: "",
|
||||
},
|
||||
direction: "ascending", //This is the value for sorting sent to server
|
||||
translation: {
|
||||
currentLabel: ascendingTranslation, //This is the localized UI value in the the dialog
|
||||
ascending: ascendingTranslation,
|
||||
descending: descendingTranslation
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
templateQueryResource.getAllowedProperties()
|
||||
.then(function (properties) {
|
||||
.then(function(properties) {
|
||||
vm.properties = properties;
|
||||
});
|
||||
|
||||
templateQueryResource.getContentTypes()
|
||||
.then(function (contentTypes) {
|
||||
.then(function(contentTypes) {
|
||||
vm.contentTypes = contentTypes;
|
||||
});
|
||||
|
||||
templateQueryResource.getFilterConditions()
|
||||
.then(function (conditions) {
|
||||
.then(function(conditions) {
|
||||
vm.conditions = conditions;
|
||||
});
|
||||
|
||||
|
||||
throttledFunc();
|
||||
|
||||
}
|
||||
@@ -111,10 +109,11 @@
|
||||
}
|
||||
|
||||
function getPropertyOperators(property) {
|
||||
var conditions = _.filter(vm.conditions, function (condition) {
|
||||
var index = condition.appliesTo.indexOf(property.type);
|
||||
return index >= 0;
|
||||
});
|
||||
var conditions = _.filter(vm.conditions,
|
||||
function(condition) {
|
||||
var index = condition.appliesTo.indexOf(property.type);
|
||||
return index >= 0;
|
||||
});
|
||||
return conditions;
|
||||
}
|
||||
|
||||
@@ -123,10 +122,8 @@
|
||||
}
|
||||
|
||||
function trashFilter(query, filter) {
|
||||
for (var i = 0; i < query.filters.length; i++)
|
||||
{
|
||||
if (query.filters[i] == filter)
|
||||
{
|
||||
for (var i = 0; i < query.filters.length; i++) {
|
||||
if (query.filters[i] == filter) {
|
||||
query.filters.splice(i, 1);
|
||||
}
|
||||
}
|
||||
@@ -173,7 +170,7 @@
|
||||
|
||||
function setFilterTerm(filter, term) {
|
||||
filter.term = term;
|
||||
if(filter.constraintValue) {
|
||||
if (filter.constraintValue) {
|
||||
throttledFunc();
|
||||
}
|
||||
}
|
||||
@@ -183,22 +180,32 @@
|
||||
}
|
||||
|
||||
function datePickerChange(event, filter) {
|
||||
if(event.date && event.date.isValid()) {
|
||||
if (event.date && event.date.isValid()) {
|
||||
filter.constraintValue = event.date.format(vm.datePickerConfig.format);
|
||||
throttledFunc();
|
||||
}
|
||||
}
|
||||
|
||||
var throttledFunc = _.throttle(function () {
|
||||
|
||||
templateQueryResource.postTemplateQuery(vm.query)
|
||||
.then(function (response) {
|
||||
$scope.model.result = response;
|
||||
});
|
||||
var throttledFunc = _.throttle(function() {
|
||||
|
||||
}, 200);
|
||||
templateQueryResource.postTemplateQuery(vm.query)
|
||||
.then(function(response) {
|
||||
$scope.model.result = response;
|
||||
});
|
||||
|
||||
onInit();
|
||||
},
|
||||
200);
|
||||
|
||||
localizationService.localizeMany([
|
||||
"template_allContent", "template_websiteRoot", "template_ascending", "template_descending"
|
||||
])
|
||||
.then(function(res) {
|
||||
everything = res[0];
|
||||
myWebsite = res[1];
|
||||
ascendingTranslation = res[2];
|
||||
descendingTranslation = res[3];
|
||||
onInit();
|
||||
});
|
||||
}
|
||||
|
||||
angular.module("umbraco").controller("Umbraco.Overlays.QueryBuilderController", QueryBuilderOverlayController);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="umb-media-grid">
|
||||
<div class="umb-media-grid__item" ng-click="clickItem(item, $event, $index)" ng-repeat="item in items | filter:filterBy" ng-style="item.flexStyle" ng-class="{'-selected': item.selected, '-file': !item.thumbnail, '-svg': item.extension == 'svg'}">
|
||||
<div class="umb-media-grid__item" title="{{item.name}}" ng-click="clickItem(item, $event, $index)" ng-repeat="item in items | filter:filterBy" ng-style="item.flexStyle" ng-class="{'-selected': item.selected, '-file': !item.thumbnail, '-svg': item.extension == 'svg'}">
|
||||
<div>
|
||||
<i ng-show="item.selected" class="icon-check umb-media-grid__checkmark"></i>
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
<div class="umb-media-grid__image-background" ng-if="item.thumbnail || item.extension == 'svg'"></div>
|
||||
|
||||
<!-- Image thumbnail -->
|
||||
<img class="umb-media-grid__item-image" width="{{item.width}}" height="{{item.height}}" ng-if="item.thumbnail" ng-src="{{item.thumbnail}}" alt="{{item.name}}" title="{{item.name}}" draggable="false" />
|
||||
<img class="umb-media-grid__item-image" width="{{item.width}}" height="{{item.height}}" ng-if="item.thumbnail" ng-src="{{item.thumbnail}}" alt="{{item.name}}" draggable="false" />
|
||||
|
||||
<!-- SVG -->
|
||||
<img class="umb-media-grid__item-image" width="{{item.width}}" height="{{item.height}}" ng-if="!item.thumbnail && item.extension == 'svg'" ng-src="{{item.file}}" alt="{{item.name}}" title="{{item.name}}" draggable="false" />
|
||||
<img class="umb-media-grid__item-image" width="{{item.width}}" height="{{item.height}}" ng-if="!item.thumbnail && item.extension == 'svg'" ng-src="{{item.file}}" alt="{{item.name}}" draggable="false" />
|
||||
|
||||
<!-- Transparent image - fallback - used to keep image proportions on wrapper-->
|
||||
<img class="umb-media-grid__item-image-placeholder" ng-if="!item.thumbnail && item.extension != 'svg'" src="assets/img/transparent.png" alt="{{item.name}}" draggable="false" />
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
angular.module("umbraco")
|
||||
.controller("Umbraco.PropertyEditors.Grid.MediaController",
|
||||
function ($scope, $rootScope, $timeout) {
|
||||
function ($scope, $rootScope, $timeout, userService) {
|
||||
|
||||
if (!$scope.model.config.startNodeId) {
|
||||
userService.getCurrentUser().then(function (userData) {
|
||||
$scope.model.config.startNodeId = userData.startMediaId;
|
||||
});
|
||||
}
|
||||
|
||||
$scope.setImage = function(){
|
||||
$scope.mediaPickerOverlay = {};
|
||||
$scope.mediaPickerOverlay.view = "mediapicker";
|
||||
$scope.mediaPickerOverlay.startNodeId = $scope.model.config && $scope.model.config.startNodeId ? $scope.model.config.startNodeId : undefined;
|
||||
$scope.mediaPickerOverlay.cropSize = $scope.control.editor.config && $scope.control.editor.config.size ? $scope.control.editor.config.size : undefined;
|
||||
$scope.mediaPickerOverlay.showDetails = true;
|
||||
$scope.mediaPickerOverlay.disableFolderSelect = true;
|
||||
|
||||
Reference in New Issue
Block a user