diff --git a/app/assets/javascripts/OQS.js b/app/assets/javascripts/OQS.js index 2bbf07bb..1409c829 100755 --- a/app/assets/javascripts/OQS.js +++ b/app/assets/javascripts/OQS.js @@ -93,8 +93,7 @@ $(document).on('turbolinks:load', function() { var oqs_append = $('.oqs_append'); oqs_append.empty(); var filter = $('.filter').text(); - - console.log(table_id) + //Start Ajax $.ajax({ type: "GET", diff --git a/app/assets/javascripts/addorder.js b/app/assets/javascripts/addorder.js index a8de44b1..9563131d 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 = '