// // js for 'add_edit_blog_info' page // // 2013/10/08 // // a list contains all the configs data objects var research_configs_list = new Array(); $(document).ready(function() { // make a configs list from 'research_configs {{{ var obj_keys = Object.keys(research_configs); for (var i=0; i   '; }; $("#cate_btns").html(cate_btns_html); // button actions $('#cate_btns input[type="button"]').on("click", document, function() { // unselect all buttons //console.log(this); $('#cate_btns input[type="button"]').removeClass("selected"); $('#cate_btns input[type="button"]').addClass("unselected"); $(this).removeClass("unselected"); $(this).addClass("selected"); // unselect buttons of combinations $('#comb_divs input[type="button"]').removeClass("selected"); $('#comb_divs input[type="button"]').addClass("unselected"); // hide configs div's $('#conf_divs .conf_comb').hide(); // display category of combinations var cate_id = $(this).attr('id').replace('btn_cate_', ''); $('#comb_divs .comb').hide(); $('#div_comb_'+cate_id).show(); }); // }}} // indicator combinations div's and buttons {{{ var comb_divs_html = ''; for (var i=1; i<=rind_num; i++) { var id = 'div_comb_'+i; comb_divs_html += '\n'; }; $("#comb_divs").html(comb_divs_html); // button actions $('#comb_divs input[type="button"]').on("click", document, function() { // unselect all buttons $('#comb_divs input[type="button"]').removeClass("selected"); $('#comb_divs input[type="button"]').addClass("unselected"); $(this).removeClass("unselected"); $(this).addClass("selected"); // display configs of the combination var comb_id = $(this).attr('id'); $('#conf_divs .conf_comb').hide(); $('#div_conf_'+comb_id).show(); }); // }}} // config div's & info input {{{ var conf_divs_html = ''; for (var i=0; i