Fix links see BT#10217

1.9.x
Julio 10 years ago
parent bd43b5bca4
commit 36071a53f6
  1. 20
      main/inc/lib/javascript/fixlinks.js
  2. 19
      main/newscorm/scorm_api.php

@ -48,8 +48,18 @@ $(document).ready(function() {
var width = embed.attr('width');
var src = embed.attr('src');
var n = src.indexOf("youtube.com");
if (n > 0) {
var urlToAvoid = src.indexOf("youtube.com");
if (urlToAvoid >= 0) {
return true;
}
urlToAvoid = src.indexOf("/main/inc/lib/fckeditor/editor/fckeditor.html");
if (urlToAvoid >= 0) {
return true;
}
urlToAvoid = src.indexOf("javascript:void(0)");
if (urlToAvoid >= 0) {
return true;
}
@ -96,6 +106,12 @@ $(document).ready(function() {
if (hasJs >= 0) {
return true;
}
hasJs = $(this).attr('href').indexOf('#collapse');
if (hasJs >= 0) {
return true;
}
}
if ($(this).attr('class')) {

@ -2196,11 +2196,22 @@ function attach_glossary_into_scorm(type) {
'&width='+width;
var result = $("iframe").contents().find('#'+openerId);
var n = src.indexOf("youtube.com");
if (n > 0) {
var urlToAvoid = src.indexOf("youtube.com");
if (urlToAvoid >= 0) {
return true;
}
urlToAvoid = src.indexOf("/main/inc/lib/fckeditor/editor/fckeditor.html");
if (urlToAvoid >= 0) {
return true;
}
urlToAvoid = src.indexOf("javascript:void(0)");
if (urlToAvoid >= 0) {
return true;
}
if (result.length == 0) {
if (embed.prev().attr('class') != 'generated') {
$(this).parent().prepend(link + '<br />');
@ -2235,6 +2246,10 @@ function attach_glossary_into_scorm(type) {
if (hasJs >= 0) {
return true;
}
var hasJs = $(this).attr('href').indexOf('#collapse');
if (hasJs >= 0) {
return true;
}
}
if ($(this).attr('class')) {

Loading…
Cancel
Save