mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
'v3.7.2.1'
This commit is contained in:
@@ -36,16 +36,16 @@ class Xou_user_ {
|
||||
}
|
||||
public static void Bookmarks_make(Xoae_app app, Xowe_wiki home_wiki) {
|
||||
app.Usr_dlg().Log_many(GRP_KEY, "bookmarks.create", "creating bookmarks page");
|
||||
home_wiki.Db_mgr().Save_mgr().Data_create(Xoa_ttl.parse(home_wiki, Bry_.new_a7("Data:Bookmarks")), Bry_.new_a7(Bookmarks_text));
|
||||
home_wiki.Db_mgr().Save_mgr().Data_create(Xoa_ttl.Parse(home_wiki, Bry_.new_a7("Data:Bookmarks")), Bry_.new_a7(Bookmarks_text));
|
||||
}
|
||||
public static final String User_system_cfg_text = String_.Concat_lines_nl
|
||||
public static final String User_system_cfg_text = String_.Concat_lines_nl
|
||||
( "app.scripts.txns.get('user.prefs.general').version_('" + Xoa_app_.Version + "').bgn();"
|
||||
, "app.files.download.enabled_('y');" // default to true; DATE:2015-01-05
|
||||
, "app.files.math.enabled_('y');"
|
||||
, "app.files.math.renderer_('mathjax');"
|
||||
, "app.scripts.txns.get('user.prefs.general').end();\n"
|
||||
);
|
||||
public static final String Bookmarks_text = String_.Concat_lines_nl
|
||||
public static final String Bookmarks_text = String_.Concat_lines_nl
|
||||
( "Bookmarks are added automatically to the bottom of the page. All other text is not modified."
|
||||
, ""
|
||||
, "Please delete bookmarks by editing this page."
|
||||
|
||||
@@ -77,9 +77,9 @@ public class Xoue_user implements Xou_user, Gfo_evt_mgr_owner, Gfo_invk {
|
||||
Bry_bfr tmp_bfr = wiki.Utl__bfr_mkr().Get_k004();
|
||||
bookmarks_add_fmtr.Bld_bfr_many(tmp_bfr, wiki_domain, ttl_full_txt);
|
||||
byte[] new_entry = tmp_bfr.To_bry_and_rls();
|
||||
Xoa_ttl bookmarks_ttl = Xoa_ttl.parse(wiki, Bry_data_bookmarks);
|
||||
Xoa_ttl bookmarks_ttl = Xoa_ttl.Parse(wiki, Bry_data_bookmarks);
|
||||
Xoae_page bookmarks_page = wiki.Data_mgr().Load_page_by_ttl(bookmarks_ttl);
|
||||
byte[] new_data = Bry_.Add(bookmarks_page.Data_raw(), new_entry);
|
||||
byte[] new_data = Bry_.Add(bookmarks_page.Db().Text().Text_bry(), new_entry);
|
||||
wiki.Db_mgr().Save_mgr().Data_update(bookmarks_page, new_data);
|
||||
} private Bry_fmtr bookmarks_add_fmtr = Bry_fmtr.new_("* [[~{wiki_key}:~{page_name}]]\n", "wiki_key", "page_name"); byte[] Bry_data_bookmarks = Bry_.new_a7("Data:Bookmarks");
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
||||
|
||||
@@ -28,7 +28,7 @@ public class Xows_bmk_page implements Xow_special_page {
|
||||
page.Html_data().Head_mgr().Itm__dbui().Init(app).Enabled_y_();
|
||||
Bry_bfr bfr = wiki.Utl__bfr_mkr().Get_m001();
|
||||
ui_tbl.Select(bfr, Xoud_bmk_mgr.Owner_root);
|
||||
page.Hdump_data().Body_(bfr.To_bry_and_rls());
|
||||
page.Db().Html().Html_bry_(bfr.To_bry_and_rls());
|
||||
}
|
||||
|
||||
public Xow_special_page Special__clone() {return this;}
|
||||
|
||||
@@ -26,7 +26,7 @@ public class Xou_history_html implements gplx.core.brys.Bfr_arg, Xow_special_pag
|
||||
mgr.Sort();
|
||||
Bry_bfr bfr = app.Utl__bfr_mkr().Get_m001();
|
||||
html_grp.Bld_bfr_many(bfr, this);
|
||||
page.Data_raw_(bfr.To_bry_and_rls());
|
||||
page.Db().Text().Text_bry_(bfr.To_bry_and_rls());
|
||||
}
|
||||
public void Bfr_arg__add(Bry_bfr bfr) {
|
||||
int len = mgr.Len();
|
||||
|
||||
@@ -47,9 +47,8 @@ public class Xou_history_mgr implements Gfo_invk {
|
||||
Xoa_url url = page.Url();
|
||||
Xoa_ttl ttl = page.Ttl();
|
||||
byte[] page_ttl = null;
|
||||
List_adp redirect_list = page.Redirected_ttls();
|
||||
if (redirect_list.Count() > 0) // page was redirected; add src ttl to history, not trg; EX: UK -> United Kingdom; add "UK"; DATE:2014-02-28
|
||||
page_ttl = page.Redirected_ttls__itm_0();
|
||||
if (page.Redirect().Itms__len() > 0) // page was redirected; add src ttl to history, not trg; EX: UK -> United Kingdom; add "UK"; DATE:2014-02-28
|
||||
page_ttl = page.Redirect().Itms__get_at(0).Ttl().Full_db();
|
||||
else {
|
||||
page_ttl = Bry_.Add(ttl.Ns().Name_db_w_colon(), ttl.Page_txt()); // use ttl.Page_txt() b/c it normalizes space/casing (url.Page_txt does not)
|
||||
if (url.Qargs_ary().length > 0)
|
||||
|
||||
@@ -65,9 +65,9 @@ class Xou_history_mgr_fxt {
|
||||
}
|
||||
public Xou_history_mgr_fxt Add_one(String ttl_str, String arg_str) {
|
||||
byte[] ttl_bry = Bry_.new_u8(ttl_str);
|
||||
Xoa_ttl ttl = Xoa_ttl.parse(wiki, ttl_bry);
|
||||
Xoa_ttl ttl = Xoa_ttl.Parse(wiki, ttl_bry);
|
||||
Xoae_page page = Xoae_page.New_test(wiki, ttl);
|
||||
page.Revision_data().Modified_on_(DateAdp_.Now());
|
||||
page.Db().Page().Modified_on_(DateAdp_.Now());
|
||||
byte[] url_bry = ttl_bry;
|
||||
if (arg_str != null) url_bry = Bry_.Add(url_bry, Bry_.new_u8(arg_str));
|
||||
Xoa_url url = wiki.Utl__url_parser().Parse(url_bry);
|
||||
|
||||
@@ -26,7 +26,7 @@ public class Xoud_history_special implements Xow_special_page {
|
||||
page.Html_data().Head_mgr().Itm__dbui().Init(app).Enabled_y_();
|
||||
Bry_bfr bfr = wiki.Utl__bfr_mkr().Get_m001();
|
||||
ui_tbl.Select(bfr, 100);
|
||||
page.Hdump_data().Body_(bfr.To_bry_and_rls());
|
||||
page.Db().Html().Html_bry_(bfr.To_bry_and_rls());
|
||||
}
|
||||
|
||||
public Xow_special_page Special__clone() {return this;}
|
||||
|
||||
@@ -55,7 +55,7 @@ public class Prefs_mgr implements Gfo_invk {
|
||||
} private Bry_fmtr props_get_fmtr;
|
||||
private void Props_set_and_reload() {
|
||||
Xoae_page page = app.Gui_mgr().Browser_win().Active_page();
|
||||
Props_set(page.Data_raw());
|
||||
Props_set(page.Db().Text().Text_bry());
|
||||
page.Wikie().Parser_mgr().Parse(page, true); // reparse in order to save new values to root; needed for history and going back / fwd; DATE:2014-02-07
|
||||
// app.Api_root().Gui().Page().View().Reload(); // force reload to update page; needed for language; DATE:2014-05-26; NOTE: deactivate on 2015-08-13; refreshing page causes options to not show
|
||||
Xog_tab_itm tab = app.Gui_mgr().Browser_win().Active_tab(); if (tab != null) tab.Exec_notify(Bool_.Y, "options saved");
|
||||
|
||||
Reference in New Issue
Block a user