diff --git a/public/src/forum/admin/categories.js b/public/src/forum/admin/categories.js index 6a2f5c0fd0..39efe81616 100644 --- a/public/src/forum/admin/categories.js +++ b/public/src/forum/admin/categories.js @@ -5,7 +5,7 @@ function modified(el) { var cid = $(el).parents('li').attr('data-cid'); modified_categories[cid] = modified_categories[cid] || {}; - modified_categories[cid][el.getAttribute('data-name')] = el.value; + modified_categories[cid][el.attr('data-name')] = el.val(); } function save() { @@ -14,16 +14,17 @@ function save() { } function select_icon(el) { - var selected = el.className.replace(' icon-2x', ''); + var selected = el.attr('class').replace(' icon-2x', ''); jQuery('#icons .selected').removeClass('selected'); - jQuery('#icons .' + selected).parent().addClass('selected'); + if(selected) + jQuery('#icons .' + selected).parent().addClass('selected'); bootbox.confirm('