Skip to content

Commit

Permalink
MDL-35590 block_navigation: Set attribute on node creation
Browse files Browse the repository at this point in the history
Otherwise we would need to unescape href and title.
  • Loading branch information
David Monllao committed Jan 29, 2016
1 parent a057ba5 commit ed654d4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion blocks/navigation/amd/build/ajax_response_renderer.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions blocks/navigation/amd/src/ajax_response_renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ define(['jquery'], function($) {
}

if (node.link) {
var link = $('<a></a>');
link.attr('title', node.title);
link.attr('href', node.link);
var link = $('<a title="' + node.title + '" href="' + node.link + '"></a>');

if (icon) {
link.append(icon);
Expand Down
2 changes: 1 addition & 1 deletion blocks/settings/amd/build/settingsblock.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion blocks/settings/amd/src/settingsblock.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ define(['jquery', 'core/tree'], function($, Tree) {
init: function(siteAdminNodeId) {
var adminTree = new Tree(".block_settings .block_tree");
if (siteAdminNodeId) {
var siteAdminNode = adminTree.treeRoot.find('#' + siteAdminNodeId)
var siteAdminNode = adminTree.treeRoot.find('#' + siteAdminNodeId);
var siteAdminLink = siteAdminNode.children('a').first();
siteAdminLink.replaceWith('<span tabindex="0">' + siteAdminLink.html() + '</span>');
}
Expand Down
2 changes: 1 addition & 1 deletion lib/amd/build/tree.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ed654d4

Please sign in to comment.