Skip to content

Commit

Permalink
Merge branch 'egov1.1' of https://github.com/hoaquynhtim99/eGovernment
Browse files Browse the repository at this point in the history
…into egov1.1
  • Loading branch information
VINADES.,JSC authored and hoaquynhtim99 committed Jun 13, 2018
2 parents 496b128 + 20a98eb commit 908a459
Show file tree
Hide file tree
Showing 13 changed files with 159 additions and 38 deletions.
2 changes: 1 addition & 1 deletion themes/admin_default/modules/laws/area.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
<tr>
<th style="width:100px"> {LANG.pos} </th>
<th>{LANG.title}</th>
<th style="width:130px"></th>
<th style="width:130px">{LANG.feature}</th>
</tr>
</thead>
<tbody>
Expand Down
2 changes: 1 addition & 1 deletion themes/admin_default/modules/laws/cat.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
<th> {LANG.pos} </th>
<th> {LANG.title} </th>
<th>{LANG.newicon} ({LANG.day})</th>
<th>&nbsp;</th>
<th>{LANG.feature}</th>
</tr>
</thead>
<tbody>
Expand Down
2 changes: 1 addition & 1 deletion themes/admin_default/modules/laws/examine.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<tr>
<th style="width:100px"> {LANG.pos} </th>
<th> {LANG.title} </th>
<th style="width:120px">&nbsp;</th>
<th style="width:120px">{LANG.feature}</th>
</tr>
</thead>
<tbody>
Expand Down
2 changes: 1 addition & 1 deletion themes/admin_default/modules/laws/main.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
<link rel="stylesheet" href="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/select2/select2.min.css">
<link rel="stylesheet" type="text/css" href="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/jquery-ui/jquery-ui.min.css">
<script type="text/javascript" src="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/select2/select2.min.js"></script>
<script type="text/javascript" src="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/select2/i18n/{NV_LANG_DATA}.js"></script>
<script type="text/javascript" src="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/select2/i18n/{NV_LANG_INTERFACE}.js"></script>
<script type="text/javascript" src="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/jquery-ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/language/jquery.ui.datepicker-{NV_LANG_INTERFACE}.js"></script>
<div id="pageContent">
Expand Down
2 changes: 1 addition & 1 deletion themes/admin_default/modules/laws/subject.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
<th style="width:100px"> {LANG.pos} </th>
<th> {LANG.title} </th>
<th class="w100"> {LANG.numlink} </th>
<th style="width:120px">&nbsp;</th>
<th style="width:120px">{LANG.feature}</th>
</tr>
</thead>
<tbody>
Expand Down
15 changes: 13 additions & 2 deletions themes/default/modules/laws/block_search_center.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- BEGIN: main -->
<link rel="stylesheet" type="text/css" href="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/jquery-ui/jquery-ui.min.css">

<link rel="stylesheet" href="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/select2/select2.min.css">
<form id="ltablesearch{BLOCKID}" class="form-horizontal formsearch" action="{FORM_ACTION}" method="get" onsubmit="return nv_check_search_laws(this);">
<!-- BEGIN: no_rewrite -->
<input type="hidden" name="{NV_LANG_VARIABLE}" value="{NV_LANG_DATA}"/>
Expand Down Expand Up @@ -121,6 +121,8 @@
</form>
<script type="text/javascript" src="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/jquery-ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/language/jquery.ui.datepicker-{NV_LANG_INTERFACE}.js"></script>
<script type="text/javascript" src="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/select2/select2.min.js"></script>
<script type="text/javascript" src="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/select2/i18n/{NV_LANG_INTERFACE}.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#lclearform{BLOCKID}').click(function() {
Expand All @@ -141,7 +143,9 @@ $(document).ready(function() {
e.preventDefault();
var a = $(this);
if( a.hasClass('advance')){
$('#advance').slideDown();
$('#advance').slideDown(function() {
select2search();
});
a.html('<em class="fa fa-search">&nbsp;</em>{LANG.search_simple}');
a.removeClass('advance');
$('input[name="is_advance"]').val(1);
Expand All @@ -152,7 +156,14 @@ $(document).ready(function() {
$('input[name="is_advance"]').val(0);
}
});
select2search();
});
function select2search() {
var form = $('#ltablesearch{BLOCKID}');
if ($('#advance', form).is(':visible')) {
$('[name="area"],[name="cat"],[name="approval"],[name="status"],[name="signer"],[name="subject"],[name="examine"]', form).select2();
}
}
function nv_check_search_laws(data) {
if (($('#ls_key').val() == '' ) && ($('#ls_cat').val() == 0 ) && ($('#ls_area').val() == 0 ) && ($('#ls_subject').val() == 0 ) && ($('#ls_signer').val() == 0 ) && ($('#ls_status').val() == 0 ) && ($('#ls_from').val() == '' ) && ($('#ls_to').val() == '' )) {
alert('{LANG.search_alert}');
Expand Down
15 changes: 13 additions & 2 deletions themes/default/modules/laws/block_search_vertical.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- BEGIN: main -->
<link rel="stylesheet" type="text/css" href="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/jquery-ui/jquery-ui.min.css">

<link rel="stylesheet" href="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/select2/select2.min.css">
<form id="ltablesearch{BLOCKID}" action="{FORM_ACTION}" method="get" onsubmit="return nv_check_search_laws(this);">
<!-- BEGIN: no_rewrite -->
<input type="hidden" name="{NV_LANG_VARIABLE}" value="{NV_LANG_DATA}"/>
Expand Down Expand Up @@ -113,6 +113,8 @@
</form>
<script type="text/javascript" src="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/jquery-ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/language/jquery.ui.datepicker-{NV_LANG_INTERFACE}.js"></script>
<script type="text/javascript" src="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/select2/select2.min.js"></script>
<script type="text/javascript" src="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/select2/i18n/{NV_LANG_INTERFACE}.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#lclearform{BLOCKID}').click(function() {
Expand All @@ -133,7 +135,9 @@ $(document).ready(function() {
e.preventDefault();
var a = $(this);
if( a.hasClass('advance')){
$('#advance').slideDown();
$('#advance').slideDown(function() {
select2search();
});
a.html('<em class="fa fa-search">&nbsp;</em>{LANG.search_simple}');
a.removeClass('advance');
$('input[name="is_advance"]').val(1);
Expand All @@ -144,7 +148,14 @@ $(document).ready(function() {
$('input[name="is_advance"]').val(0);
}
});
select2search();
});
function select2search() {
var form = $('#ltablesearch{BLOCKID}');
if ($('#advance', form).is(':visible')) {
$('[name="area"],[name="cat"],[name="approval"],[name="status"],[name="signer"],[name="subject"],[name="examine"]', form).select2();
}
}
function nv_check_search_laws(data) {
if (($('#ls_key').val() == '' ) && ($('#ls_cat').val() == 0 ) && ($('#ls_area').val() == 0 ) && ($('#ls_subject').val() == 0 ) && ($('#ls_signer').val() == 0 ) && ($('#ls_status').val() == 0 ) && ($('#ls_from').val() == '' ) && ($('#ls_to').val() == '' )) {
alert('{LANG.search_alert}');
Expand Down
2 changes: 1 addition & 1 deletion themes/egov/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ div.breadcrumbs-bg {
padding-bottom: 0;
}

.news-catbox-single h2 {
.news-catbox-single h2, .viewcat-main-style > ul h2 {
text-transform: uppercase;
margin-bottom: 0px;
}
Expand Down
55 changes: 53 additions & 2 deletions themes/egov/css/news.css
Original file line number Diff line number Diff line change
Expand Up @@ -305,18 +305,69 @@ ul.related h4 {
box-shadow: 1px 2px 2px rgba(0,0,0,0.08);
}

.news-catbox-single {
.news-catbox-single, .viewcat-main-style {
border: #ccc 1px solid;
border-bottom: 0px;
border-radius: 5px 5px 0px 0px;
padding: 10px;
}

.news-catbox-single h2 {
.news-catbox-single h2, .viewcat-main-style > ul {
border-bottom: #fba919 2px solid;
padding-bottom: 5px;
}

.viewcat-main-style > ul h4 {
position: relative;
top: -2px;
line-height: 30px!important;
}

.viewcat-main-style ul li {
position: relative;
}

.viewcat-main-style ul li:nth-child(2) {
padding-left: 25px;
}

.viewcat-main-style ul li:nth-child(2):before {
font-family: "FontAwesome";
content: "\f105";
position: absolute;
left: 0;
top: -2px;
width: 20px;
text-align: center;
font-size: 20px;
}

.viewcat-main-style ul li:nth-child(n+3) {
padding-left: 10px;
}

.viewcat-main-style ul li:nth-child(n+3):before {
content: "|";
position: absolute;
top: 3px;
left: 0;
}

.viewcat-main-style ul li.last-cat {
padding-left: 0;
margin-right: 15px;
}

.viewcat-main-style ul li.last-cat:before {
display: none;
}

.viewcat-main-style ul li.last-cat a {
position: absolute;
left: 0;
top: 5px;
}

.height-hometext {
height: 165px;
overflow: hidden;
Expand Down
88 changes: 68 additions & 20 deletions themes/egov/modules/news/viewcat_grid.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<!-- BEGIN: featuredloop -->
<div class="news_column">
<div class="panel panel-default">
<div class="panel panel-default">
<div class="panel-body featured">
<!-- BEGIN: image -->
<a href="{CONTENT.link}" title="{CONTENT.title}" {CONTENT.target_blank}><img alt="{HOMEIMGALT1}" src="{HOMEIMG1}" width="150px" class="img-thumbnail pull-left imghome" /></a>
Expand Down Expand Up @@ -49,33 +49,81 @@
</div>
<!-- END: featuredloop -->

<!-- BEGIN: viewcatloop -->
<div class="col-sm-12 col-md-8">
<div class="thumbnail">
<a title="{CONTENT.title}" href="{CONTENT.link}" {CONTENT.target_blank}><img alt="{HOMEIMGALT1}" src="{HOMEIMG1}" width="{IMGWIDTH1}" class="img-thumbnail"/></a>
<div class="caption text-center">
<h4><a class="show" href="{CONTENT.link}" {CONTENT.target_blank} <!-- BEGIN: tooltip -->data-content="{CONTENT.hometext_clean}" data-img="" data-rel="tooltip" data-placement="{TOOLTIP_POSITION}"<!-- END: tooltip --> title="{CONTENT.title}">{CONTENT.title}</a></h4>
<span>{ADMINLINK}</span>
</div>
</div>
<div class="row news_column news_grid">
<!-- BEGIN: viewcatloop -->
<div class="col-sm-12 col-md-8">
<div class="thumbnail clearfix">
<a title="{CONTENT.title}" href="{CONTENT.link}" {CONTENT.target_blank}><img alt="{HOMEIMGALT1}" src="{HOMEIMG1}" width="{IMGWIDTH1}" class="img-thumbnail"/></a>
<div class="caption text-center">
<h4><a class="show" href="{CONTENT.link}" {CONTENT.target_blank} <!-- BEGIN: tooltip -->data-content="{CONTENT.hometext_clean}" data-img="" data-rel="tooltip" data-placement="{TOOLTIP_POSITION}"<!-- END: tooltip --> title="{CONTENT.title}">{CONTENT.title}</a></h4>
<span>{ADMINLINK}</span>
</div>
</div>
</div>
<!-- END: viewcatloop -->
</div>
<!-- END: viewcatloop -->
<div class="clear">&nbsp;</div>

<!-- BEGIN: generate_page -->
<div class="text-center">
{GENERATE_PAGE}
</div>
<!-- END: generate_page -->
<script type="text/javascript">
$(window).on('load', function() {
$.each( $('.thumbnail'), function(k,v){
var height1 = $($('.thumbnail')[k]).height();
var height2 = $($('.thumbnail')[k+1]).height();
var height = ( height1 > height2 ? height1 : height2 );
$($('.thumbnail')[k]).height( height );
$($('.thumbnail')[k+1]).height( height );
});
var catGridColTimer;
$.scrollbarWidth=function(){var a,b,c;if(c===undefined){a=$('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo('body');b=a.children();c=b.innerWidth()-b.height(99).innerWidth();a.remove()}return c};
function fixColumnHeight() {
var winW = $(document).width() + $.scrollbarWidth();
var numcols = 0;
if (winW < 768) {
// Mobile - 1 cột
$('.news_grid .thumbnail').height('auto');
} else if (winW < 992) {
// Tablet - 2 cột
numcols = 2;
} else {
// Desktop - 3 cột
numcols = 3;
}
if (numcols > 0) {
var lastKey = $('.news_grid .thumbnail').length - 1;
$.each($('.news_grid .thumbnail'), function(k, v) {
if (k % numcols == 0 || k == lastKey) {
$($('.news_grid .thumbnail')[k]).height('auto');
$($('.news_grid .thumbnail')[k+1]).height('auto');
var height1 = $($('.news_grid .thumbnail')[k]).height();
var height2 = $($('.news_grid .thumbnail')[k+1]).height();
if (typeof height2 == "undefined") {
height2 = 0;
}
var height3;
var height = (height1 > height2 ? height1 : height2);
if (numcols > 2) {
$($('.news_grid .thumbnail')[k+2]).height('auto');
height3 = $($('.news_grid .thumbnail')[k+2]).height();
if (typeof height3 == "undefined") {
height3 = 0;
}
height = (height > height3 ? height : height3);
$($('.news_grid .thumbnail')[k+2]).height(height);
}
$($('.news_grid .thumbnail')[k]).height(height);
$($('.news_grid .thumbnail')[k+1]).height(height);
}
});
}
}
$(window).on('load', function() {
catGridColTimer = setTimeout(function(){
fixColumnHeight();
}, 100)
});
$(function(){
$(window).resize(function(){
clearTimeout(catGridColTimer);
catGridColTimer = setTimeout(function(){
fixColumnHeight();
}, 100);
});
});
</script>
<!-- END: main -->
4 changes: 2 additions & 2 deletions themes/egov/modules/news/viewcat_main_bottom.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<!-- BEGIN: listcat -->
<div class="news_column">
<div class="panel clearfix">
<div class="news-catbox-single clearfix">
<div class="viewcat-main-style clearfix">
<ul class="list-inline" style="margin: 0">
<li><h2><a title="{CAT.title}" href="{CAT.link}"><span>{CAT.title}</span></a></h2></li>
<!-- BEGIN: subcatloop -->
<li class="hidden-xs"><h4><a class="dimgray" title="{SUBCAT.title}" href="{SUBCAT.link}">{SUBCAT.title}</a></h4></li>
<!-- END: subcatloop -->
<!-- BEGIN: subcatmore -->
<a class="dimgray pull-right hidden-xs" title="{MORE.title}" href="{MORE.link}"><em class="fa fa-sign-out">&nbsp;</em></a>
<li class="pull-right hidden-xs last-cat"><a class="dimgray" title="{MORE.title}" href="{MORE.link}"><em class="fa fa-sign-out">&nbsp;</em></a></li>
<!-- END: subcatmore -->
</ul>
</div>
Expand Down
4 changes: 2 additions & 2 deletions themes/egov/modules/news/viewcat_main_left.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<!-- BEGIN: listcat -->
<div class="news_column">
<div class="panel clearfix">
<div class="news-catbox-single clearfix">
<div class="viewcat-main-style clearfix">
<ul class="list-inline" style="margin: 0">
<li><h2><a title="{CAT.title}" href="{CAT.link}"><span>{CAT.title}</span></a></h2></li>
<!-- BEGIN: subcatloop -->
<li class="hidden-xs"><h4><a class="dimgray" title="{SUBCAT.title}" href="{SUBCAT.link}">{SUBCAT.title}</a></h4></li>
<!-- END: subcatloop -->
<!-- BEGIN: subcatmore -->
<a class="dimgray pull-right hidden-xs" title="{MORE.title}" href="{MORE.link}"><em class="fa fa-sign-out">&nbsp;</em></a>
<li class="pull-right hidden-xs last-cat"><a class="dimgray" title="{MORE.title}" href="{MORE.link}"><em class="fa fa-sign-out">&nbsp;</em></a></li>
<!-- END: subcatmore -->
</ul>
</div>
Expand Down
4 changes: 2 additions & 2 deletions themes/egov/modules/news/viewcat_main_right.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<!-- BEGIN: listcat -->
<div class="news_column">
<div class="panel clearfix">
<div class="news-catbox-single clearfix">
<div class="viewcat-main-style clearfix">
<ul class="list-inline" style="margin: 0">
<li><h2><a title="{CAT.title}" href="{CAT.link}"><span>{CAT.title}</span></a></h2></li>
<!-- BEGIN: subcatloop -->
<li class="hidden-xs"><h4><a class="dimgray" title="{SUBCAT.title}" href="{SUBCAT.link}">{SUBCAT.title}</a></h4></li>
<!-- END: subcatloop -->
<!-- BEGIN: subcatmore -->
<a class="dimgray pull-right hidden-xs" title="{MORE.title}" href="{MORE.link}"><em class="fa fa-sign-out">&nbsp;</em></a>
<li class="pull-right hidden-xs last-cat"><a class="dimgray" title="{MORE.title}" href="{MORE.link}"><em class="fa fa-sign-out">&nbsp;</em></a></li>
<!-- END: subcatmore -->
</ul>
</div>
Expand Down

0 comments on commit 908a459

Please sign in to comment.