/o//commerce-media/accounts/-1/images/18527447?download=true

NABUCCO Script Center
Data Modeling, Process & Business Logic
18527400
(function () { let currentIndex = 0; let images = []; const carouselNextBtn = document.querySelector('.nav-button.next'); const carouselPrevBtn = document.querySelector('.nav-button.prev'); const carouselMainImage = document.getElementById('main-image'); const thumbnailsContainer = document.querySelector('.thumbnails'); const viewFullGalleryBtn = document.querySelector('.view-full-gallery'); function loadImages() { images = [ { src: "http://marketplace.lxc.liferay.com/o/commerce-media/accounts/-1/images/18527478?download=true", alt: "Overview-1080.png" }, { src: "http://marketplace.lxc.liferay.com/o/commerce-media/accounts/-1/images/18527506?download=true", alt: "Help_Page_01-1080.png" }, { src: "http://marketplace.lxc.liferay.com/o/commerce-media/accounts/-1/images/18527534?download=true", alt: "Script_UPDATE_01-1080.png" }, { src: "http://marketplace.lxc.liferay.com/o/commerce-media/accounts/-1/images/18527562?download=true", alt: "Interception_OVERVIEW_01-1080.png" }, { src: "http://marketplace.lxc.liferay.com/o/commerce-media/accounts/-1/images/18527590?download=true", alt: "Interception_UPDATE_01-1080.png" }, { src: "http://marketplace.lxc.liferay.com/o/commerce-media/accounts/-1/images/18527618?download=true", alt: "Schedule_EXECUTION_OVERVIEW_01-1080.png" } ] } function renderThumbnails() { const maxVisible = 5; let start = currentIndex - 2; if (start < 0) start = 0; if (start > images.length - maxVisible) start = Math.max(images.length - maxVisible, 0); const end = Math.min(images.length, start + maxVisible); thumbnailsContainer.innerHTML = ''; for (let i = start; i < end; i++) { const img = document.createElement('img'); img.className = 'thumbnail' + (i === currentIndex ? ' selected' : ''); img.src = images[i].src; img.alt = images[i].alt; img.dataset.index = i; img.addEventListener('click', () => updateMainImage(i)); thumbnailsContainer.appendChild(img); } } function updateMainImage(index) { currentIndex = index; carouselMainImage.src = images[index].src; carouselMainImage.alt = images[index].alt; carouselPrevBtn.disabled = index === 0; carouselNextBtn.disabled = index === images.length - 1; renderThumbnails(); } function setupNavigationButtons() { carouselPrevBtn.addEventListener('click', () => { if (currentIndex > 0) updateMainImage(currentIndex - 1); }); carouselNextBtn.addEventListener('click', () => { if (currentIndex < images.length - 1) updateMainImage(currentIndex + 1); }); } function setupModalTriggers() { carouselMainImage.addEventListener('click', () => openModalGallery(currentIndex)); if (viewFullGalleryBtn) { viewFullGalleryBtn.addEventListener('click', () => openModalGallery(currentIndex)); } } function openModalGallery(startIndex) { let current = startIndex; const template = document.getElementById('modal-gallery'); const clone = template.content.cloneNode(true); const container = document.createElement('div'); container.appendChild(clone); Liferay.Util.openModal({ bodyHTML: container.innerHTML, center: true, headerHTML: '', size: "full-screen", onOpen: () => { const modalContainer = document.querySelector('.modal-content'); if (modalContainer) { modalContainer.classList.add('custom-gallery-modal'); } const modalImage = document.querySelector('[data-role="modal-image"]'); const modalNext = document.querySelector('[data-role="modal-next"]'); const modalPrev = document.querySelector('[data-role="modal-prev"]'); const indexDisplay = document.getElementById('modal-index-display'); function updateModalImage(index) { const img = images[index]; modalImage.src = img.src; modalImage.alt = img.alt; modalNext.disabled = index === images.length - 1; modalPrev.disabled = index === 0; if (indexDisplay) { indexDisplay.textContent = (index + 1) + ' 的 ' + images.length; } } modalNext.addEventListener('click', () => { if (current < images.length - 1) { current++; updateModalImage(current); } }); modalPrev.addEventListener('click', () => { if (current > 0) { current--; updateModalImage(current); } }); updateModalImage(current); } }); } function main() { loadImages(); setupNavigationButtons(); setupModalTriggers(); updateMainImage(0); } main(); })(); (function () { let currentIndex = 0; let images = []; const carouselNextBtn = document.querySelector('.nav-button.next'); const carouselPrevBtn = document.querySelector('.nav-button.prev'); const carouselMainImage = document.getElementById('main-image'); const thumbnailsContainer = document.querySelector('.thumbnails'); const viewFullGalleryBtn = document.querySelector('.view-full-gallery'); function loadImages() { images = [ { src: "http://marketplace.lxc.liferay.com/o/commerce-media/accounts/-1/images/18527478?download=true", alt: "Overview-1080.png" }, { src: "http://marketplace.lxc.liferay.com/o/commerce-media/accounts/-1/images/18527506?download=true", alt: "Help_Page_01-1080.png" }, { src: "http://marketplace.lxc.liferay.com/o/commerce-media/accounts/-1/images/18527534?download=true", alt: "Script_UPDATE_01-1080.png" }, { src: "http://marketplace.lxc.liferay.com/o/commerce-media/accounts/-1/images/18527562?download=true", alt: "Interception_OVERVIEW_01-1080.png" }, { src: "http://marketplace.lxc.liferay.com/o/commerce-media/accounts/-1/images/18527590?download=true", alt: "Interception_UPDATE_01-1080.png" }, { src: "http://marketplace.lxc.liferay.com/o/commerce-media/accounts/-1/images/18527618?download=true", alt: "Schedule_EXECUTION_OVERVIEW_01-1080.png" } ] } function renderThumbnails() { const maxVisible = 5; let start = currentIndex - 2; if (start < 0) start = 0; if (start > images.length - maxVisible) start = Math.max(images.length - maxVisible, 0); const end = Math.min(images.length, start + maxVisible); thumbnailsContainer.innerHTML = ''; for (let i = start; i < end; i++) { const img = document.createElement('img'); img.className = 'thumbnail' + (i === currentIndex ? ' selected' : ''); img.src = images[i].src; img.alt = images[i].alt; img.dataset.index = i; img.addEventListener('click', () => updateMainImage(i)); thumbnailsContainer.appendChild(img); } } function updateMainImage(index) { currentIndex = index; carouselMainImage.src = images[index].src; carouselMainImage.alt = images[index].alt; carouselPrevBtn.disabled = index === 0; carouselNextBtn.disabled = index === images.length - 1; renderThumbnails(); } function setupNavigationButtons() { carouselPrevBtn.addEventListener('click', () => { if (currentIndex > 0) updateMainImage(currentIndex - 1); }); carouselNextBtn.addEventListener('click', () => { if (currentIndex < images.length - 1) updateMainImage(currentIndex + 1); }); } function setupModalTriggers() { carouselMainImage.addEventListener('click', () => openModalGallery(currentIndex)); if (viewFullGalleryBtn) { viewFullGalleryBtn.addEventListener('click', () => openModalGallery(currentIndex)); } } function openModalGallery(startIndex) { let current = startIndex; const template = document.getElementById('modal-gallery'); const clone = template.content.cloneNode(true); const container = document.createElement('div'); container.appendChild(clone); Liferay.Util.openModal({ bodyHTML: container.innerHTML, center: true, headerHTML: '<h2 class="modal-gallery-header" id="modal-header-title"><svg class="lexicon-icon lexicon-icon-picture" role="presentation" ><use xlink:href="https://marketplace.liferay.com/o/classic-theme/images/clay/icons.svg#picture" /></svg> Image <span id="modal-index-display"></span></h2>', size: "full-screen", onOpen: () => { const modalContainer = document.querySelector('.modal-content'); if (modalContainer) { modalContainer.classList.add('custom-gallery-modal'); } const modalImage = document.querySelector('[data-role="modal-image"]'); const modalNext = document.querySelector('[data-role="modal-next"]'); const modalPrev = document.querySelector('[data-role="modal-prev"]'); const indexDisplay = document.getElementById('modal-index-display'); function updateModalImage(index) { const img = images[index]; modalImage.src = img.src; modalImage.alt = img.alt; modalNext.disabled = index === images.length - 1; modalPrev.disabled = index === 0; if (indexDisplay) { indexDisplay.textContent = (index + 1) + ' av ' + images.length; } } modalNext.addEventListener('click', () => { if (current < images.length - 1) { current++; updateModalImage(current); } }); modalPrev.addEventListener('click', () => { if (current > 0) { current--; updateModalImage(current); } }); updateModalImage(current); } }); } function main() { loadImages(); setupNavigationButtons(); setupModalTriggers(); updateMainImage(0); } main(); })();
Beskrivning
NABUCCO Script Center is a generic solution for scripting in Liferay portals. Although scripting is generally possible in Liferay portals, our solution provides many additional features. These start with script management, continue with script scheduling and event interception, and finish with the formatting of reports and script execution results.

NABUCCO Script Center is based on the Liferay Script Engine and provides additional features based on that. Thus, on applying this solution, you stay compatible with Liferay. NABUCCO Script Center can, amongst others, be used to implement scheduler-based and model listener features without plugin overhead and the need to adhere to the traditional deployment process. It provides a flexible, fast, and cost efficient way to respond to requirements.

Visit the product website at http://www.prodyna.com/scriptcenter if you want to learn more about NABUCCO Script Center. Additional scripts are also provided on that website.
NABUCCO Script Center is a generic solution for scripting in Liferay portals. Although scripting is generally possible in Liferay portals, our solution provides many additional features. These start with script management, continue with script scheduling and event interception, and finish with the formatting of reports and script execution results.

NABUCCO Script Center is based on the Liferay Script Engine and provides additional features based on that. Thus, on applying this solution, you stay compatible with Liferay. NABUCCO Script Center can, amongst others, be used to implement scheduler-based and model listener features without plugin overhead and the need to adhere to the traditional deployment process. It provides a flexible, fast, and cost efficient way to respond to requirements.

Visit the product website at http://www.prodyna.com/scriptcenter if you want to learn more about NABUCCO Script Center. Additional scripts are also provided on that website.
DEVELOPER

Utvecklare


Publisher Date

January 23, 2024


Deployment Method

Liferay Self-Hosted

Liferay PaaS


App Type

DXP

Version

1.0.0.0

Versioner som stöds

6.2

Standard Price

Free

Help and Support


Dela länk

DEVELOPER
2024-11-21 18:01
Published date
2024-11-21 18:01
Published Date
2024-11-21 18:01
SUPPORTED OFFERINGS
Liferay PaaS
Supported Versions
6.2
Resource Requirements
Edition
Community
PRICE
Free
help & support
SHARE LINK
Copy & Share

HTML Example

A paragraph is a self-contained unit of a discourse in writing dealing with a particular point or idea. Paragraphs are usually an expected part of formal writing, used to organize longer prose.