From 7f679e03dc040960f7ce4f5ded9c8afe37cc8215 Mon Sep 17 00:00:00 2001 From: chiu Date: Wed, 18 Sep 2019 22:26:39 +0800 Subject: [PATCH] Update categories_order.html.erb --- app/views/admin/archive_files/categories_order.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/admin/archive_files/categories_order.html.erb b/app/views/admin/archive_files/categories_order.html.erb index 9b717be..f3dd1d5 100644 --- a/app/views/admin/archive_files/categories_order.html.erb +++ b/app/views/admin/archive_files/categories_order.html.erb @@ -4,11 +4,11 @@ $('form[name="category_sort_number_form"]').submit(function(){ var eles = $('form[name="category_sort_number_form"]').serialize().split('&') var keys=[],values=[] - eles.each(function(){ - var temp = this.split('=') + for (var ele in eles){ + var temp = ele.split('=') keys.push(temp[0]) values.push(temp[1]) - }) + } if (navigator.onLine) { $.ajax({ url : "/admin/archive_files/categories_order",