feat: VivesPOS landing on Winter CMS 1.2 — theme + plugin + Dockerfile
Some checks are pending
Module sub-split / Sub-split (push) Waiting to run
Some checks are pending
Module sub-split / Sub-split (push) Waiting to run
- Base: wintercms/winter branch 1.2 (full framework) - Theme vivespos: Canvas 7 + Bootstrap 5 CDN, custom CSS - Layout: deferred GTM/GA4 tracking, JSON-LD SoftwareApplication - Partials: hero (offline-first), features, modes (offline/nube toggle), screenshots, pricing (3 planes), comparison, FAQ, CTA - Plugin VivesPOS.Site with ContactForm - Dockerfile: PHP 8.2 Apache, port 80, healthcheck - Added winter/wn-pages, blog, sitemap, seo plugins - Active theme set to vivespos
This commit is contained in:
103
modules/system/assets/ui/js/inspector.engine.js
Normal file
103
modules/system/assets/ui/js/inspector.engine.js
Normal file
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Inspector engine helpers.
|
||||
*
|
||||
* The helpers are used mostly by the Inspector Surface.
|
||||
*
|
||||
*/
|
||||
+function ($) { "use strict";
|
||||
|
||||
// NAMESPACES
|
||||
// ============================
|
||||
|
||||
if ($.wn === undefined)
|
||||
$.wn = {}
|
||||
if ($.oc === undefined)
|
||||
$.oc = $.wn
|
||||
|
||||
if ($.wn.inspector === undefined)
|
||||
$.wn.inspector = {}
|
||||
|
||||
$.wn.inspector.engine = {}
|
||||
|
||||
// CLASS DEFINITION
|
||||
// ============================
|
||||
|
||||
function findGroup(group, properties) {
|
||||
for (var i = 0, len = properties.length; i < len; i++) {
|
||||
var property = properties[i]
|
||||
|
||||
if (property.itemType !== undefined && property.itemType == 'group' && property.title == group) {
|
||||
return property
|
||||
}
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
$.wn.inspector.engine.processPropertyGroups = function(properties) {
|
||||
var fields = [],
|
||||
result = {
|
||||
hasGroups: false,
|
||||
properties: []
|
||||
},
|
||||
groupIndex = 0
|
||||
|
||||
for (var i = 0, len = properties.length; i < len; i++) {
|
||||
var property = properties[i]
|
||||
|
||||
if (property['sortOrder'] === undefined) {
|
||||
property['sortOrder'] = (i+1)*20
|
||||
}
|
||||
}
|
||||
|
||||
properties.sort(function(a, b){
|
||||
return a['sortOrder'] - b['sortOrder']
|
||||
})
|
||||
|
||||
for (var i = 0, len = properties.length; i < len; i++) {
|
||||
var property = properties[i]
|
||||
|
||||
property.itemType = 'property'
|
||||
|
||||
if (property.group === undefined) {
|
||||
fields.push(property)
|
||||
}
|
||||
else {
|
||||
var group = findGroup(property.group, fields)
|
||||
|
||||
if (!group) {
|
||||
group = {
|
||||
itemType: 'group',
|
||||
title: property.group,
|
||||
properties: [],
|
||||
groupIndex: groupIndex
|
||||
}
|
||||
|
||||
groupIndex++
|
||||
fields.push(group)
|
||||
}
|
||||
|
||||
property.groupIndex = group.groupIndex
|
||||
group.properties.push(property)
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0, len = fields.length; i < len; i++) {
|
||||
var property = fields[i]
|
||||
|
||||
result.properties.push(property)
|
||||
|
||||
if (property.itemType == 'group') {
|
||||
result.hasGroups = true
|
||||
|
||||
for (var j = 0, propertiesLen = property.properties.length; j < propertiesLen; j++) {
|
||||
result.properties.push(property.properties[j])
|
||||
}
|
||||
|
||||
delete property.properties
|
||||
}
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
}(window.jQuery);
|
||||
Reference in New Issue
Block a user