Merge pull request #935 from openclassify/dia

#3021 [store-module] new design integrate
This commit is contained in:
Muammer Top 2021-02-04 10:33:57 +03:00 committed by GitHub
commit 080844f102
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 26 deletions

View File

@ -227,31 +227,14 @@ a.sort-by-open-dropdown:hover {
padding: 5px 0;
}
.p-3{
background-color: #f4f4f4;
}
.card {
border: none;
}
.py-1 {
padding-top: 3px!important;
padding-bottom: 3px!important;
}
.px-2 {
padding: 0!important;
}
.btn-link {
font-weight: bold;
}
.p-3 {
padding: 8px !important;
}
.searchbut {
padding: 0px !important;
}

View File

@ -60,13 +60,15 @@ $(document).ready(function () {
$('.cat-item-3').parent().css('display', 'flex');
stop();
} else {
response.forEach(function(options){
$(catId).append("<li class='text-truncate pl-1 my-1' data-value="+options.id+">"+options.name+"</li>");
});
$('.focus-select').removeClass('focus-select');
// $(catId).animate({height: '14rem'}, 200);
$(catId).css({height: '14rem'});
$(catId).closest('.cat-item-2').show().addClass('focus-select')
if (!$('li', catId).length) {
response.forEach(function(options){
$(catId).append("<li class='text-truncate pl-1 my-1' data-value="+options.id+">"+options.name+"</li>");
});
$('.focus-select').removeClass('focus-select');
// $(catId).animate({height: '14rem'}, 200);
$(catId).css({height: '14rem'});
$(catId).closest('.cat-item-2').show().addClass('focus-select')
}
}
// Auto scroll right
let categoryTab = $('.category-tab');

View File

@ -4,9 +4,20 @@
{{ content|raw }}
{% if form.mode == 'edit' %}
{% set entry = form.entry.setAttribute('cf_json', null) %}
{% set entry = form.entry %}
<script>
const ad = JSON.parse(`{{ entry|json_encode|raw }}`)
const ad = {
cat1: `{{ entry.cat1 }}`,
cat2: `{{ entry.cat2 }}`,
cat3: `{{ entry.cat3 }}`,
cat4: `{{ entry.cat4 }}`,
cat5: `{{ entry.cat5 }}`,
cat6: `{{ entry.cat6 }}`,
cat7: `{{ entry.cat7 }}`,
cat8: `{{ entry.cat8 }}`,
cat9: `{{ entry.cat9 }}`,
cat10: `{{ entry.cat10 }}`,
}
</script>
{% endif %}
{% endblock %}