merge with aung

This commit is contained in:
Yan
2017-11-21 16:47:07 +06:30
10 changed files with 90 additions and 57 deletions

View File

@@ -465,7 +465,7 @@ $(function() {
// click select option icon for add
$(document).on('click', '.attribute_btn', function(event){
$('.change_qty').val(1);
// $('.change_qty').val(1);
value = $(this).data('value');
type = $(this).data('type');
instances = $(this).data('instances');
@@ -505,6 +505,8 @@ $(function() {
// click select option icon for add
$(document).on('click', '.option_btn', function(event){
active =$(this).hasClass('selected-option');
console.log(active);
value = $(this).data('value');
type = $(this).data('type');
group = $(this).data('group');
@@ -514,7 +516,12 @@ $(function() {
$('.'+type).removeClass("selected-option");
}
});
$(this).addClass('selected-option');
if (active) {
$(this).revoveClass('selected-option');
}else{
$(this).addClass('selected-option');
}
if(group == "set_menu"){
code = $(this).data('code');
@@ -858,7 +865,7 @@ $(function() {
id = $(this).attr('id');
value = $(this).val();
$('#count').attr('value',value);
if (id=="count") {
price = $("#unit_price").text();
$("#total_price").text(value*price);