V9/feature/merge v8 22/11/2021 (#11681)
* Changes to GetReducedEventList (#11444) * Instead of only using first event, we combine events of same type into a single event with multiple arguments * Added generic method to DRY up grouping logic. * Renamed method to better reflect new functionality. Co-authored-by: Andy Butland <abutland73@gmail.com> * Merge pull request #11360 from umbraco/v8/bugfix/11057-mandatory-image-not-validating-after-first-time-failure Fixes 11057: Mandatory Image not validating after first time failure (cherry picked from commit5cc70d2160) * Additional optional sanitization of scripting in TinyMCE (#10653) (cherry picked from commitf68dba7bcb) * Bump version to 8.17.1 * Hide localization key while loading * ContentVersion cleanup backoffice UI (#11637) * init rollback ui prototype * add busy state to button, deselect version, add pagination status * add localisation * style current version * disable rollback button when nothing is selected * stop click event * Endpoints for paginated content versions. Light on tests, tight on time. * Endpoints to "pin" content versions * camel case json output. Not sure why json formatter not set for controller, bit risky to add it now * wire up paging * wire up pin/unpin * rename getPagedRollbackVersions to getPagedContentVersions * prevent selection of current version and current draft * add current draft and current version to UI * remove pointer if the row is not selectable * Improve warning for globally disabled cleanup feature. * Fix current loses prevent cleanup state on publish. * Added umbracoLog audit entries for "pin" / "unpin" * Match v9 defaults for keepVersions settings * Fix - losing preventCleanup on save current with content changes * update pin/unpin button labels * fix pagination bug * add missing " * always send culture when a doc type can vary Co-authored-by: Mads Rasmussen <madsr@hey.com> * Bugfix - DocumentVersionRepository.Get should not join culture variation * Bugfix - Missing write lock * Bugfix - Policy returns items to delete not items to keep. Switch to inverse behavior. Co-authored-by: Andy Butland <abutland73@gmail.com> Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Co-authored-by: Niels Lyngsø <nsl@umbraco.dk> Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com> Co-authored-by: Ronald Barendse <ronald@barend.se> Co-authored-by: Paul Johnson <pmj@umbraco.com> Co-authored-by: Mads Rasmussen <madsr@hey.com>
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
angular.module("umbraco.directives")
|
||||
|
||||
angular.module('umbraco.directives')
|
||||
/**
|
||||
* @ngdoc directive
|
||||
* @name umbraco.directives.directive:localize
|
||||
@@ -8,12 +7,12 @@ angular.module("umbraco.directives")
|
||||
* @description
|
||||
* <div>
|
||||
* <strong>Component</strong><br />
|
||||
* Localize a specific token to put into the HTML as an item
|
||||
* Localize a specific token to put into the HTML as an item.
|
||||
* </div>
|
||||
* <div>
|
||||
* <strong>Attribute</strong><br />
|
||||
* Add a HTML attribute to an element containing the HTML attribute name you wish to localise
|
||||
* Using the format of '@section_key' or 'section_key'
|
||||
* Add an HTML attribute to an element containing the HTML attribute name you wish to localize,
|
||||
* using the format of '@section_key' or 'section_key'.
|
||||
* </div>
|
||||
* ##Usage
|
||||
* <pre>
|
||||
@@ -36,12 +35,11 @@ angular.module("umbraco.directives")
|
||||
watchTokens: '@'
|
||||
},
|
||||
replace: true,
|
||||
|
||||
link: function (scope, element, attrs) {
|
||||
var key = scope.key;
|
||||
scope.text = "";
|
||||
scope.text = '';
|
||||
|
||||
// A render function to be able to update tokens as values update.
|
||||
// A render function to be able to update tokens as values update
|
||||
function render() {
|
||||
element.html(localizationService.tokenReplace(scope.text, scope.tokens || null));
|
||||
}
|
||||
@@ -50,26 +48,28 @@ angular.module("umbraco.directives")
|
||||
scope.text = value;
|
||||
render();
|
||||
});
|
||||
|
||||
if (scope.watchTokens === 'true') {
|
||||
scope.$watch("tokens", render, true);
|
||||
}
|
||||
}
|
||||
};
|
||||
})
|
||||
|
||||
.directive('localize', function ($log, localizationService) {
|
||||
return {
|
||||
restrict: 'A',
|
||||
link: function (scope, element, attrs) {
|
||||
//Support one or more attribute properties to update
|
||||
// Support one or more attribute properties to update
|
||||
var keys = attrs.localize.split(',');
|
||||
|
||||
Utilities.forEach(keys, (value, key) => {
|
||||
var attr = element.attr(value);
|
||||
|
||||
if (attr) {
|
||||
// Localizing is done async, so make sure the key isn't visible
|
||||
element.removeAttr(value);
|
||||
|
||||
if (attr[0] === '@') {
|
||||
//If the translation key starts with @ then remove it
|
||||
// If the translation key starts with @ then remove it
|
||||
attr = attr.substring(1);
|
||||
}
|
||||
|
||||
@@ -82,5 +82,4 @@ angular.module("umbraco.directives")
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user