Release of v5.1.0
Add [AllowDynamicProperties] in the base view class for J5. Move the _prepareDocument above the display call in the base view class. Remove all backward compatibility issues, so JCB will not need the [Backward Compatibility] plugin to run. Added new import powers for custom import of spreadsheets. Move the setDocument and _prepareDocument above the display in the site view and custom admin view. Update the trashhelper layout to work in Joomla 5. Add AllowDynamicProperties (Joomla 4+5) to view class to allow Custom Dynamic Get methods to work without issues. Fix Save failed issue in dynamicGet. #1148. Move all [TEXT, EDITOR, TEXTAREA] fields from [NOT NULL] to [NULL]. Add the DateHelper class and improve the date methods. Add simple SessionHelper class. Add first classes for the new import engine. Improve the [VDM Registry] to be Joomla Registry Compatible. Move all registries to the [VDM Registry] class. Fix Checked Out to be null and not 0. (#1194). Fix created_by, modified_by, checked_out fields in the compiler of the SQL. (#1194). Update all core date fields in table class. (#1188). Update created_by, modified_by, checked_out fields in table class. Implementation of the decentralized Super-Power CORE repository network. (#1190). Fix the noticeboard to display Llewellyn's Joomla Social feed. Started compiling JCB5 on Joomla 5 with PHP 8.2. Add init_defaults option for dynamic form selection setup (to int new items with default values dynamically). Update all JCB 5 tables to utf8mb4_unicode_ci collation if misaligned. Move all internal ID linking to GUID inside of JCB 5. Updated the admin-tab-fields in add-fields view. #1205. Remove Custom Import Tab from admin view. Improved the customcode and placeholder search features.
This commit is contained in:
@@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
|
||||
|
||||
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
|
||||
|
||||
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.3) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.1.0) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
|
||||
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
|
||||
|
||||
@@ -144,14 +144,14 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 20th September, 2024
|
||||
+ *Version*: 5.0.3
|
||||
+ *Last Build*: 14th February, 2025
|
||||
+ *Version*: 5.1.0
|
||||
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **858191**
|
||||
+ *Field count*: **2104**
|
||||
+ *File count*: **5924**
|
||||
+ *Folder count*: **631**
|
||||
+ *Line count*: **949989**
|
||||
+ *Field count*: **2098**
|
||||
+ *File count*: **6390**
|
||||
+ *Folder count*: **640**
|
||||
|
||||
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
|
||||
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||
|
@@ -10,10 +10,105 @@
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
html, body {
|
||||
background-color: #fefcfe !important;
|
||||
html[data-bs-theme="light"] .main-card {
|
||||
background-color: #fefcfe;
|
||||
}
|
||||
|
||||
.jcb-sponsor-banner {
|
||||
-webkit-box-shadow: 0 0 7px 1px #f0f0f0;
|
||||
box-shadow: 0 0 7px 1px #f0f0f0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Spinning effect within the mastadon-display-block */
|
||||
.mastadon-display-block .spinning i {
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
|
||||
.mastadon-display-block .enlarge-and-disappear {
|
||||
animation: enlarge-fade-out 1s forwards;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes enlarge-fade-out {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
transform: scale(2);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Placeholder container scoped to mastadon-display-block */
|
||||
.mastadon-display-block .placeholder {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
margin-bottom: 16px;
|
||||
padding: 16px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.mastadon-display-block .placeholder-line {
|
||||
height: 12px;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 4px;
|
||||
animation: pulse 1.5s infinite;
|
||||
}
|
||||
|
||||
.mastadon-display-block .placeholder-line:nth-child(1) {
|
||||
width: 80%;
|
||||
}
|
||||
.mastadon-display-block .placeholder-line:nth-child(2) {
|
||||
width: 60%;
|
||||
}
|
||||
.mastadon-display-block .placeholder-line:nth-child(3) {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.mastadon-display-block .placeholder-circle {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 50%;
|
||||
animation: pulse 1.5s infinite;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.mastadon-display-block .loading {
|
||||
visibility: visible;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.social-icon-details {
|
||||
min-height: 50px;
|
||||
width: 100%;
|
||||
padding: 5px;
|
||||
box-sizing: border-box;
|
||||
font-size: 10px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
|
@@ -11,3 +11,31 @@
|
||||
/* CSS Document */
|
||||
|
||||
|
||||
.namespace-code-container {
|
||||
display: inline-block;
|
||||
max-width: 300px; /* Limit visible width */
|
||||
white-space: nowrap;
|
||||
overflow-x: auto; /* Enable horizontal scrolling */
|
||||
border: 1px solid #ccc;
|
||||
padding: 5px;
|
||||
font-family: monospace;
|
||||
background-color: #f4f4f4;
|
||||
cursor: pointer;
|
||||
scrollbar-width: thin; /* Firefox scrollbar */
|
||||
}
|
||||
|
||||
/* Style the scrollbar for WebKit browsers */
|
||||
.namespace-code-container::-webkit-scrollbar {
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
.namespace-code-container::-webkit-scrollbar-thumb {
|
||||
background: #888;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
/* Ensure normal text direction while scrolling */
|
||||
.namespace-code-container {
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
}
|
||||
|
333
admin/assets/js/compiler.js
Normal file
333
admin/assets/js/compiler.js
Normal file
@@ -0,0 +1,333 @@
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 30th April, 2015
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
/* JS Document */
|
||||
class MastodonFeed {
|
||||
constructor(containerId, refreshButtonId) {
|
||||
this.container = document.getElementById(containerId);
|
||||
this.refreshButton = document.getElementById(refreshButtonId);
|
||||
|
||||
// Get settings from data attributes
|
||||
this.mastodonInstance = this.container.dataset.instance;
|
||||
this.accountId = this.container.dataset.accountId;
|
||||
this.postCount = parseInt(this.container.dataset.postCount) || 5;
|
||||
|
||||
this.cacheKey = `mastodon-feed-cache-${this.accountId}`;
|
||||
this.cacheExpiration = 24 * 60 * 60 * 1000; // 24 hours in milliseconds
|
||||
|
||||
// Initialize the feed
|
||||
this.initFeed();
|
||||
|
||||
// Attach event listener for the refresh button
|
||||
this.refreshButton.addEventListener("click", () => this.clearCacheAndReload());
|
||||
}
|
||||
|
||||
async initFeed() {
|
||||
const cachedData = this.getCachedData();
|
||||
|
||||
if (cachedData) {
|
||||
this.renderFeed(cachedData);
|
||||
} else {
|
||||
await this.loadFeed();
|
||||
}
|
||||
}
|
||||
|
||||
getCachedData() {
|
||||
const cache = localStorage.getItem(this.cacheKey);
|
||||
if (!cache) return null;
|
||||
|
||||
const parsedCache = JSON.parse(cache);
|
||||
const now = new Date().getTime();
|
||||
|
||||
if (now - parsedCache.timestamp > this.cacheExpiration) {
|
||||
// Cache is expired
|
||||
this.clearCache();
|
||||
return null;
|
||||
}
|
||||
|
||||
return parsedCache.data;
|
||||
}
|
||||
|
||||
setCachedData(data) {
|
||||
const cache = {
|
||||
timestamp: new Date().getTime(),
|
||||
data: data,
|
||||
};
|
||||
localStorage.setItem(this.cacheKey, JSON.stringify(cache));
|
||||
}
|
||||
|
||||
clearCache() {
|
||||
localStorage.removeItem(this.cacheKey);
|
||||
}
|
||||
|
||||
async loadFeed() {
|
||||
try {
|
||||
const response = await fetch(`${this.mastodonInstance}/api/v1/accounts/${this.accountId}/statuses?limit=${this.postCount}`);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`Failed to fetch Mastodon feed: ${response.statusText}`);
|
||||
}
|
||||
|
||||
const posts = await response.json();
|
||||
this.setCachedData(posts); // Cache the data
|
||||
this.renderFeed(posts);
|
||||
} catch (error) {
|
||||
console.error("Error loading Mastodon feed:", error);
|
||||
this.container.innerHTML = `<div class="alert alert-danger">Error loading feed. Please try again later.</div>`;
|
||||
}
|
||||
}
|
||||
|
||||
renderFeed(posts) {
|
||||
// Clear existing content
|
||||
this.container.innerHTML = "";
|
||||
|
||||
posts.forEach(post => {
|
||||
if (!post.content) return; // Ignore posts with no content
|
||||
|
||||
// Create post element
|
||||
const listItem = document.createElement("div");
|
||||
listItem.className = "card mb-3";
|
||||
|
||||
const postContent = document.createElement("div");
|
||||
postContent.className = "card-body";
|
||||
|
||||
const user = post.account;
|
||||
const avatar = user.avatar_static;
|
||||
const displayName = user.display_name || user.username;
|
||||
|
||||
// User header
|
||||
const header = document.createElement("div");
|
||||
header.className = "d-flex align-items-center mb-2";
|
||||
|
||||
const avatarLink = document.createElement("a");
|
||||
avatarLink.href = user.url;
|
||||
// avatarLink.target = "_blank";
|
||||
|
||||
const avatarImg = document.createElement("img");
|
||||
avatarImg.src = avatar;
|
||||
avatarImg.alt = displayName;
|
||||
avatarImg.className = "rounded-circle me-2";
|
||||
avatarImg.style.width = "40px";
|
||||
|
||||
avatarLink.appendChild(avatarImg);
|
||||
|
||||
const userInfo = document.createElement("div");
|
||||
const nameLink = document.createElement("a");
|
||||
nameLink.href = user.url;
|
||||
// nameLink.target = "_blank";
|
||||
nameLink.className = "text-decoration-none fw-bold";
|
||||
nameLink.textContent = displayName;
|
||||
|
||||
// The date
|
||||
const dateStamp = this.intelligentDateFormat(post.created_at);
|
||||
|
||||
const username = document.createElement("div");
|
||||
username.className = "text-muted small";
|
||||
username.textContent = `@${user.username} (${dateStamp})`;
|
||||
|
||||
userInfo.appendChild(nameLink);
|
||||
userInfo.appendChild(username);
|
||||
|
||||
header.appendChild(avatarLink);
|
||||
header.appendChild(userInfo);
|
||||
|
||||
// Post content
|
||||
const content = document.createElement("div");
|
||||
content.innerHTML = post.content;
|
||||
|
||||
// Interactions
|
||||
const interactions = document.createElement("div");
|
||||
interactions.className = "btn-group btn-sm";
|
||||
|
||||
// View Post link
|
||||
const viewPost = document.createElement("a");
|
||||
viewPost.href = post.url;
|
||||
// viewPost.target = "_blank";
|
||||
viewPost.className = "btn btn-primary btn-sm";
|
||||
viewPost.innerHTML = `View Post
|
||||
<i class="icon-comments-2"></i> ${post.replies_count}
|
||||
<i class="icon-heart"></i> ${post.favourites_count}
|
||||
<i class="icon-loop"></i> ${post.reblogs_count}`;
|
||||
interactions.appendChild(viewPost);
|
||||
|
||||
// Join Me link
|
||||
const joinLink = document.createElement("a");
|
||||
joinLink.href = "https://joomla.social/invite/gzAvC48K";
|
||||
// joinLink.target = "_blank";
|
||||
joinLink.className = "btn btn-success btn-sm";
|
||||
joinLink.textContent = "Join Me";
|
||||
interactions.appendChild(joinLink);
|
||||
|
||||
// Assemble post
|
||||
postContent.appendChild(header);
|
||||
postContent.appendChild(content);
|
||||
postContent.appendChild(interactions);
|
||||
|
||||
listItem.appendChild(postContent);
|
||||
this.container.appendChild(listItem);
|
||||
this.container.classList.remove('loading');
|
||||
});
|
||||
}
|
||||
|
||||
clearCacheAndReload() {
|
||||
// Add spinning effect to the refresh button
|
||||
this.refreshButton.classList.add('spinning');
|
||||
|
||||
// Show placeholder content
|
||||
this.container.classList.add('loading');
|
||||
this.container.innerHTML = this.generatePlaceholder();
|
||||
|
||||
// Clear cache and reload feed
|
||||
this.clearCache();
|
||||
|
||||
// Wait for 3 seconds
|
||||
setTimeout(() => {
|
||||
// Enlarge and fade out the refresh button
|
||||
this.refreshButton.classList.add('enlarge-and-disappear');
|
||||
|
||||
// After the animation, reset the button and content
|
||||
setTimeout(() => {
|
||||
this.refreshButton.classList.remove('spinning', 'enlarge-and-disappear');
|
||||
this.refreshButton.style.display = '';
|
||||
|
||||
// Remove placeholder and restore actual content
|
||||
this.loadFeed();
|
||||
}, 1000); // Animation time for fade-out
|
||||
}, 3000); // Spinning duration
|
||||
}
|
||||
|
||||
generatePlaceholder() {
|
||||
let placeholders = '';
|
||||
for (let i = 0; i < this.postCount; i++) {
|
||||
placeholders += `
|
||||
<div class="placeholder">
|
||||
<div class="placeholder-circle"></div>
|
||||
<div class="placeholder-line"></div>
|
||||
<div class="placeholder-line"></div>
|
||||
<div class="placeholder-line"></div>
|
||||
<div class="placeholder-line"></div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
return placeholders;
|
||||
}
|
||||
|
||||
intelligentDateFormat(isoDateString) {
|
||||
const date = new Date(isoDateString);
|
||||
const now = new Date();
|
||||
|
||||
// Helper function to determine if two dates are the same day
|
||||
const isSameDay = (d1, d2) => d1.toDateString() === d2.toDateString();
|
||||
|
||||
// Calculate the difference in time and days
|
||||
const diffTime = Math.abs(now - date);
|
||||
const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24));
|
||||
|
||||
if (isSameDay(date, now)) {
|
||||
// If the date is today, show the time only
|
||||
return date.toLocaleTimeString(undefined, { hour: 'numeric', minute: '2-digit', hour12: true });
|
||||
} else if (diffDays < 7) {
|
||||
// If it's within the last week, show the day name
|
||||
return date.toLocaleDateString(undefined, { weekday: 'long', hour: 'numeric', minute: '2-digit', hour12: true });
|
||||
} else if (diffDays < 30) {
|
||||
// If it's within the last month, show the number of days ago
|
||||
return `${diffDays} days ago`;
|
||||
} else if (date.getFullYear() === now.getFullYear()) {
|
||||
// If it's this year, show just the month and day
|
||||
return date.toLocaleDateString(undefined, { month: 'short', day: 'numeric' });
|
||||
} else {
|
||||
// For older dates, show month, day, and year
|
||||
return date.toLocaleDateString(undefined, { month: 'short', day: 'numeric', year: 'numeric' });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class IconWaveAnimator {
|
||||
constructor(containerId, detailsId) {
|
||||
this.details = document.getElementById(detailsId);
|
||||
this.container = document.getElementById(containerId);
|
||||
this.icons = this.container.querySelectorAll("i");
|
||||
this.links = this.container.querySelectorAll("a");
|
||||
this.init();
|
||||
}
|
||||
|
||||
init() {
|
||||
// set the icon hover events
|
||||
this.setupHoverEvents();
|
||||
|
||||
// Random chance to do nothing (1 out of 10)
|
||||
if (Math.random() < 0.1) return;
|
||||
|
||||
// Randomize the initial delay before starting
|
||||
const initialDelay = Math.random() * 2000 + 2000; // 2–4 seconds
|
||||
setTimeout(() => {
|
||||
this.randomBehavior();
|
||||
}, initialDelay);
|
||||
|
||||
// Occasionally trigger a second wave after 10 seconds
|
||||
if (Math.random() > 0.5) {
|
||||
setTimeout(() => {
|
||||
this.mexicanWave(false); // Reverse wave
|
||||
}, 10000);
|
||||
}
|
||||
}
|
||||
|
||||
mexicanWave(forward = true) {
|
||||
let delay = 0;
|
||||
const iconsArray = Array.from(this.icons);
|
||||
|
||||
(forward ? iconsArray : iconsArray.reverse()).forEach((icon) => {
|
||||
setTimeout(() => {
|
||||
icon.style.transition = "transform 0.3s ease-in-out";
|
||||
icon.style.transform = "scale(1.3)";
|
||||
setTimeout(() => {
|
||||
icon.style.transform = "scale(1)";
|
||||
}, 300);
|
||||
}, delay);
|
||||
delay += 150; // Stagger the effect for the wave
|
||||
});
|
||||
}
|
||||
|
||||
randomBehavior() {
|
||||
const waveDirection = Math.random() > 0.5 ? "forward" : "backward";
|
||||
const waveCount = Math.floor(Math.random() * 10) + 1; // 1 to 5 waves
|
||||
const interval = Math.random() * 2000 + 3000; // 3 to 5 seconds
|
||||
|
||||
let executedCount = 0;
|
||||
const intervalId = setInterval(() => {
|
||||
if (executedCount >= waveCount) {
|
||||
clearInterval(intervalId);
|
||||
return;
|
||||
}
|
||||
this.mexicanWave(waveDirection === "forward");
|
||||
executedCount++;
|
||||
}, interval);
|
||||
}
|
||||
|
||||
setupHoverEvents() {
|
||||
this.links.forEach((link) => {
|
||||
link.addEventListener("mouseenter", () => this.showDetails(link));
|
||||
link.addEventListener("mouseleave", () => this.clearDetails());
|
||||
});
|
||||
}
|
||||
|
||||
showDetails(link) {
|
||||
const description = link.dataset.description;
|
||||
if (this.details && description) {
|
||||
this.details.textContent = description;
|
||||
}
|
||||
}
|
||||
|
||||
clearDetails() {
|
||||
if (this.details) {
|
||||
this.details.textContent = "";
|
||||
}
|
||||
}
|
||||
}
|
@@ -78,7 +78,7 @@ function getLibraries(path) {
|
||||
buildLibraries(_paths);
|
||||
} else {
|
||||
jQuery.get(path)
|
||||
.success(function(paths) {
|
||||
.done(function(paths) {
|
||||
// load only this library paths
|
||||
jQuery.jStorage.set('JCB-Snippets-Paths', paths, {TTL: expire});
|
||||
buildLibraries(paths);
|
||||
@@ -161,7 +161,7 @@ function getSnippets(path, libraryName) {
|
||||
jQuery('#snippets-github').html('<h1>'+Joomla.JText._('COM_COMPONENTBUILDER_JCB_COMMUNITY_SNIPPETS')+'</h1>');
|
||||
} else {
|
||||
jQuery.get(path)
|
||||
.success(function(paths) {
|
||||
.done(function(paths) {
|
||||
// load only this library paths
|
||||
jQuery.jStorage.set('JCB-Snippets-Paths', paths, {TTL: expire});
|
||||
setSnippets(paths, libraryName);
|
||||
@@ -190,7 +190,7 @@ function setSnippets(paths, libraryName) {
|
||||
fromLocal = true;
|
||||
} else {
|
||||
jQuery.get(snippetPath+value.path)
|
||||
.success(function(snippet) {
|
||||
.done(function(snippet) {
|
||||
// convert the string to json.object
|
||||
snippet = jQuery.parseJSON(snippet);
|
||||
jQuery.jStorage.set(value.path, snippet, {TTL: expire});
|
||||
@@ -469,7 +469,7 @@ function getSnippetModal(key, type) {
|
||||
showSnippetModal(_snippet, type);
|
||||
} else {
|
||||
jQuery.get('https://raw.githubusercontent.com/vdm-io/Joomla-Component-Builder-Snippets/master/'+key)
|
||||
.success(function(snippet) {
|
||||
.done(function(snippet) {
|
||||
// convert the string to json.object
|
||||
snippet = jQuery.parseJSON(snippet);
|
||||
jQuery.jStorage.set(key, snippet, {TTL: expire});
|
||||
@@ -527,7 +527,6 @@ function getKeyID(key) {
|
||||
// return the id build
|
||||
return keyID;
|
||||
}
|
||||
|
||||
// get key ID
|
||||
function getKeyID(key) {
|
||||
// get useful ID
|
||||
|
@@ -35,6 +35,9 @@ class ###Component###View###SView### extends HtmlView
|
||||
$this->user = Factory::getUser();
|
||||
// get global action permissions
|
||||
$this->canDo = ###Component###Helper::getActions('###sview###');###CUSTOM_ADMIN_DIPLAY_METHOD###
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
}###CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS###
|
||||
|
||||
/**
|
||||
|
@@ -72,11 +72,11 @@ class ###Component###View###View### extends HtmlView
|
||||
throw new Exception(implode("\n", $errors), 500);
|
||||
}
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
|
||||
// Set the document
|
||||
$this->setDocument();
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
|
||||
@@ -113,6 +113,11 @@ class ###Component###View###View### extends HtmlView
|
||||
*/
|
||||
protected function setDocument()
|
||||
{
|
||||
// Load Core
|
||||
Html::_('behavior.core');
|
||||
// Load jQuery
|
||||
Html::_('jquery.framework');
|
||||
|
||||
$isNew = ($this->item->id < 1);
|
||||
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT'));
|
||||
Html::_('stylesheet', "administrator/components/com_###component###/assets/css/###view###.css", ['version' => 'auto']);###AJAXTOKE######LINKEDVIEWTABLESCRIPTS###
|
||||
|
@@ -72,11 +72,11 @@ class ###Component###View###View### extends HtmlView
|
||||
throw new Exception(implode("\n", $errors), 500);
|
||||
}
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
|
||||
// Set the document
|
||||
$this->setDocument();
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
|
||||
@@ -114,6 +114,11 @@ class ###Component###View###View### extends HtmlView
|
||||
*/
|
||||
protected function setDocument()
|
||||
{
|
||||
// Load Core
|
||||
Html::_('behavior.core');
|
||||
// Load jQuery
|
||||
Html::_('jquery.framework');
|
||||
|
||||
$isNew = ($this->item->id < 1);
|
||||
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT'));
|
||||
// only add the ISIS template css & js if needed (default is 1 = true)
|
||||
|
@@ -65,11 +65,11 @@ class ###Component###View###Views### extends HtmlView
|
||||
throw new Exception(implode("\n", $errors), 500);
|
||||
}
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
|
||||
// Set the document
|
||||
$this->setDocument();
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -151,6 +151,11 @@ class ###Component###View###Views### extends HtmlView
|
||||
*/
|
||||
protected function setDocument()
|
||||
{
|
||||
// Load Core
|
||||
Html::_('behavior.core');
|
||||
// Load jQuery
|
||||
Html::_('jquery.framework');
|
||||
|
||||
if (!isset($this->document))
|
||||
{
|
||||
$this->document = Factory::getDocument();
|
||||
|
@@ -35,6 +35,9 @@ class ###Component###View###SViews### extends HtmlView
|
||||
$this->user = Factory::getUser();
|
||||
// get global action permissions
|
||||
$this->canDo = ###Component###Helper::getActions('###sview###');###CUSTOM_ADMIN_DIPLAY_METHOD###
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
}###CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS###
|
||||
|
||||
/**
|
||||
|
@@ -33,6 +33,9 @@ class ###Component###View###SViews### extends HtmlView
|
||||
$this->menu = $this->app->getMenu()->getActive();
|
||||
// get the user object
|
||||
$this->user = Factory::getUser();###SITE_DIPLAY_METHOD###
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
}###SITE_EXTRA_DIPLAY_METHODS###
|
||||
|
||||
/**
|
||||
|
@@ -33,6 +33,9 @@ class ###Component###View###SView### extends HtmlView
|
||||
$this->menu = $this->app->getMenu()->getActive();
|
||||
// get the user object
|
||||
$this->user = Factory::getUser();###SITE_DIPLAY_METHOD###
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
}###SITE_EXTRA_DIPLAY_METHODS###
|
||||
|
||||
/**
|
||||
|
@@ -25,6 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class HtmlView extends BaseHtmlView
|
||||
{
|
||||
/**
|
||||
@@ -89,9 +90,10 @@ class HtmlView extends BaseHtmlView
|
||||
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
||||
*
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
* @since 1.6
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
public function display($tpl = null): void
|
||||
{
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
|
@@ -109,13 +109,22 @@ class ###View###Controller extends FormController
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
// get the referral options (old method use return instead see parent)
|
||||
// get int-defaults (to int new items with default values dynamically)
|
||||
$init_defaults = $this->input->get('init_defaults', null, 'STRING');
|
||||
|
||||
// get the referral options (old method use init_defaults or return instead see parent)
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// get redirect info.
|
||||
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
|
||||
|
||||
// set int-defaults
|
||||
if (!empty($init_defaults))
|
||||
{
|
||||
$append = '&init_defaults='. (string) $init_defaults . $append;
|
||||
}
|
||||
|
||||
// set the referral options
|
||||
if ($refid && $ref)
|
||||
{
|
||||
|
@@ -25,6 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class HtmlView extends BaseHtmlView
|
||||
{
|
||||
/**
|
||||
@@ -113,9 +114,10 @@ class HtmlView extends BaseHtmlView
|
||||
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
||||
*
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
* @since 1.6
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
public function display($tpl = null): void
|
||||
{
|
||||
// set params
|
||||
$this->params = ComponentHelper::getParams('com_###component###');
|
||||
|
@@ -25,6 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class HtmlView extends BaseHtmlView
|
||||
{
|
||||
/**
|
||||
@@ -65,9 +66,10 @@ class HtmlView extends BaseHtmlView
|
||||
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
||||
*
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
* @since 1.6
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
public function display($tpl = null): void
|
||||
{
|
||||
// get component params
|
||||
$this->params = ComponentHelper::getParams('com_###component###');
|
||||
@@ -82,6 +84,8 @@ class HtmlView extends BaseHtmlView
|
||||
|
||||
// Set the html view document stuff
|
||||
$this->_prepareDocument();
|
||||
|
||||
parent::display($tpl);
|
||||
}###CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS###
|
||||
|
||||
/**
|
||||
|
@@ -105,9 +105,12 @@ class ###SViews###Model extends ListModel
|
||||
];
|
||||
|
||||
/**
|
||||
* A custom property for UIKit components. (not used unless you load v2)
|
||||
* A custom property for UI Kit components.
|
||||
*
|
||||
* @var mixed Property for storing UI Kit component-related data or objects.
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected $uikitComp;
|
||||
protected $uikitComp = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
@@ -25,6 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class HtmlView extends BaseHtmlView
|
||||
{
|
||||
/**
|
||||
@@ -33,9 +34,10 @@ class HtmlView extends BaseHtmlView
|
||||
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
||||
*
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
* @since 1.6
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
public function display($tpl = null): void
|
||||
{
|
||||
// get component params
|
||||
$this->params = ComponentHelper::getParams('com_###component###');
|
||||
@@ -50,6 +52,8 @@ class HtmlView extends BaseHtmlView
|
||||
|
||||
// Set the html view document stuff
|
||||
$this->_prepareDocument();
|
||||
|
||||
parent::display($tpl);
|
||||
}###CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS###
|
||||
|
||||
/**
|
||||
|
@@ -115,10 +115,10 @@ class ###SView###Model extends ItemModel
|
||||
/**
|
||||
* A custom property for UI Kit components.
|
||||
*
|
||||
* @var array|null Property for storing UI Kit component-related data or objects.
|
||||
* @var mixed Property for storing UI Kit component-related data or objects.
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected ?array $uikitComp;
|
||||
protected $uikitComp = [];
|
||||
|
||||
/**
|
||||
* @var object item
|
||||
|
@@ -25,13 +25,17 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class HtmlView extends BaseHtmlView
|
||||
{
|
||||
/**
|
||||
* View display method
|
||||
*
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
* @since 1.6
|
||||
*/
|
||||
function display($tpl = null)
|
||||
function display($tpl = null): void
|
||||
{
|
||||
// Assign data to the view
|
||||
$this->icons = $this->get('Icons');
|
||||
@@ -93,7 +97,7 @@ class HtmlView extends BaseHtmlView
|
||||
// set page title
|
||||
$this->getDocument()->setTitle(Text::_('COM_###COMPONENT###_DASHBOARD'));
|
||||
// add manifest to page JavaScript
|
||||
$this->getDocument()->addScriptDeclaration("var manifest = JSON.parse('" . json_encode($this->manifest) . "');", "text/javascript");
|
||||
$this->getDocument()->addScriptDeclaration("var manifest = JSON.parse(" . json_encode($this->manifest) . ");", "text/javascript");
|
||||
// add styles
|
||||
foreach ($this->styles as $style)
|
||||
{
|
||||
|
@@ -109,13 +109,22 @@ class ###View###Controller extends FormController
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
// get the referral options (old method use return instead see parent)
|
||||
// get int-defaults (to int new items with default values dynamically)
|
||||
$init_defaults = $this->input->get('init_defaults', null, 'STRING');
|
||||
|
||||
// get the referral options (old method use init_defaults or return instead see parent)
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// get redirect info.
|
||||
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
|
||||
|
||||
// set int-defaults
|
||||
if (!empty($init_defaults))
|
||||
{
|
||||
$append = '&init_defaults='. (string) $init_defaults . $append;
|
||||
}
|
||||
|
||||
// set the referral options
|
||||
if ($refid && $ref)
|
||||
{
|
||||
|
@@ -81,9 +81,10 @@ class HtmlView extends BaseHtmlView
|
||||
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
||||
*
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
* @since 1.6
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
public function display($tpl = null): void
|
||||
{
|
||||
// get combined params of both component and menu
|
||||
$this->app ??= Factory::getApplication();
|
||||
@@ -93,6 +94,8 @@ class HtmlView extends BaseHtmlView
|
||||
$this->scripts = $this->get('Scripts');
|
||||
// get the user object
|
||||
$this->user ??= $this->app->getIdentity();###SITE_DIPLAY_METHOD###
|
||||
|
||||
parent::display($tpl);
|
||||
}###SITE_EXTRA_DIPLAY_METHODS###
|
||||
|
||||
/**
|
||||
|
@@ -65,9 +65,10 @@ class HtmlView extends BaseHtmlView
|
||||
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
||||
*
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
* @since 1.6
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
public function display($tpl = null): void
|
||||
{
|
||||
// get combined params of both component and menu
|
||||
$this->app ??= Factory::getApplication();
|
||||
@@ -77,6 +78,8 @@ class HtmlView extends BaseHtmlView
|
||||
$this->scripts = $this->get('Scripts') ?? [];
|
||||
// get the user object
|
||||
$this->user ??= $this->getCurrentUser();###SITE_DIPLAY_METHOD###
|
||||
|
||||
parent::display($tpl);
|
||||
}###SITE_EXTRA_DIPLAY_METHODS###
|
||||
|
||||
/**
|
||||
|
@@ -57,7 +57,7 @@
|
||||
buttons="add,remove,move"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_SUBFORM_LAYOUTS_DESCRIPTION"
|
||||
icon="list"
|
||||
max="9"
|
||||
max="10"
|
||||
min="1">
|
||||
<form hidden="true" name="list_subform_layouts_modal" repeat="true">
|
||||
<!-- View_field Field. Type: List. (joomla) -->
|
||||
@@ -73,6 +73,8 @@
|
||||
<!-- Option Set. -->
|
||||
<option value="default">
|
||||
COM_COMPONENTBUILDER_CONFIG_DEFAULT</option>
|
||||
<option value="admin_view.ajax_input">
|
||||
COM_COMPONENTBUILDER_CONFIG_ADMIN_VIEWS_AJAX_INPUT</option>
|
||||
<option value="admin_custom_tabs.tabs">
|
||||
COM_COMPONENTBUILDER_CONFIG_ADMIN_CUSTOM_TABS_TABS</option>
|
||||
<option value="admin_fields.addfields">
|
||||
@@ -93,6 +95,8 @@
|
||||
COM_COMPONENTBUILDER_CONFIG_COMPONENT_CUSTOM_ADMIN_MENUS_ADDCUSTOMMENUS</option>
|
||||
<option value="component_site_views.addsite_views">
|
||||
COM_COMPONENTBUILDER_CONFIG_COMPONENT_SITE_VIEWS_ADDSITE_VIEWS</option>
|
||||
<option value="custom_admin_view.ajax_input">
|
||||
COM_COMPONENTBUILDER_CONFIG_CUSTOM_ADMIN_VIEWS_AJAX_INPUT</option>
|
||||
<option value="dynamic_get.join_db_table">
|
||||
COM_COMPONENTBUILDER_CONFIG_DYNAMIC_GET_JOIN_DB_TABLE</option>
|
||||
<option value="dynamic_get.join_view_table">
|
||||
@@ -103,6 +107,8 @@
|
||||
COM_COMPONENTBUILDER_CONFIG_JOOMLA_MODULE_UPDATES_VERSION_UPDATE</option>
|
||||
<option value="joomla_plugin_updates.version_update">
|
||||
COM_COMPONENTBUILDER_CONFIG_JOOMLA_PLUGIN_UPDATES_VERSION_UPDATE</option>
|
||||
<option value="site_view.ajax_input">
|
||||
COM_COMPONENTBUILDER_CONFIG_SITE_VIEWS_AJAX_INPUT</option>
|
||||
</field>
|
||||
<!-- Layout Field. Type: List. (joomla) -->
|
||||
<field
|
||||
|
@@ -106,7 +106,6 @@
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
default=""
|
||||
required="true"
|
||||
readonly="true"
|
||||
button="false"
|
||||
|
@@ -106,7 +106,6 @@
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
default=""
|
||||
required="true"
|
||||
readonly="true"
|
||||
button="false"
|
||||
|
@@ -106,7 +106,6 @@
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
default=""
|
||||
required="true"
|
||||
readonly="true"
|
||||
button="false"
|
||||
@@ -130,7 +129,6 @@
|
||||
description="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_TARGET_FIELD_DESCRIPTION"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="true"
|
||||
default=""
|
||||
required="true"
|
||||
button="false"
|
||||
/>
|
||||
|
@@ -106,7 +106,6 @@
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
default=""
|
||||
required="true"
|
||||
readonly="true"
|
||||
button="false"
|
||||
|
@@ -205,21 +205,38 @@
|
||||
filter="raw"
|
||||
validate="code"
|
||||
/>
|
||||
<!-- Php_import_ext Field. Type: Textarea. (joomla) -->
|
||||
<!-- Php_getitems Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_import_ext"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_LABEL"
|
||||
rows="30"
|
||||
type="editor"
|
||||
name="php_getitems"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
rows="30"
|
||||
buttons="no"
|
||||
syntax="php"
|
||||
editor="codemirror|none"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_HINT"
|
||||
required="true"
|
||||
validate="code"
|
||||
/>
|
||||
<!-- Name_list Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="name_list"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_LABEL"
|
||||
size="40"
|
||||
maxlength="150"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_DESCRIPTION"
|
||||
class="inputbox"
|
||||
readonly="false"
|
||||
disabled="false"
|
||||
required="true"
|
||||
filter="STRING"
|
||||
message="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_HINT"
|
||||
/>
|
||||
<!-- Note_advanced_import Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_advanced_import" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_DESCRIPTION" heading="h4" class="alert alert-success note_advanced_import" />
|
||||
<!-- Icon Field. Type: Media. (joomla) -->
|
||||
<field
|
||||
type="media"
|
||||
@@ -376,7 +393,7 @@
|
||||
<option value="latin7">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_LATIN7_ISO_885913_BALTIC_MOST_SUITABLE_COLLATION_LATIN7_GENERAL_CI</option>
|
||||
<option value="utf8mb4">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_UTF8MB4_UTF8_UNICODE_MOST_SUITABLE_COLLATION_UTF8MB4_GENERAL_CI</option>
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_UTF8MB4_UTF8_UNICODE_MOST_SUITABLE_COLLATION_UTF8MB4_UNICODE_CI</option>
|
||||
<option value="cp1251">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_CP1251_WINDOWS_CYRILLIC_MOST_SUITABLE_COLLATION_CP1251_GENERAL_CI</option>
|
||||
<option value="utf16">
|
||||
@@ -470,18 +487,21 @@
|
||||
</field>
|
||||
<!-- Note_on_permissions Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_on_permissions" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_PERMISSIONS_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_PERMISSIONS_DESCRIPTION" heading="h4" class="alert alert-info note_on_permissions" />
|
||||
<!-- Php_import Field. Type: Textarea. (joomla) -->
|
||||
<!-- Php_getitem Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_import"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_LABEL"
|
||||
rows="30"
|
||||
type="editor"
|
||||
name="php_getitem"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
rows="30"
|
||||
buttons="no"
|
||||
syntax="php"
|
||||
editor="codemirror|none"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HINT"
|
||||
required="true"
|
||||
validate="code"
|
||||
/>
|
||||
<!-- Addpermissions Field. Type: Subform. (joomla) -->
|
||||
<field
|
||||
@@ -680,7 +700,7 @@
|
||||
type="subform"
|
||||
name="addlinked_views"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADDLINKED_VIEWS_LABEL"
|
||||
layout="joomla.form.field.subform.repeatable-table"
|
||||
layout="joomla.form.field.subform.repeatable"
|
||||
multiple="true"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ADDLINKED_VIEWS_DESCRIPTION"
|
||||
icon="list">
|
||||
@@ -693,7 +713,6 @@
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ADMINVIEW_DESCRIPTION"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
default=""
|
||||
required="true"
|
||||
button="false"
|
||||
/>
|
||||
@@ -896,19 +915,20 @@
|
||||
/>
|
||||
<!-- Note_category_menu_switch Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_category_menu_switch" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CATEGORY_MENU_SWITCH_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CATEGORY_MENU_SWITCH_DESCRIPTION" heading="h4" class="alert alert-info note_category_menu_switch" />
|
||||
<!-- Php_import_display Field. Type: Textarea. (joomla) -->
|
||||
<!-- Add_php_getitem Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_import_display"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_HINT"
|
||||
required="true"
|
||||
/>
|
||||
type="radio"
|
||||
name="add_php_getitem"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEM_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Add_category_submenu Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
@@ -923,37 +943,36 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Php_import_setdata Field. Type: Textarea. (joomla) -->
|
||||
<!-- Add_php_getitems Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_import_setdata"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_HINT"
|
||||
required="true"
|
||||
/>
|
||||
type="radio"
|
||||
name="add_php_getitems"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Note_create_edit_buttons Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_create_edit_buttons" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_BUTTONS_DESCRIPTION" class="note_create_edit_buttons" />
|
||||
<!-- Name_list Field. Type: Text. (joomla) -->
|
||||
<!-- Add_php_getitems_after_all Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="name_list"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_LABEL"
|
||||
size="40"
|
||||
maxlength="150"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_DESCRIPTION"
|
||||
class="inputbox"
|
||||
readonly="false"
|
||||
disabled="false"
|
||||
required="true"
|
||||
filter="STRING"
|
||||
message="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_HINT"
|
||||
/>
|
||||
type="radio"
|
||||
name="add_php_getitems_after_all"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_AFTER_ALL_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Note_create_edit_display Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_create_edit_display" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_DISPLAY_DESCRIPTION" class="note_create_edit_display" />
|
||||
<!-- Add_php_getlistquery Field. Type: Radio. (joomla) -->
|
||||
@@ -1966,7 +1985,7 @@
|
||||
multiple="false"
|
||||
filter="CMD"
|
||||
required="true"
|
||||
default="utf8mb4_general_ci">
|
||||
default="utf8mb4_unicode_ci">
|
||||
<!-- Option Set. -->
|
||||
<option value="big5_chinese_ci">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_BIG5_CHINESE_CI_CHARSET_BIG5</option>
|
||||
@@ -2473,6 +2492,7 @@
|
||||
name="table"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_TABLE_LABEL"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
default="0"
|
||||
button="false"
|
||||
@@ -2510,8 +2530,20 @@
|
||||
filter="raw"
|
||||
validate="code"
|
||||
/>
|
||||
<!-- Note_beginner_import Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_beginner_import" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_DESCRIPTION" heading="h4" class="alert alert-info note_beginner_import" />
|
||||
<!-- Guid Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="guid"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_GUID_LABEL"
|
||||
size="40"
|
||||
maxlength="40"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_GUID_DESCRIPTION"
|
||||
class="text_area"
|
||||
readonly="true"
|
||||
filter="CMD"
|
||||
validate="guid"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_GUID_HINT"
|
||||
/>
|
||||
<!-- Ajax_input Field. Type: Subform. (joomla) -->
|
||||
<field
|
||||
type="subform"
|
||||
@@ -2652,148 +2684,6 @@
|
||||
/>
|
||||
</form>
|
||||
</field>
|
||||
<!-- Add_custom_import Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_custom_import"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_IMPORT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_IMPORT_DESCRIPTION"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Add_php_getitem Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_getitem"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEM_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Html_import_view Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="html_import_view"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Php_getitem Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="php_getitem"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
rows="30"
|
||||
buttons="no"
|
||||
syntax="php"
|
||||
editor="codemirror|none"
|
||||
filter="raw"
|
||||
validate="code"
|
||||
/>
|
||||
<!-- Php_import_headers Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_import_headers"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HEADERS_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HEADERS_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HEADERS_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Add_php_getitems Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_getitems"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Php_import_save Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_import_save"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Php_getitems Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="php_getitems"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_DESCRIPTION"
|
||||
width="100%"
|
||||
height="450px"
|
||||
cols="15"
|
||||
rows="30"
|
||||
buttons="no"
|
||||
syntax="php"
|
||||
editor="codemirror|none"
|
||||
filter="raw"
|
||||
validate="code"
|
||||
/>
|
||||
<!-- Guid Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="guid"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_GUID_LABEL"
|
||||
size="40"
|
||||
maxlength="40"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_GUID_DESCRIPTION"
|
||||
class="text_area"
|
||||
readonly="true"
|
||||
filter="CMD"
|
||||
validate="guid"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_GUID_HINT"
|
||||
/>
|
||||
<!-- Add_php_getitems_after_all Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_getitems_after_all"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_AFTER_ALL_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
|
||||
<!-- Access Control Fields. -->
|
||||
|
@@ -135,6 +135,20 @@
|
||||
<option value="modules">
|
||||
COM_COMPONENTBUILDER_CLASS_EXTENDS_MODULES</option>
|
||||
</field>
|
||||
<!-- Guid Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="guid"
|
||||
label="COM_COMPONENTBUILDER_CLASS_EXTENDS_GUID_LABEL"
|
||||
size="40"
|
||||
maxlength="40"
|
||||
description="COM_COMPONENTBUILDER_CLASS_EXTENDS_GUID_DESCRIPTION"
|
||||
class="text_area"
|
||||
readonly="true"
|
||||
filter="CMD"
|
||||
validate="guid"
|
||||
hint="COM_COMPONENTBUILDER_CLASS_EXTENDS_GUID_HINT"
|
||||
/>
|
||||
<!-- Head Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
|
@@ -104,7 +104,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
@@ -144,7 +143,6 @@
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ADMINVIEW_DESCRIPTION"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
default=""
|
||||
required="true"
|
||||
button="false"
|
||||
/>
|
||||
|
@@ -104,7 +104,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_CONFIG_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_CONFIG_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@@ -104,7 +104,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@@ -104,7 +104,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
@@ -142,7 +141,6 @@
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CUSTOMADMINVIEW_DESCRIPTION"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
default=""
|
||||
required="true"
|
||||
button="false"
|
||||
/>
|
||||
|
@@ -104,7 +104,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
@@ -174,7 +173,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HTML_LABEL"
|
||||
rows="20"
|
||||
cols="30"
|
||||
default=""
|
||||
class="text_area tab_html"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HTML_HINT"
|
||||
|
@@ -104,7 +104,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@@ -104,7 +104,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_MODULES_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_MODULES_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@@ -104,7 +104,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
@@ -187,7 +186,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_IDS_LABEL"
|
||||
rows="20"
|
||||
cols="40"
|
||||
default=""
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_IDS_DESCRIPTION"
|
||||
class="text_area ids_selection"
|
||||
filter="raw"
|
||||
|
@@ -104,7 +104,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@@ -104,7 +104,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_PLUGINS_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_PLUGINS_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@@ -104,7 +104,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_ROUTER_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_ROUTER_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@@ -104,7 +104,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@@ -104,7 +104,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_UPDATES_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_UPDATES_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
@@ -159,7 +158,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_UPDATES_MYSQL_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
default=""
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_UPDATES_MYSQL_DESCRIPTION"
|
||||
class="text_area mysql_update"
|
||||
filter="raw"
|
||||
|
@@ -151,7 +151,6 @@
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_DESCRIPTION"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
default=""
|
||||
required="true"
|
||||
button="true"
|
||||
/>
|
||||
@@ -611,7 +610,6 @@
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DYNAMIC_GET_DESCRIPTION"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
default=""
|
||||
required="false"
|
||||
/>
|
||||
<!-- Php_document Field. Type: Editor. (joomla) -->
|
||||
|
@@ -97,17 +97,19 @@
|
||||
default="componentbuilder custom_code"
|
||||
/>
|
||||
<!-- Dynamic Fields. -->
|
||||
<!-- Component Field. Type: Joomlacomponent. (custom) -->
|
||||
<!-- System_name Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="joomlacomponent"
|
||||
name="component"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_CODE_COMPONENT_LABEL"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
default="0"
|
||||
required="true"
|
||||
button="true"
|
||||
type="text"
|
||||
name="system_name"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_CODE_SYSTEM_NAME_LABEL"
|
||||
size="10"
|
||||
maxlength="50"
|
||||
default=""
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_CODE_SYSTEM_NAME_DESCRIPTION"
|
||||
class="text_area"
|
||||
filter="STRING"
|
||||
message="COM_COMPONENTBUILDER_CUSTOM_CODE_SYSTEM_NAME_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_CUSTOM_CODE_SYSTEM_NAME_HINT"
|
||||
/>
|
||||
<!-- Path Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
@@ -195,20 +197,6 @@
|
||||
class="input-large-text"
|
||||
required="true"
|
||||
/>
|
||||
<!-- System_name Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="system_name"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_CODE_SYSTEM_NAME_LABEL"
|
||||
size="10"
|
||||
maxlength="50"
|
||||
default=""
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_CODE_SYSTEM_NAME_DESCRIPTION"
|
||||
class="text_area"
|
||||
filter="STRING"
|
||||
message="COM_COMPONENTBUILDER_CUSTOM_CODE_SYSTEM_NAME_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_CUSTOM_CODE_SYSTEM_NAME_HINT"
|
||||
/>
|
||||
<!-- Note_placeholders_explained Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_placeholders_explained" label="COM_COMPONENTBUILDER_CUSTOM_CODE_NOTE_PLACEHOLDERS_EXPLAINED_LABEL" description="COM_COMPONENTBUILDER_CUSTOM_CODE_NOTE_PLACEHOLDERS_EXPLAINED_DESCRIPTION" heading="h4" class="note_placeholders_explained" />
|
||||
<!-- Code Field. Type: Editor. (joomla) -->
|
||||
@@ -287,6 +275,18 @@
|
||||
message="COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_HINT"
|
||||
/>
|
||||
<!-- Component Field. Type: Joomlacomponent. (custom) -->
|
||||
<field
|
||||
type="joomlacomponent"
|
||||
name="component"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_CODE_COMPONENT_LABEL"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
default="0"
|
||||
required="true"
|
||||
button="true"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<!-- Access Control Fields. -->
|
||||
|
@@ -340,7 +340,6 @@
|
||||
description="COM_COMPONENTBUILDER_DYNAMIC_GET_VIEW_TABLE_MAIN_DESCRIPTION"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
default=""
|
||||
required="true"
|
||||
/>
|
||||
<!-- Add_php_getlistquery Field. Type: Radio. (joomla) -->
|
||||
@@ -1243,7 +1242,6 @@
|
||||
label="COM_COMPONENTBUILDER_DYNAMIC_GET_VIEW_TABLE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_DYNAMIC_GET_VIEW_TABLE_DESCRIPTION"
|
||||
multiple="false"
|
||||
default=""
|
||||
required="true"
|
||||
button="false"
|
||||
/>
|
||||
|
@@ -121,7 +121,6 @@
|
||||
description="COM_COMPONENTBUILDER_FIELD_FIELDTYPE_DESCRIPTION"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
default=""
|
||||
required="true"
|
||||
button="true"
|
||||
/>
|
||||
|
@@ -332,7 +332,6 @@
|
||||
label="COM_COMPONENTBUILDER_FIELDTYPE_EXAMPLE_LABEL"
|
||||
rows="2"
|
||||
cols="15"
|
||||
default=""
|
||||
description="COM_COMPONENTBUILDER_FIELDTYPE_EXAMPLE_DESCRIPTION"
|
||||
message="COM_COMPONENTBUILDER_FIELDTYPE_EXAMPLE_MESSAGE"
|
||||
class="text_area span12"
|
||||
|
@@ -60,13 +60,6 @@
|
||||
multiple="false"
|
||||
class="js-select-submit-on-change"
|
||||
/>
|
||||
<field
|
||||
type="adminviewsfilteraddcustomimport"
|
||||
name="add_custom_import"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_IMPORT_LABEL"
|
||||
multiple="false"
|
||||
class="js-select-submit-on-change"
|
||||
/>
|
||||
<input type="hidden" name="form_submited" value="1"/>
|
||||
</fields>
|
||||
|
||||
@@ -76,7 +69,7 @@
|
||||
type="list"
|
||||
label="JGLOBAL_SORT_BY"
|
||||
class="js-select-submit-on-change"
|
||||
default="a.id desc"
|
||||
default=" desc"
|
||||
validate="options"
|
||||
>
|
||||
<option value="">JGLOBAL_SORT_BY</option>
|
||||
|
@@ -53,7 +53,7 @@
|
||||
type="list"
|
||||
label="JGLOBAL_SORT_BY"
|
||||
class="js-select-submit-on-change"
|
||||
default="a.id desc"
|
||||
default=" desc"
|
||||
validate="options"
|
||||
>
|
||||
<option value="">JGLOBAL_SORT_BY</option>
|
||||
|
@@ -30,13 +30,6 @@
|
||||
class="js-select-submit-on-change"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
/>
|
||||
<field
|
||||
type="joomlacomponent"
|
||||
name="component"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_CODE_COMPONENT_LABEL"
|
||||
multiple="false"
|
||||
class="js-select-submit-on-change"
|
||||
/>
|
||||
<field
|
||||
type="customcodesfiltertarget"
|
||||
name="target"
|
||||
@@ -75,8 +68,6 @@
|
||||
<option value="a.ordering DESC">JGRID_HEADING_ORDERING_DESC</option>
|
||||
<option value="a.published ASC">JSTATUS_ASC</option>
|
||||
<option value="a.published DESC">JSTATUS_DESC</option>
|
||||
<option value="g.system_name ASC">COM_COMPONENTBUILDER_FILTER_COMPONENT_ASCENDING</option>
|
||||
<option value="g.system_name DESC">COM_COMPONENTBUILDER_FILTER_COMPONENT_DESCENDING</option>
|
||||
<option value="a.path ASC">COM_COMPONENTBUILDER_FILTER_FILE_PATH_ASCENDING</option>
|
||||
<option value="a.path DESC">COM_COMPONENTBUILDER_FILTER_FILE_PATH_DESCENDING</option>
|
||||
<option value="a.target ASC">COM_COMPONENTBUILDER_FILTER_TARGET_ASCENDING</option>
|
||||
|
@@ -53,7 +53,7 @@
|
||||
type="list"
|
||||
label="JGLOBAL_SORT_BY"
|
||||
class="js-select-submit-on-change"
|
||||
default="a.id desc"
|
||||
default=" desc"
|
||||
validate="options"
|
||||
>
|
||||
<option value="">JGLOBAL_SORT_BY</option>
|
||||
|
@@ -105,7 +105,6 @@
|
||||
class="list_class span12"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
default="0"
|
||||
readonly="true"
|
||||
/>
|
||||
<!-- Note_constant_paths Field. Type: Note. A None Database Field. (joomla) -->
|
||||
|
@@ -105,7 +105,6 @@
|
||||
class="list_class span12"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
default="0"
|
||||
readonly="true"
|
||||
/>
|
||||
<!-- Version_update Field. Type: Subform. (joomla) -->
|
||||
@@ -143,7 +142,6 @@
|
||||
label="COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATES_MYSQL_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
default=""
|
||||
description="COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATES_MYSQL_DESCRIPTION"
|
||||
class="text_area mysql_update"
|
||||
filter="raw"
|
||||
|
@@ -125,6 +125,20 @@
|
||||
required="true"
|
||||
button="true"
|
||||
/>
|
||||
<!-- Guid Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="guid"
|
||||
label="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_GUID_LABEL"
|
||||
size="40"
|
||||
maxlength="40"
|
||||
description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_GUID_DESCRIPTION"
|
||||
class="text_area"
|
||||
readonly="true"
|
||||
filter="CMD"
|
||||
validate="guid"
|
||||
hint="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_GUID_HINT"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<!-- Access Control Fields. -->
|
||||
|
@@ -143,7 +143,6 @@
|
||||
label="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_MYSQL_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
default=""
|
||||
description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_MYSQL_DESCRIPTION"
|
||||
class="text_area mysql_update"
|
||||
filter="raw"
|
||||
|
@@ -137,7 +137,6 @@
|
||||
description="COM_COMPONENTBUILDER_LAYOUT_DYNAMIC_GET_DESCRIPTION"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
default="0"
|
||||
required="false"
|
||||
button="true"
|
||||
/>
|
||||
@@ -153,6 +152,20 @@
|
||||
required="false"
|
||||
button="true"
|
||||
/>
|
||||
<!-- Guid Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="guid"
|
||||
label="COM_COMPONENTBUILDER_LAYOUT_GUID_LABEL"
|
||||
size="40"
|
||||
maxlength="40"
|
||||
description="COM_COMPONENTBUILDER_LAYOUT_GUID_DESCRIPTION"
|
||||
class="text_area"
|
||||
readonly="true"
|
||||
filter="CMD"
|
||||
validate="guid"
|
||||
hint="COM_COMPONENTBUILDER_LAYOUT_GUID_HINT"
|
||||
/>
|
||||
<!-- Php_view Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
|
@@ -166,7 +166,6 @@
|
||||
label="COM_COMPONENTBUILDER_SERVER_PRIVATE_KEY_LABEL"
|
||||
rows="15"
|
||||
cols="5"
|
||||
default=""
|
||||
description="COM_COMPONENTBUILDER_SERVER_PRIVATE_KEY_DESCRIPTION"
|
||||
class="input-xxlarge span12"
|
||||
hint="COM_COMPONENTBUILDER_SERVER_PRIVATE_KEY_HINT"
|
||||
|
@@ -151,7 +151,6 @@
|
||||
description="COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_DESCRIPTION"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
default=""
|
||||
required="true"
|
||||
button="true"
|
||||
/>
|
||||
@@ -449,7 +448,6 @@
|
||||
description="COM_COMPONENTBUILDER_SITE_VIEW_DYNAMIC_GET_DESCRIPTION"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
default=""
|
||||
required="false"
|
||||
/>
|
||||
<!-- Add_php_ajax Field. Type: Radio. (joomla) -->
|
||||
|
@@ -138,7 +138,6 @@
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
default="0"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Heading Field. Type: Text. (joomla) -->
|
||||
|
@@ -129,6 +129,20 @@
|
||||
message="COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION_HINT"
|
||||
/>
|
||||
<!-- Guid Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="guid"
|
||||
label="COM_COMPONENTBUILDER_SNIPPET_TYPE_GUID_LABEL"
|
||||
size="40"
|
||||
maxlength="40"
|
||||
description="COM_COMPONENTBUILDER_SNIPPET_TYPE_GUID_DESCRIPTION"
|
||||
class="text_area"
|
||||
readonly="true"
|
||||
filter="CMD"
|
||||
validate="guid"
|
||||
hint="COM_COMPONENTBUILDER_SNIPPET_TYPE_GUID_HINT"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<!-- Access Control Fields. -->
|
||||
|
@@ -137,10 +137,23 @@
|
||||
description="COM_COMPONENTBUILDER_TEMPLATE_DYNAMIC_GET_DESCRIPTION"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
default="0"
|
||||
required="false"
|
||||
button="true"
|
||||
/>
|
||||
<!-- Guid Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="guid"
|
||||
label="COM_COMPONENTBUILDER_TEMPLATE_GUID_LABEL"
|
||||
size="40"
|
||||
maxlength="40"
|
||||
description="COM_COMPONENTBUILDER_TEMPLATE_GUID_DESCRIPTION"
|
||||
class="text_area"
|
||||
readonly="true"
|
||||
filter="CMD"
|
||||
validate="guid"
|
||||
hint="COM_COMPONENTBUILDER_TEMPLATE_GUID_HINT"
|
||||
/>
|
||||
<!-- Php_view Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
|
File diff suppressed because one or more lines are too long
@@ -1,53 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 30th April, 2015
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// get the form
|
||||
$form = $displayData->getForm();
|
||||
|
||||
// get the layout fields override method name (from layout path/ID)
|
||||
$layout_path_array = explode('.', $this->getLayoutId());
|
||||
// Since we cannot pass the layout and tab names as parameters to the model method
|
||||
// this name combination of tab and layout in the method name is the only work around
|
||||
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
|
||||
// example of layout name: details_left.php
|
||||
// example of method name: getFields_details_left()
|
||||
$fields_tab_layout = 'fields_' . $layout_path_array[1];
|
||||
|
||||
// get the fields
|
||||
$fields = $displayData->get($fields_tab_layout) ?: array(
|
||||
'note_beginner_import',
|
||||
'note_advanced_import',
|
||||
'add_custom_import',
|
||||
'php_import_display',
|
||||
'html_import_view',
|
||||
'php_import',
|
||||
'php_import_headers',
|
||||
'php_import_setdata',
|
||||
'php_import_save',
|
||||
'php_import_ext'
|
||||
);
|
||||
|
||||
$hiddenFields = $displayData->get('hidden_fields') ?: [];
|
||||
|
||||
?>
|
||||
<?php if ($fields && count((array) $fields)) :?>
|
||||
<div class="form-vertical">
|
||||
<?php foreach($fields as $field): ?>
|
||||
<?php if (in_array($field, $hiddenFields)) : ?>
|
||||
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
|
||||
<?php endif; ?>
|
||||
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
@@ -26,6 +26,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
|
||||
|
||||
// get the fields
|
||||
$fields = $displayData->get($fields_tab_layout) ?: array(
|
||||
'guid',
|
||||
'title',
|
||||
'created',
|
||||
'created_by',
|
||||
|
@@ -15,12 +15,13 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// set the defaults
|
||||
$items = $displayData->vxsfields;
|
||||
$items = $displayData->vxlfields;
|
||||
$user = Factory::getApplication()->getIdentity();
|
||||
$id = $displayData->item->id;
|
||||
// set the edit URL
|
||||
@@ -96,8 +97,8 @@ $can = ComponentbuilderHelper::getActions('field');
|
||||
<?php
|
||||
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('field',$item,'fields');
|
||||
?>
|
||||
<tr>
|
||||
|
@@ -23,8 +23,8 @@ defined('JPATH_BASE') or die;
|
||||
|
||||
|
||||
?>
|
||||
<div class="well well-small">
|
||||
<h2 class="module-title nav-header"><?= Text::_('COM_COMPONENTBUILDER_JCB_PRO_NOTICE_BOARD') ?></h2>
|
||||
<div class="proboard-md"><small><?= Text::_('COM_COMPONENTBUILDER_THE_PRO_BOARD_IS_LOADING') ?><span class="loading-dots">.</span></small></div>
|
||||
<div style="text-align:right;"><small><a href="https://vdm.bz/get-jcb-pro-membership" target="_blank" style="color:gray">JCB PRO</a></small></div>
|
||||
</div>
|
||||
<div id="noticeboard">
|
||||
<?php echo LayoutHelper::render('mastodon', $displayData ?? []); ?>
|
||||
</div>
|
||||
<?php echo LayoutHelper::render('socialnetworking', null); ?>
|
||||
<div class="p-md-3"><?php echo ComponentbuilderHelper::getDynamicContent('banner', '728-90'); ?></div>
|
@@ -1,37 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 30th April, 2015
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
|
||||
// No direct access to this file
|
||||
defined('JPATH_BASE') or die;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<div id="<?php echo $displayData['id']; ?>">
|
||||
<?php echo Html::_('bootstrap.startTabSet', $displayData['id'] . '_tab', array('active' => $displayData['active'] . '-noticeboard')); ?>
|
||||
<?php echo Html::_('bootstrap.addTab', $displayData['id'] . '_tab', 'vdm-noticeboard', Text::_('COM_COMPONENTBUILDER_VDM_BOARD', true)); ?>
|
||||
<?php echo LayoutHelper::render('jcbnoticeboardvdm', null); ?>
|
||||
<div class="p-md-3"><?php echo ComponentbuilderHelper::getDynamicContent('banner', '728-90'); ?></div>
|
||||
<?php echo Html::_('bootstrap.endTab'); ?>
|
||||
<?php echo Html::_('bootstrap.addTab', $displayData['id'] . '_tab', 'pro-noticeboard', Text::_('COM_COMPONENTBUILDER_JCB_PRO_BOARD', true)); ?>
|
||||
<?php echo LayoutHelper::render('jcbnoticeboardpro', null); ?>
|
||||
<div class="p-md-3"><?php echo ComponentbuilderHelper::getDynamicContent('banner', '728-90'); ?></div>
|
||||
<?php echo Html::_('bootstrap.endTab'); ?>
|
||||
<?php echo Html::_('bootstrap.endTabSet'); ?>
|
||||
</div>
|
@@ -1,30 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 30th April, 2015
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
|
||||
// No direct access to this file
|
||||
defined('JPATH_BASE') or die;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<div class="well well-small">
|
||||
<h2 class="module-title nav-header"><?= Text::_('COM_COMPONENTBUILDER_VDM_NOTICE_BOARD') ?><span class="vdm-new-notice" style="display:none; color:red;"> (<?= Text::_('COM_COMPONENTBUILDER_NEW_NOTICE') ?>)</span></h2>
|
||||
<div class="noticeboard-md"><small><?= Text::_('COM_COMPONENTBUILDER_THE_NOTICE_BOARD_IS_LOADING') ?><span class="loading-dots">.</span></small></div>
|
||||
<div style="text-align:right;"><small><a href="https://github.com/Llewellynvdm" target="_blank" style="color:gray"><<ewe>>yn</a></small></div>
|
||||
</div>
|
@@ -116,9 +116,25 @@ $support_button = $button_names[random_int(0, 32)];
|
||||
?>
|
||||
<?php echo $support_message; ?>
|
||||
<br /><br />
|
||||
<img src="https://opencollective.com/joomla-component-builder/tiers/badge.svg" />
|
||||
<div style="display: flex; flex-wrap: wrap; gap: 10px;">
|
||||
<a href="https://opencollective.com/joomla-component-builder/contribute/donation-15820/checkout?interval=month&amount=40&contributeAs=me" title="Support Joomla Component Builder">
|
||||
<img src="https://opencollective.com/joomla-component-builder/tiers/badge.svg" alt="Joomla Component Builder Badge" />
|
||||
</a>
|
||||
<a href="https://status.vdm.dev/status/jcb" title="JCB Powers Uptime">
|
||||
<img src="https://status.vdm.dev/api/badge/25/uptime?labelPrefix=JCB+Powers+" alt="JCB Powers Uptime">
|
||||
</a>
|
||||
<a href="https://git.vdm.dev/joomla/pkg-component-builder/src/branch/5.x" title="Joomla 5 Compatible">
|
||||
<img src="https://img.shields.io/badge/Joomla-5.x%20Compatible-green.svg" alt="Joomla 5 Compatible">
|
||||
</a>
|
||||
<a href="https://git.vdm.dev/joomla/Component-Builder/src/branch/5.x/LICENSE.txt" title="GPLv3 License">
|
||||
<img src="https://img.shields.io/badge/License-GPLv2-blue.svg" alt="GPLv3 License">
|
||||
</a>
|
||||
<a href="https://github.com/vdm-io/Joomla-Component-Builder/stargazers" title="GitHub Stars">
|
||||
<img src="https://img.shields.io/github/stars/vdm-io/Joomla-Component-Builder.svg?style=flat&label=Star" alt="GitHub Stars">
|
||||
</a>
|
||||
</div>
|
||||
<br /><br />
|
||||
<a class="btn btn-mini btn-success" href="https://opencollective.com/joomla-component-builder/donate?interval=month&amount=20" title="<?php echo $support_titles; ?>" trage="_blank">
|
||||
<a class="btn btn-mini btn-outline-dark" style="width: 100%;" href="https://opencollective.com/joomla-component-builder/contribute/donation-15820/checkout?interval=month&amount=40&contributeAs=me" title="<?php echo $support_titles; ?>" target="_blank">
|
||||
<?php echo $support_button; ?>
|
||||
</a>
|
||||
<br />
|
||||
|
@@ -26,6 +26,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
|
||||
|
||||
// get the fields
|
||||
$fields = $displayData->get($fields_tab_layout) ?: array(
|
||||
'guid',
|
||||
'title',
|
||||
'created',
|
||||
'created_by',
|
||||
|
@@ -26,6 +26,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
|
||||
|
||||
// get the fields
|
||||
$fields = $displayData->get($fields_tab_layout) ?: array(
|
||||
'guid',
|
||||
'title',
|
||||
'created',
|
||||
'created_by',
|
||||
|
111
admin/layouts/mastodon.php
Normal file
111
admin/layouts/mastodon.php
Normal file
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 30th April, 2015
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
|
||||
// No direct access to this file
|
||||
defined('JPATH_BASE') or die;
|
||||
|
||||
// Extract all keys from $displayData as individual variables.
|
||||
extract($displayData ?? []);
|
||||
|
||||
// Default fallback values
|
||||
$defaultValues = [
|
||||
[ // Llewellyn
|
||||
'account' => '112766899254600077',
|
||||
'instance' => 'https://joomla.social',
|
||||
'invite_url' => 'https://joomla.social/invite/gzAvC48K',
|
||||
'invite_heading' => Text::_("COM_COMPONENTBUILDER_LLEWELLYNS_JOOMLA_SOCIAL_FEED"),
|
||||
'invite_title' => Text::_("COM_COMPONENTBUILDER_JOIN_JCBS_LEAD_DEVELOPER_ON_JOOMLA_SOCIAL_A_MASTODON_INSTANCE")
|
||||
// ], // removed since the feed is inactive at this time. if active, we can add it back in.
|
||||
// [ // Joomla
|
||||
// 'account' => '112755435087541569',
|
||||
// 'instance' => 'https://joomla.social',
|
||||
// 'invite_url' => 'https://joomla.social/invite/PCXktw8g',
|
||||
// 'invite_heading' => Text::_("COM_COMPONENTBUILDER_JOOMLA_SOCIAL_FEED"),
|
||||
// 'invite_title' => Text::_("COM_COMPONENTBUILDER_JOIN_JOOMLA_SOCIAL_A_MASTODON_INSTANCE")
|
||||
]
|
||||
];
|
||||
|
||||
// List of default accounts
|
||||
$defaultAccounts ??= $defaultValues;
|
||||
|
||||
// function to retrieve active account
|
||||
$getActiveAccount = function ($accounts, array $defaults): object {
|
||||
if (!empty($accounts) && is_array($accounts)) {
|
||||
// Select a random account and return it as an object
|
||||
return (object) $accounts[array_rand($accounts)];
|
||||
}
|
||||
// Return defaults as an object if no accounts are available
|
||||
return (object) $defaults;
|
||||
};
|
||||
|
||||
// Get the active account
|
||||
$activeAccount = $getActiveAccount($defaultAccounts, $defaultValues[0]);
|
||||
|
||||
// Assign values
|
||||
|
||||
// The 'id' parameter, defaulting to mastodon-feed.
|
||||
$id ??= 'mastodon-feed';
|
||||
|
||||
// The button 'id' parameter, defaulting to refresh-feed.
|
||||
$button_id ??= 'refresh-feed';
|
||||
|
||||
// The number of post to load
|
||||
$posts ??= 5;
|
||||
|
||||
// The URL of the Mastodon instance to use; defaults to the instance of the selected account.
|
||||
$instance ??= $activeAccount->instance;
|
||||
|
||||
// The unique account ID for the selected Mastodon account; defaults to the ID of the selected account.
|
||||
$account ??= $activeAccount->account;
|
||||
|
||||
// The invitation URL for the Mastodon instance, used to invite others to join; defaults to the invite URL of the selected account.
|
||||
$invite_url ??= $activeAccount->invite_url;
|
||||
|
||||
// The heading displayed for the invitation; defaults to the invite heading of the selected account.
|
||||
$invite_heading ??= $activeAccount->invite_heading;
|
||||
|
||||
// The title displayed for the invitation; defaults to the invite title of the selected account.
|
||||
$invite_title ??= $activeAccount->invite_title;
|
||||
|
||||
|
||||
?>
|
||||
<div class="well well-small mastadon-display-block">
|
||||
<h2>
|
||||
<a
|
||||
href="<?php echo $invite_url; ?>"
|
||||
title="<?php echo $invite_title; ?>">
|
||||
<?php echo $invite_heading; ?>
|
||||
</a>
|
||||
<a
|
||||
type="button"
|
||||
id="<?php echo $button_id; ?>"
|
||||
href="#"
|
||||
title="<?php echo Text::_('COM_COMPONENTBUILDER_REFRESH_FEED'); ?>">
|
||||
<i class="icon-loop"></i>
|
||||
</a>
|
||||
</h2>
|
||||
<div id="<?php echo $id; ?>"
|
||||
data-instance="<?php echo $instance; ?>"
|
||||
data-account-id="<?php echo $account; ?>"
|
||||
data-post-count="<?php echo $posts; ?>">
|
||||
</div>
|
||||
<script>
|
||||
new MastodonFeed("<?php echo $id; ?>", "<?php echo $button_id; ?>");
|
||||
</script>
|
||||
</div>
|
@@ -26,6 +26,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
|
||||
|
||||
// get the fields
|
||||
$fields = $displayData->get($fields_tab_layout) ?: array(
|
||||
'guid',
|
||||
'title',
|
||||
'created',
|
||||
'created_by',
|
||||
|
70
admin/layouts/socialnetworking.php
Normal file
70
admin/layouts/socialnetworking.php
Normal file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 30th April, 2015
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
|
||||
// No direct access to this file
|
||||
defined('JPATH_BASE') or die;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<div id="llewellyns-social-icons" class="float-end social-icons">
|
||||
<a href="https://volunteers.joomla.org/joomlers/1396-llewellyn-van-der-merwe" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_JOIN_LLEWELLYN_ON_THE_JOOMLA_VOLUNTEER_PORTAL_SHAPING_THE_FUTURE_TOGETHER'); ?>">
|
||||
<i class="fa fa-joomla"></i>
|
||||
</a>
|
||||
<a href="https://git.vdm.dev/octoleo" class="text-decoration-none me-2" data-description="--quiet">
|
||||
<i class="fa fa-linux"></i>
|
||||
</a>
|
||||
<a href="https://git.vdm.dev/Llewellyn" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_COLLABORATE_AND_INNOVATE_WITH_LLEWELLYN_ON_GIT_BUILDING_A_BETTER_CODE_FUTURE'); ?>">
|
||||
<i class="fa fa-code"></i>
|
||||
</a>
|
||||
<a href="https://t.me/Joomla_component_builder" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_JOIN_LLEWELLYN_AND_THE_COMMUNITY_ON_TELEGRAM_BUILDING_JOOMLA_COMPONENTS_TOGETHER'); ?>">
|
||||
<i class="fa-brands fa-telegram"></i>
|
||||
</a>
|
||||
<a href="https://joomla.social/@llewellyn" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_CONNECT_AND_ENGAGE_WITH_LLEWELLYN_ON_JOOMLA_SOCIAL_EMPOWERING_COMMUNITIES_ONE_POST_AT_A_TIME'); ?>">
|
||||
<i class="fa-brands fa-mastodon"></i>
|
||||
</a>
|
||||
<a href="https://x.com/llewellynvdm" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_JOIN_THE_CONVERSATION_WITH_LLEWELLYN_ON_X_WHERE_IDEAS_TAKE_FLIGHT'); ?>">
|
||||
<i class="fa-brands fa-x-twitter"></i>
|
||||
</a>
|
||||
<a href="https://github.com/Llewellynvdm" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_BUILD_INNOVATE_AND_THRIVE_WITH_LLEWELLYN_ON_GITHUB_TURNING_IDEAS_INTO_IMPACT'); ?>">
|
||||
<i class="fa fa-github"></i>
|
||||
</a>
|
||||
<a href="https://www.youtube.com/@OctoYou" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_EXPLORE_LEARN_AND_CREATE_WITH_LLEWELLYN_ON_YOUTUBE_YOUR_GATEWAY_TO_INSPIRATION'); ?>">
|
||||
<i class="fa fa-youtube"></i>
|
||||
</a>
|
||||
<a href="https://n8n.io/creators/octoleo" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_EFFORTLESS_AUTOMATION_AND_IMPACTFUL_WORKFLOWS_WITH_LLEWELLYN_ON_NEIGHTN'); ?>">
|
||||
<i class="fa fa-code-fork"></i>
|
||||
</a>
|
||||
<a href="https://hub.docker.com/u/llewellyn" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_LLEWELLYN_ON_DOCKER_CONTAINERIZE_YOUR_CREATIVITY'); ?>">
|
||||
<i class="fa-brands fa-docker"></i>
|
||||
</a>
|
||||
<a href="https://opencollective.com/joomla-component-builder" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_DONATE_TOWARDS_JCB_HELP_LLEWELLYN_FINANCIALLY_SO_HE_CAN_CONTINUE_DEVELOPING_THIS_GREAT_TOOL'); ?>">
|
||||
<i class="fa-solid fa-circle-dollar-to-slot"></i>
|
||||
</a>
|
||||
<a href="https://git.vdm.dev/Llewellyn/gpg" class="text-decoration-none" data-description="<?php echo Text::_("COM_COMPONENTBUILDER_UNLOCK_TRUST_AND_SECURITY_WITH_LLEWELLYNS_GPG_KEY_YOUR_GATEWAY_TO_VERIFIED_CONNECTIONS"); ?>">
|
||||
<i class="fa-solid fa-fingerprint"></i>
|
||||
</a>
|
||||
</div>
|
||||
<br>
|
||||
<div id="llewellyns-social-icon-details" class="float-end social-icon-details"></div>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
new IconWaveAnimator("llewellyns-social-icons", "llewellyns-social-icon-details");
|
||||
});
|
||||
</script>
|
@@ -35,6 +35,9 @@ $name ??= false;
|
||||
// The 'table_class' parameter, defaulting to 'uk-table' if not set or is null.
|
||||
$table_class ??= 'uk-table';
|
||||
|
||||
// The 'table_other_class' parameter, defaulting to '' if not set or is null.
|
||||
$table_other_class = !empty($table_other_class ?? '') ? ' ' . $table_other_class : '';
|
||||
|
||||
// The 'table_container_class' parameter, defaulting to 'uk-overflow-auto' if not set or is null.
|
||||
$table_container_class ??= 'uk-overflow-auto';
|
||||
|
||||
@@ -42,11 +45,30 @@ $table_container_class ??= 'uk-overflow-auto';
|
||||
$headers ??= [Text::_('COM_COMPONENTBUILDER_NO'), Text::_('COM_COMPONENTBUILDER_HEADERS'), Text::_('COM_COMPONENTBUILDER_FOUND')];
|
||||
|
||||
// The 'items' parameter, defaulting to 6 if not set or is null.
|
||||
$items ??= 6;
|
||||
$items ??= 6;
|
||||
|
||||
// The 'default_items_number' parameter, defaulting to 0 if not set or is null.
|
||||
$default_items_number ??= 0;
|
||||
|
||||
// tweak to add empty rows
|
||||
$items_number = 0;
|
||||
if (is_array($items))
|
||||
{
|
||||
$items_number = count((array) $items);
|
||||
}
|
||||
elseif (is_numeric($items))
|
||||
{
|
||||
$items_number = (int) $items;
|
||||
}
|
||||
$add_items = 0;
|
||||
if ($default_items_number > $items_number)
|
||||
{
|
||||
$add_items = round($default_items_number - $items_number);
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="<?php echo $$table_container_class; ?>">
|
||||
<table id="<?php echo $table_id; ?>" class="<?php echo $table_class; ?>">
|
||||
<div class="<?php echo $table_container_class; ?>">
|
||||
<table id="<?php echo $table_id; ?>" class="<?php echo $table_class; ?><?php echo $table_other_class; ?>">
|
||||
<thead>
|
||||
<?php if (is_array($headers)): ?>
|
||||
<?php if ($name): ?>
|
||||
@@ -80,6 +102,9 @@ $items ??= 6;
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php echo LayoutHelper::render('rows', ['headers' => $headers, 'items' => $items]); ?>
|
||||
<?php if ($add_items > 0): ?>
|
||||
<?php echo LayoutHelper::render('rows', ['headers' => $headers, 'items' => $add_items]); ?>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
@@ -26,6 +26,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
|
||||
|
||||
// get the fields
|
||||
$fields = $displayData->get($fields_tab_layout) ?: array(
|
||||
'guid',
|
||||
'title',
|
||||
'created',
|
||||
'created_by',
|
||||
|
@@ -34,16 +34,16 @@ defined('JPATH_BASE') or die;
|
||||
document.adminForm.elements['checkall-toggle'].checked=1;
|
||||
Joomla.checkAll(document.adminForm.elements['checkall-toggle']);
|
||||
// check to confirm the deletion
|
||||
if(confirm('<?= Text::_("COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS") ?>')) {
|
||||
Joomla.submitbutton('<?= $displayData->get("name") ?>.delete');
|
||||
if(confirm('<?php echo Text::_("COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS") ?>')) {
|
||||
Joomla.submitbutton('<?php echo $displayData->getName(); ?>.delete');
|
||||
} else {
|
||||
document.adminForm.elements['checkall-toggle'].checked=0;
|
||||
Joomla.checkAll(document.adminForm.elements['checkall-toggle']);
|
||||
}
|
||||
} else {
|
||||
// confirm deletion of those selected
|
||||
if (confirm('<?= Text::_("COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS") ?>')) {
|
||||
Joomla.submitbutton('<?= $displayData->get("name") ?>.delete');
|
||||
if (confirm('<?php echo Text::_("COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS") ?>')) {
|
||||
Joomla.submitbutton('<?php echo $displayData->getName(); ?>.delete');
|
||||
};
|
||||
}
|
||||
return false;
|
||||
@@ -59,23 +59,23 @@ defined('JPATH_BASE') or die;
|
||||
<?php if (empty($displayData->items)): ?>
|
||||
<h4 class="alert-heading">
|
||||
<span class="icon-trash"></span>
|
||||
<?= Text::_("COM_COMPONENTBUILDER_TRASH_AREA") ?>
|
||||
<?php echo Text::_("COM_COMPONENTBUILDER_TRASH_AREA") ?>
|
||||
</h4>
|
||||
<p><?= Text::_("COM_COMPONENTBUILDER_YOU_ARE_CURRENTLY_VIEWING_THE_TRASH_AREA_AND_YOU_DONT_HAVE_ANY_ITEMS_IN_TRASH_AT_THE_MOMENT") ?></p>
|
||||
<p><?php echo Text::_("COM_COMPONENTBUILDER_YOU_ARE_CURRENTLY_VIEWING_THE_TRASH_AREA_AND_YOU_DONT_HAVE_ANY_ITEMS_IN_TRASH_AT_THE_MOMENT") ?></p>
|
||||
<?php else: ?>
|
||||
<h4 class="alert-heading">
|
||||
<span class="icon-trash"></span>
|
||||
<?= Text::_("COM_COMPONENTBUILDER_TRASHED_ITEMS") ?>
|
||||
<?php echo Text::_("COM_COMPONENTBUILDER_TRASHED_ITEMS") ?>
|
||||
</h4>
|
||||
<p><?= Text::_("COM_COMPONENTBUILDER_YOU_ARE_CURRENTLY_VIEWING_THE_TRASHED_ITEMS") ?></p>
|
||||
<p><?php echo Text::_("COM_COMPONENTBUILDER_YOU_ARE_CURRENTLY_VIEWING_THE_TRASHED_ITEMS") ?></p>
|
||||
<button onclick="emptyTrash();" class="btn btn-small btn-danger">
|
||||
<span class="icon-delete" aria-hidden="true"></span>
|
||||
<?= Text::_("COM_COMPONENTBUILDER_EMPTY_TRASH") ?>
|
||||
<?php echo Text::_("COM_COMPONENTBUILDER_EMPTY_TRASH") ?>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
<button onclick="exitTrash();" class="btn btn-small">
|
||||
<span class="icon-back" aria-hidden="true"></span>
|
||||
<?= Text::_("COM_COMPONENTBUILDER_EXIT_TRASH") ?>
|
||||
<?php echo Text::_("COM_COMPONENTBUILDER_EXIT_TRASH") ?>
|
||||
</button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
File diff suppressed because one or more lines are too long
1
admin/sql/updates/mysql/5.0.3.sql
Normal file
1
admin/sql/updates/mysql/5.0.3.sql
Normal file
@@ -0,0 +1 @@
|
||||
|
@@ -177,13 +177,22 @@ class Admin_custom_tabsController extends FormController
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
// get the referral options (old method use return instead see parent)
|
||||
// get int-defaults (to int new items with default values dynamically)
|
||||
$init_defaults = $this->input->get('init_defaults', null, 'STRING');
|
||||
|
||||
// get the referral options (old method use init_defaults or return instead see parent)
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// get redirect info.
|
||||
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
|
||||
|
||||
// set int-defaults
|
||||
if (!empty($init_defaults))
|
||||
{
|
||||
$append = '&init_defaults='. (string) $init_defaults . $append;
|
||||
}
|
||||
|
||||
// set the referral options
|
||||
if ($refid && $ref)
|
||||
{
|
||||
|
@@ -177,13 +177,22 @@ class Admin_fieldsController extends FormController
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
// get the referral options (old method use return instead see parent)
|
||||
// get int-defaults (to int new items with default values dynamically)
|
||||
$init_defaults = $this->input->get('init_defaults', null, 'STRING');
|
||||
|
||||
// get the referral options (old method use init_defaults or return instead see parent)
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// get redirect info.
|
||||
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
|
||||
|
||||
// set int-defaults
|
||||
if (!empty($init_defaults))
|
||||
{
|
||||
$append = '&init_defaults='. (string) $init_defaults . $append;
|
||||
}
|
||||
|
||||
// set the referral options
|
||||
if ($refid && $ref)
|
||||
{
|
||||
|
@@ -177,13 +177,22 @@ class Admin_fields_conditionsController extends FormController
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
// get the referral options (old method use return instead see parent)
|
||||
// get int-defaults (to int new items with default values dynamically)
|
||||
$init_defaults = $this->input->get('init_defaults', null, 'STRING');
|
||||
|
||||
// get the referral options (old method use init_defaults or return instead see parent)
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// get redirect info.
|
||||
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
|
||||
|
||||
// set int-defaults
|
||||
if (!empty($init_defaults))
|
||||
{
|
||||
$append = '&init_defaults='. (string) $init_defaults . $append;
|
||||
}
|
||||
|
||||
// set the referral options
|
||||
if ($refid && $ref)
|
||||
{
|
||||
|
@@ -177,13 +177,22 @@ class Admin_fields_relationsController extends FormController
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
// get the referral options (old method use return instead see parent)
|
||||
// get int-defaults (to int new items with default values dynamically)
|
||||
$init_defaults = $this->input->get('init_defaults', null, 'STRING');
|
||||
|
||||
// get the referral options (old method use init_defaults or return instead see parent)
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// get redirect info.
|
||||
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
|
||||
|
||||
// set int-defaults
|
||||
if (!empty($init_defaults))
|
||||
{
|
||||
$append = '&init_defaults='. (string) $init_defaults . $append;
|
||||
}
|
||||
|
||||
// set the referral options
|
||||
if ($refid && $ref)
|
||||
{
|
||||
|
@@ -24,7 +24,8 @@ use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Session\Session;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use VDM\Joomla\Data\Factory as DataFactory;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
|
||||
// No direct access to this file
|
||||
\defined('_JEXEC') or die;
|
||||
@@ -178,13 +179,22 @@ class Admin_viewController extends FormController
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
// get the referral options (old method use return instead see parent)
|
||||
// get int-defaults (to int new items with default values dynamically)
|
||||
$init_defaults = $this->input->get('init_defaults', null, 'STRING');
|
||||
|
||||
// get the referral options (old method use init_defaults or return instead see parent)
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// get redirect info.
|
||||
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
|
||||
|
||||
// set int-defaults
|
||||
if (!empty($init_defaults))
|
||||
{
|
||||
$append = '&init_defaults='. (string) $init_defaults . $append;
|
||||
}
|
||||
|
||||
// set the referral options
|
||||
if ($refid && $ref)
|
||||
{
|
||||
@@ -355,29 +365,53 @@ class Admin_viewController extends FormController
|
||||
*/
|
||||
protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
|
||||
{
|
||||
// linked tables to update
|
||||
$_tables_array = [
|
||||
'admin_fields' => 'admin_view',
|
||||
'admin_fields_conditions' => 'admin_view',
|
||||
'admin_fields_relations' => 'admin_view',
|
||||
'admin_custom_tabs' => 'admin_view'
|
||||
];
|
||||
|
||||
// get the state object (Joomla\CMS\Object\CMSObject)
|
||||
$state = $model->get('state');
|
||||
$state = $model->get('state');
|
||||
|
||||
// if we save2copy we need to also copy linked tables found!
|
||||
if ($state->task === 'save2copy' && $state->{'admin_view.new'})
|
||||
if (!empty($_tables_array) && $state->task === 'save2copy' && $state->{'admin_view.new'})
|
||||
{
|
||||
// get new ID
|
||||
$newID = $state->{'admin_view.id'};
|
||||
// get old ID
|
||||
$oldID = $this->input->get('id', 0, 'INT');
|
||||
// linked tables to update
|
||||
$_tablesArray = array(
|
||||
'admin_fields',
|
||||
'admin_fields_conditions',
|
||||
'admin_fields_relations',
|
||||
'admin_custom_tabs'
|
||||
// get new GUID
|
||||
$new_guid = DataFactory::_('Load')->value(
|
||||
['a.guid' => 'guid'], // select
|
||||
['a' => 'admin_view'], // tables
|
||||
['a.id' => $state->{'admin_view.id'}] // where
|
||||
);
|
||||
foreach($_tablesArray as $_updateTable)
|
||||
|
||||
// get old GUID
|
||||
$old_guid = $validData['guid'] ?? $this->input->get('guid', null, 'STRING') ?? DataFactory::_('Load')->value(
|
||||
['a.guid' => 'guid'], // select
|
||||
['a' => 'admin_view'], // tables
|
||||
['a.id' => $validData['id'] ?? $this->input->get('id', 0, 'INT')] // where
|
||||
);
|
||||
|
||||
// we only continue if we have valid GUIDs
|
||||
if (!GuidHelper::valid($new_guid) || !GuidHelper::valid($old_guid))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach($_tables_array as $_update_table => $_field_name)
|
||||
{
|
||||
// get the linked ID
|
||||
if ($_value = GetHelper::var($_updateTable, $oldID, 'admin_view', 'id'))
|
||||
$_item_id = DataFactory::_('Load')->value(
|
||||
['a.id' => 'id'], // select
|
||||
['a' => $_update_table], // tables
|
||||
['a.' . $_field_name => $old_guid] // where
|
||||
);
|
||||
|
||||
if ($_item_id !== null)
|
||||
{
|
||||
// copy fields to new admin view
|
||||
ComponentbuilderHelper::copyItem(/*id->*/ $_value, /*table->*/ $_updateTable, /*change->*/ array('admin_view' => $newID));
|
||||
ComponentbuilderHelper::copyItem(/*id->*/ $_item_id, /*table->*/ $_update_table, /*change->*/ [$_field_name => $new_guid]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -49,8 +49,6 @@ class AjaxController extends BaseController
|
||||
$this->app->setHeader('Content-Disposition','attachment;filename="getajax.json"');
|
||||
$this->app->setHeader('Access-Control-Allow-Origin', '*');
|
||||
// load the tasks
|
||||
$this->registerTask('isNew', 'ajax');
|
||||
$this->registerTask('isRead', 'ajax');
|
||||
$this->registerTask('getComponentDetails', 'ajax');
|
||||
$this->registerTask('getCronPath', 'ajax');
|
||||
$this->registerTask('getWiki', 'ajax');
|
||||
@@ -80,6 +78,9 @@ class AjaxController extends BaseController
|
||||
$this->registerTask('getEditCustomCodeButtons', 'ajax');
|
||||
$this->registerTask('placedin', 'ajax');
|
||||
$this->registerTask('checkPlaceholderName', 'ajax');
|
||||
$this->registerTask('snippetDetails', 'ajax');
|
||||
$this->registerTask('setSnippetGithub', 'ajax');
|
||||
$this->registerTask('getSnippets', 'ajax');
|
||||
$this->registerTask('getExistingValidationRuleCode', 'ajax');
|
||||
$this->registerTask('getValidationRulesTable', 'ajax');
|
||||
$this->registerTask('checkRuleName', 'ajax');
|
||||
@@ -91,9 +92,6 @@ class AjaxController extends BaseController
|
||||
$this->registerTask('getSearchValue', 'ajax');
|
||||
$this->registerTask('getReplaceValue', 'ajax');
|
||||
$this->registerTask('setValue', 'ajax');
|
||||
$this->registerTask('snippetDetails', 'ajax');
|
||||
$this->registerTask('setSnippetGithub', 'ajax');
|
||||
$this->registerTask('getSnippets', 'ajax');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -120,108 +118,10 @@ class AjaxController extends BaseController
|
||||
$task = $this->getTask();
|
||||
switch($task)
|
||||
{
|
||||
case 'isNew':
|
||||
try
|
||||
{
|
||||
$noticeValue = $jinput->get('notice', NULL, 'STRING');
|
||||
if($noticeValue && $user->id != 0)
|
||||
{
|
||||
$ajaxModule = $this->getModel('ajax', 'Administrator');
|
||||
if ($ajaxModule)
|
||||
{
|
||||
$result = $ajaxModule->isNew($noticeValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = ['error' => 'There was an error! [149]'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = ['error' => 'There was an error! [149]'];
|
||||
}
|
||||
if($callback)
|
||||
{
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
echo json_encode($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($result).");";
|
||||
}
|
||||
}
|
||||
catch(\Exception $e)
|
||||
{
|
||||
if($callback)
|
||||
{
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
echo json_encode($e);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($e).");";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'isRead':
|
||||
try
|
||||
{
|
||||
$noticeValue = $jinput->get('notice', NULL, 'STRING');
|
||||
if($noticeValue && $user->id != 0)
|
||||
{
|
||||
$ajaxModule = $this->getModel('ajax', 'Administrator');
|
||||
if ($ajaxModule)
|
||||
{
|
||||
$result = $ajaxModule->isRead($noticeValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = ['error' => 'There was an error! [149]'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = ['error' => 'There was an error! [149]'];
|
||||
}
|
||||
if($callback)
|
||||
{
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
echo json_encode($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($result).");";
|
||||
}
|
||||
}
|
||||
catch(\Exception $e)
|
||||
{
|
||||
if($callback)
|
||||
{
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
echo json_encode($e);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($e).");";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'getComponentDetails':
|
||||
try
|
||||
{
|
||||
$idValue = $jinput->get('id', NULL, 'INT');
|
||||
$idValue = $jinput->get('id', NULL, 'STRING');
|
||||
if($idValue && $user->id != 0)
|
||||
{
|
||||
$ajaxModule = $this->getModel('ajax', 'Administrator');
|
||||
@@ -565,7 +465,7 @@ class AjaxController extends BaseController
|
||||
case 'getClassCode':
|
||||
try
|
||||
{
|
||||
$idValue = $jinput->get('id', NULL, 'INT');
|
||||
$idValue = $jinput->get('id', NULL, 'STRING');
|
||||
$typeValue = $jinput->get('type', NULL, 'WORD');
|
||||
if($idValue && $user->id != 0 && $typeValue)
|
||||
{
|
||||
@@ -615,7 +515,7 @@ class AjaxController extends BaseController
|
||||
case 'getClassCodeIds':
|
||||
try
|
||||
{
|
||||
$idValue = $jinput->get('id', NULL, 'INT');
|
||||
$idValue = $jinput->get('id', NULL, 'STRING');
|
||||
$typeValue = $jinput->get('type', NULL, 'WORD');
|
||||
$keyValue = $jinput->get('key', 1, 'INT');
|
||||
if($idValue && $user->id != 0 && $typeValue)
|
||||
@@ -666,7 +566,7 @@ class AjaxController extends BaseController
|
||||
case 'getClassHeaderCode':
|
||||
try
|
||||
{
|
||||
$idValue = $jinput->get('id', NULL, 'INT');
|
||||
$idValue = $jinput->get('id', NULL, 'STRING');
|
||||
$typeValue = $jinput->get('type', NULL, 'WORD');
|
||||
if($idValue && $user->id != 0 && $typeValue)
|
||||
{
|
||||
@@ -765,7 +665,7 @@ class AjaxController extends BaseController
|
||||
case 'fieldSelectOptions':
|
||||
try
|
||||
{
|
||||
$idValue = $jinput->get('id', NULL, 'INT');
|
||||
$idValue = $jinput->get('id', NULL, 'STRING');
|
||||
if($idValue && $user->id != 0)
|
||||
{
|
||||
$ajaxModule = $this->getModel('ajax', 'Administrator');
|
||||
@@ -1308,7 +1208,7 @@ class AjaxController extends BaseController
|
||||
case 'viewTableColumns':
|
||||
try
|
||||
{
|
||||
$idValue = $jinput->get('id', NULL, 'INT');
|
||||
$idValue = $jinput->get('id', NULL, 'STRING');
|
||||
$asValue = $jinput->get('as', NULL, 'WORD');
|
||||
$typeValue = $jinput->get('type', NULL, 'INT');
|
||||
if($idValue && $user->id != 0 && $asValue && $typeValue)
|
||||
@@ -1359,7 +1259,7 @@ class AjaxController extends BaseController
|
||||
case 'getDynamicValues':
|
||||
try
|
||||
{
|
||||
$idValue = $jinput->get('id', NULL, 'INT');
|
||||
$idValue = $jinput->get('id', NULL, 'STRING');
|
||||
$viewValue = $jinput->get('view', NULL, 'WORD');
|
||||
if($idValue && $user->id != 0 && $viewValue)
|
||||
{
|
||||
@@ -1461,8 +1361,8 @@ class AjaxController extends BaseController
|
||||
{
|
||||
$functioNameValue = $jinput->get('functioName', NULL, 'WORD');
|
||||
$idValue = $jinput->get('id', NULL, 'INT');
|
||||
$targetValue = $jinput->get('target', NULL, 'WORD');
|
||||
if($functioNameValue && $user->id != 0 && $idValue && $targetValue)
|
||||
$targetValue = $jinput->get('target', NULL, 'ALNUM');
|
||||
if($functioNameValue && $user->id != 0 && $idValue)
|
||||
{
|
||||
$ajaxModule = $this->getModel('ajax', 'Administrator');
|
||||
if ($ajaxModule)
|
||||
@@ -1561,8 +1461,8 @@ class AjaxController extends BaseController
|
||||
{
|
||||
$placeholderValue = $jinput->get('placeholder', NULL, 'WORD');
|
||||
$idValue = $jinput->get('id', NULL, 'INT');
|
||||
$targetValue = $jinput->get('target', NULL, 'WORD');
|
||||
if($placeholderValue && $user->id != 0 && $idValue && $targetValue)
|
||||
$targetValue = $jinput->get('target', NULL, 'ALNUM');
|
||||
if($placeholderValue && $user->id != 0 && $idValue)
|
||||
{
|
||||
$ajaxModule = $this->getModel('ajax', 'Administrator');
|
||||
if ($ajaxModule)
|
||||
@@ -1657,6 +1557,154 @@ class AjaxController extends BaseController
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'snippetDetails':
|
||||
try
|
||||
{
|
||||
$idValue = $jinput->get('id', NULL, 'STRING');
|
||||
if($idValue && $user->id != 0)
|
||||
{
|
||||
$ajaxModule = $this->getModel('ajax', 'Administrator');
|
||||
if ($ajaxModule)
|
||||
{
|
||||
$result = $ajaxModule->getSnippetDetails($idValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = ['error' => 'There was an error! [149]'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = ['error' => 'There was an error! [149]'];
|
||||
}
|
||||
if($callback)
|
||||
{
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
echo json_encode($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($result).");";
|
||||
}
|
||||
}
|
||||
catch(\Exception $e)
|
||||
{
|
||||
if($callback)
|
||||
{
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
echo json_encode($e);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($e).");";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'setSnippetGithub':
|
||||
try
|
||||
{
|
||||
$pathValue = $jinput->get('path', NULL, 'STRING');
|
||||
$statusValue = $jinput->get('status', NULL, 'WORD');
|
||||
if($pathValue && $user->id != 0 && $statusValue)
|
||||
{
|
||||
$ajaxModule = $this->getModel('ajax', 'Administrator');
|
||||
if ($ajaxModule)
|
||||
{
|
||||
$result = $ajaxModule->setSnippetGithub($pathValue, $statusValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = ['error' => 'There was an error! [149]'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = ['error' => 'There was an error! [149]'];
|
||||
}
|
||||
if($callback)
|
||||
{
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
echo json_encode($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($result).");";
|
||||
}
|
||||
}
|
||||
catch(\Exception $e)
|
||||
{
|
||||
if($callback)
|
||||
{
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
echo json_encode($e);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($e).");";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'getSnippets':
|
||||
try
|
||||
{
|
||||
$librariesValue = $jinput->get('libraries', NULL, 'STRING');
|
||||
if($librariesValue && $user->id != 0)
|
||||
{
|
||||
$ajaxModule = $this->getModel('ajax', 'Administrator');
|
||||
if ($ajaxModule)
|
||||
{
|
||||
$result = $ajaxModule->getSnippets($librariesValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = ['error' => 'There was an error! [149]'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = ['error' => 'There was an error! [149]'];
|
||||
}
|
||||
if($callback)
|
||||
{
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
echo json_encode($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($result).");";
|
||||
}
|
||||
}
|
||||
catch(\Exception $e)
|
||||
{
|
||||
if($callback)
|
||||
{
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
echo json_encode($e);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($e).");";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'getExistingValidationRuleCode':
|
||||
try
|
||||
{
|
||||
@@ -1808,7 +1856,7 @@ class AjaxController extends BaseController
|
||||
case 'fieldTypeProperties':
|
||||
try
|
||||
{
|
||||
$idValue = $jinput->get('id', NULL, 'INT');
|
||||
$idValue = $jinput->get('id', NULL, 'STRING');
|
||||
if($idValue)
|
||||
{
|
||||
$ajaxModule = $this->getModel('ajax', 'Administrator');
|
||||
@@ -1907,7 +1955,7 @@ class AjaxController extends BaseController
|
||||
case 'getCodeGlueOptions':
|
||||
try
|
||||
{
|
||||
$listfieldValue = $jinput->get('listfield', NULL, 'INT');
|
||||
$listfieldValue = $jinput->get('listfield', NULL, 'STRING');
|
||||
$joinfieldsValue = $jinput->get('joinfields', NULL, 'STRING');
|
||||
$typeValue = $jinput->get('type', NULL, 'INT');
|
||||
$areaValue = $jinput->get('area', NULL, 'INT');
|
||||
@@ -2231,154 +2279,6 @@ class AjaxController extends BaseController
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'snippetDetails':
|
||||
try
|
||||
{
|
||||
$idValue = $jinput->get('id', NULL, 'INT');
|
||||
if($idValue && $user->id != 0)
|
||||
{
|
||||
$ajaxModule = $this->getModel('ajax', 'Administrator');
|
||||
if ($ajaxModule)
|
||||
{
|
||||
$result = $ajaxModule->getSnippetDetails($idValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = ['error' => 'There was an error! [149]'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = ['error' => 'There was an error! [149]'];
|
||||
}
|
||||
if($callback)
|
||||
{
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
echo json_encode($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($result).");";
|
||||
}
|
||||
}
|
||||
catch(\Exception $e)
|
||||
{
|
||||
if($callback)
|
||||
{
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
echo json_encode($e);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($e).");";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'setSnippetGithub':
|
||||
try
|
||||
{
|
||||
$pathValue = $jinput->get('path', NULL, 'STRING');
|
||||
$statusValue = $jinput->get('status', NULL, 'WORD');
|
||||
if($pathValue && $user->id != 0 && $statusValue)
|
||||
{
|
||||
$ajaxModule = $this->getModel('ajax', 'Administrator');
|
||||
if ($ajaxModule)
|
||||
{
|
||||
$result = $ajaxModule->setSnippetGithub($pathValue, $statusValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = ['error' => 'There was an error! [149]'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = ['error' => 'There was an error! [149]'];
|
||||
}
|
||||
if($callback)
|
||||
{
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
echo json_encode($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($result).");";
|
||||
}
|
||||
}
|
||||
catch(\Exception $e)
|
||||
{
|
||||
if($callback)
|
||||
{
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
echo json_encode($e);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($e).");";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'getSnippets':
|
||||
try
|
||||
{
|
||||
$librariesValue = $jinput->get('libraries', NULL, 'STRING');
|
||||
if($librariesValue && $user->id != 0)
|
||||
{
|
||||
$ajaxModule = $this->getModel('ajax', 'Administrator');
|
||||
if ($ajaxModule)
|
||||
{
|
||||
$result = $ajaxModule->getSnippets($librariesValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = ['error' => 'There was an error! [149]'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = ['error' => 'There was an error! [149]'];
|
||||
}
|
||||
if($callback)
|
||||
{
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
echo json_encode($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($result).");";
|
||||
}
|
||||
}
|
||||
catch(\Exception $e)
|
||||
{
|
||||
if($callback)
|
||||
{
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
echo json_encode($e);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($e).");";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@@ -177,13 +177,22 @@ class Class_extendsController extends FormController
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
// get the referral options (old method use return instead see parent)
|
||||
// get int-defaults (to int new items with default values dynamically)
|
||||
$init_defaults = $this->input->get('init_defaults', null, 'STRING');
|
||||
|
||||
// get the referral options (old method use init_defaults or return instead see parent)
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// get redirect info.
|
||||
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
|
||||
|
||||
// set int-defaults
|
||||
if (!empty($init_defaults))
|
||||
{
|
||||
$append = '&init_defaults='. (string) $init_defaults . $append;
|
||||
}
|
||||
|
||||
// set the referral options
|
||||
if ($refid && $ref)
|
||||
{
|
||||
|
@@ -177,13 +177,22 @@ class Class_methodController extends FormController
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
// get the referral options (old method use return instead see parent)
|
||||
// get int-defaults (to int new items with default values dynamically)
|
||||
$init_defaults = $this->input->get('init_defaults', null, 'STRING');
|
||||
|
||||
// get the referral options (old method use init_defaults or return instead see parent)
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// get redirect info.
|
||||
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
|
||||
|
||||
// set int-defaults
|
||||
if (!empty($init_defaults))
|
||||
{
|
||||
$append = '&init_defaults='. (string) $init_defaults . $append;
|
||||
}
|
||||
|
||||
// set the referral options
|
||||
if ($refid && $ref)
|
||||
{
|
||||
|
@@ -177,13 +177,22 @@ class Class_propertyController extends FormController
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
// get the referral options (old method use return instead see parent)
|
||||
// get int-defaults (to int new items with default values dynamically)
|
||||
$init_defaults = $this->input->get('init_defaults', null, 'STRING');
|
||||
|
||||
// get the referral options (old method use init_defaults or return instead see parent)
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// get redirect info.
|
||||
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
|
||||
|
||||
// set int-defaults
|
||||
if (!empty($init_defaults))
|
||||
{
|
||||
$append = '&init_defaults='. (string) $init_defaults . $append;
|
||||
}
|
||||
|
||||
// set the referral options
|
||||
if ($refid && $ref)
|
||||
{
|
||||
|
@@ -20,6 +20,8 @@ use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory;
|
||||
use Joomla\CMS\Version;
|
||||
use VDM\Joomla\Componentbuilder\File\Factory as FileFactory;
|
||||
use VDM\Joomla\Componentbuilder\Import\Factory as ImportFactory;
|
||||
use VDM\Joomla\Abstraction\Console\Import;
|
||||
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
@@ -73,6 +75,10 @@ class CompilerController extends AdminController
|
||||
/**
|
||||
* Adding this so that the upload factory gets build for Super Powers
|
||||
* FileFactory
|
||||
* Adding this so that the import factory gets build for Super Powers
|
||||
* ImportFactory
|
||||
* Adding this so that the import cli gets build for Super Powers
|
||||
* Import
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -546,13 +552,16 @@ class CompilerController extends AdminController
|
||||
* Clear tmp folder
|
||||
*
|
||||
* @return true on success
|
||||
* @since 3.0.0
|
||||
*/
|
||||
public function clearTmp()
|
||||
{
|
||||
// Check for request forgeries
|
||||
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN'));
|
||||
|
||||
// check if user has the right
|
||||
$user = Factory::getUser();
|
||||
|
||||
// set page redirect
|
||||
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=compiler', false);
|
||||
$message = Text::_('COM_COMPONENTBUILDER_COULD_NOT_CLEAR_THE_TMP_FOLDER');
|
||||
@@ -580,40 +589,5 @@ class CompilerController extends AdminController
|
||||
}
|
||||
$this->setRedirect($redirect_url, $message, 'error');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Run the Translator
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function runTranslator()
|
||||
{
|
||||
// Check for request forgeries
|
||||
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN'));
|
||||
// check if user has the right
|
||||
$user = Factory::getUser();
|
||||
// set page redirect
|
||||
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=compiler', false);
|
||||
// set massage
|
||||
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_TRANSLATOR_MODULE');
|
||||
// check if this user has the right to run expansion
|
||||
if($user->authorise('compiler.run_translator', 'com_componentbuilder'))
|
||||
{
|
||||
// set massage
|
||||
$message = Text::_('COM_COMPONENTBUILDER_TRANSLATION_FAILED_SINCE_THERE_ARE_NO_COMPONENTS_LINKED_WITH_TRANSLATION_TOOLS');
|
||||
// run translator via API
|
||||
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.translator');
|
||||
// is there a message returned
|
||||
if (!is_numeric($result) && StringHelper::check($result))
|
||||
{
|
||||
$this->setRedirect($redirect_url, $result);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
$this->setRedirect($redirect_url, $message, 'error');
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -177,13 +177,22 @@ class Component_admin_viewsController extends FormController
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
// get the referral options (old method use return instead see parent)
|
||||
// get int-defaults (to int new items with default values dynamically)
|
||||
$init_defaults = $this->input->get('init_defaults', null, 'STRING');
|
||||
|
||||
// get the referral options (old method use init_defaults or return instead see parent)
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// get redirect info.
|
||||
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
|
||||
|
||||
// set int-defaults
|
||||
if (!empty($init_defaults))
|
||||
{
|
||||
$append = '&init_defaults='. (string) $init_defaults . $append;
|
||||
}
|
||||
|
||||
// set the referral options
|
||||
if ($refid && $ref)
|
||||
{
|
||||
|
@@ -177,13 +177,22 @@ class Component_configController extends FormController
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
// get the referral options (old method use return instead see parent)
|
||||
// get int-defaults (to int new items with default values dynamically)
|
||||
$init_defaults = $this->input->get('init_defaults', null, 'STRING');
|
||||
|
||||
// get the referral options (old method use init_defaults or return instead see parent)
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// get redirect info.
|
||||
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
|
||||
|
||||
// set int-defaults
|
||||
if (!empty($init_defaults))
|
||||
{
|
||||
$append = '&init_defaults='. (string) $init_defaults . $append;
|
||||
}
|
||||
|
||||
// set the referral options
|
||||
if ($refid && $ref)
|
||||
{
|
||||
|
@@ -177,13 +177,22 @@ class Component_custom_admin_menusController extends FormController
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
// get the referral options (old method use return instead see parent)
|
||||
// get int-defaults (to int new items with default values dynamically)
|
||||
$init_defaults = $this->input->get('init_defaults', null, 'STRING');
|
||||
|
||||
// get the referral options (old method use init_defaults or return instead see parent)
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// get redirect info.
|
||||
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
|
||||
|
||||
// set int-defaults
|
||||
if (!empty($init_defaults))
|
||||
{
|
||||
$append = '&init_defaults='. (string) $init_defaults . $append;
|
||||
}
|
||||
|
||||
// set the referral options
|
||||
if ($refid && $ref)
|
||||
{
|
||||
|
@@ -177,13 +177,22 @@ class Component_custom_admin_viewsController extends FormController
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
// get the referral options (old method use return instead see parent)
|
||||
// get int-defaults (to int new items with default values dynamically)
|
||||
$init_defaults = $this->input->get('init_defaults', null, 'STRING');
|
||||
|
||||
// get the referral options (old method use init_defaults or return instead see parent)
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// get redirect info.
|
||||
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
|
||||
|
||||
// set int-defaults
|
||||
if (!empty($init_defaults))
|
||||
{
|
||||
$append = '&init_defaults='. (string) $init_defaults . $append;
|
||||
}
|
||||
|
||||
// set the referral options
|
||||
if ($refid && $ref)
|
||||
{
|
||||
|
@@ -177,13 +177,22 @@ class Component_dashboardController extends FormController
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
// get the referral options (old method use return instead see parent)
|
||||
// get int-defaults (to int new items with default values dynamically)
|
||||
$init_defaults = $this->input->get('init_defaults', null, 'STRING');
|
||||
|
||||
// get the referral options (old method use init_defaults or return instead see parent)
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// get redirect info.
|
||||
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
|
||||
|
||||
// set int-defaults
|
||||
if (!empty($init_defaults))
|
||||
{
|
||||
$append = '&init_defaults='. (string) $init_defaults . $append;
|
||||
}
|
||||
|
||||
// set the referral options
|
||||
if ($refid && $ref)
|
||||
{
|
||||
|
@@ -177,13 +177,22 @@ class Component_files_foldersController extends FormController
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
// get the referral options (old method use return instead see parent)
|
||||
// get int-defaults (to int new items with default values dynamically)
|
||||
$init_defaults = $this->input->get('init_defaults', null, 'STRING');
|
||||
|
||||
// get the referral options (old method use init_defaults or return instead see parent)
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// get redirect info.
|
||||
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
|
||||
|
||||
// set int-defaults
|
||||
if (!empty($init_defaults))
|
||||
{
|
||||
$append = '&init_defaults='. (string) $init_defaults . $append;
|
||||
}
|
||||
|
||||
// set the referral options
|
||||
if ($refid && $ref)
|
||||
{
|
||||
|
@@ -177,13 +177,22 @@ class Component_modulesController extends FormController
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
// get the referral options (old method use return instead see parent)
|
||||
// get int-defaults (to int new items with default values dynamically)
|
||||
$init_defaults = $this->input->get('init_defaults', null, 'STRING');
|
||||
|
||||
// get the referral options (old method use init_defaults or return instead see parent)
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// get redirect info.
|
||||
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
|
||||
|
||||
// set int-defaults
|
||||
if (!empty($init_defaults))
|
||||
{
|
||||
$append = '&init_defaults='. (string) $init_defaults . $append;
|
||||
}
|
||||
|
||||
// set the referral options
|
||||
if ($refid && $ref)
|
||||
{
|
||||
|
@@ -177,13 +177,22 @@ class Component_mysql_tweaksController extends FormController
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
// get the referral options (old method use return instead see parent)
|
||||
// get int-defaults (to int new items with default values dynamically)
|
||||
$init_defaults = $this->input->get('init_defaults', null, 'STRING');
|
||||
|
||||
// get the referral options (old method use init_defaults or return instead see parent)
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// get redirect info.
|
||||
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
|
||||
|
||||
// set int-defaults
|
||||
if (!empty($init_defaults))
|
||||
{
|
||||
$append = '&init_defaults='. (string) $init_defaults . $append;
|
||||
}
|
||||
|
||||
// set the referral options
|
||||
if ($refid && $ref)
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user