Merge pull request #1043 from openclassify/muammertop

category problem solved in new ad, rtl page
This commit is contained in:
Fatih Alp 2021-04-20 11:28:58 +03:00 committed by GitHub
commit 5c68eb626d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 6 deletions

View File

@ -66,9 +66,15 @@ $(document).ready(function () {
$(catId).closest('.cat-item-2').show().addClass('focus-select')
}
}
// Auto scroll right
// Auto scroll right or left
let categoryTab = $('.category-tab');
let pos = categoryTab.scrollLeft() + categoryTab.width();
let pos;
if (isRtl){
pos = categoryTab.scrollLeft() - (categoryTab.width() * 2);
$('.cat-item-3').css('display', 'flex');
} else {
pos = categoryTab.scrollLeft() + categoryTab.width();
}
categoryTab.animate( {scrollLeft: pos}, 1000);
},
beforeSend: function () {

View File

@ -45,11 +45,13 @@
</div>
{% endfor %}
<div class="cat-item mb-2 shadow-sm border rounded align-items-center">
<div class="cat-item mb-2 shadow-sm border rounded align-items-center mr-2">
<div class="cat-item-3">
<div class="section next-stap post-option post-icon px-4 text-center py-2">
{{ img('visiosoft.module.advs::images/check.svg').data|raw }}
{{ img('visiosoft.module.advs::images/cross.svg').data|raw }}
<div class="cat-item-icons post-icon d-flex align-items-center justify-content-center">
{{ img('visiosoft.module.advs::images/check.svg').data|raw }}
{{ img('visiosoft.module.advs::images/cross.svg').data|raw }}
</div>
<div class="next-content"></div>
</div>
</div>
@ -63,7 +65,9 @@
</form>
</div>
</section>
<script>
let isRtl = '{{ locale().isRtl() }}';
</script>
{{ addBlock('post-cat/section') }}
{{ asset_add("scripts.js", "visiosoft.module.advs::js/cats.js") }}