Template:CopyEmbeddedStoriesForm: Difference between revisions

From Seven Sages of Rome
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
<includeonly>
<html>
<html>
<form method="post" action="">
<form method="post" action="javascript:void(0);">
     <label for="targetPageInput">Select target page:</label>
     <label for="targetPageInput">Select target page:</label>
     <div id="autocomplete-container">
     <input type="text" id="targetPageInput" name="targetPage" placeholder="Start typing to search..." class="oo-ui-inputWidget-input oo-ui-textInputWidget">
        <input type="text" id="targetPageInput" name="targetPage" placeholder="Start typing to search..." class="oo-ui-inputWidget-input oo-ui-textInputWidget">
    <button type="button" id="copyButton">Copy Embedded Stories</button>
        <ul id="autocomplete-suggestions" class="suggestions-list" style="display: none;"></ul>
    </div>
    <input type="submit" value="Copy Embedded Stories">
</form>
</form>
 
</html>
-- Lua invocation to render the fetched EmbeddedStory templates
<!-- Hidden div to hold EmbeddedStory templates -->
{{#invoke:CopyEmbeddedStories|fetchEmbeddedStories|sourcePage={{FULLPAGENAME}}}}
<div id="embeddedStoryTemplates" style="display: none;">
 
     {{#invoke:CopyEmbeddedStories|fetchEmbeddedStories|sourcePage={{FULLPAGENAME}}}}
<!-- Fetch page titles using Semantic MediaWiki query -->
<div id="pageList" style="display: none;">
     {{#ask: [[Category:YourCategory]] | ? | limit=500 | format=list | sep=, }}
</div>
</div>
<style>
    /* Custom styles for the suggestion list */
    .suggestions-list {
        border: 1px solid #ccc;
        background-color: #fff;
        max-height: 200px;
        overflow-y: auto;
        position: absolute;
        width: 100%;
        list-style-type: none;
        padding: 0;
        margin: 0;
    }
    .suggestions-list li {
        padding: 8px;
        cursor: pointer;
    }
    .suggestions-list li:hover {
        background-color: #eee;
    }
</style>
</html>
</includeonly>
</includeonly>

Latest revision as of 20:18, 13 November 2024