From 6ce93b0a79a9141eeea98cbd211bccbc27f5bb3f Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Thu, 7 Sep 2017 12:44:25 -0500 Subject: [PATCH] Avoid load Chamilo assets in iframe when lp item is link - refs BT#13320 --- main/template/default/learnpath/view.tpl | 26 +++++++++++++----------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/main/template/default/learnpath/view.tpl b/main/template/default/learnpath/view.tpl index 5e3eddaee4..1e09d54bcc 100644 --- a/main/template/default/learnpath/view.tpl +++ b/main/template/default/learnpath/view.tpl @@ -283,18 +283,20 @@ $('iframe#content_id') .on('load', function () { - $.frameReady(function () { - }, 'top.content_name', { - load: [ - {type: 'script', id: '_fr1', src: '{{ _p.web }}web/assets/jquery/dist/jquery.min.js'}, - {type: 'script', id: '_fr7', src: '{{ _p.web }}web/assets/MathJax/MathJax.js?config=AM_HTMLorMML'}, - {type: 'script', id: '_fr4', src: '{{ _p.web }}web/assets/jquery-ui/jquery-ui.min.js'}, - {type: 'stylesheet', id: '_fr5', src: '{{ _p.web }}web/assets/jquery-ui/themes/smoothness/jquery-ui.min.css'}, - {type: 'stylesheet', id: '_fr6', src: '{{ _p.web }}web/assets/jquery-ui/themes/smoothness/theme.css'}, - {type: 'script', id: '_fr2', src: '{{ _p.web_lib }}javascript/jquery.highlight.js'}, - {type: 'script', id: '_fr3', src: '{{ _p.web_main }}glossary/glossary.js.php?{{ _p.web_cid_req }}'} - ] - }); + if ('link' !== olms.lms_item_type) { + $.frameReady(function () { + }, 'top.content_name', { + load: [ + {type: 'script', id: '_fr1', src: '{{ _p.web }}web/assets/jquery/dist/jquery.min.js'}, + {type: 'script', id: '_fr7', src: '{{ _p.web }}web/assets/MathJax/MathJax.js?config=AM_HTMLorMML'}, + {type: 'script', id: '_fr4', src: '{{ _p.web }}web/assets/jquery-ui/jquery-ui.min.js'}, + {type: 'stylesheet', id: '_fr5', src: '{{ _p.web }}web/assets/jquery-ui/themes/smoothness/jquery-ui.min.css'}, + {type: 'stylesheet', id: '_fr6', src: '{{ _p.web }}web/assets/jquery-ui/themes/smoothness/theme.css'}, + {type: 'script', id: '_fr2', src: '{{ _p.web_lib }}javascript/jquery.highlight.js'}, + {type: 'script', id: '_fr3', src: '{{ _p.web_main }}glossary/glossary.js.php?{{ _p.web_cid_req }}'} + ] + }); + } }); });