Skip to content

Commit

Permalink
V9/feature/merge v8 22/11/2021 (#11681)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* 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 commit 5cc70d2)

* Additional optional sanitization of scripting in TinyMCE (#10653)

(cherry picked from commit f68dba7)

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: Nikolaj Geisle <[email protected]>
Co-authored-by: Niels Lyngsø <[email protected]>
Co-authored-by: Sebastiaan Janssen <[email protected]>
Co-authored-by: Ronald Barendse <[email protected]>
Co-authored-by: Paul Johnson <[email protected]>
Co-authored-by: Mads Rasmussen <[email protected]>
  • Loading branch information
8 people authored Nov 22, 2021
1 parent 579613c commit 33f00a5
Showing 1 changed file with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
angular.module("umbraco.directives")

angular.module('umbraco.directives')
/**
* @ngdoc directive
* @name umbraco.directives.directive:localize
Expand All @@ -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>
Expand All @@ -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));
}
Expand All @@ -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);
}

Expand All @@ -82,5 +82,4 @@ angular.module("umbraco.directives")
});
}
};

});

0 comments on commit 33f00a5

Please sign in to comment.