1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

HTTP Server: Preliminary push of Search code to fix compile error [#289]

This commit is contained in:
gnosygnu
2018-11-27 07:07:35 -05:00
parent 68fe39f5e1
commit 333c507720
3 changed files with 14 additions and 3 deletions

View File

@@ -38,6 +38,11 @@ public class Srch_htmlbar_mgr implements Gfo_invk {
Srch_search_qry qry = Srch_search_qry.New__suggest_box(wiki, wiki.App().Addon_mgr().Itms__search__special().Ns_mgr(), wiki.App().Addon_mgr().Itms__search__special().Auto_wildcard(), results_max, search_bry);
Srch_rslt_cbk__suggest_box cbk = new Srch_rslt_cbk__suggest_box(wiki.Appe(), cbk_func, search_bry);
addon.Search(qry, cbk);
cbkrslt = cbk.Get_js_str();
}
private String cbkrslt;
public String Get_js_rslt() {
return cbkrslt;
}
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
if (ctx.Match(k, Cfg__enabled)) enabled = m.ReadYn("v");

View File

@@ -42,6 +42,11 @@ public class Srch_rslt_cbk__suggest_box implements Srch_rslt_cbk, Gfo_invk {
js_wtr.Ary_term();
js_wtr.Func_term();
Gfo_invk_.Invk_by_key(app.Gui_mgr().Kit().New_cmd_sync(this), Srch_rslt_cbk__suggest_box.Invk__notify);
if (!app.Mode().Tid_is_http())
Gfo_invk_.Invk_by_key(app.Gui_mgr().Kit().New_cmd_sync(this), Srch_rslt_cbk__suggest_box.Invk__notify);
}
public String Get_js_str() {
return js_wtr.To_str_and_clear();
}
private void Notify() {
app.Gui_mgr().Browser_win().Active_html_box().Html_js_eval_script(js_wtr.To_str_and_clear());