fix addorder UI

This commit is contained in:
Zin Moe
2020-03-16 17:54:10 +06:30
parent 2cd816e20f
commit ce6785c70b
11 changed files with 166 additions and 119 deletions

View File

@@ -1539,6 +1539,13 @@ $(function() {
// price = $("#unit_price").text();
// $("#total_price").text(qty*price);
// });
function truncateString(str, num) {
if (str.length <= num) {
return str
} else {
return str.slice(0, num) + '...'
}
}
function show_menu_list(menu_items) {
var menu_list = $('.menu_items_list');
menu_list.empty();
@@ -1617,10 +1624,12 @@ $(function() {
oos_header = ''
opacity = ''
}
name = menu_items[field].name
short_name = truncateString(name, 30)
row = '<div class="col-md-6 col-sm-6 col-lg-3 m-t-2">'
+ oos_item + oos_header
+'<div class="custom-card-head card-head row" style="margin:0px; height: auto; font-size: 0.9em; opacity: '+opacity+'" >'
+'<div class="col-md-10 " style="padding:0px !important;">'+ menu_items[field].name +'</div>'
+'<div class="custom-card-head card-head row" style="margin:0px; height: 40px; font-size: 0.9em; opacity: '+opacity+'" >'
+'<div class="col-md-10 " style="padding:0px !important;">'+ short_name +'</div>'
+'</div>'
+"<div class='"+add_icon+"' "
@@ -1672,6 +1681,8 @@ $(function() {
oos_header = ''
opacity = ''
}
name = menu_items[field].name
short_name = truncateString(name, 60)
row = '<div class="col-md-6 col-sm-6 col-lg-3 m-t-2">'
+ oos_item + oos_header
+'<div class="custom-card-no-img-head card-head h-100 '+add_icon+' " id="oos'+ code +'" style="margin:0px;display:flex; opacity: '+opacity+';"'
@@ -1690,7 +1701,7 @@ $(function() {
+" data-item-sets = '"+JSON.stringify(menu_items[field].item_sets)+"'"
+" data-instances = '"+JSON.stringify(menu_items[field].instances)+"'>"
+'<div class="product_box" style="width:100%;"><span>'+ menu_items[field].name +'<span></div>'
+'<div class="product_box" style="width:100%;"><span>'+ short_name +'<span></div>'
+'</div>'
+"<div class='"+add_icon+"' "
+" data-item-code='"+ menu_items[field].code +"' "

View File

@@ -23,6 +23,16 @@ $(document).ready(function() {
touchScrollStep : 50
});
$('#foodcourt-table-slimscroll').slimScroll({
height: '100%',
size: '5px',
color: 'rgba(0,0,0,0.5)',
alwaysVisible: false,
borderRadius: '0',
railBorderRadius: '0',
touchScrollStep : 50
});
$('#foodcourt-order-slimscroll').slimScroll({
height: '100%',
size: '5px',