Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('.image_click').click(function () {
- var image_name=$(this).data("img-name");
- // var product_guid = $(this).closest('.food-item').find(".add-to-cart").data("product_guid");
- var url = "img/food/large_800/"+image_name;
- //alert("clicked")
- //var foodName = $(this).siblings('.title').html();
- //var image = $(this).siblings('img').attr('src');
- //var description = $(this).siblings('.description').html();
- //var startingPrice = $(this).closest('.food-item').data('price');
- //var product_guid = $(this).data("product_guid");
- //var foodType = $(this).closest('.tabcontent').attr('id');
- ////get pricing options
- //var foodId = $(this).closest('.food-item').data('id');
- //var modalSelect = $('#' + foodType + '-modal').find('.mandatory-selections .selection select');
- //var options = food[foodType][foodId].prices;
- //modalSelect.empty();
- //options.forEach(function (option) {
- // modalSelect.append('<option value="' + option.price + '" data-topping_number="' + option.web_topping_group_product_number + '" data-product_guid="' + option.product_guid + '">' + option.name + '</option>');
- //});
- //if (options.length < 2) {
- // modalSelect.remove();
- //}
- //$('#' + foodType + '-modal').find('.title').first().html(foodName);
- //$('#' + foodType + '-modal').find('.description').html(description);
- //$('#' + foodType + '-modal').find('.food-main-image').attr('src', image);
- //$('#' + foodType + '-modal').find('.total strong').html('€' + startingPrice);
- //$('#' + foodType + '-modal').attr('data-price', startingPrice);
- //$('#' + foodType + '-modal').attr('data-baseprice', startingPrice);
- //$('#' + foodType + '-modal').attr('data-product_guid', product_guid);
- //////reset checkboxes
- ////$('#' + foodType + '-modal').find('.choices .choice').each(function () {
- //// $(this).find('input').prop("checked", false);
- ////});
- ////reset checkboxes
- //$('#' + foodType + '-modal').find('.choices .choice .topping').each(function () {
- // Reset_Single_Topping($(this));
- //});
- ////reset quantity
- //$('#' + foodType + '-modal').find('.quantity').attr("value", 1);
- ////reset comments
- //$('#' + foodType + '-modal').find('textarea').val("");
- //updateExtraSelectionPrices(1);
- //Validate_Minimum_Order();
- //var largeImage = document.getElementById('largeImage');
- //largeImage.style.display = 'block';
- //largeImage.style.width=200+"px";
- //largeImage.style.height=200+"px";
- //var url=largeImage.getAttribute('src');
- var h=800;
- var w=800;
- const y = window.top.outerHeight / 2 + window.top.screenY - ( h / 2);
- const x = window.top.outerWidth / 2 + window.top.screenX - ( w / 2);
- window.open(url, 'Image', `toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=${w}, height=${h}, top=${y}, left=${x}`);
- //window.open(url,'Image','width=800px,height=800px,resizable=1');
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement