mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-24 22:11:01 -06:00
fix default currency problem
This commit is contained in:
parent
6ed0baac4a
commit
091e4586ac
@ -15,15 +15,14 @@ var filter = {};
|
|||||||
filter.getCats = (catId, divId) => {
|
filter.getCats = (catId, divId) => {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'get',
|
type: 'get',
|
||||||
url: '/class/getcats/'+ divId,
|
url: '/class/getcats/' + divId,
|
||||||
success: function (response) {
|
success: function (response) {
|
||||||
hideLoader()
|
hideLoader()
|
||||||
if(response == 0){
|
if (response == 0) {
|
||||||
stop();
|
stop();
|
||||||
}
|
} else {
|
||||||
else {
|
response.forEach(function (options) {
|
||||||
response.forEach(function(options){
|
$(catId).append("<option value=" + options.id + ">" + options.name + "</option>");
|
||||||
$(catId).append("<option value="+options.id+">"+options.name+"</option>");
|
|
||||||
$(catId).closest('li').show();
|
$(catId).closest('li').show();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -35,40 +34,42 @@ filter.getCats = (catId, divId) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$("select[name='currency']").val(default_currency);
|
if ($('input[name="slug"]').val() == "") {
|
||||||
if(default_GET == 1)
|
$("select[name='currency']").val(default_currency);
|
||||||
{
|
}
|
||||||
|
|
||||||
|
if (default_GET == 1) {
|
||||||
$('#is_get_adv').prop('checked', true);
|
$('#is_get_adv').prop('checked', true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('change', '.sub_cats', function(){
|
$(document).on('change', '.sub_cats', function () {
|
||||||
divId = $(this).find('option:selected').val();
|
divId = $(this).find('option:selected').val();
|
||||||
if (divId == 0) {
|
if (divId == 0) {
|
||||||
$(this).parent().nextAll().remove();
|
$(this).parent().nextAll().remove();
|
||||||
} else
|
} else
|
||||||
filter.callCats(divId);
|
filter.callCats(divId);
|
||||||
});
|
});
|
||||||
function getAdv(){
|
|
||||||
if (document.getElementById('getMethod').checked){
|
function getAdv() {
|
||||||
|
if (document.getElementById('getMethod').checked) {
|
||||||
var val = $('input[name=price]').val();
|
var val = $('input[name=price]').val();
|
||||||
val = val*90/100;
|
val = val * 90 / 100;
|
||||||
$("#priceLi").append('<input type="number" class="form-control" disabled id="getprice" value="'+val+'">');
|
$("#priceLi").append('<input type="number" class="form-control" disabled id="getprice" value="' + val + '">');
|
||||||
} else {
|
} else {
|
||||||
$("#getprice").remove();
|
$("#getprice").remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$('input[name=price]').bind('keyup change', function () {
|
$('input[name=price]').bind('keyup change', function () {
|
||||||
var val = $('input[name=price]').val();
|
var val = $('input[name=price]').val();
|
||||||
val = val*90/100;
|
val = val * 90 / 100;
|
||||||
$("#getprice").val(val);
|
$("#getprice").val(val);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('input[name="price"]').on('click', function () {
|
$('input[name="price"]').on('click', function () {
|
||||||
if($(this).val() == "0.00")
|
if ($(this).val() == "0.00") {
|
||||||
{
|
|
||||||
$(this).val("");
|
$(this).val("");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user