Skip to content

Commit

Permalink
allow progressive actions for inline actions
Browse files Browse the repository at this point in the history
  • Loading branch information
lekoala committed Apr 19, 2022
1 parent 2a95880 commit c827e38
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions javascript/cms-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@
url: url,
dataType: "json",
success: function (data) {
if (data === null) {
jQuery.noticeAdd({
text: "Invalid handler",
stayTime: 1000,
inEffect: { left: "0", opacity: "show" },
});
return;
}
// Progress can return messages
if (data.message) {
jQuery.noticeAdd({
Expand Down
4 changes: 4 additions & 0 deletions src/CmsInlineFormAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
class CmsInlineFormAction extends LiteralField
{
use DefaultLink;
use ProgressiveAction;

/**
* @var array
Expand Down Expand Up @@ -109,6 +110,9 @@ public function FieldHolder($properties = array())
$classes .= " font-icon";
$classes .= ' font-icon-' . $this->buttonIcon;
}
if ($this->progressive) {
$classes .= " progressive-action";
}
$link = $this->getLink();
$attrs = '';
if ($this->newWindow) {
Expand Down

0 comments on commit c827e38

Please sign in to comment.