Skip to content

Commit 5353b90

Browse files
committed
Merge branch 'release/2.1.6'
2 parents 9b6bcd0 + 6022d46 commit 5353b90

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# v2.1.6
2+
## 03/22/2023
3+
4+
1. [](#bugfix)
5+
* Fixed NextGen integration where cog icon settings would not work properly
6+
17
# v2.1.5
28
## 03/28/2022
39

@@ -63,13 +69,13 @@
6369
1. [](#bugfix)
6470
* NextGen Editor: Fixed Page Inject UI links missing the base_root [getgrav/grav-premium-issues#30](https://github.com/getgrav/grav-premium-issues/issues/30)
6571
* NextGen Editor: Moved list of available templates to input text to support partials and any twig template [getgrav/grav-premium-issues#24](https://github.com/getgrav/grav-premium-issues/issues/24)
66-
72+
6773
# v1.4.3
6874
## 01/15/2021
6975

7076
1. [](#improved)
7177
* NextGen Editor: Updated upcast/downcast syntax to support latest version
72-
78+
7379
# v1.4.2
7480
## 12/20/2020
7581

blueprints.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Page Inject
22
type: plugin
33
slug: page-inject
4-
version: 2.1.5
4+
version: 2.1.6
55
description: "**Page Inject** is a powerful plugin that lets you inject entire pages or page content into other pages using simple markdown-style or shortcode syntax"
66
icon: trello
77
author:

nextgen-editor/plugins/page-inject/page-inject.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function uncollapse(input) {
4444
innerHTML += `<span class="pi-type">${itemTypes[attributes.type] || ''}</span>`;
4545
innerHTML += `<span class="pi-title">${attributes.title || ''}</span>`;
4646
innerHTML += `<a_reserved target="_blank" class="pi-route" href="${GravAdmin?.config?.base_url_simple || ''}${attributes.route || ''}">${attributes.route || ''}</a_reserved>`;
47-
innerHTML += '<svg class="pi-route-settings" viewBox="0 0 24 24" fill="currentColor" stroke="none" onclick="pageInjectRouteSettings.call(this)">';
47+
innerHTML += '<svg class="pi-route-settings" viewBox="0 0 24 24" fill="currentColor" stroke="none">';
4848
innerHTML += '<path d="M9 4.58V4c0-1.1.9-2 2-2h2a2 2 0 0 1 2 2v.58a8 8 0 0 1 1.92 1.11l.5-.29a2 2 0 0 1 2.74.73l1 1.74a2 2 0 0 1-.73 2.73l-.5.29a8.06 8.06 0 0 1 0 2.22l.5.3a2 2 0 0 1 .73 2.72l-1 1.74a2 2 0 0 1-2.73.73l-.5-.3A8 8 0 0 1 15 19.43V20a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-.58a8 8 0 0 1-1.92-1.11l-.5.29a2 2 0 0 1-2.74-.73l-1-1.74a2 2 0 0 1 .73-2.73l.5-.29a8.06 8.06 0 0 1 0-2.22l-.5-.3a2 2 0 0 1-.73-2.72l1-1.74a2 2 0 0 1 2.73-.73l.5.3A8 8 0 0 1 9 4.57zM7.88 7.64l-.54.51-1.77-1.02-1 1.74 1.76 1.01-.17.73a6.02 6.02 0 0 0 0 2.78l.17.73-1.76 1.01 1 1.74 1.77-1.02.54.51a6 6 0 0 0 2.4 1.4l.72.2V20h2v-2.04l.71-.2a6 6 0 0 0 2.41-1.4l.54-.51 1.77 1.02 1-1.74-1.76-1.01.17-.73a6.02 6.02 0 0 0 0-2.78l-.17-.73 1.76-1.01-1-1.74-1.77 1.02-.54-.51a6 6 0 0 0-2.4-1.4l-.72-.2V4h-2v2.04l-.71.2a6 6 0 0 0-2.41 1.4zM12 16a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-2a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"></path>';
4949
innerHTML += '</svg>';
5050

@@ -60,7 +60,7 @@ function uncollapse(input) {
6060

6161
innerHTML += '</span>';
6262
innerHTML += '<span class="pi-settings">';
63-
innerHTML += '<svg viewBox="0 0 24 24" fill="currentColor" stroke="none" onclick="pageInjectSettings.call(this)">';
63+
innerHTML += '<svg viewBox="0 0 24 24" fill="currentColor" stroke="none">';
6464
innerHTML += '<path d="M9 4.58V4c0-1.1.9-2 2-2h2a2 2 0 0 1 2 2v.58a8 8 0 0 1 1.92 1.11l.5-.29a2 2 0 0 1 2.74.73l1 1.74a2 2 0 0 1-.73 2.73l-.5.29a8.06 8.06 0 0 1 0 2.22l.5.3a2 2 0 0 1 .73 2.72l-1 1.74a2 2 0 0 1-2.73.73l-.5-.3A8 8 0 0 1 15 19.43V20a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-.58a8 8 0 0 1-1.92-1.11l-.5.29a2 2 0 0 1-2.74-.73l-1-1.74a2 2 0 0 1 .73-2.73l.5-.29a8.06 8.06 0 0 1 0-2.22l-.5-.3a2 2 0 0 1-.73-2.72l1-1.74a2 2 0 0 1 2.73-.73l.5.3A8 8 0 0 1 9 4.57zM7.88 7.64l-.54.51-1.77-1.02-1 1.74 1.76 1.01-.17.73a6.02 6.02 0 0 0 0 2.78l.17.73-1.76 1.01 1 1.74 1.77-1.02.54.51a6 6 0 0 0 2.4 1.4l.72.2V20h2v-2.04l.71-.2a6 6 0 0 0 2.41-1.4l.54-.51 1.77 1.02 1-1.74-1.76-1.01.17-.73a6.02 6.02 0 0 0 0-2.78l-.17-.73 1.76-1.01-1-1.74-1.77 1.02-.54-.51a6 6 0 0 0-2.4-1.4l-.72-.2V4h-2v2.04l-.71.2a6 6 0 0 0-2.41 1.4zM12 16a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-2a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"></path>';
6565
innerHTML += '</span>';
6666
innerHTML += '</span>';
@@ -320,4 +320,18 @@ window.pageInjectSettings = function pageInjectSettings() {
320320
}
321321
};
322322

323+
document.addEventListener('click', (event) => {
324+
const target = event.target;
325+
326+
if (target.classList.contains('pi-route-settings') || target.closest('.pi-route-settings')) {
327+
event.preventDefault();
328+
window.pageInjectRouteSettings.call(target);
329+
}
330+
331+
if (target.classList.contains('pi-settings') || target.closest('.pi-settings')) {
332+
event.preventDefault();
333+
window.pageInjectSettings.call(target)
334+
}
335+
});
336+
323337
})();

0 commit comments

Comments
 (0)