Merge remote-tracking branch 'origin/7.0.0' into 7.0.0
This commit is contained in:
@@ -31,8 +31,7 @@
|
||||
|
||||
$.ctrl("S", function(){
|
||||
var link = $(".umb-panel-header .btn-primary");
|
||||
var b = link.click();
|
||||
|
||||
|
||||
//this is made of bad, to work around webforms horrible wiring
|
||||
if(!link.hasClass("client-side") && link.attr("href").indexOf("javascript:") == 0){
|
||||
eval(link.attr('href').replace('javascript:',''));
|
||||
@@ -59,23 +58,26 @@
|
||||
$.ctrl = function(key, callback, args) {
|
||||
var isMac = navigator.platform.toUpperCase().indexOf('MAC')>=0;
|
||||
var isCtrl = false;
|
||||
|
||||
$(document).keydown(function(e) {
|
||||
if(!args) args=[]; // IE barks when args is null
|
||||
var modKey = isMac ? e.metaKey : e.ctrlKey;
|
||||
if(modKey){
|
||||
isCtrl = true;
|
||||
}
|
||||
//if(modKey){
|
||||
// isCtrl = true;
|
||||
//}
|
||||
|
||||
if(isCtrl && e.keyCode == key.charCodeAt(0)) {
|
||||
if(modKey && e.keyCode == key.charCodeAt(0)) {
|
||||
callback.apply(this, args);
|
||||
return false;
|
||||
}
|
||||
|
||||
}).keyup(function(e) {
|
||||
});
|
||||
|
||||
/*.keyup(function(e) {
|
||||
var modKey = isMac ? e.metaKey : e.ctrlKey;
|
||||
if(modKey){
|
||||
isCtrl = false;
|
||||
}
|
||||
});
|
||||
}); */
|
||||
};
|
||||
})(jQuery);
|
||||
@@ -103,18 +103,19 @@ angular.module("umbraco.directives.html")
|
||||
// if total width is slightly smaller than
|
||||
// actual div width then add 1 to each
|
||||
// photo width till they match
|
||||
i = 0;
|
||||
while (tw < w) {
|
||||
|
||||
/*i = 0;
|
||||
while (tw < w-1) {
|
||||
row.photos[i].style.width++;
|
||||
i = (i + 1) % c;
|
||||
tw++;
|
||||
}
|
||||
}*/
|
||||
|
||||
// if total width is slightly bigger than
|
||||
// actual div width then subtract 1 from each
|
||||
// photo width till they match
|
||||
i = 0;
|
||||
while (tw > w) {
|
||||
while (tw > w-1) {
|
||||
row.photos[i].style.width--;
|
||||
i = (i + 1) % c;
|
||||
tw--;
|
||||
|
||||
@@ -33,10 +33,10 @@ angular.module("umbraco.directives")
|
||||
},
|
||||
|
||||
template: '<li ng-class="{\'current\': (node == currentNode)}"><div ng-style="setTreePadding(node)" class="{{node.stateCssClass}}" ng-class="{\'loading\': node.loading}" ng-swipe-right="options(this, node, $event)" >' +
|
||||
'<ins ng-hide="node.hasChildren" style="background:none;width:18px;"></ins>' +
|
||||
'<ins ng-hide="node.hasChildren" style="width:18px;"></ins>' +
|
||||
'<ins ng-show="node.hasChildren" ng-class="{\'icon-navigation-right\': !node.expanded, \'icon-navigation-down\': node.expanded}" ng-click="load(node)"></ins>' +
|
||||
'<i title="#{{node.routePath}}" class="{{node.cssClass}}" style="{{node.style}}"></i>' +
|
||||
'<a href ng-click="select(this, node, $event)" on-right-click="altSelect(this, node, $event)" >{{node.name}}</a>' +
|
||||
'<i title="#{{node.routePath}}" class="{{node.cssClass}}"></i>' +
|
||||
'<a href ng-click="select(this, node, $event)" on-right-click="altSelect(this, node, $event)">{{node.name}}</a>' +
|
||||
'<a href class="umb-options" ng-hide="!node.menuUrl" ng-click="options(this, node, $event)"><i></i><i></i><i></i></a>' +
|
||||
'<div ng-show="node.loading" class="l"><div></div></div>' +
|
||||
'</div>' +
|
||||
@@ -167,6 +167,10 @@ angular.module("umbraco.directives")
|
||||
scope.expandActivePath(scope.node, scope.activetree, scope.path);
|
||||
scope.node.stateCssClass = (scope.node.cssClasses || []).join(" ");
|
||||
|
||||
if(scope.node.style){
|
||||
$(element).find("i").attr("style", scope.node.style);
|
||||
}
|
||||
|
||||
var template = '<ul ng-class="{collapsed: !node.expanded}"><umb-tree-item ng-repeat="child in node.children" eventhandler="eventhandler" activetree="{{activetree}}" tree="tree" current-node="currentNode" node="child" section="{{section}}" ng-animate="animation()"></umb-tree-item></ul>';
|
||||
var newElement = angular.element(template);
|
||||
$compile(newElement)(scope);
|
||||
|
||||
@@ -66,7 +66,7 @@ angular.module('umbraco.services')
|
||||
var scope = options.scope || $rootScope.$new();
|
||||
|
||||
//Modal dom obj and unique id
|
||||
dialog.element = $('<div ng-swipe-right="hide()" data-backdrop="false"></div>');
|
||||
dialog.element = $('<div ng-swipe-right="swipeHide($event)" data-backdrop="false"></div>');
|
||||
var id = dialog.template.replace('.html', '').replace('.aspx', '').replace(/[\/|\.|:\&\?\=]/g, "-") + '-' + scope.$id;
|
||||
|
||||
if (options.inline) {
|
||||
@@ -158,6 +158,15 @@ angular.module('umbraco.services')
|
||||
dialog.element.modal(name);
|
||||
};
|
||||
|
||||
scope.swipeHide = function(e){
|
||||
if($rootScope.touchDevice){
|
||||
var selection = window.getSelection();
|
||||
if(selection.type !== "Range"){
|
||||
scope.hide();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
scope.hide = function() {
|
||||
dialog.element.modal('hide');
|
||||
|
||||
|
||||
@@ -485,10 +485,10 @@ function iconHelper($q) {
|
||||
/** Used by the create dialogs for content/media types to format the data so that the thumbnails are styled properly */
|
||||
formatContentTypeThumbnails: function (contentTypes) {
|
||||
for (var i = 0; i < contentTypes.length; i++) {
|
||||
|
||||
if (contentTypes[i].thumbnailIsClass === undefined || contentTypes[i].thumbnailIsClass) {
|
||||
contentTypes[i].cssClass = this.convertFromLegacyIcon(contentTypes[i].thumbnail);
|
||||
}
|
||||
else {
|
||||
}else {
|
||||
contentTypes[i].style = "background-image: url('" + contentTypes[i].thumbnailFilePath + "');height:36px; background-position:4px 0px; background-repeat: no-repeat;background-size: 35px 35px;";
|
||||
//we need an 'icon-' class in there for certain styles to work so if it is image based we'll add this
|
||||
contentTypes[i].cssClass = "custom-file";
|
||||
@@ -499,6 +499,11 @@ function iconHelper($q) {
|
||||
formatContentTypeIcons: function (contentTypes) {
|
||||
for (var i = 0; i < contentTypes.length; i++) {
|
||||
contentTypes[i].icon = this.convertFromLegacyIcon(contentTypes[i].icon);
|
||||
|
||||
//couldnt find replacement
|
||||
if(contentTypes[i].icon.indexOf(".") > 0){
|
||||
contentTypes[i].icon = "icon-document-dashed-line";
|
||||
}
|
||||
}
|
||||
return contentTypes;
|
||||
},
|
||||
|
||||
@@ -200,7 +200,7 @@ ul.color-picker li a {
|
||||
// --------------------------------------------------
|
||||
|
||||
.umb-photo-folder .picrow{
|
||||
width: 100%;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.umb-photo-folder .picrow a, .umb-photo-preview{
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
* The main application controller
|
||||
*
|
||||
*/
|
||||
function MainController($scope, $location, $routeParams, $rootScope, $timeout, $http, $log, notificationsService, userService, navigationService, legacyJsLoader, updateChecker) {
|
||||
function MainController($scope, $rootScope, $location, $routeParams, $rootScope, $timeout, $http, $log, notificationsService, userService, navigationService, legacyJsLoader, updateChecker) {
|
||||
|
||||
var legacyTreeJsLoaded = false;
|
||||
|
||||
//detect if the current device is touch-enabled
|
||||
//todo, move this out of the controller
|
||||
$scope.touchDevice = ("ontouchstart" in window || window.touch || window.navigator.msMaxTouchPoints===5 || window.DocumentTouch && document instanceof DocumentTouch);
|
||||
navigationService.touchDevice = $scope.touchDevice;
|
||||
$rootScope.touchDevice = ("ontouchstart" in window || window.touch || window.navigator.msMaxTouchPoints===5 || window.DocumentTouch && document instanceof DocumentTouch);
|
||||
navigationService.touchDevice = $rootScope.touchDevice;
|
||||
|
||||
//the null is important because we do an explicit bool check on this in the view
|
||||
//the avatar is by default the umbraco logo
|
||||
|
||||
Reference in New Issue
Block a user