diff options
author | prashantsinalkar | 2017-02-02 17:39:17 +0530 |
---|---|---|
committer | prashantsinalkar | 2019-09-01 22:13:10 +0530 |
commit | 0f227125f2c6d996d1528048d00f3e9a23e08df0 (patch) | |
tree | d2d46a8d100dcaa1cc089b0946bcfd5e5e748ed9 /js | |
parent | 8ffe399aa099cb67bed1611873cf655693f00521 (diff) | |
download | r_tbc_fixer-0f227125f2c6d996d1528048d00f3e9a23e08df0.tar.gz r_tbc_fixer-0f227125f2c6d996d1528048d00f3e9a23e08df0.tar.bz2 r_tbc_fixer-0f227125f2c6d996d1528048d00f3e9a23e08df0.zip |
added some minor changes
Diffstat (limited to 'js')
-rw-r--r-- | js/textbook_companion_fixer_edit_category.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/js/textbook_companion_fixer_edit_category.js b/js/textbook_companion_fixer_edit_category.js index 2821382..f10973b 100644 --- a/js/textbook_companion_fixer_edit_category.js +++ b/js/textbook_companion_fixer_edit_category.js @@ -74,20 +74,28 @@ $("input[name='ids[]']:checked").each(function (){ main_cat_chk_value.push(parseInt($(this).val())); }); - console.log(modPath); + var sub_cat_select_value = $.map($('select[name="subcats"] :selected'), function (val, _) { + var newObj = {}; + if(val.value > '0'){ + newObj.subcats = val.value; + } + return newObj; + }); + var pref_id = $('.prefrence_id').val(); + console.log(pref_id); $.ajax({ url: modPath, type: "POST", data: { pref_id: pref_id, main_category: main_cat_chk_value, - subcategory: "" + sub_category: sub_cat_select_value }, dataType: "html", success: function(data) { $updating.hide(); $done.show(); - console.log("data: +" + main_cat_chk_value); + console.log("data1: " + main_cat_chk_value + " data2: "+ sub_cat_select_value); $done.fadeOut("slow"); //alert("ok"); } |