Skip to content
Snippets Groups Projects
Commit 397d4e08 authored by Henri-Damien LAURENT's avatar Henri-Damien LAURENT
Browse files

Merge branch...

Merge branch 'hotline#179242_dev#169475_fix_message_undefined_displayed_when_deleting_record_from_selection' into 'master'

hotline#179242 : dev#169475 : message 'undefined' affiché quand un utilisateur...

See merge request !4744
parents 0ea4fa72 6d50deb1
Branches
Tags
1 merge request!4744hotline#179242 : dev#169475 : message 'undefined' affiché quand un utilisateur...
Pipeline #24045 passed with stage
in 20 minutes and 56 seconds
- correctif #179242 : OPAC [MT] : La suppression d'une notice d'une sélection n'entraine plus d'affichage de fenêtre intempestive
\ No newline at end of file
......@@ -91,8 +91,8 @@ class Intonation_Library_Selection {
$url = Class_Url::relative($this->_getUrlForContext());
$js =
sprintf("event.preventDefault(); event.stopPropagation(); var url = $(this).attr('href'); var anchors = $('a[href=\'' + url + '\']'); $.ajax({type: 'GET', url: '%s', success: function(data) {anchors.replaceWith(data.anchor);}});",
$url);
sprintf("event.preventDefault(); event.stopPropagation(); var url = $(this).attr('href'); var anchors = $('a[href=\'' + url + '\']'); $.ajax({type: 'GET', url: '%s', success: function(data) {if (data){return anchors.replaceWith(data.anchor);} return false;}});",
$url);
return (new Intonation_Library_Link)
->setUrl($url)
......
......@@ -816,7 +816,7 @@ class MyBibAppTemplateActionsCardTest extends ViewHelperTestCase {
* @depends addToReadedShouldBeDisplayInRow
*/
public function addToReadedShouldContainsScript() {
$js = 'event.preventDefault(); event.stopPropagation(); var url = $(this).attr(\'href\'); var anchors = $(\'a[href=\\\'\' + url + \'\\\']\'); $.ajax({type: \'GET\', url: \'/abonne/ajouter-le-document-a-la-selection/selection_label/D%C3%A9j%C3%A0+lu/image/readed/revert-image/unread/record_id/213/ajax/\', success: function(data) {anchors.replaceWith(data.anchor);}});';
$js = 'event.preventDefault(); event.stopPropagation(); var url = $(this).attr(\'href\'); var anchors = $(\'a[href=\\\'\' + url + \'\\\']\'); $.ajax({type: \'GET\', url: \'/abonne/ajouter-le-document-a-la-selection/selection_label/D%C3%A9j%C3%A0+lu/image/readed/revert-image/unread/record_id/213/ajax/\', success: function(data) {if (data){return anchors.replaceWith(data.anchor);} return false;}});';
$this->assertXPath(static::$_set_up->html,
'//a[contains(@onclick, "'. $js .'")]');
......
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