Skip to content
Snippets Groups Projects
Commit 1d320ba7 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

Merge branch 'hotline#128655_erreur_telechargement_ebook' into 'hotline'

hotline MT #128655 add timeout to fix event launch

See merge request !3883
parents 641babca ee440044
Branches
Tags
2 merge requests!3891Hotline,!3883hotline MT #128655 add timeout to fix event launch
Pipeline #12630 passed with stage
in 53 minutes and 48 seconds
- ticket #128655 : Correction des liens d'emprunt de ressources PNB.
\ No newline at end of file
......@@ -34,6 +34,7 @@ class ZendAfi_Controller_Action_Helper_HTMLAjaxResponse
public function htmlAjaxResponseWithScript($content) {
Class_ScriptLoader::getInstance()
->beAjax()
->addAdminScript('onload_utils')
->addJQueryReady('initializePopups();setupAnchorsTarget();');
......
......@@ -33,6 +33,7 @@ class Intonation_View_Ajax extends Intonation_View_Opac {
public function render() {
Class_ScriptLoader::getInstance()
->beAjax()
->addJQueryReady('initializePopups();setupAnchorsTarget();');
return $this->_body . Class_ScriptLoader::getInstance()->html();
......
......@@ -36,6 +36,7 @@ class Intonation_View_RenderAjax extends ZendAfi_View_Helper_BaseHelper {
$url['inspector_gadget'] = 1;
Class_ScriptLoader::getInstance()
->beAjax()
->addJQueryReady(sprintf('$("#%s").load("%s", function() {%s;});',
$id,
$this->view->url($url),
......
......@@ -62,7 +62,7 @@ class TemplateDigitalResourcesDispatchTest extends AbstractControllerTestCase {
/** @test */
public function initializePopupsShouldBeInScript() {
$this->assertXPathContentContains('//script', 'initializePopups();');
$this->assertXPathContentContains('//script', 'setTimeout(function(){initializePopups();setupAnchorsTarget();}, 5);');
}
}
......
......@@ -372,6 +372,6 @@ class TemplatesDispatchRecordItemsTest extends TemplatesRecordsWidgetTestCase {
$this->dispatch('/record/items/id/1/id_profil/1');
$this->assertXPathContentContains('//script', '.load("/noticeajax/author/id/1/id_profil/1", function() {$(\'.loading_icon\').parent().remove();
if ($(\'.document_author .jumbotron_section_content [data-ajax-content] > *\').length)
return $(\'.document_author\').removeClass(\'d-none text-black-50 disabled\');initializePopups();setupAnchorsTarget();});');
return $(\'.document_author\').removeClass(\'d-none text-black-50 disabled\');initializePopups();setupAnchorsTarget();});}, 5);');
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment