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:
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Scripts for the Export controller behavior.
|
||||
*/
|
||||
+function ($) { "use strict";
|
||||
|
||||
var ExportBehavior = function() {
|
||||
|
||||
this.processExport = function () {
|
||||
var $form = $('#exportColumns').closest('form')
|
||||
|
||||
$form.request('onExport', {
|
||||
success: function(data) {
|
||||
$('#exportContainer').html(data.result)
|
||||
$(document).trigger('render')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$.wn.exportBehavior = new ExportBehavior;
|
||||
}(window.jQuery);
|
||||
@@ -0,0 +1,149 @@
|
||||
/*
|
||||
* Scripts for the Import controller behavior.
|
||||
*/
|
||||
+function ($) { "use strict";
|
||||
|
||||
var ImportBehavior = function() {
|
||||
|
||||
this.processImport = function () {
|
||||
var $form = $('#importFileColumns').closest('form')
|
||||
|
||||
$form.request('onImport', {
|
||||
success: function(data) {
|
||||
$('#importContainer').html(data.result)
|
||||
$(document).trigger('render')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.loadFileColumnSample = function(el) {
|
||||
var $el = $(el),
|
||||
$column = $el.closest('[data-column-id]'),
|
||||
columnId = $column.data('column-id')
|
||||
|
||||
$el.popup({
|
||||
handler: 'onImportLoadColumnSampleForm',
|
||||
extraData: {
|
||||
file_column_id: columnId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.bindColumnSorting = function() {
|
||||
/*
|
||||
* Unbind existing
|
||||
*/
|
||||
$('#importDbColumns > ul, .import-column-bindings > ul').each(function(){
|
||||
var $this = $(this)
|
||||
if ($this.data('oc.sortable')) {
|
||||
$this.sortable('destroyGroup')
|
||||
$this.sortable('destroy')
|
||||
}
|
||||
})
|
||||
|
||||
var sortableOptions = {
|
||||
group: 'import-fields',
|
||||
usePlaceholderClone: true,
|
||||
nested: false,
|
||||
onDrop: $.proxy(this.onDropColumn, this)
|
||||
}
|
||||
|
||||
$('#importDbColumns > ul, .import-column-bindings > ul').sortable(sortableOptions)
|
||||
}
|
||||
|
||||
this.onDropColumn = function ($dbItem, container, _super, event) {
|
||||
var
|
||||
$fileColumns = $('#importFileColumns'),
|
||||
$fileItem,
|
||||
isMatch = $.contains($fileColumns.get(0), $dbItem.get(0)),
|
||||
matchColumnId
|
||||
|
||||
/*
|
||||
* Has a previous match?
|
||||
*/
|
||||
matchColumnId = $dbItem.data('column-matched-id')
|
||||
if (matchColumnId !== null) {
|
||||
$fileItem = $('[data-column-id='+matchColumnId+']', $fileColumns)
|
||||
this.toggleMatchState($fileItem)
|
||||
}
|
||||
|
||||
/*
|
||||
* Is a new match?
|
||||
*/
|
||||
if (isMatch) {
|
||||
$fileItem = $dbItem.closest('[data-column-id]'),
|
||||
this.matchColumn($dbItem, $fileItem)
|
||||
}
|
||||
else {
|
||||
this.unmatchColumn($dbItem)
|
||||
}
|
||||
|
||||
if (_super) {
|
||||
_super($dbItem, container)
|
||||
}
|
||||
}
|
||||
|
||||
this.toggleMatchState = function ($container) {
|
||||
var hasItems = !!$('.import-column-bindings li', $container).length
|
||||
$container.toggleClass('is-matched', hasItems)
|
||||
}
|
||||
|
||||
this.ignoreFileColumn = function(el) {
|
||||
var $el = $(el),
|
||||
$column = $el.closest('[data-column-id]')
|
||||
|
||||
$column.addClass('is-ignored')
|
||||
$('#showIgnoredColumnsButton').removeClass('disabled')
|
||||
}
|
||||
|
||||
this.showIgnoredColumns = function() {
|
||||
$('#importFileColumns li.is-ignored').removeClass('is-ignored')
|
||||
$('#showIgnoredColumnsButton').addClass('disabled')
|
||||
}
|
||||
|
||||
this.autoMatchColumns = function() {
|
||||
var self = this,
|
||||
fileColumns = {},
|
||||
$this,
|
||||
name
|
||||
|
||||
$('#importFileColumns li').each(function() {
|
||||
$this = $(this)
|
||||
name = $.trim($('.column-label', $this).text())
|
||||
fileColumns[name] = $this
|
||||
})
|
||||
|
||||
$('#importDbColumns li').each(function() {
|
||||
$this = $(this)
|
||||
name = $.trim($('> span', $this).text())
|
||||
if (fileColumns[name]) {
|
||||
|
||||
$this.appendTo($('.import-column-bindings > ul', fileColumns[name]))
|
||||
self.matchColumn($this, fileColumns[name])
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.matchColumn = function($dbItem, $fileItem) {
|
||||
var matchColumnId = $fileItem.data('column-id'),
|
||||
dbColumnName = $dbItem.data('column-name'),
|
||||
$dbItemMatchInput = $('[data-column-match-input]', $dbItem)
|
||||
|
||||
this.toggleMatchState($fileItem)
|
||||
|
||||
$dbItem.data('column-matched-id', matchColumnId)
|
||||
$dbItemMatchInput.attr('name', 'column_match['+matchColumnId+'][]')
|
||||
$dbItemMatchInput.attr('value', dbColumnName)
|
||||
}
|
||||
|
||||
this.unmatchColumn = function($dbItem) {
|
||||
var $dbItemMatchInput = $('[data-column-match-input]', $dbItem)
|
||||
|
||||
$dbItem.removeData('column-matched-id')
|
||||
$dbItemMatchInput.attr('name', '');
|
||||
$dbItemMatchInput.attr('value', '');
|
||||
}
|
||||
}
|
||||
|
||||
$.wn.importBehavior = new ImportBehavior;
|
||||
}(window.jQuery);
|
||||
Reference in New Issue
Block a user