MDL-39949 - Blocks - preventing blocks with empty titles from blocking the execution of javascript
This commit is contained in:
committed by
Sam Hemelryk
parent
d3cf194050
commit
64ddb28dfd
+9
-2
@@ -836,8 +836,15 @@ M.core_dock.genericblock.prototype = {
|
||||
}
|
||||
|
||||
// Must set the image src seperatly of we get an error with XML strict headers
|
||||
var moveto = Y.Node.create('<input type="image" class="moveto customcommand requiresjs" alt="'+M.str.block.addtodock+'" title="'+
|
||||
Y.Escape.html(M.util.get_string('dockblock', 'block', node.one('.header .title h2').getHTML())) +'" />');
|
||||
var moveto = Y.Node.create('<input type="image" class="moveto customcommand requiresjs" />');
|
||||
var header = node.one('.header .title h2');
|
||||
moveto.setAttribute('alt', Y.Escape.html(M.util.get_string('addtodock', 'block')));
|
||||
if (header) {
|
||||
moveto.setAttribute('title', Y.Escape.html(M.util.get_string('dockblock', 'block', header.getHTML())));
|
||||
} else {
|
||||
moveto.setAttribute('title', Y.Escape.html(M.util.get_string('addtodock', 'block')));
|
||||
}
|
||||
|
||||
var icon = 't/block_to_dock';
|
||||
if (right_to_left()) {
|
||||
icon = 't/block_to_dock_rtl';
|
||||
|
||||
Reference in New Issue
Block a user