mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-30 22:18:46 +02:00
N°3833 Fix DashletBadge in Ajax causing JS error
* switch dashlet_badge widget init from js_template to js_on_ready_template * add phpdoc on UIBlock::DEFAULT_JS_FILES_REL_PATH * remove old code in \AjaxPage::output (after the return statement) that is already handled with the new Twig rendering
This commit is contained in:
@@ -237,19 +237,6 @@ EOF
|
||||
echo "\n</script>\n";
|
||||
}
|
||||
|
||||
//echo $this->s_deferred_content;
|
||||
if (count($this->a_scripts) > 0) {
|
||||
echo "<script type=\"text/javascript\">\n";
|
||||
echo implode("\n", $this->a_scripts);
|
||||
echo "\n</script>\n";
|
||||
}
|
||||
if (count($this->a_linked_scripts) > 0) {
|
||||
echo "<script type=\"text/javascript\">\n";
|
||||
foreach ($this->a_linked_scripts as $sScriptUrl) {
|
||||
echo '$.getScript('.json_encode($sScriptUrl).");\n";
|
||||
}
|
||||
echo "\n</script>\n";
|
||||
}
|
||||
if (!empty($this->s_deferred_content)) {
|
||||
echo "<script type=\"text/javascript\">\n";
|
||||
echo "\$('body').append('".addslashes(str_replace("\n", '', $this->s_deferred_content))."');\n";
|
||||
@@ -260,14 +247,6 @@ EOF
|
||||
echo $this->m_aReadyScripts; // Ready Scripts are output as simple scripts
|
||||
echo "\n</script>\n";
|
||||
}
|
||||
if (count($this->a_linked_stylesheets) > 0) {
|
||||
echo "<script type=\"text/javascript\">";
|
||||
foreach ($this->a_linked_stylesheets as $aStylesheet) {
|
||||
$sStylesheetUrl = $aStylesheet['link'];
|
||||
echo "if (!$('link[href=\"{$sStylesheetUrl}\"]').length) $('<link href=\"{$sStylesheetUrl}\" rel=\"stylesheet\">').appendTo('head');\n";
|
||||
}
|
||||
echo "\n</script>\n";
|
||||
}
|
||||
|
||||
if (trim($s_captured_output) != "") {
|
||||
echo self::FilterXSS($s_captured_output);
|
||||
|
||||
Reference in New Issue
Block a user