Chi chú phát triển 4.1.01 - nukeviet/module-laws GitHub Wiki

Thêm một số cấu hình

INSERT INTO `nv4_vi_laws_config` (`config_name`, `config_value`) VALUES ('detail_hide_empty_field', '1');
INSERT INTO `nv4_vi_laws_config` (`config_name`, `config_value`) VALUES ('detail_show_link_cat', '1');
INSERT INTO `nv4_vi_laws_config` (`config_name`, `config_value`) VALUES ('detail_show_link_area', '1');
INSERT INTO `nv4_vi_laws_config` (`config_name`, `config_value`) VALUES ('detail_show_link_subject', '1');
INSERT INTO `nv4_vi_laws_config` (`config_name`, `config_value`) VALUES ('detail_show_link_signer', '1');
INSERT INTO `nv4_vi_laws_config` (`config_name`, `config_value`) VALUES ('detail_pdf_quick_view', '0');

Cập nhật giao diện

Thêm vào CSS

.laws-download-file {
    margin-top: -6px;
}

.laws-download-file .list-group-item:first-child{
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.laws-download-file .list-group-item .badge {
    float: right;
    display: inline-block;
    width: 22px;
    height: 22px;
    font-size: 12px;
    font-weight: 700;
    line-height: 22px;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    background-color: #5cb85c;
    border-radius: 15px;
}

.laws-download-file .list-group-item .badge a {
    color: #fff;
}

Thêm vào JS

$(function() {
	$('.laws-download-file [data-toggle="tooltip"]').tooltip({
	   container: "body"
	});
    $('[data-toggle="collapsepdf"]').each(function() {
        $('#' + $(this).attr('id')).on('shown.bs.collapse', function() {
            $(this).find('iframe').attr('src', $(this).data('src'));
        });
    });
});

Ghi đè file detail.tpl