Loading js/flag-action_link_flash.es6.js +11 −9 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ */ Drupal.AjaxCommands.prototype.actionLinkFlash = (ajax, response, status) => { if (status === 'success') { if (response.message.length) { // Prepare a message element. const para = document.createElement('P'); para.innerText = response.message; Loading @@ -42,6 +43,7 @@ // Add message element to the DOM. document.querySelector(response.selector).appendChild(para); } } else { // If the XHR failed, assume the replace command that would normally make // the styling disapear has also failed and remove the temporary styling. Loading js/flag-action_link_flash.js +9 −7 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr Drupal.AjaxCommands.prototype.actionLinkFlash = function (ajax, response, status) { if (status === 'success') { if (response.message.length) { var para = document.createElement('P'); para.innerText = response.message; Loading @@ -30,6 +31,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr }, false); document.querySelector(response.selector).appendChild(para); } } else { var links = [].concat(_toConsumableArray(document.querySelectAll('.flag-waiting'))); links.forEach(function (link) { Loading src/Controller/ActionLinkNoJsController.php +3 −2 Original line number Diff line number Diff line Loading @@ -135,8 +135,9 @@ class ActionLinkNoJsController implements ContainerInjectionInterface { * The response object. */ private function generateResponse(EntityInterface $entity, $message) { if (!empty($message)) { $this->messenger->addMessage($message); } if ($entity->hasLinkTemplate('canonical')) { // Redirect back to the entity. A passed in destination query parameter // will automatically override this. Loading Loading
js/flag-action_link_flash.es6.js +11 −9 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ */ Drupal.AjaxCommands.prototype.actionLinkFlash = (ajax, response, status) => { if (status === 'success') { if (response.message.length) { // Prepare a message element. const para = document.createElement('P'); para.innerText = response.message; Loading @@ -42,6 +43,7 @@ // Add message element to the DOM. document.querySelector(response.selector).appendChild(para); } } else { // If the XHR failed, assume the replace command that would normally make // the styling disapear has also failed and remove the temporary styling. Loading
js/flag-action_link_flash.js +9 −7 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr Drupal.AjaxCommands.prototype.actionLinkFlash = function (ajax, response, status) { if (status === 'success') { if (response.message.length) { var para = document.createElement('P'); para.innerText = response.message; Loading @@ -30,6 +31,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr }, false); document.querySelector(response.selector).appendChild(para); } } else { var links = [].concat(_toConsumableArray(document.querySelectAll('.flag-waiting'))); links.forEach(function (link) { Loading
src/Controller/ActionLinkNoJsController.php +3 −2 Original line number Diff line number Diff line Loading @@ -135,8 +135,9 @@ class ActionLinkNoJsController implements ContainerInjectionInterface { * The response object. */ private function generateResponse(EntityInterface $entity, $message) { if (!empty($message)) { $this->messenger->addMessage($message); } if ($entity->hasLinkTemplate('canonical')) { // Redirect back to the entity. A passed in destination query parameter // will automatically override this. Loading