SCORM MDL-29159 - override getContentHtml function in treeview so that it doesn't escape text incorrectly
This commit is contained in:
+19
-3
@@ -46,9 +46,25 @@ M.mod_scorm.init = function(Y, hide_nav, hide_toc, toc_title, window_name, launc
|
||||
var scorm_bloody_labelclick = false;
|
||||
var scorm_nav_panel;
|
||||
|
||||
|
||||
Y.use('yui2-resize', 'yui2-dragdrop', 'yui2-container', 'yui2-button', 'yui2-layout', 'yui2-treeview', 'yui2-json', 'yui2-event', function(Y) {
|
||||
|
||||
YAHOO.widget.TextNode.prototype.getContentHtml = function() {
|
||||
var sb = [];
|
||||
sb[sb.length] = this.href ? '<a' : '<span';
|
||||
sb[sb.length] = ' id="' + YAHOO.lang.escapeHTML(this.labelElId) + '"';
|
||||
sb[sb.length] = ' class="' + YAHOO.lang.escapeHTML(this.labelStyle) + '"';
|
||||
if (this.href) {
|
||||
sb[sb.length] = ' href="' + YAHOO.lang.escapeHTML(this.href) + '"';
|
||||
sb[sb.length] = ' target="' + YAHOO.lang.escapeHTML(this.target) + '"';
|
||||
}
|
||||
if (this.title) {
|
||||
sb[sb.length] = ' title="' + YAHOO.lang.escapeHTML(this.title) + '"';
|
||||
}
|
||||
sb[sb.length] = ' >';
|
||||
sb[sb.length] = this.label;
|
||||
sb[sb.length] = this.href?'</a>':'</span>';
|
||||
return sb.join("");
|
||||
};
|
||||
|
||||
var scorm_activate_item = function(node) {
|
||||
if (!node) {
|
||||
@@ -120,7 +136,7 @@ M.mod_scorm.init = function(Y, hide_nav, hide_toc, toc_title, window_name, launc
|
||||
}
|
||||
var old = YAHOO.util.Dom.get('scorm_object');
|
||||
if (old) {
|
||||
if(window_name) {
|
||||
if(window_name) {
|
||||
var cwidth = scormplayerdata.cwidth;
|
||||
var cheight = scormplayerdata.cheight;
|
||||
var poptions = scormplayerdata.popupoptions;
|
||||
@@ -449,4 +465,4 @@ function scorm_get_next() {
|
||||
mod_scorm_activate_item(next);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user