var dict_pre_searching=false; var dict_pre_search_curr_word=""; var dict_search_xml_http=null; function search_book_filter(objid,type){ if(document.getElementById(objid).checked==true){ $("."+type).show(); } else{ $("."+type).hide(); } } function dict_bold_word_all_select(){ var wordcount=$("#bold_word_count").val(); for(var i=0;i0){ strHistory+="清空历史记录"; } for(var i=0;i"+word+""; strHistory+=""; } $("#dict_ref_search_result").html(strHistory); } function search_input_onfocus(){ if($("#dict_ref_search_input").val()==""){ search_show_history(); } } function search_input_keyup(e,obj){ var keynum var keychar var numcheck if($("#dict_ref_search_input").val()==""){ search_show_history(); $("#pre_search_result").hide(); return; } if(window.event) // IE { keynum = e.keyCode } else if(e.which) // Netscape/Firefox/Opera { keynum = e.which } var keychar = String.fromCharCode(keynum) if(keynum==13){ search_search(obj.value); } else{ if(obj.value.indexOf(" ")>=0){ //search_pre_sent(obj.value); } else{ $("#pre_search_sent").hide(); } $("#pre_search_result").show(); search_pre_search(obj.value); } } function search_pre_sent(word){ pali_sent_get_word(word,function(result){ let html=""; try{ let arrResult= JSON.parse(result); for(x in arrResult){ html+=arrResult[x].text+"
"; } $("#pre_search_sent_title_right").html("总共"+arrResult.lenght); $("#pre_search_sent_content").html(html); $("#pre_search_sent").show(); } catch(e){ console.error(e.message); } }); } function cls_word_search_history(){ localStorage.searchword=""; $("#dict_ref_search_result").html(""); } function search_edit_now(book,para,title){ var res_list = new Array(); res_list.push({"type":"1","album_id":"-1","book":book,"parNum":para,"parlist":para,"title":title+"-"+para}); res_list.push({"type":"6","album_id":"-1","book":book,"parNum":para,"parlist":para,"title":title+"-"+para}); var res_data = JSON.stringify(res_list); window.open("../studio/project.php?op=create&data="+res_data,"_blank"); }