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

User_wikis: Refactor xo js includes

This commit is contained in:
gnosygnu
2016-10-26 17:08:07 -04:00
parent 76e2750b5c
commit 169f972019
3 changed files with 20 additions and 15 deletions

View File

@@ -27,6 +27,21 @@ public class Xopg_tag_wtr_{
head_tags.Add(Xopg_tag_itm.New_css_file(css_dir.GenSubFil_nest("xohelp-0.0.1.css")));
head_tags.Add(Xopg_tag_itm.New_js_file(css_dir.GenSubFil_nest("xohelp-0.0.1.js")));
}
public static void Add__xolog(Xopg_tag_mgr head_tags, Io_url http_root) {
Io_url dir = http_root.GenSubDir_nest("bin", "any", "xowa", "html", "res", "src", "xowa", "xolog");
head_tags.Add(Xopg_tag_itm.New_css_file(dir.GenSubFil_nest("xo.log.css")));
head_tags.Add(Xopg_tag_itm.New_js_file(dir.GenSubFil_nest("xo.log.js")));
}
public static void Add__xoajax(Xopg_tag_mgr head_tags, Io_url http_root, Xoa_app app) {
Io_url dir = http_root.GenSubDir_nest("bin", "any", "xowa", "html", "res", "src", "xowa", "xoajax");
head_tags.Add(Xopg_tag_itm.New_js_file(dir.GenSubFil_nest("xo.app.js")));
head_tags.Add(Xopg_tag_itm.New_js_file(dir.GenSubFil_nest(Get_app_js_file(app))));
head_tags.Add(Xopg_tag_itm.New_js_file(dir.GenSubFil_nest("xo.server.js")));
}
private static String Get_app_js_file(Xoa_app app) {
if (app.Mode().Tid_is_http()) return "xo.app.http_server.js";
return gplx.core.envs.Op_sys.Cur().Tid_is_drd() ? "xo.app.drd.js" : "xo.app.swt.js";
}
public static void Add__mustache(Xopg_tag_mgr head_tags, Io_url http_root) {
head_tags.Add(Xopg_tag_itm.New_js_file(http_root.GenSubFil_nest("bin", "any", "xowa", "html", "res", "lib", "mustache", "mustache-2.2.1.js")));
}