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:
86
modules/system/assets/ui/js/checkbox.js
Normal file
86
modules/system/assets/ui/js/checkbox.js
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* Checkbox control
|
||||
*
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
|
||||
$(document).on('keypress', 'div.custom-checkbox', function(e) {
|
||||
if (e.key === '(Space character)' || e.key === 'Spacebar' || e.key === ' ') {
|
||||
var $cb = $('input[type=checkbox]', this)
|
||||
|
||||
if ($cb.data('wn-space-timestamp') == e.timeStamp)
|
||||
return
|
||||
|
||||
$cb.get(0).checked = !$cb.get(0).checked
|
||||
$cb.data('wn-space-timestamp', e.timeStamp)
|
||||
$cb.trigger('change')
|
||||
return false
|
||||
}
|
||||
})
|
||||
|
||||
//
|
||||
// Intermediate checkboxes
|
||||
//
|
||||
|
||||
$(document).render(function() {
|
||||
$('div.custom-checkbox.is-indeterminate > input').each(function() {
|
||||
var $el = $(this),
|
||||
checked = $el.data('checked')
|
||||
|
||||
switch (checked) {
|
||||
|
||||
// Unchecked
|
||||
case 1:
|
||||
$el.prop('indeterminate', true)
|
||||
break
|
||||
|
||||
// Checked
|
||||
case 2:
|
||||
$el.prop('indeterminate', false)
|
||||
$el.prop('checked', true)
|
||||
break
|
||||
|
||||
// Unchecked
|
||||
default:
|
||||
$el.prop('indeterminate', false)
|
||||
$el.prop('checked', false)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
$(document).on('click', 'div.custom-checkbox.is-indeterminate > label', function() {
|
||||
var $el = $(this).parent().find('input:first'),
|
||||
checked = $el.data('checked')
|
||||
|
||||
if (checked === undefined) {
|
||||
checked = $el.is(':checked') ? 1 : 0
|
||||
}
|
||||
|
||||
switch (checked) {
|
||||
|
||||
// Unchecked, going indeterminate
|
||||
case 0:
|
||||
$el.data('checked', 1)
|
||||
$el.prop('indeterminate', true)
|
||||
break
|
||||
|
||||
// Indeterminate, going checked
|
||||
case 1:
|
||||
$el.data('checked', 2)
|
||||
$el.prop('indeterminate', false)
|
||||
$el.prop('checked', true)
|
||||
break
|
||||
|
||||
// Checked, going unchecked
|
||||
default:
|
||||
$el.data('checked', 0)
|
||||
$el.prop('indeterminate', false)
|
||||
$el.prop('checked', false)
|
||||
}
|
||||
|
||||
$el.trigger('change')
|
||||
return false
|
||||
})
|
||||
|
||||
})(jQuery);
|
||||
Reference in New Issue
Block a user