Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7-U4-6425

This commit is contained in:
bjarnef
2016-02-02 15:15:49 +01:00
10 changed files with 35 additions and 24 deletions

View File

@@ -150,6 +150,7 @@ angular.module('umbraco.directives')
function oneTimeClick(event) {
var el = event.target.nodeName;
//ignore link and button clicks
var els = ["INPUT","A","BUTTON"];
if(els.indexOf(el) >= 0){return;}
@@ -167,6 +168,12 @@ angular.module('umbraco.directives')
return;
}
// ignore clicks in tinyMCE dropdown(floatpanel)
var floatpanel = $(el).parents(".mce-floatpanel");
if (floatpanel.length === 1) {
return;
}
//ignore clicks inside this element
if( $(element).has( $(event.target) ).length > 0 ){
return;

View File

@@ -30,7 +30,7 @@ angular.module("umbraco.directives")
//These are absolutely required in order for the macros to render inline
//we put these as extended elements because they get merged on top of the normal allowed elements by tiny mce
var extendedValidElements = "@[id|class|style],-div[id|dir|class|align|style],ins[datetime|cite],-ul[class|style],-li[class|style],-h1[id|dir|class|align|style],-h2[id|dir|class|align|style],-h3[id|dir|class|align|style],-h4[id|dir|class|align|style],-h5[id|dir|class|align|style],-h6[id|style|dir|class|align]";
var extendedValidElements = "@[id|class|style],-div[id|dir|class|align|style],ins[datetime|cite],-ul[class|style],-li[class|style],-h1[id|dir|class|align|style],-h2[id|dir|class|align|style],-h3[id|dir|class|align|style],-h4[id|dir|class|align|style],-h5[id|dir|class|align|style],-h6[id|style|dir|class|align],span[id|class|style]";
var invalidElements = tinyMceConfig.inValidElements;
var plugins = _.map(tinyMceConfig.plugins, function (plugin) {
@@ -104,7 +104,7 @@ angular.module("umbraco.directives")
statusbar: false,
relative_urls: false,
toolbar: toolbar,
content_css: stylesheets.join(','),
content_css: stylesheets,
style_formats: styleFormats,
autoresize_bottom_margin: 0
};

View File

@@ -161,7 +161,7 @@
// Mixin for form field states
//SD: I've had to modify this slightly to work nicely with angular validation , note the
//SD: I've had to modify this slightly to work nicely with angular validation , note the
// additional targetting of the ng-invalid class.
.formFieldState(@textColor: #555, @borderColor: #ccc, @backgroundColor: #f5f5f5) {
// Set the text color
@@ -522,10 +522,14 @@
*background-color: @endColor; /* Darken IE7 buttons by default so they stand out more given they won't have borders */
.reset-filter();
// button states
&:hover, &:focus, &:active {
background-color: darken(@startColor, 2%);
}
// in these cases the gradient won't cover the background, so we override
&:hover, &:focus, &:active, &.active, &.disabled, &[disabled] {
color: @textColor;
background-color: @endColor;
*background-color: darken(@endColor, 5%);
}

View File

@@ -119,7 +119,7 @@
@btnWarningBackgroundHighlight: @orange;
@btnDangerBackground: #ee5f5b;
@btnDangerBackgroundHighlight: #bd362f;
@btnDangerBackgroundHighlight: #ee5f5b;
@btnInverseBackground: #444;
@btnInverseBackgroundHighlight: @grayDarker;

View File

@@ -1,9 +1,9 @@
<div class="umb-dialog-body with-footer" ng-controller="Umbraco.Editors.Content.CreateController">
<div class="umb-dialog-body with-footer" ng-controller="Umbraco.Editors.Content.CreateController" ng-cloak>
<div class="umb-pane">
<h5><localize key="create_createUnder">Create a page under</localize> {{currentNode.name}}</h5>
<p class="abstract" ng-hide="allowedTypes">
<p class="abstract" ng-if="allowedTypes && allowedTypes.length === 0">
<localize key="create_noDocumentTypes" />
</p>

View File

@@ -1,4 +1,4 @@
<div class="umbracoDialog umb-dialog-body with-footer" ng-controller="Umbraco.Editors.DataType.CreateController">
<div class="umbracoDialog umb-dialog-body with-footer" ng-controller="Umbraco.Editors.DataType.CreateController" ng-cloak>
<div class="umb-pane" ng-if="!model.creatingFolder">
<h5><localize key="create_createUnder">Create an item under</localize> {{currentNode.name}}</h5>

View File

@@ -1,4 +1,4 @@
<div class="umbracoDialog umb-dialog-body with-footer" ng-controller="Umbraco.Editors.DocumentTypes.CreateController">
<div class="umbracoDialog umb-dialog-body with-footer" ng-controller="Umbraco.Editors.DocumentTypes.CreateController" ng-cloak>
<div class="umb-pane" ng-if="!model.creatingFolder">
<h5><localize key="create_createUnder">Create an item under</localize> {{currentNode.name}}</h5>

View File

@@ -1,4 +1,4 @@
<div class="umbracoDialog umb-dialog-body with-footer" ng-controller="Umbraco.Editors.MediaTypes.CreateController">
<div class="umbracoDialog umb-dialog-body with-footer" ng-controller="Umbraco.Editors.MediaTypes.CreateController" ng-cloak>
<div class="umb-pane" ng-if="!model.creatingFolder">
<h5><localize key="create_createUnder">Create an item under</localize> {{currentNode.name}}</h5>

View File

@@ -1,4 +1,4 @@
<div class="umb-dialog-body with-footer" ng-controller="Umbraco.Editors.Member.CreateController">
<div class="umb-dialog-body with-footer" ng-controller="Umbraco.Editors.Member.CreateController" ng-cloak>
<div class="umb-pane">
<h5><localize key="member_createNewMember">Create a new member</localize></h5>

View File

@@ -34,7 +34,7 @@ angular.module("umbraco")
//These are absolutely required in order for the macros to render inline
//we put these as extended elements because they get merged on top of the normal allowed elements by tiny mce
var extendedValidElements = "@[id|class|style],-div[id|dir|class|align|style],ins[datetime|cite],-ul[class|style],-li[class|style]";
var extendedValidElements = "@[id|class|style],-div[id|dir|class|align|style],ins[datetime|cite],-ul[class|style],-li[class|style],span[id|class|style]";
var invalidElements = tinyMceConfig.inValidElements;
var plugins = _.map(tinyMceConfig.plugins, function (plugin) {
@@ -117,7 +117,7 @@ angular.module("umbraco")
width: editorConfig.dimensions.width,
maxImageSize: editorConfig.maxImageSize,
toolbar: toolbar,
content_css: stylesheets.join(','),
content_css: stylesheets,
relative_urls: false,
style_formats: styleFormats
};
@@ -125,7 +125,7 @@ angular.module("umbraco")
if (tinyMceConfig.customConfig) {
//if there is some custom config, we need to see if the string value of each item might actually be json and if so, we need to
//if there is some custom config, we need to see if the string value of each item might actually be json and if so, we need to
// convert it to json instead of having it as a string since this is what tinymce requires
for (var i in tinyMceConfig.customConfig) {
var val = tinyMceConfig.customConfig[i];
@@ -134,7 +134,7 @@ angular.module("umbraco")
if (val.detectIsJson()) {
try {
tinyMceConfig.customConfig[i] = JSON.parse(val);
//now we need to check if this custom config key is defined in our baseline, if it is we don't want to
//now we need to check if this custom config key is defined in our baseline, if it is we don't want to
//overwrite the baseline config item if it is an array, we want to concat the items in the array, otherwise
//if it's an object it will overwrite the baseline
if (angular.isArray(baseLineConfigObj[i]) && angular.isArray(tinyMceConfig.customConfig[i])) {
@@ -144,7 +144,7 @@ angular.module("umbraco")
}
catch (e) {
//cannot parse, we'll just leave it
}
}
}
}
}
@@ -164,13 +164,13 @@ angular.module("umbraco")
editor.getBody().setAttribute('spellcheck', true);
});
//We need to listen on multiple things here because of the nature of tinymce, it doesn't
//We need to listen on multiple things here because of the nature of tinymce, it doesn't
//fire events when you think!
//The change event doesn't fire when content changes, only when cursor points are changed and undo points
//are created. the blur event doesn't fire if you insert content into the editor with a button and then
//press save.
//We have a couple of options, one is to do a set timeout and check for isDirty on the editor, or we can
//listen to both change and blur and also on our own 'saving' event. I think this will be best because a
//are created. the blur event doesn't fire if you insert content into the editor with a button and then
//press save.
//We have a couple of options, one is to do a set timeout and check for isDirty on the editor, or we can
//listen to both change and blur and also on our own 'saving' event. I think this will be best because a
//timer might end up using unwanted cpu and we'd still have to listen to our saving event in case they clicked
//save before the timeout elapsed.
@@ -190,7 +190,7 @@ angular.module("umbraco")
// currForm.$setDirty();
// alreadyDirty = true;
// }
// });
//});
@@ -225,7 +225,7 @@ angular.module("umbraco")
var srcAttr = $(e.target).attr("src");
var path = srcAttr.split("?")[0];
$(e.target).attr("data-mce-src", path + qs);
syncContent(editor);
});
@@ -336,7 +336,7 @@ angular.module("umbraco")
});
//when the element is disposed we need to unsubscribe!
// NOTE: this is very important otherwise if this is part of a modal, the listener still exists because the dom
// NOTE: this is very important otherwise if this is part of a modal, the listener still exists because the dom
// element might still be there even after the modal has been hidden.
$scope.$on('$destroy', function () {
unsubscribe();