Hệ thống pháp luật

BỘ XÂY DỰNG
-------

CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM
Độc lập - Tự do - Hạnh phúc
---------------

Số: 384/QĐ-BXD

Hà Nội, ngày 11 tháng 4 năm 2023

 

QUYẾT ĐỊNH

ĐIỀU CHỈNH KẾ HOẠCH TỔ CHỨC LẬP QUY HOẠCH HỆ THỐNG ĐÔ THỊ VÀ NÔNG THÔN THỜI KỲ 2021-2030, TẦM NHÌN ĐẾN NĂM 2050

Căn cứ Luật Quy hoạch số 21/2017/QH14 ngày 24/11/2017;

Căn cứ Nghị định số 52/2022/NĐ-CP ngày 08/8/2022 của Chính phủ quy định chức năng, nhiệm vụ, quyền hạn và cơ cấu tổ chức của Bộ Xây dựng;

Căn cứ Nghị định số 37/2019/NĐ-CP ngày 07/5/2019 của Chính phủ quy định chi tiết thi hành một số điều của Luật Quy hoạch;

Căn cứ Quyết định số 995/QĐ-TTg ngày 09/8/2018 của Thủ tướng Chính phủ về việc giao nhiệm vụ cho các bộ tổ chức lập quy hoạch ngành Quốc gia thời kỳ 2021-2030, tầm nhìn đến năm 2050;

Căn cứ Quyết định số 754/QĐ-BXD ngày 10/09/2019 của Bộ trưởng Bộ Xây dựng ban hành Kế hoạch lập Quy hoạch hệ thống đô thị và nông thôn thời kỳ 2021-2030, tầm nhìn đến năm 2050;

Căn cứ Quyết định số 294/QĐ-TTg ngày 24/02/2020 của Thủ tướng Chính phủ về việc phê duyệt Nhiệm vụ lập Quy hoạch hệ thống đô thị và nông thôn thời kỳ 2021-2030, tầm nhìn đến năm 2050;

Căn cứ văn bản số 8920/VPCP-CN ngày 30/12/2022 của Văn phòng Chính phủ về việc điều chỉnh thời gian lập Quy hoạch hệ thống đô thị và nông thôn thời kỳ 2021-2030, tầm nhìn đến năm 2050;

Theo đề nghị của Cục trưởng Cục Phát triển đô thị.

QUYẾT ĐỊNH:

Điều 1. Điều chỉnh Mục III nội dung chi tiết của Kế hoạch lập Quy hoạch hệ thống đô thị và nông thôn thời kỳ 2021-2030, tầm nhìn đến năm 2050 (ban hành kèm theo Quyết định số 754/QĐ-BXD ngày 10/9/2019 của Bộ trưởng Bộ Xây dựng).

Các nội dung điều chỉnh chi tiết tại phụ lục kèm theo Quyết định này.

Điều 2. Quyết định này có hiệu lực thi hành kể từ ngày ký.

Các nội dung khác tại Quyết định số 754/QĐ-BXD ngày 10/9/2019 của Bộ trưởng Bộ Xây dựng không thay đổi.

Chánh Văn phòng Bộ, Cục trưởng Cục Phát triển đô thị; Vụ trưởng Vụ Quy hoạch - Kiến trúc; Vụ trưởng Vụ Kế hoạch - Tài chính và Thủ trưởng các cơ quan, đơn vị liên quan của Bộ Xây dựng chịu trách nhiệm thi hành Quyết định này./.

 


Nơi nhận:
- Như Điều 2;
- Thủ tướng Chính phủ (để b/c);
- Phó Thủ tướng Lê Văn Thành (để b/c);
- Phó Thủ tướng Trần Hồng Hà (để b/c);
- Các Bộ: Kế hoạch và Đầu tư; Tài chính; Tài nguyên
và Môi trường; Công thương; Nông nghiệp và
phát triển nông thôn; Văn hóa thể thao và du lịch;
Quốc phòng; Công an;
- Văn phòng Chính phủ;
- Chủ tịch UBND các tỉnh, thành phố trực thuộc TW;
- Các đơn vị thuộc Bộ Xây dựng;
- Cổng TTĐT Bộ Xây dựng;
- Lưu: VP, PTĐT.

BỘ TRƯỞNG




Nguyễn Thanh Nghị

 

PHỤ LỤC.

ĐIỀU CHỈNH MỤC III. NỘI DUNG CHI TIẾT KẾ HOẠCH TỔ CHỨC LẬP QUY HOẠCH HỆ THỐNG ĐÔ THỊ VÀ NÔNG THÔN THỜI KỲ 2021-2030, TẦM NHÌN ĐẾN NĂM 2050
(Ban hành kèm theo Quyết định số 384/QĐ-BXD ngày 11/4/2023 của Bộ trưởng Bộ Xây dựng)

STT

Nội dung công việc

Các đơn vị chịu trách nhiệm quản lý/thực hiện

Thời gian hoàn thành

Ghi chú

Đơn vị thực hiện

Đơn vị chỉ đạo/quản lý

Đơn vị phối hợp

1

Lập, thẩm định, phê duyệt Nhiệm vụ

Cục Phát triển đô thị

- Bộ Xây dựng;

- Vụ Quy hoạch Kiến trúc.

- Các Vụ: Kế hoạch Tài chính; Pháp chế; Cục Hạ tầng kỹ thuật;

- Các Cục, Vụ, Văn phòng Bộ liên quan.

Tháng 02/2020

Đã hoàn thành (Thủ tướng Chính phủ đã ban hành Quyết định số 294/QĐ-TTg ngày 24/2/2020)

2

Lựa chọn đơn vị tư vấn lập quy hoạch và Báo cáo đánh giá môi trường chiến lược

Ban Quản lý dự án Phát triển đô thị

- Bộ Xây dựng

- Cục Phát triển đô thị;

- Vụ Kế hoạch Tài chính

- Các Vụ: Pháp chế; Quy hoạch Kiến trúc và các Cục, Vụ liên quan.

Tháng 8/2022

Đã hoàn thành (Đơn vị tư vấn được lựa chọn là Viện Quy hoạch đô thị và nông thôn quốc gia - VIUP)

3

Lập, thẩm định, phê duyệt Quy hoạch

3.1

Lập quy hoạch

Viện Quy hoạch đô thị và nông thôn quốc gia

- Ban Chỉ đạo, Tổ công tác- Cục Phát triển đô thị.

- Các Vụ: Quy hoạch Kiến trúc; Kế hoạch Tài chính; Pháp chế;

- Các đơn vị thuộc Bộ Xây dựng (Tổ công tác).

Tháng 8/2022 - Tháng 8/2023

Đảm bảo yêu cầu của hợp đồng; tuân thủ quy định của pháp luật về quy hoạch và pháp luật liên quan

3.1.1

Xây dựng hoàn thiện dự thảo nội dung nghiên cứu lập quy hoạch và Báo cáo đánh giá môi trường chiến lược lần 1

Viện Quy hoạch đô thị và nông thôn quốc gia

- Ban Quản lý dự án Phát triển đô thị;

- Cục Phát triển đô thị;

- Các Vụ: Quy hoạch Kiến trúc; Kế hoạch tài chính; Pháp chế;

- Các đơn vị thuộc Bộ Xây dựng (Tổ công tác).

Tháng 12/2022

 

3.1.2

Xây dựng hoàn thiện dự thảo nội dung nghiên cứu lập quy hoạch và Báo cáo đánh giá môi trường chiến lược

Viện Quy hoạch đô thị và nông thôn quốc gia

- Ban Quản lý dự án Phát triển đô thị;

- Cục Phát triển đô thị;

- Các Vụ: Quy hoạch Kiến trúc, Kế hoạch Tài chính. Pháp chế;

- Các đơn vị thuộc Bộ Xây dựng (Tổ công tác).

Tháng 4/2023

 

3.1.3

Xây dựng hoàn thiện hồ sơ Quy hoạch theo quy định để trình Thẩm định

Viện Quy hoạch đô thị và nông thôn quốc gia

- Ban Quản lý dự án Phát triển đô thị;

- Cục Phát triển đô thị;

- Các Vụ: Quy hoạch Kiến trúc, Kế hoạch Tài chính, Pháp chế;

- Các đơn vị thuộc Bộ Xây dựng (Tổ công tác).

Tháng 5-6/2023

 

3.1.4

Hoàn thiện Hồ sơ trình thẩm định

Viện Quy hoạch đô thị và nông thôn quốc gia

- Ban Quản lý dự án Phát triển đô thị;

- Cục Phát triển đô thị.

- Các Vụ: Quy hoạch Kiến trúc, Pháp chế;

- Các đơn vị thuộc Bộ Xây dựng (Tổ công tác).

Tháng 6/2023

 

3.2

Tổ chức thẩm định Quy hoạch và Báo cáo đánh giá môi trường chiến lược

3.2.1

Thành lập Hội đồng thẩm định

Cơ quan có thẩm quyền theo Điều 30 Luật Quy hoạch

Cơ quan tổ chức lập quy hoạch (Bộ Xây dựng)

- Cục Phát triển đô thị;

- Vụ Pháp chế;

- Vụ Kế hoạch Tài chính.

Tháng 12/2022 - Tháng 04/2023

- Vụ Quy hoạch Kiến trúc đã tham mưu Bộ Xây dựng trình Thủ tướng Chính phủ thành lập Hội đồng thẩm định và phân công cơ quan thường trực Hội đồng thẩm định Quy hoạch- Thủ tướng Chính phủ ban hành quyết định thành lập Hội đồng thẩm định.

3.2.2

Tổ chức lựa chọn tư vấn phản biện độc lập cho Hội đồng thẩm định (nếu có)

Vụ Quy hoạch Kiến trúc

Hội đồng thẩm định

Ban Quản lý dự án Phát triển đô thị - Cục Phát triển đô thị

Tháng 5-7/2023

- Trong trường hợp cần thiết, Hội đồng thẩm định quy hoạch có thể lựa chọn tư vấn phản biện độc lập;

- Vụ Quy hoạch Kiến trúc tham mưu Bộ Xây dựng báo cáo Hội đồng thẩm định về việc có cần lựa chọn tư vấn phản biện độc lập làm cơ sở lựa chọn theo quy định pháp luật.

3.2.3

Chuẩn bị hồ sơ thẩm định

Viện Quy hoạch đô thị và nông thôn quốc gia

Cục Phát triển đô thị

Vụ Quy hoạch Kiến trúc

Tháng 5-6/2023

 

3.2.4

Chuẩn bị họp Thẩm định

Vụ Quy hoạch Kiến trúc

Hội đồng thẩm định

- Tổ công tác.

Tháng 5-7/2023

 

3.2.5

Tổ chức họp Hội đồng thẩm định

Vụ Quy hoạch Kiến trúc

Hội đồng thẩm định

- Cục Phát triển đô thị;

- Tổ công tác.

Tháng 7-8/2023

- Dự thảo Báo cáo kết quả thẩm định

3.3

Trình phê duyệt Quy hoạch và Báo cáo đánh giá môi trường chiến lược

3.3.1

Tiếp thu giải trình và hoàn thiện Hồ sơ trình phê duyệt

Viện Quy hoạch đô thị và nông thôn quốc gia

Vụ Quy hoạch Kiến trúc

- Cục Phát triển đô thị;

- Các Vụ: Pháp chế; Kế hoạch Tài chính.

Tháng 8/2023

 

3.3.2

Trình phê duyệt Quy hoạch

Vụ Quy hoạch Kiến trúc

Bộ Xây dựng

- Cục Phát triển đô thị;

- Viện Quy hoạch đô thị và nông thôn quốc gia.

Trước ngày 31/8/2023

 

3.3.3

Phê duyệt Quy hoạch

Thủ tướng Chính phủ

 

 

4

Công bố quy hoạch

 

4.1

Xây dựng kế hoạch công bố quy hoạch

Cục Phát triển đô thị

Bộ Xây dựng

- Các Vụ: Quy hoạch Kiến trúc; Kế hoạch Tài chính.

Ngay sau khi có quyết định phê duyệt

 

4.2

Tổ chức Hội nghị công bố

Cục Phát triển đô thị

Bộ Xây dựng

- Các Vụ: Kế hoạch Tài chính: Quy hoạch Kiến trúc:

- Viện Quy hoạch đô thị và nông thôn quốc gia.

15 ngày sau khi có quyết định phê duyệt

 

4.3

Bàn giao hồ sơ đến các cơ quan lưu trữ theo quy định

Cục Phát triển đô thị

Bộ Xây dựng

- Các Vụ: Kế hoạch Tài chính; Quy hoạch Kiến trúc;

- Viện Quy hoạch đô thị và nông thôn quốc gia.

 

 

Ghi chú:

- Thời gian thực hiện các công việc sẽ được điều chỉnh bổ sung căn cứ vào thực tế triển khai công tác lập, thẩm định, phê duyệt của các quy hoạch cấp quốc gia, quy hoạch vùng, quy hoạch tỉnh có liên quan để đảm bảo sự phù hợp, thống nhất về nội dung giữa quy hoạch các cấp./.

 



/g, '').replace(/\s*(<\/?[^>]+>)\s*/g, '$1').trim(); } function checkAndWrap(element) { // Đệ quy kiểm tra các phần tử .main-elem con bên trong trước element.children('cttd, dctd, dctk').each(function() { checkAndWrap($(this)); }); // Lấy HTML hiện tại của phần tử .main-elem và làm sạch nó var currentHTML = cleanHTML(element.html()); // Log trạng thái HTML bên trong trước khi kiểm tra //console.log('Before inner HTML:', currentHTML); // Kiểm tra xem HTML có bao quanh bởi thẻ span không if (!(currentHTML.startsWith(''))) { // Nếu không, bao quanh toàn bộ nội dung bằng thẻ span element.html('' + currentHTML + ''); currentHTML = cleanHTML(element.html()); //console.log('After inner HTML:', currentHTML); } else { //console.log('Giữ nguyên inner HTML:..........................'); } } $('cttd.chuthichtudong a.chuthichtudong').each(function() { $(this).removeClass('chuthichtudong'); }); // Bắt đầu kiểm tra từ các phần tử .main-elem ngoài cùng $('cttd.chuthichtudong, a.chuthichtudong, dctd, dctk').each(function() { $(this).attr('id', 'rnd_' + random_string_id(20)); checkAndWrap($(this)); }); }); $(document).ready(function() { $('cttd.chuthichtudong span, a.chuthichtudong span, dctk span, dctd span').click(function(e) { e.preventDefault(); e.stopPropagation(); }); $('cttd.chuthichtudong > span, a.chuthichtudong > span, dctk > span, dctd > span').click(function(e) { e.preventDefault(); e.stopPropagation(); if ($(document).width()<=768) { return; } var $this = $(this); //alert($this.position().top); var clickedElement = $(this); var level = 0; var selectors = ['cttd.chuthichtudong > span', 'dctk > span', 'dctd > span']; // Kiểm tra xem có ít nhất một cấp con thỏa mãn điều kiện không var hasChild = selectors.some(function(selector) { return clickedElement.closest(selector).find('span').length > 0; }); if (!hasChild) { //alert('chỉ có 1 cấp'); var totalSubLevels = 1; } else { function findMatchingParent(element) { var parent = element.parent(); if (parent.length === 0) return null; for (var i = 0; i < selectors.length; i++) { if (parent.is(selectors[i])) { return parent; } } return findMatchingParent(parent); } var parentElement = findMatchingParent(clickedElement); while (parentElement !== null) { level++; parentElement = findMatchingParent(parentElement); } var closestElement = clickedElement.closest(selectors.join(', ')); var nodeName = closestElement.prop('nodeName').toLowerCase(); var className = closestElement.attr('class'); var textContent = closestElement.text().trim(); var address = selectors.find(function(selector) { return closestElement.is(selector); }); // Đếm tổng số cấp dưới bao gồm cả cấp được click var totalSubLevels = closestElement.find('span').length + 1; // +1 để bao gồm cả cấp được click var parent_id = closestElement.parent().attr('id'); //alert('Clicked element level: ' + level + '\nAddress: ' + address + '\nText: ' + textContent + '\nparent_id: ' + parent_id); var variableName = 'parent_id_' + level; // Gán giá trị của parent_id cho biến động này window[variableName] = parent_id; } if (totalSubLevels>1) { // Tạo đối tượng để lưu trữ các biến động var dynamicVars = {}; // Tạo tên biến động dựa trên giá trị của level var variableName = 'parent_id_' + level; // Gán giá trị của parent_id cho biến động này dynamicVars[variableName] = parent_id; // Giờ gắn ngược lại biến buble_id = parent_id_{level} var buble_id = dynamicVars[variableName]; } else { buble_id = 'dc_' + $(this).parent().attr('id'); } //alert('bat dau xu ly ' + buble_id); // Nếu không có .pointer ngay sau .main-elem thì chèn thêm if ($this.next('.pointy').length === 0) { $this.after('

'); } var $pointer = $this.next('.pointer'); var $canvas = $this.next('canvas'); var $pointy = $canvas.next('div.pointy'); if ($pointy.is(':visible')) { //alert('now hide everything'); } //$pointer.css({'border':'solid 5px red'}); //$pointer.hide(); //$pointer.prev('canvas.pointy').hide(); if ($pointer.is(':visible')) { } else { if ($('#ajax_tra_cuu').is(':visible')) { $('#ajax_tra_cuu').hide(); } $("#right_info_col").css('height', '1px'); //$('#rightdocinfo').hide(); $('#rightdocinfo').hide('slow'); $('#r-toc').hide('slow'); if ($('button#toggleSidebar').length) { if (parseInt($('#customSidebar').css('right'),10) == 0) { $('#customSidebar').animate({ right: '-280px' }, 500); $('#toggleSidebar').html(''); } else { } } //alert('pointy length: ' + $pointy.length); //alert('pointy visible: ' + $pointy.is(':visible')); //$canvas.show(); if ($pointy.is(':visible')) { var $pointer = $canvas.next('.pointer'); //alert('pointer text: ' + $pointer.text()); //alert('pointer visible: ' + $pointer.is(':visible')); if ($pointer.is(':visible')) { //alert($pointer.prev('canvas.pointy').length); $pointer.hide(); $canvas.hide(); } else { } } else { if ($canvas.length==1) { var $canvas = $this.next('canvas'); var $pointer = $canvas.next('.pointer'); //$pointy.show(); if ($pointer.length>0) { $pointer.show(); $canvas.show(); } //$canvas.show(); $('.pointer').removeClass('pointy-active'); $('.pointer').css({'z-index':1}); $('canvas.pointy').removeClass('pointy-active'); $('canvas.pointy').css({'z-index':1}); $pointer.css({'z-index':9999}); $canvas.css({'z-index':9999}); if (level==0) { if (totalSubLevels==1) { scrollTop_offset = $pointer.offset().top - $(window).height() / 4; } else { scrollTop_offset = $pointer.offset().top - $('#nav-tab-vb').height()-10; } $('html,body').animate({ scrollTop: scrollTop_offset }, 'slow'); } } else { $pointer.show(); //$canvas.show(); if ($pointy.length==0) { var elementOffset = $(this).position().top; var windowHeight = $(window).height()-20 - $('#nav-tab-vb').height(); var pointerHeight = Math.max(250, Math.min(windowHeight * 0.8, 450)); var newTop = elementOffset - (pointerHeight / 2); // Đảm bảo pointer không ra khỏi màn hình var maxTop = $(document).height() - pointerHeight; newTop = Math.max(0, Math.min(newTop, maxTop)); if (totalSubLevels=1) { if (level>0) { newTop = newTop+pointerHeight+30; } } // Positioning the pointer var position = $this.position(); $pointer.css({ left: $('#doc-left-col').width() + 50 + "px", width: $('#doc-right-col').width()-30, height: pointerHeight, 'z-index': 9999, top: newTop + "px" }); // Initialize pointy $this.pointy({ pointer: $pointer, defaultClass: 'zindex', activeClass: 'pointy-active', arrowWidth: 20 }); var initialTop = $pointer.position().top; $pointer.draggable({ containment: 'document', drag: function() { if (screen.width<1280) { var cap_nhat_pointy_top = setInterval(function(){ if ($this.position().top-$this.parent().height()+10!=$pointer.prev('canvas.pointy').position().top) { $pointer.prev('canvas.pointy').css({'top': $this.position().top-$this.parent().height()+10+'px'}); clearInterval(cap_nhat_pointy_top); } else { clearInterval(cap_nhat_pointy_top); } },50); } $this.trigger('pointy-update'); } }); // Thêm sự kiện click cho .close_pointy $pointer.on('click', '.close_pointy', function(e) { $pointer.hide(); $pointer.prev('canvas.pointy').hide(); }); // Handle touch events for mobile devices var isDragging = false, startX, startY, offsetX, offsetY; var startDragging = function(e) { if (checkIfScrollingContent(e)) return; if ($(e.target).is('.close_pointy')) { // Nếu đúng thì không chạy các hàm drag return; } isDragging = true; var touch = e.originalEvent.touches[0]; var pos = $pointer.position(); startX = touch.pageX; startY = touch.pageY; offsetX = startX - pos.left; offsetY = startY - pos.top-$pointer.height()-$pointer.height()/1.365; var cap_nhat_pointy_top = setInterval(function(){ if ($this.position().top-$this.parent().height()+10!=$pointer.prev('canvas.pointy').position().top) { $pointer.prev('canvas.pointy').css({'top': $this.position().top-$this.parent().height()+10+'px'}); clearInterval(cap_nhat_pointy_top); } else { clearInterval(cap_nhat_pointy_top); } },50); e.preventDefault(); }; var duringDragging = function(e) { if (checkIfScrollingContent(e)) return; if (isDragging) { var touch = e.originalEvent.touches[0]; var moveX = touch.pageX; var moveY = touch.pageY; if (screen.width<1280) { var newLeft = moveX - offsetX; var newTop = moveY - offsetY-$pointer.height()-$pointer.height()/1.365; // Giới hạn không cho kéo vượt quá chiều ngang của màn hình if (newLeft < 0) { newLeft = 0; } else if (newLeft + $pointer.outerWidth() > $(window).width()) { newLeft = $(window).width() - $pointer.outerWidth(); } // Giới hạn không cho kéo lên trên vượt quá position.top ban đầu if (newTop < initialTop) { newTop = initialTop; } $pointer.css({ left: newLeft, top: newTop }); } else { var newLeft = moveX - offsetX; var newTop = moveY - offsetY-$pointer.height()-$pointer.height()/1.365; // Giới hạn không cho kéo vượt quá chiều ngang của màn hình if (newLeft < 0) { newLeft = 0; } else if (newLeft + $pointer.outerWidth() > $(window).width()) { newLeft = $(window).width() - $pointer.outerWidth(); } $pointer.css({ left: newLeft, top: newTop }); } $pointer.prev('canvas.pointy').hide(); e.preventDefault(); } }; var stopDragging = function(e) { $pointer.prev('canvas.pointy').show(); if (checkIfScrollingContent(e)) return; if (screen.width<1280) { var cap_nhat_pointy_top = setInterval(function(){ if ($this.position().top-$this.parent().height()+10!=$pointer.prev('canvas.pointy').position().top) { $pointer.prev('canvas.pointy').css({'top': $this.position().top-$this.parent().height()+10+'px'}); clearInterval(cap_nhat_pointy_top); } else { clearInterval(cap_nhat_pointy_top); } },50); } $this.trigger('pointy-update'); }; function checkIfScrollingContent(e) { // Kiểm tra đối tượng mà người dùng đang chạm có phải là nội dung bên trong $pointer // Ví dụ, nếu nó là một phần tử
hoặc

bên trong $pointer if ($(e.target).closest('.list_tds').length > 0) { // Người dùng đang chạm vào nội dung bên trong .scroll_2 // Cho phép hành vi cuộn và ngăn chặn di chuyển $pointer e.stopPropagation(); return true; } // Người dùng không chạm vào nội dung bên trong $pointer // Cho phép di chuyển $pointer return false; } $pointer.on('touchstart', startDragging); $pointer.on('touchmove', duringDragging); $pointer.on('touchend', stopDragging); // Hàm để cập nhật vị trí của pointer var updatePointerPosition = function() { var offset = $this.position(); //alert($this.position().top); var windowHeight = $(window).height() - $('#nav-tab-vb').height()-20; var pointerHeight = Math.max(250, Math.min(windowHeight * 0.8, 450)); var elementOffset = $this.position().top; var newTop = elementOffset - (pointerHeight / 2); // Đảm bảo pointer không ra khỏi màn hình var maxTop = $(document).height() - pointerHeight; newTop = Math.max(0, Math.min(newTop, maxTop)); $pointer.css({ left: $('#doc-left-col').width() + 50 + "px", width: $('#doc-right-col').width() - 30, height: pointerHeight, top: newTop + "px" }); //alert($pointer.position().top); }; /* */ // Cập nhật vị trí pointer khi thay đổi kích thước hoặc xoay màn hình $(window).on('resize orientationchange', function() { updatePointerPosition(); //$canvas.css('top', $this.position().top+'px'); var cap_nhat_pointy_top = setInterval(function(){ if ($this.position().top-$this.parent().height()+10!=$pointer.prev('canvas.pointy').position().top) { $pointer.prev('canvas.pointy').css({'top': $this.position().top-$this.parent().height()+10+'px'}); $this.trigger('pointy-update'); clearInterval(cap_nhat_pointy_top); } else { clearInterval(cap_nhat_pointy_top); } },50); }); } } } if ($pointer.is(':visible')) { if (level==0) { if (totalSubLevels==1) { scrollTop_offset = $pointer.offset().top - $(window).height() / 4; } else { scrollTop_offset = $pointer.offset().top - $('#nav-tab-vb').height()-10; } $('html,body').animate({ scrollTop: scrollTop_offset }, 'slow'); } } } $pointer.css('opacity', '1'); $('.pointy').click(function(e) { e.preventDefault(); e.stopPropagation(); }); var parent = $(this).parent(); var dataCT = parent.attr('data-ct'); var dataDC = parent.attr('data-dc'); var dataTN = parent.attr('data-tn'); //if (dataCT) loai_buble = 'chuthich'; //if (dataDC) loai_buble = 'danchieu';; //if (dataTN) loai_buble = 'thuatngu'; var loai_buble = parent.prop('nodeName').toLowerCase(); var text_html = $(this).text(); if (loai_buble=='cttd' || loai_buble=='a') { pointer_html = '

'; } else if(loai_buble=='dctd') { if (this.hasAttribute('o-title')) { tieu_de_dan_chieu = $(this).attr('o-title'); } else { tieu_de_dan_chieu = text_html; } pointer_html = ''; } else if(loai_buble=='dctk') { pointer_html = ''; } if ($pointer.find('#noi_dung_buble_'+buble_id).length) { } else { $pointer.html(pointer_html); } if (loai_buble=='cttd' || loai_buble=='a') { var load_cttd = setInterval(function(){ if ($pointer.find('#noi_dung_buble_'+buble_id + ' .dc_loading').length) { $.ajax({ type: 'POST', url: '/ajax/vanban/chu-thich/', data: { 'ndct': dataCT, 'id_ct': buble_id, 'dc_text': text_html }, success: function(response) { $("#noi_dung_buble_" + buble_id).html(response); if ($(document).width()>=1280){$this.trigger('pointy-update');} clearInterval(load_cttd); } }); } },500); } else if(loai_buble=='dctd') { var load_cttd = setInterval(function(){ if ($pointer.find('#noi_dung_buble_'+buble_id + ' .dc_loading').length){ if (dataDC.length == 32) { $.ajax({ type: 'POST', url: '/ajax/public/dan-chieu/' + dataDC, data: { 'text_dan_chieu': text_html }, success: function(response) { $("#noi_dung_buble_" + buble_id).html(response); if ($(document).width()>=1280){$this.trigger('pointy-update');} clearInterval(load_cttd); } }); } else { $("#noi_dung_buble_" + buble_id).load('/ajax/public/dan-chieu/' + dataDC + '/'); if ($(document).width()>=1280){$this.trigger('pointy-update');} clearInterval(load_cttd); } } else { clearInterval(load_cttd); } },500); } else if(loai_buble=='dctk') { if ($('#noi_dung_buble_'+buble_id + ' .dc_loading').length){ $.ajax({ type: 'POST', url: '/ajax/vanban/chu-thich/', data: { 'ndct': dataCT, 'id_ct': buble_id, 'loai_hd': 'noi_dung_tham_khao', 'dc_text': text_html }, success: function(response) { $("#noi_dung_buble_" + buble_id).html(response); if ($(document).width()>=1280){$this.trigger('pointy-update');} } }); } } /* var tim_buble_id = setInterval(function(){ if ($('#noi_dung_buble_'+buble_id).length) { alert('bay gio moi tim thay '+buble_id); clearInterval(tim_buble_id); } },1000); */ $('.pointer').removeClass('pointy-active'); $('.pointer').css({'z-index':1}); $('canvas.pointy').removeClass('pointy-active'); $('canvas.pointy').css({'z-index':1}); $pointer.css({'z-index':9999}); $canvas.css({'z-index':9999}); $('.pointer').on('mouseenter mouseleave click touchstart', function() { // Khi di chuột vào $('.pointer').removeClass('pointy-active'); $('.pointer').css({'z-index':1}); $(this).css({'z-index':9999}); $('canvas.pointy').removeClass('pointy-active'); $('canvas.pointy').css({'z-index':1}); $(this).prev('canvas.pointy').addClass('pointy-active'); $(this).prev('canvas.pointy').css({'z-index':9999}); } ); var list_tds_max_height_interval = setInterval(function(){ if ($pointer.find('.list_tds').length) { var windowHeight = $(window).height()-20 - $('#nav-tab-vb').height(); var pointerHeight = Math.max(250, Math.min(windowHeight * 0.8, 450)); $pointer.find('.list_tds').css('max-height', pointerHeight + 'px'); clearInterval(list_tds_max_height_interval); } },50); $(window).resize(function() { if ($(document).width()<=768) { $pointer.hide(); $pointer.prev('canvas.pointy').hide(); } var cap_nhat_pointy_top = setInterval(function(){ if ($this.position().top-$this.parent().height()+10!=$pointer.prev('canvas.pointy').position().top) { $pointer.prev('canvas.pointy').css({'top': $this.position().top-$this.parent().height()+10+'px'}); clearInterval(cap_nhat_pointy_top); } else { clearInterval(cap_nhat_pointy_top); } },50); var list_tds_max_height_interval = setInterval(function(){ if ($pointer.find('.list_tds').length) { var windowHeight = $(window).height()-20 - $('#nav-tab-vb').height(); var pointerHeight = Math.max(250, Math.min(windowHeight * 0.8, 450)); $pointer.find('.list_tds').css('max-height', pointerHeight + 'px'); clearInterval(list_tds_max_height_interval); } },50); }); var parentElement = $(this).parent(); // Define the selectors for the target elements var selectors = 'cttd.chuthichtudong > span, a.chuthichtudong > span, dctk > span, dctd > span'; // Find and click all matching child elements parentElement.find(selectors).each(function() { $(this).click(); }); var cap_nhat_pointy_top = setInterval(function(){ if ($this.position().top-$this.parent().height()+10!=$pointer.prev('canvas.pointy').position().top) { $pointer.prev('canvas.pointy').css({'top': $this.position().top-$this.parent().height()+10+'px'}); clearInterval(cap_nhat_pointy_top); } else { clearInterval(cap_nhat_pointy_top); } },50); }); }); function random_string_id(numstr) { var text = ""; var possible = "abcdefghijklmnopqrstuvwxyz0123456789"; for (var i = 0; i < numstr; i++) text += possible.charAt(Math.floor(Math.random() * possible.length)); return text; } $(document).ready(function() { function setPointerHeight() { var windowHeight = $(window).height() - $('#nav-tab-vb').height()-20; var pointerHeight = Math.max(250, Math.min(windowHeight * 0.8, 450)); $('.pointer').css('height', pointerHeight + 'px'); } // Đặt chiều cao khi tải trang setPointerHeight(); // Đặt lại chiều cao khi thay đổi kích thước cửa sổ (nếu cần) $(window).resize(function() { setPointerHeight(); }); }); // Lưu dấu chọn lựa cuối cùng let lastChosen = null; let lastChosentr = null; function scroll_den_hd(ndsh_dich_address) { if (lastChosen) { $(lastChosen).css('background-color', ''); // Xóa mọi bôi mờ trước } if (lastChosentr) { $(lastChosentr).css('background-color', ''); // Xóa mọi bôi mờ trước } lastChosen = $('[href="javascript:scroll_den_hd(\'' + ndsh_dich_address + '\')"]'); lastChosentr = $('[data-ct="' + ndsh_dich_address + '"]'); $(lastChosen).css('background-color', 'yellow'); // Thay bôi mờ $(lastChosentr).css('background-color', 'yellow'); // Thay bôi mờ var targetElement = $('[address="' + ndsh_dich_address + '"]'); $('.selected_dchd').removeClass('selected_dchd'); targetElement.addClass('selected_dchd'); targetElement.children('p').children('cttd').click(); targetElement.children('cttd').click(); targetElement.children('p').children('dctk').click(); targetElement.children('dctk').click(); // Tính toán vị trí để cuộn đến và đẩy vị trí xuống một chút cho dễ nhìn /* var position = targetElement.offset().top - $(window).height()/2; // Sử dụng animate để cuộn đến vị trí, sau đó không cần bôi màu như trước $('html, body').animate({ scrollTop: position }, 800, function() { // Không cần thực hiện thêm hành động nào sau khi cuộn, vì việc đánh dấu đã được xử lý ở trên }); */ }