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:
81
modules/backend/assets/js/winter.simplelist.js
Normal file
81
modules/backend/assets/js/winter.simplelist.js
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* SimpleList control.
|
||||
*
|
||||
* Data attributes:
|
||||
* - data-control="simplelist" - enables the simplelist plugin
|
||||
*
|
||||
* JavaScript API:
|
||||
* $('#simplelist').simplelist()
|
||||
*
|
||||
* Dependences:
|
||||
* - Sortable (jquery-sortable.js)
|
||||
*/
|
||||
+function ($) { "use strict";
|
||||
|
||||
var SimpleList = function (element, options) {
|
||||
|
||||
var $el = this.$el = $(element)
|
||||
|
||||
this.options = options || {}
|
||||
|
||||
if ($el.hasClass('is-sortable')) {
|
||||
|
||||
/*
|
||||
* Make each list inside sortable
|
||||
*/
|
||||
var sortableOptions = {
|
||||
distance: 10
|
||||
}
|
||||
if (this.options.sortableHandle)
|
||||
sortableOptions[handle] = this.options.sortableHandle
|
||||
|
||||
$el.find('> ul, > ol').sortable(sortableOptions)
|
||||
}
|
||||
|
||||
if ($el.hasClass('is-scrollable')) {
|
||||
|
||||
/*
|
||||
* Inject a scrollbar container
|
||||
*/
|
||||
$el.wrapInner($('<div />').addClass('control-scrollbar'))
|
||||
var $scrollbar = $el.find('>.control-scrollbar:first')
|
||||
$scrollbar.scrollbar()
|
||||
}
|
||||
}
|
||||
|
||||
SimpleList.DEFAULTS = {
|
||||
sortableHandle: null
|
||||
}
|
||||
|
||||
// SIMPLE LIST PLUGIN DEFINITION
|
||||
// ============================
|
||||
|
||||
var old = $.fn.simplelist
|
||||
|
||||
$.fn.simplelist = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
var data = $this.data('oc.simplelist')
|
||||
var options = $.extend({}, SimpleList.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
||||
if (!data) $this.data('oc.simplelist', (data = new SimpleList(this, options)))
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.simplelist.Constructor = SimpleList
|
||||
|
||||
// SIMPLE LIST NO CONFLICT
|
||||
// =================
|
||||
|
||||
$.fn.simplelist.noConflict = function () {
|
||||
$.fn.simplelist = old
|
||||
return this
|
||||
}
|
||||
|
||||
// SIMPLE LIST DATA-API
|
||||
// ===============
|
||||
|
||||
$(document).render(function(){
|
||||
$('[data-control="simplelist"]').simplelist()
|
||||
})
|
||||
|
||||
}(window.jQuery);
|
||||
Reference in New Issue
Block a user