mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
'v3.6.3.1'
This commit is contained in:
@@ -20,11 +20,11 @@ import gplx.core.brys.fmtrs.*;
|
||||
import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.xwikis.*; import gplx.xowa.wikis.pages.skins.*;
|
||||
import gplx.xowa.htmls.hrefs.*;
|
||||
class Sites_xtn_skin_itm implements Xopg_xtn_skin_itm {
|
||||
private List_adp itms = List_adp_.new_();
|
||||
private List_adp itms = List_adp_.New();
|
||||
private Sites_html_bldr html_bldr;
|
||||
public Sites_xtn_skin_itm(Sites_html_bldr html_bldr) {this.html_bldr = html_bldr;}
|
||||
public byte Tid() {return Xopg_xtn_skin_itm_tid.Tid_sidebar;}
|
||||
public byte[] Key() {return KEY;} public static final byte[] KEY = Bry_.new_a7("RelatedSites");
|
||||
public byte[] Key() {return KEY;} public static final byte[] KEY = Bry_.new_a7("RelatedSites");
|
||||
public void Add(Sites_regy_itm itm) {itms.Add(itm);}
|
||||
public void Write(Bry_bfr bfr, Xoae_page page) {
|
||||
html_bldr.Bld_all(bfr, page, itms);
|
||||
@@ -32,7 +32,7 @@ class Sites_xtn_skin_itm implements Xopg_xtn_skin_itm {
|
||||
}
|
||||
public class Sites_html_bldr implements gplx.core.brys.Bfr_arg {
|
||||
private Sites_xtn_mgr xtn_mgr;
|
||||
private Bry_bfr tmp_ttl = Bry_bfr.reset_(255);
|
||||
private Bry_bfr tmp_ttl = Bry_bfr_.Reset(255);
|
||||
private List_adp list; private int list_len;
|
||||
private Hash_adp_bry hash = Hash_adp_bry.cs();
|
||||
public Sites_html_bldr(Sites_xtn_mgr xtn_mgr) {this.xtn_mgr = xtn_mgr;}
|
||||
@@ -61,7 +61,7 @@ public class Sites_html_bldr implements gplx.core.brys.Bfr_arg {
|
||||
rv = Bry_.Add(Xoh_href_.Bry__site, rv);
|
||||
return rv;
|
||||
}
|
||||
private static final Bry_fmtr
|
||||
private static final Bry_fmtr
|
||||
fmtr_grp = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last
|
||||
( "<div id='p-relatedsites' class='portal'>"
|
||||
, " <h3>~{related_sites_hdr}</h3>"
|
||||
|
||||
@@ -61,7 +61,7 @@ class Sites_html_bldr_fxt {
|
||||
xtn_mgr.Regy_mgr().Match(page, ttl);
|
||||
}
|
||||
public void Test_bld(String expd) {
|
||||
Bry_bfr tmp_bfr = Bry_bfr.reset_(255);
|
||||
Bry_bfr tmp_bfr = Bry_bfr_.Reset(255);
|
||||
Sites_xtn_skin_itm skin_itm = (Sites_xtn_skin_itm)page.Html_data().Xtn_skin_mgr().Get_or_null(Sites_xtn_skin_itm.KEY);
|
||||
skin_itm.Write(tmp_bfr, page);
|
||||
Tfds.Eq_str_lines(expd, tmp_bfr.To_str_and_clear());
|
||||
|
||||
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.xtns.relatedSites; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*;
|
||||
import gplx.xowa.wikis.xwikis.*; import gplx.xowa.wikis.pages.skins.*;
|
||||
public class Sites_regy_mgr implements GfoInvkAble {
|
||||
public class Sites_regy_mgr implements Gfo_invk {
|
||||
private Hash_adp_bry hash = Hash_adp_bry.cs();
|
||||
private Xow_xwiki_mgr xwiki_mgr;
|
||||
public Sites_regy_mgr(Sites_xtn_mgr xtn_mgr) {this.xtn_mgr = xtn_mgr;}
|
||||
@@ -46,7 +46,7 @@ public class Sites_regy_mgr implements GfoInvkAble {
|
||||
}
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
||||
if (ctx.Match(k, Invk_set_many)) Set_many(m.ReadStrAry("v", "|"));
|
||||
else return GfoInvkAble_.Rv_unhandled;
|
||||
else return Gfo_invk_.Rv_unhandled;
|
||||
return this;
|
||||
} private static final String Invk_set_many = "set_many";
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ public class Sites_xtn_mgr extends Xox_mgr_base {
|
||||
regy_mgr = new Sites_regy_mgr(this);
|
||||
}
|
||||
@Override public boolean Enabled_default() {return false;}
|
||||
@Override public byte[] Xtn_key() {return XTN_KEY;} public static final byte[] XTN_KEY = Bry_.new_a7("RelatedSites");
|
||||
@Override public Xox_mgr Clone_new() {return new Sites_xtn_mgr();}
|
||||
@Override public byte[] Xtn_key() {return XTN_KEY;} public static final byte[] XTN_KEY = Bry_.new_a7("RelatedSites");
|
||||
@Override public Xox_mgr Xtn_clone_new() {return new Sites_xtn_mgr();}
|
||||
@Override public void Xtn_init_by_wiki(Xowe_wiki wiki) {
|
||||
this.wiki = wiki;
|
||||
regy_mgr.Init_by_wiki(wiki);
|
||||
|
||||
Reference in New Issue
Block a user