Skip to content

Commit

Permalink
Modal in modal
Browse files Browse the repository at this point in the history
  • Loading branch information
ibelar committed Jun 28, 2018
1 parent 9964bc8 commit c6b762a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -12,5 +12,5 @@ docs/build
/build
.DS_Store
*.codekit3

yarn.lock
run_local.sh
6 changes: 5 additions & 1 deletion src/Modal.php
Expand Up @@ -81,7 +81,10 @@ public function enableCallback()
if ($this->cb->triggered() && $this->fx) {
$this->fx[0]($this->cb_view);
}
$this->app->terminate($this->cb_view->renderJSON());
$modalName = isset($_GET['__atk_m']) ? $_GET['__atk_m'] : null;
if ($modalName === $this->name) {
$this->app->terminate($this->cb_view->renderJSON());
}
});
}

Expand Down Expand Up @@ -279,6 +282,7 @@ public function renderView()
$data['label'] = $this->loading_label;

if (!empty($this->fx)) {
$this->cb_view->stickyGet('__atk_m', $this->name);
$data['uri'] = $this->cb->getJSURL();
}

Expand Down

0 comments on commit c6b762a

Please sign in to comment.