Skip to content

Commit

Permalink
refactor, remove js
Browse files Browse the repository at this point in the history
  • Loading branch information
Nazar65 committed Nov 21, 2019
1 parent 610eed6 commit 7bf8b0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
3 changes: 2 additions & 1 deletion AdobeStockImageAdminUi/Plugin/AddSearchButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public function beforeSetLayout(Container $subject, LayoutInterface $layout): vo
[
'class' => 'action-secondary',
'label' => __('Search Adobe Stock'),
'type' => 'button',
'type' => 'button',
'onclick' => 'jQuery(".adobe-search-images-modal")[0].trigger("openModal");'
],
0,
0,
Expand Down
18 changes: 0 additions & 18 deletions AdobeStockImageAdminUi/view/adminhtml/templates/panel.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,3 @@
}
}
</script>
<script>
require([
'jquery',
], function ($) {
$(function () {
var searchButton = "#search_adobe_stock",
adobeStockModal = ".adobe-search-images-modal";

$(searchButton).click(function() {
if ($(adobeStockModal).length > 1) {
$(adobeStockModal)[0].remove();
}
$(adobeStockModal).trigger("openModal");
});
});
});
</script>

0 comments on commit 7bf8b0a

Please sign in to comment.