Skip to content

Commit

Permalink
修改微服务商品分类显示
Browse files Browse the repository at this point in the history
  • Loading branch information
zgt0109 committed May 3, 2016
1 parent 4f3291c commit 6bfb80e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/controllers/pro/booking_items_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def destroy
private

def set_booking_item
@booking_item = BookingItem.where(id: params[:id]).first
@booking_item = @booking.booking_items.where(id: params[:id]).first
return redirect_to booking_items_path, alert: '商品不存在或已删除' unless @booking_item
end

Expand Down
4 changes: 2 additions & 2 deletions app/views/pro/booking_categories/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
p.prev().before(p);
$.ajax({
type: "GET",
url: "/bookings/" + $(this.booking) + "/booking_categories/" + self.closest('.tree-tools').attr('data-id') +"/update_sorts?type=up",
url: "/bookings/" + <%= @booking.id %> + "/booking_categories/" + self.closest('.tree-tools').attr('data-id') +"/update_sorts?type=up",
success: function(data) {
showTip("success","操作成功");
return false;
Expand All @@ -84,7 +84,7 @@
p.next().after(p);
$.ajax({
type: "GET",
url: "/bookings/" + $(this.booking) + "/booking_categories/" + self.closest('.tree-tools').attr('data-id') +"/update_sorts?type=down",
url: "/bookings/" + <%= @booking.id %> + "/booking_categories/" + self.closest('.tree-tools').attr('data-id') +"/update_sorts?type=down",
success: function(data) {
showTip("success","操作成功");
return false;
Expand Down
2 changes: 1 addition & 1 deletion app/views/pro/booking_categories/show.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if(type == 2){
}else{
$.ajax({
type: "GET",
url: "/bookings/" + $(this.booking) + "/booking_categories/" + $("#booking_category_id" + (rel + 1)).val() + "?rel=" + (rel + 1) + "&&type=" + type,
url: "/bookings/" + <%= @booking.id %> + "/booking_categories/" + $("#booking_category_id" + (rel + 1)).val() + "?rel=" + (rel + 1) + "&&type=" + type,
success: function(data) {
return false;
},
Expand Down
2 changes: 1 addition & 1 deletion app/views/pro/booking_items/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
else{
$.ajax({
type: "GET",
url: "/bookings/" + $(this.booking) + "/booking_categories/" + $(this).val() + "?rel=" + ($(this).attr('rel')) + '&&type=1',
url: "/bookings/" + <%= @booking.id %> + "/booking_categories/" + $(this).val() + "?rel=" + ($(this).attr('rel')) + '&&type=1',
success: function(data) {
return false;
},
Expand Down
2 changes: 1 addition & 1 deletion app/views/pro/booking_items/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
else{
$.ajax({
type: "GET",
url: "/bookings/" + $(this.booking) + "/booking_categories/" + $(this).val() + "?rel=" + ($(this).attr('rel')) + '&&type=2',
url: "/bookings/" + <%= @booking.id %> + "/booking_categories/" + $(this).val() + "?rel=" + ($(this).attr('rel')) + '&&type=2',
success: function(data) {
return false;
},
Expand Down

0 comments on commit 6bfb80e

Please sign in to comment.