This repository was archived by the owner on May 10, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Core Enhancement 2 -Incorporation of Modules in the Articles-Edit-View #8
Open
YatharthVyas
wants to merge
36
commits into
joomla-projects:dev
Choose a base branch
from
YatharthVyas:feature-article-module
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
45782b0
init language files
YatharthVyas 0da15bd
init xml form
YatharthVyas 12d56a0
init plugin php file
YatharthVyas a6715a8
Merge branch 'feature-article-module' of https://github.com/YatharthV…
YatharthVyas 431cb80
language constant for modules tab
YatharthVyas 3105800
imported modules tab
YatharthVyas 8c36d28
installation sql script
YatharthVyas 27c23bf
add language constants
YatharthVyas 3d8b9c6
show toolbar
YatharthVyas fdf301a
fetch all modules used in the article
YatharthVyas 307300a
add new tab for imported modules
YatharthVyas 8da56fe
add switcher for toggling the imported modules tab
YatharthVyas fde75fa
sort sql install script alphabetically
YatharthVyas 822e539
add missing comma
YatharthVyas 66f9691
edit modal script
YatharthVyas de3b3a9
add modal script to assets
YatharthVyas abbcee7
edit module modal
YatharthVyas e7a0cdd
Update administrator/components/com_content/tmpl/article/edit.php
YatharthVyas 6b53d86
Change heading language constant
YatharthVyas 31b3b10
Merge branch 'feature-article-module' of https://github.com/YatharthV…
YatharthVyas 89ab339
js lint
YatharthVyas fe446f1
introduce apply button param for Saving
YatharthVyas dd61a88
Display a save button in the modal
YatharthVyas 357da31
add remove id language constant
YatharthVyas de44fae
rename the js file name in assets
YatharthVyas ecfc63b
remove old js file
YatharthVyas c096b57
js script for modal and remove function
YatharthVyas 92eac8b
add column for removing the module from article
YatharthVyas dcad97f
js lint
YatharthVyas 0b7ad24
js lint
YatharthVyas 45005fe
check imported modules for empty
YatharthVyas 7c214e9
New Module button in select module modal
YatharthVyas ba7c8ef
correct the link
YatharthVyas f816ec9
revert newmodule xtd editor plugin files
YatharthVyas 6a539b3
add newline at the end
YatharthVyas 8744b8d
fix remove module js function
YatharthVyas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
build/media_source/com_content/js/admin-article-edit-modal.es6.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| (function () { | ||
| 'use strict'; | ||
|
|
||
| /** | ||
| * @copyright (C) 2021 Open Source Matters, Inc. <https://www.joomla.org> | ||
| * @license GNU General Public License version 2 or later; see LICENSE.txt | ||
| */ | ||
| Joomla = window.Joomla || {}; | ||
|
|
||
| (function () { | ||
|
|
||
| var baseLink = 'index.php?option=com_modules&client_id=0&task=module.edit&tmpl=component&view=module&layout=modal&id='; | ||
| var linkElements = [].slice.call(document.getElementsByClassName('module-edit-link')); | ||
| var elements = [].slice.call(document.querySelectorAll('#moduleEditModal .modal-footer .btn')); | ||
|
|
||
| if (linkElements.length) { | ||
| linkElements.forEach(function (linkElement) { | ||
| linkElement.addEventListener('click', function (_ref) { | ||
| var target = _ref.target; | ||
| var link = baseLink + target.getAttribute('data-module-id'); | ||
| var modal = document.getElementById('moduleEditModal'); | ||
| var body = modal.querySelector('.modal-body'); | ||
| var iFrame = document.createElement('iframe'); | ||
| iFrame.src = link; | ||
| iFrame.setAttribute('class', 'class="iframe jviewport-height70"'); | ||
| body.innerHTML = ''; | ||
| body.appendChild(iFrame); | ||
| modal.open(); | ||
| }); | ||
| }); | ||
| } | ||
|
|
||
| if (elements.length) { | ||
| elements.forEach(function (element) { | ||
| element.addEventListener('click', function (_ref2) { | ||
| var target = _ref2.target; | ||
| var dataTarget = target.getAttribute('data-bs-target'); | ||
|
|
||
| if (dataTarget) { | ||
| var iframe = document.querySelector('#moduleEditModal iframe'); | ||
| var iframeDocument = iframe.contentDocument || iframe.contentWindow.document; | ||
| iframeDocument.querySelector(dataTarget).click(); | ||
| } | ||
| }); | ||
| }); | ||
| } | ||
| })(); | ||
|
|
||
| }()); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.