diff --git a/app/assets/javascripts/addorder.js b/app/assets/javascripts/addorder.js index a8de44b1..e49f7446 100755 --- a/app/assets/javascripts/addorder.js +++ b/app/assets/javascripts/addorder.js @@ -12,6 +12,16 @@ $(function() { var menu_list = $('.menu_items_list'); menu_list.empty(); + + if (type != -1 && modify_order != -1) { + url_item = '../../../../../'+url_item; + } + if(modify_order == -1 && type != -1){ + url_item = '../../../../'+url_item; + } + if (type ==-1 && modify_order == -1){ + url_item = url_item + } //Start Ajax $.ajax({ type: "GET", @@ -31,37 +41,47 @@ $(function() { item_attributes = []; if (product[field].image_path) { - image_path = product[field].image_path.url; + if (type != -1 && modify_order != -1) { + image_path = '../../'+product[field].image_path.url; + } + if(modify_order == -1 && type != -1){ + image_path = '../../../../'+product[field].image_path.url; + } + if (type ==-1 && modify_order == -1){ + image_path = product[field].image_path.url; + } }else{ image_path = "/image/logo.png"; } - row = '
' + row = '
' +'
' +'
'+ product[field].name +'
' - +"
" + +"' +'
' - +"