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:
77
modules/system/assets/ui/js/flashmessage.js
Normal file
77
modules/system/assets/ui/js/flashmessage.js
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* The flash message.
|
||||
*
|
||||
* Documentation: ../docs/flashmessage.md
|
||||
*
|
||||
* Require:
|
||||
* - bootstrap/transition
|
||||
*/
|
||||
+function ($) { "use strict";
|
||||
|
||||
var FlashMessage = function (options, el) {
|
||||
var
|
||||
options = $.extend({}, FlashMessage.DEFAULTS, options),
|
||||
$element = $(el)
|
||||
|
||||
$('body > p.flash-message').remove()
|
||||
|
||||
if ($element.length == 0) {
|
||||
$element = $('<p />').addClass(options.class).html(options.text)
|
||||
}
|
||||
|
||||
$element.addClass('flash-message fade')
|
||||
$element.attr('data-control', null)
|
||||
$element.append('<button type="button" class="close" aria-hidden="true">×</button>')
|
||||
$element.on('click', 'button', remove)
|
||||
$element.on('click', remove)
|
||||
|
||||
$(document.body).append($element)
|
||||
|
||||
setTimeout(function() {
|
||||
$element.addClass('in')
|
||||
}, 100)
|
||||
|
||||
var timer = window.setTimeout(remove, options.interval * 1000)
|
||||
|
||||
function removeElement() {
|
||||
$element.remove()
|
||||
}
|
||||
|
||||
function remove() {
|
||||
window.clearInterval(timer)
|
||||
|
||||
$element.removeClass('in')
|
||||
$.support.transition && $element.hasClass('fade')
|
||||
? $element
|
||||
.one($.support.transition.end, removeElement)
|
||||
.emulateTransitionEnd(500)
|
||||
: removeElement()
|
||||
}
|
||||
}
|
||||
|
||||
FlashMessage.DEFAULTS = {
|
||||
class: 'success',
|
||||
text: 'Default text',
|
||||
interval: 5
|
||||
}
|
||||
|
||||
// FLASH MESSAGE PLUGIN DEFINITION
|
||||
// ============================
|
||||
|
||||
if ($.wn === undefined)
|
||||
$.wn = {}
|
||||
if ($.oc === undefined)
|
||||
$.oc = $.wn
|
||||
|
||||
$.wn.flashMsg = FlashMessage
|
||||
|
||||
// FLASH MESSAGE DATA-API
|
||||
// ===============
|
||||
|
||||
$(document).render(function(){
|
||||
$('[data-control=flash-message]').each(function(){
|
||||
$.wn.flashMsg($(this).data(), this)
|
||||
})
|
||||
})
|
||||
|
||||
}(window.jQuery);
|
||||
Reference in New Issue
Block a user