Compare commits
1 Commits
main
...
desarrollo
| Author | SHA1 | Date | |
|---|---|---|---|
| 7f753376e3 |
@@ -55,7 +55,7 @@ const Config = (() => {
|
||||
// -------------------------------------------------------------------------
|
||||
// Theme switcher
|
||||
// -------------------------------------------------------------------------
|
||||
function setTheme(theme) {
|
||||
/*function setTheme(theme) {
|
||||
document.documentElement.setAttribute('data-theme', theme);
|
||||
try { localStorage.setItem('pos_theme', theme); } catch(e) {}
|
||||
|
||||
@@ -70,7 +70,22 @@ const Config = (() => {
|
||||
var opts = document.querySelectorAll('.theme-option');
|
||||
if (opts[idx]) opts[idx].classList.add('is-selected');
|
||||
}
|
||||
window.setTheme = setTheme;
|
||||
window.setTheme = setTheme;*/
|
||||
|
||||
function setTheme(theme) {
|
||||
if (window.posSetTheme) window.posSetTheme(theme);
|
||||
|
||||
document.querySelectorAll('.theme-btn').forEach(function(btn) {
|
||||
btn.classList.toggle('is-active', btn.dataset.themeTarget === theme);
|
||||
});
|
||||
|
||||
document.querySelectorAll('.theme-option').forEach(function(opt) {
|
||||
opt.classList.remove('is-selected');
|
||||
});
|
||||
var idx = theme === 'industrial' ? 0 : 1;
|
||||
var opts = document.querySelectorAll('.theme-option');
|
||||
if (opts[idx]) opts[idx].classList.add('is-selected');
|
||||
}
|
||||
|
||||
function selectThemeOption(theme) {
|
||||
setTheme(theme);
|
||||
|
||||
@@ -46,7 +46,7 @@ const Dashboard = (() => {
|
||||
// -------------------------------------------------------------------------
|
||||
// Theme switcher
|
||||
// -------------------------------------------------------------------------
|
||||
function setTheme(theme) {
|
||||
/*function setTheme(theme) {
|
||||
document.documentElement.setAttribute('data-theme', theme);
|
||||
try { localStorage.setItem('pos_theme', theme); } catch(e) {}
|
||||
const btnInd = document.getElementById('btn-industrial');
|
||||
@@ -54,7 +54,15 @@ const Dashboard = (() => {
|
||||
if (btnInd) btnInd.classList.toggle('active', theme === 'industrial');
|
||||
if (btnMod) btnMod.classList.toggle('active', theme === 'modern');
|
||||
}
|
||||
window.setTheme = setTheme;
|
||||
window.setTheme = setTheme;*/
|
||||
|
||||
function setTheme(theme) {
|
||||
if (window.posSetTheme) window.posSetTheme(theme);
|
||||
const btnInd = document.getElementById('btn-industrial');
|
||||
const btnMod = document.getElementById('btn-modern');
|
||||
if (btnInd) btnInd.classList.toggle('active', theme === 'industrial');
|
||||
if (btnMod) btnMod.classList.toggle('active', theme === 'modern');
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Sidebar toggle (mobile)
|
||||
|
||||
@@ -59,7 +59,7 @@ const Reports = (() => {
|
||||
// -------------------------------------------------------------------------
|
||||
// Theme switcher
|
||||
// -------------------------------------------------------------------------
|
||||
function setTheme(theme) {
|
||||
/* function setTheme(theme) {
|
||||
document.documentElement.setAttribute('data-theme', theme);
|
||||
try { localStorage.setItem('pos_theme', theme); } catch(e) {}
|
||||
var btnInd = document.getElementById('btn-industrial');
|
||||
@@ -67,7 +67,15 @@ const Reports = (() => {
|
||||
if (btnInd) btnInd.classList.toggle('is-active', theme === 'industrial');
|
||||
if (btnMod) btnMod.classList.toggle('is-active', theme === 'modern');
|
||||
}
|
||||
window.setTheme = setTheme;
|
||||
window.setTheme = setTheme;*/
|
||||
|
||||
function setTheme(theme) {
|
||||
if (window.posSetTheme) window.posSetTheme(theme);
|
||||
var btnInd = document.getElementById('btn-industrial');
|
||||
var btnMod = document.getElementById('btn-modern');
|
||||
if (btnInd) btnInd.classList.toggle('is-active', theme === 'industrial');
|
||||
if (btnMod) btnMod.classList.toggle('is-active', theme === 'modern');
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Tab switcher with lazy loading
|
||||
|
||||
Reference in New Issue
Block a user