Merge branch 'master' into dia

This commit is contained in:
Fatih Alp 2020-12-18 16:30:04 +03:00 committed by GitHub
commit d9d3e3f504
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 18 deletions

View File

@ -1,8 +0,0 @@
$("input[data-type='currency']").on('blur', function() {
const value = this.value.replace(/,/g, '');
this.value = parseFloat(value).toLocaleString('en-US', {
style: 'decimal',
maximumFractionDigits: 2,
minimumFractionDigits: 2
});
});

View File

@ -19,14 +19,12 @@
<input type="number" class="price-input form-control w-100"
value="{{ app.request.get('min_price') }}"
name="min_price" min="0"
data-type="currency"
placeholder="{{ trans('visiosoft.module.advs::field.min.name') }}">
</div>
<div class="col-md-4 p-1 pr-0 m-0">
<input class="price-input form-control w-100" type="number"
value="{{ app.request.get('max_price') }}"
name="max_price"
data-type="currency"
placeholder="{{ trans('visiosoft.module.advs::field.max.name') }}">
</div>

View File

@ -20,7 +20,7 @@
</tr>
</thead>
<tbody>
{{ addBlock('ad-list/partials/table',{'featured_advs':featured_advs})|raw }}
{{ addBlock('ad-list/partials/table',{'featured_advs':featured_advs,'seenList':seenList})|raw }}
{% for adv in advs %}
<tr class="text-center clickable-row{% if adv.doping != null %} doping_type4 {% endif %}" data-href='{{ adv.detail_url }}'>
<td class="justify-content-center align-middle text-center td-image">

View File

@ -38,6 +38,7 @@ $('.filter-country-btn').on('click', function () {
//City
$('.filter-city-btn').on('click', function () {
var countries_value = $('input[name="country[]"]').val();
countries_value += ',' + defaultCountry
var selected__city_request = $('input[name="city[]"]').val();
if (cities == undefined || $(this).attr('data-parent') != countries_value) {
$(this).attr('data-parent', countries_value);
@ -203,8 +204,8 @@ function SelectOnClick() {
if ($(this).attr('data-field') == "country") {
$('.selected-city').html('');
$('input[name="city[]"]').val('');
text_html.html(input_text)
$(".filter-location-body li[data-id='" + id + "'] input[type='checkbox']").prop('checked', true);
// text_html.html(input_text)
// $(".filter-location-body li[data-id='" + id + "'] input[type='checkbox']").prop('checked', true);
}
if (input_val != "") {
@ -242,10 +243,11 @@ function locationCrud(params, url, type, beforeSend, callback) {
}
function item(field_name, id, value, abv = '') {
var selected = defaultCountry === id ? "checked" : "";
if (field_name === 'country') {
return '<li class="px-2" data-id="' + id + '">\n' +
' <label class="w-100">\n' +
' <input type="checkbox" data-field="' + field_name + '" data-id="' + id + '">\n' +
' <input type="checkbox" data-field="' + field_name + '" data-id="' + id + '" '+ selected +'>\n' +
' <span class="flag ml-1 flag-' + abv + '">\n' +
' </span>\n' +
' <small>' + value + '</small>\n' +

View File

@ -6,6 +6,10 @@
{% if selectedCountry %}
{% set countryName = getCountry(selectedCountry).name %}
{% set countryValue = defaultCountry == selectedCountry ? '' : selectedCountry %}
{% set selected_countries_name = [] %}
{% for selectedCountry in selectedCountry[0]|split(',') %}
{% set selected_countries_name = selected_countries_name|merge([getCountry(selectedCountry|trim(',')).name]) %}
{% endfor %}
{% elseif defaultCountry %}
{% set countryName = getCountry(defaultCountry).name %}
{% set countryValue = defaultCountry %}
@ -17,7 +21,7 @@
data-toggle="modal">
<span class="float-left">
{{ trans("visiosoft.module.location::field.country.name") }}
<small class="text-muted selected-country">{{ countryName }}</small>
<small class="text-muted selected-country">{{ countryName }} {{ selected_countries_name|join(',') }}</small>
</span>
<i class="fas fa-sort-down float-right"></i>
</button>
@ -120,4 +124,5 @@
<script>
var null_msg = "{{ trans('visiosoft.module.location::message.null_msg') }}!"
var defaultCountry = {{ defaultCountry }}
</script>

View File

@ -124,7 +124,7 @@
<label class="control-label font-weight-bold">
{{ profileForm.fields.gsm_phone.label }}
</label>
{{ profileForm.fields.gsm_phone.input|raw }}
{{ profileForm.fields.gsm_phone.setAttributes({'maxlength': '14'}).input|raw }}
</div>
</div>
<div class="col-md-6">
@ -132,7 +132,7 @@
<label class="control-label font-weight-bold">
{{ profileForm.fields.office_phone.label }}
</label>
{{ profileForm.fields.office_phone.input|raw }}
{{ profileForm.fields.office_phone.setAttributes({'maxlength': '14'}).input|raw }}
</div>
</div>
<div class="col-md-6">
@ -140,7 +140,7 @@
<label class="control-label font-weight-bold">
{{ profileForm.fields.land_phone.label }}
</label>
{{ profileForm.fields.land_phone.input|raw }}
{{ profileForm.fields.land_phone.setAttributes({'maxlength': '14'}).input|raw }}
</div>
</div>
<div class="col-md-12">