mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-18 11:10:56 +01:00
more progress on changelog feature
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
/* eslint-disable */
|
||||
import $ from 'jquery';
|
||||
|
||||
$(document).on('opened', '[data-remodal-id="changelog"]', (e) => {
|
||||
console.log(e);
|
||||
console.log(self);
|
||||
console.log('modal opened');
|
||||
const instance = $.remodal.lookup[$('[data-remodal-id=changelog]').data('remodal')];
|
||||
console.log(instance);
|
||||
console.log($trigger);
|
||||
const url = instance.$trigger.data('remodalChangelog');
|
||||
console.log(url);
|
||||
let TRIGGER = null;
|
||||
|
||||
$.ajax({url: url}).done(function(data){
|
||||
console.log(data);
|
||||
$(document).on('click', '[data-remodal-changelog]', (event) => {
|
||||
TRIGGER = event.currentTarget;
|
||||
});
|
||||
|
||||
$(document).on('opened', '[data-remodal-id="changelog"]', () => {
|
||||
const instance = $.remodal.lookup[$('[data-remodal-id=changelog]').data('remodal')];
|
||||
if (!TRIGGER) { return true; }
|
||||
|
||||
const url = $(TRIGGER).data('remodalChangelog');
|
||||
|
||||
$.ajax({url: url}).done(function(data) {
|
||||
instance.$modal.html(data);
|
||||
});
|
||||
});
|
||||
|
||||
2
themes/grav/js/admin.min.js
vendored
2
themes/grav/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
<div class="remodal" data-remodal-id="changelog">Changelog</div>
|
||||
<div class="remodal" data-remodal-id="changelog" data-remodal-options="hashTracking: false">Changelog</div>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
<tr>
|
||||
<td>{{ "PLUGIN_ADMIN.CHANGELOG"|tu }}</td>
|
||||
<td class="double"><a class="button button-small" href="#changelog" data-remodal-changelog="{{ base_url_relative }}/changelog/type:plugins/slug:{{ plugin.slug }}">Changelog</a></td>
|
||||
<td class="double"><a class="button button-small" href="#" data-remodal-target="changelog" data-remodal-changelog="{{ base_url_relative }}/changelog/type:plugins/slug:{{ plugin.slug }}">Changelog</a></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user