update services page

This commit is contained in:
2025-09-27 19:03:32 +07:00
parent 1cd8632d9f
commit fed702fce8
43 changed files with 1278 additions and 585 deletions

View File

@ -9,7 +9,6 @@ export default class Dropdown extends window.AObject {
if (window.dropdown == null) {
this.initGlobalVar();
}
this.scrollTrack = false;
}
initGlobalVar() {
var f = function (ev) {
@ -52,11 +51,7 @@ export default class Dropdown extends window.AObject {
if (this.isLock) {
return;
}
if (this.scrollTrack) {
e.stopImmediatePropagation();
e.preventDefault();
return;
}
console.log("Asdasd");
var t1 = e.currentTarget;
var p = t1.closest('[data-dropdown]');
var p1 = e.target.closest(".noopen");

View File

@ -50,18 +50,15 @@ export default class AMenu extends window.AObject {
}
initNav(ele, type = "D") {
let arr = ele.querySelectorAll(".nav-i.has-sub .nav-link, .nav-mainmenu > .nav-i:not(.has-sub) a");
let arr = ele.querySelectorAll(".nav-i.has-sub .nav-link, .navmain > .nav-i:not(.has-sub) a");
console.log(arr);
Array.from(arr).forEach(el => {
var f = function (evt) {
evt.preventDefault();
if (window.isValidPointerClick(evt)) return;
this.addEventClick.call(this, evt, type);
}.bind(this);
el.addEventListener(this.eventName, f);
var f1 = function (evt) {
evt.preventDefault();
}
el.addEventListener("click", f1);
el.addEventListener("click", f, true);
});
}
initDropDown() {
@ -126,12 +123,19 @@ export default class AMenu extends window.AObject {
addEventClick(e, t) {
window.app.initNavApp(e.currentTarget.getAttribute("href"), e.currentTarget.hasAttribute("isflexpage"));
if (t == "M") {
this.overlay.removeOverlay();
this.listIco.forEach(el => {
el.classList.remove("active");
})
}
window.requestTimeout((() => {
requestAnimationFrame((() => {
if (t == "M") {
this.overlay.removeOverlay();
this.listIco.forEach(el => {
el.classList.remove("active");
})
} else {
this.dropdown.closeDropdown();
}
}).bind(this));
}).bind(this), 100);
}
closeExpandMenu() {
Array.from(this.navM.querySelectorAll(".nav-i.has-sub")).forEach(el => {

View File

@ -0,0 +1,5 @@
export default class ASidebar extends window.AObject {
constructor(o) {
super();
}
}

View File

@ -212,6 +212,7 @@ window.AObject = class {
this.parentEventMap = new Map();
this.listAObject = new Set();
this.eventName = window.getPrimaryPointerEvent();
this.isScrolling = false;
}
_fCheckPast(label, callback) {
@ -620,7 +621,7 @@ class AApp extends window.AObject {
}).bind(this));
} else {
window.Scrollbar.use(window.OverscrollPlugin);
var sOption = {
damping: (window.getOS() == "Android") ? .08 : .04,
thumbMinSize: 25,
@ -658,7 +659,12 @@ class AApp extends window.AObject {
}
}).bind(this));
}
initNavApp(t, flex=false) {
initNavApp(t, flex = false) {
if (window.getOS() == "iOS") {
window.scrollTo({ top: 0, behavior: 'smooth' });
} else {
window.smScroll.scrollTo(0, 0, 500);
}
this.isRedirectPage = true;
this.callLoadPage(window.GetAbsoluteURL(t), flex);
}