diff --git a/src/Umbraco.Web.UI.Client/lib/umbraco/compat.js b/src/Umbraco.Web.UI.Client/lib/umbraco/compat.js
index 2a166c8a1a..3cc91174e8 100644
--- a/src/Umbraco.Web.UI.Client/lib/umbraco/compat.js
+++ b/src/Umbraco.Web.UI.Client/lib/umbraco/compat.js
@@ -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);
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/html/umbphotofolder.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/html/umbphotofolder.directive.js
index 49cea5dbf5..83d30e7c3c 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/html/umbphotofolder.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/html/umbphotofolder.directive.js
@@ -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--;
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/umbtreeitem.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/umbtreeitem.directive.js
index d86e26d2b6..d5e59cfd35 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/umbtreeitem.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/umbtreeitem.directive.js
@@ -33,10 +33,10 @@ angular.module("umbraco.directives")
},
template: '
' +
@@ -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 = '';
var newElement = angular.element(template);
$compile(newElement)(scope);
diff --git a/src/Umbraco.Web.UI.Client/src/common/services/dialog.service.js b/src/Umbraco.Web.UI.Client/src/common/services/dialog.service.js
index 6d584763dc..4c918da849 100644
--- a/src/Umbraco.Web.UI.Client/src/common/services/dialog.service.js
+++ b/src/Umbraco.Web.UI.Client/src/common/services/dialog.service.js
@@ -66,7 +66,7 @@ angular.module('umbraco.services')
var scope = options.scope || $rootScope.$new();
//Modal dom obj and unique id
- dialog.element = $('');
+ dialog.element = $('');
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');
diff --git a/src/Umbraco.Web.UI.Client/src/common/services/util.service.js b/src/Umbraco.Web.UI.Client/src/common/services/util.service.js
index 7892726d80..4877bb9972 100644
--- a/src/Umbraco.Web.UI.Client/src/common/services/util.service.js
+++ b/src/Umbraco.Web.UI.Client/src/common/services/util.service.js
@@ -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;
},
diff --git a/src/Umbraco.Web.UI.Client/src/less/property-editors.less b/src/Umbraco.Web.UI.Client/src/less/property-editors.less
index 9e4d0b267a..d79fa5a1fc 100644
--- a/src/Umbraco.Web.UI.Client/src/less/property-editors.less
+++ b/src/Umbraco.Web.UI.Client/src/less/property-editors.less
@@ -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{
diff --git a/src/Umbraco.Web.UI.Client/src/views/common/main.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/main.controller.js
index 6234d6df70..e3e5261832 100644
--- a/src/Umbraco.Web.UI.Client/src/views/common/main.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/common/main.controller.js
@@ -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