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:
102
modules/backend/assets/js/backend.js
Normal file
102
modules/backend/assets/js/backend.js
Normal file
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* Winter General Utilities
|
||||
*/
|
||||
|
||||
/*
|
||||
* Path helpers
|
||||
*/
|
||||
|
||||
if ($.wn === undefined)
|
||||
$.wn = {}
|
||||
if ($.oc === undefined)
|
||||
$.oc = $.wn
|
||||
|
||||
$.wn.backendUrl = function(url) {
|
||||
var backendBasePath = $('meta[name="backend-base-path"]').attr('content')
|
||||
|
||||
if (!backendBasePath)
|
||||
return url
|
||||
|
||||
if (url.substr(0, 1) == '/')
|
||||
url = url.substr(1)
|
||||
|
||||
return backendBasePath + '/' + url
|
||||
}
|
||||
|
||||
/*
|
||||
* String escape
|
||||
*/
|
||||
if ($.wn === undefined)
|
||||
$.wn = {}
|
||||
if ($.oc === undefined)
|
||||
$.oc = $.wn
|
||||
|
||||
$.wn.escapeHtmlString = function(string) {
|
||||
var htmlEscapes = {
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
"'": ''',
|
||||
'/': '/'
|
||||
},
|
||||
htmlEscaper = /[&<>"'\/]/g
|
||||
|
||||
return ('' + string).replace(htmlEscaper, function(match) {
|
||||
return htmlEscapes[match];
|
||||
})
|
||||
}
|
||||
|
||||
/*
|
||||
* Inverse Click Event (not used)
|
||||
*
|
||||
* Calls the handler function if the user has clicked outside the object
|
||||
* and not on any of the elements in the exception list.
|
||||
*/
|
||||
/*
|
||||
$.fn.extend({
|
||||
clickOutside: function(handler, exceptions) {
|
||||
var $this = this;
|
||||
|
||||
$('body').on('click', function(event) {
|
||||
if (exceptions && $.inArray(event.target, exceptions) > -1) {
|
||||
return;
|
||||
} else if ($.contains($this[0], event.target)) {
|
||||
return;
|
||||
} else {
|
||||
handler(event, $this);
|
||||
}
|
||||
});
|
||||
|
||||
return this;
|
||||
}
|
||||
})
|
||||
*/
|
||||
|
||||
/*
|
||||
* Browser Fixes
|
||||
* - If another fix using JS is necessary, move this logic to backend.fixes.js
|
||||
*/
|
||||
|
||||
/*
|
||||
* Internet Explorer v11
|
||||
* - IE11 will not honor height 100% when overflow is used on the Y axis.
|
||||
*/
|
||||
if (!!window.MSInputMethodContext && !!document.documentMode) {
|
||||
$(window).on('resize', function() {
|
||||
fixMediaManager()
|
||||
fixSidebar()
|
||||
})
|
||||
|
||||
function fixMediaManager() {
|
||||
var $el = $('div[data-control="media-manager"] .control-scrollpad')
|
||||
$el.height($el.parent().height())
|
||||
}
|
||||
|
||||
function fixSidebar() {
|
||||
$('#layout-sidenav').height(Math.max(
|
||||
$('#layout-body').innerHeight(),
|
||||
$(window).height() - $('#layout-mainmenu').height()
|
||||
))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user