Skip to content

Commit

Permalink
Merge pull request #536 from aertmann/aloha-link-two-lines
Browse files Browse the repository at this point in the history
BUGFIX: Multi-line links in inline editing

When creating a multi-line link to using inline editing, only the
first link is created correctly unless a whole URL is specified.

The issue lies in Aloha and an issue with a fix has been pushed to
their backlog. Until that is merged it is hotfixed in Neos.

alohaeditor/Aloha-Editor#1525
  • Loading branch information
kdambekalns committed May 25, 2016
2 parents 83cd9c7 + bbfd5bf commit d0606ea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,7 @@ define([
require({context: 'neos'}, ['Shared/Utility'], function(Utility) {
if (!Utility.isValidLink(value)) {
var url = 'http://' + value;
$(that.hrefField.getTargetObject()).attr('href', url);
if (that.target) {
that.hrefField.setAttribute(
'target',
that.target,
that.targetregex,
url
);
}
that.hrefField.setAttribute('href', url);
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion TYPO3.Neos/Resources/Public/Library/aloha/aloha.js
Original file line number Diff line number Diff line change
Expand Up @@ -34987,7 +34987,7 @@ define('ui/port-helper-attribute-field',[
// store the value to be the "reference" value for the currently selected resource item
resourceValue = v;
setAttribute(targetAttribute, item[valueField]);
RepositoryManager.markObject(targetObject, item);
executeForTargets(function (target) { RepositoryManager.markObject(target, item); });
} else {
resourceValue = null;
}
Expand Down
3 changes: 3 additions & 0 deletions TYPO3.Neos/Scripts/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ module.exports = function (grunt) {
src = src.replace(/var componentNameByElement = {\n/, "var componentNameByElement = { 'code': 'code'," + "\n");
src = src.replace("availableButtons: [ 'u',", "availableButtons: [ 'code', 'u',");

// fix https://github.com/alohaeditor/Aloha-Editor/issues/1525
src = src.replace('RepositoryManager.markObject(targetObject, item);', 'executeForTargets(function (target) { RepositoryManager.markObject(target, item); });');

return src;
}
}
Expand Down

0 comments on commit d0606ea

Please sign in to comment.