Closed micgro42 closed 6 years ago
I don't think edit-views is a standard Doku action. I'm probably just searching for do=edit, and not taking extra characters in the action into account.
My guess was wrong. Where are you seeing this do=edit-views mode?
Any update @micgro42 ?
I will check. Thank you for reminding me, that this issue is still open 🙂
@micgro42 I just installed the struct plugin and tried to quickly figure it out, but it's going to take longer. If you let me know how to reproduce the bug, I can take a look.
I can confirm that the issue still exists.
Basic steps to reproduce:
foobar
) and pressing savefastwikitestdate
)Date
from the dropdown to the rightSave
button in the lower left corner of the pageStruct Schema Assignments
(You could get there via the admin menu as well)**
(i.e. two asterisks) into the input field in the column Page/Namespace
, select the schema we created and click the Add
-ButtonIt seems that any autocomplete is missing, using the datepicker just seems easier to reproduce initially as we do not have to populate some entries for the autocomplete to fetch.
Thanks! I can now reproduce it.
The issue is that struct does some initialization when the page is loaded, but the fastwiki inline editor isn't initialized until after that. Unfortunately, this is difficult to fix because of the way struct is implemented. Each js file executes inside a jquery load closure. It also has to execute inside a fastwiki event, but the way it's written right now, every JS file would have to be loaded on the page twice, doubling the size of struct's JS. If the code were restructured slightly (for example, to use constructors instead of @includes), it would be easier to fix.
Here's the hacky, JS-doubling fix -- add this to the bottom of struct/script.js:
jQuery(window).on('fastwiki:afterSwitch', function(evt, viewMode, isSectionEdit, prevViewMode) {
jQuery(function () {
/* DOKUWIKI:include script/functions.js */
/* DOKUWIKI:include script/EntryEditor.js */
EntryEditor(jQuery('#dw__editform, form.bureaucracy__plugin'));
/* DOKUWIKI:include script/SchemaEditor.js */
SchemaEditor();
/* DOKUWIKI:include script/LookupEditor.js */
jQuery('div.structlookup table').each(LookupEditor);
/* DOKUWIKI:include script/InlineEditor.js */
InlineEditor(jQuery('div.structaggregation table'));
});
});
After some more testing, it's not so bad. Replace all of script.js with this:
(function() {
/* DOKUWIKI:include script/functions.js */
/* DOKUWIKI:include script/EntryEditor.js */
/* DOKUWIKI:include script/SchemaEditor.js */
/* DOKUWIKI:include script/LookupEditor.js */
/* DOKUWIKI:include script/InlineEditor.js */
function init() {
EntryEditor(jQuery('#dw__editform, form.bureaucracy__plugin'));
SchemaEditor();
jQuery('div.structlookup table').each(LookupEditor);
InlineEditor(jQuery('div.structaggregation table'));
}
jQuery(init);
jQuery(window).on('fastwiki:afterSwitch', function(evt, viewMode, isSectionEdit, prevViewMode) {
if (isSectionEdit) {
init();
}
});
});
I've submitted the fix in a struct ticket:
https://github.com/cosmocode/dokuwiki-plugin-struct/issues/351
This fix was merged into the struct plugin on January 2, 2018.
Hi, unfortunately this plugin causes the struct autocompletion / datepicker to be missing on
do=edit
-views. I'm not sure if this has to be fixed here or within the struct-plugin.