mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
'v3.8.2.1'
This commit is contained in:
@@ -81,7 +81,7 @@ public class Xoh_file_page_wtr {
|
||||
, " <div><a href=\"~{lnki_url}\" xowa_title=\"~{xowa_title}\" class=\"xowa_media_play\" style=\"width:~{play_width}px;max-width:~{play_max_width}px;\" alt=\"Play sound\"></a></div>"
|
||||
, "</div>"
|
||||
, ""
|
||||
), "lnki_url", "xowa_title", "play_width", "play_max_width", "play_icon");
|
||||
), "lnki_url", "xowa_title", "play_width", "play_max_width");
|
||||
public Bry_fmtr Html_main_vid() {return html_main_vid;} private final Bry_fmtr html_main_vid = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last
|
||||
( "<div class=\"fullImageLink\" id=\"file\">"
|
||||
, " <div>"
|
||||
@@ -92,7 +92,7 @@ public class Xoh_file_page_wtr {
|
||||
, " <div><a href=\"~{lnki_url}\" xowa_title=\"~{xowa_title}\" class=\"xowa_media_play\" style=\"width:~{play_width}px;max-width:~{play_max_width}px;\" alt=\"Play sound\"></a></div>"
|
||||
, "</div>"
|
||||
, ""
|
||||
), "elem_id", "lnki_href", "lnki_class", "xowa_title", "lnki_src", "lnki_width", "lnki_height", "lnki_alt", "lnki_url", "play_width", "play_max_width", "play_icon");
|
||||
), "elem_id", "lnki_href", "lnki_class", "xowa_title", "lnki_src", "lnki_width", "lnki_height", "lnki_alt", "lnki_url", "play_width", "play_max_width");
|
||||
public Bry_fmtr Html_alts() {return html_alts;} private final Bry_fmtr html_alts = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last
|
||||
( " <a href=\"~{thumb_href}\" class=\"mw-thumbnail-link\" xowa_title=\"~{xowa_title}\">"
|
||||
, " ~{thumb_width} × ~{thumb_height}"
|
||||
|
||||
@@ -24,12 +24,11 @@ public class Xoh_ns_file_page_mgr implements gplx.core.brys.Bfr_arg {
|
||||
private Xoa_ttl ttl; private Xoh_file_page_wtr html_wtr; private final Xoh_file_page__other_resolutions alt_wtr = new Xoh_file_page__other_resolutions();
|
||||
private final Bry_bfr tmp_bfr = Bry_bfr_.New();
|
||||
private Xow_repo_mgr repo_mgr;
|
||||
private Xof_file_itm xfer_itm; private byte[] file_size_bry; private byte[] play_btn_icon;
|
||||
private Xof_file_itm xfer_itm; private byte[] file_size_bry;
|
||||
private final Xof_img_size img_size = new Xof_img_size(); private final Xof_url_bldr url_bldr = Xof_url_bldr.new_v2();
|
||||
public void Bld_html(Xowe_wiki cur_wiki, Xop_ctx ctx, Xoae_page page, Bry_bfr bfr, Xoa_ttl ttl, Xoh_file_page_wtr html_wtr, Xof_xfer_queue queue) {
|
||||
Xowe_wiki wiki = (Xowe_wiki)page.Commons_mgr().Source_wiki_or(cur_wiki);
|
||||
this.ttl = ttl; this.html_wtr = html_wtr; this.repo_mgr = wiki.File__repo_mgr();
|
||||
this.play_btn_icon = wiki.Html_mgr().Img_media_play_btn();
|
||||
this.xfer_itm = wiki.Html_mgr().Html_wtr().Lnki_wtr().File_wtr().Lnki_eval(Xof_exec_tid.Tid_wiki_file, ctx, ctx.Page(), queue, ttl.Page_txt()
|
||||
, Xop_lnki_type.Id_thumb, Xop_lnki_tkn.Upright_null, html_wtr.Main_img_w(), html_wtr.Main_img_h(), Xof_lnki_time.Null, Xof_lnki_page.Null, Bool_.N);
|
||||
Xof_orig_itm orig = wiki.File_mgr().Orig_mgr().Find_by_ttl_or_null(xfer_itm.Lnki_ttl());
|
||||
@@ -50,9 +49,8 @@ public class Xoh_ns_file_page_mgr implements gplx.core.brys.Bfr_arg {
|
||||
html_wtr.Html_main().Bld_bfr_many(bfr, this, commons_notice);
|
||||
}
|
||||
|
||||
public void Bld_html(Xowe_wiki wiki, Bry_bfr bfr, Xof_file_itm xfer_itm, Xoa_ttl ttl, Xoh_file_page_wtr html_wtr, byte[] file_size_bry, byte[] play_btn_icon) { // TEST:
|
||||
public void Bld_html(Xowe_wiki wiki, Bry_bfr bfr, Xof_file_itm xfer_itm, Xoa_ttl ttl, Xoh_file_page_wtr html_wtr, byte[] file_size_bry) { // TEST:
|
||||
this.ttl = ttl; this.html_wtr = html_wtr; this.repo_mgr = wiki.File__repo_mgr();
|
||||
this.play_btn_icon = play_btn_icon;
|
||||
this.xfer_itm = xfer_itm; this.file_size_bry = file_size_bry;
|
||||
html_wtr.Html_main().Bld_bfr_many(bfr, this, "");
|
||||
}
|
||||
@@ -67,9 +65,9 @@ public class Xoh_ns_file_page_mgr implements gplx.core.brys.Bfr_arg {
|
||||
, alt_bry, xowa_title, alt_wtr);
|
||||
else if (orig_ext.Id_is_video()) // NOTE: video must precede audio else File:***.ogg will not show thumbs
|
||||
html_wtr.Html_main_vid().Bld_bfr_many(bfr, xfer_itm.Html_uid(), xfer_itm.Html_view_url().To_http_file_bry(), Atr_class_image, xowa_title
|
||||
, xfer_itm.Html_view_url().To_http_file_bry(), xfer_itm.Html_w(), xfer_itm.Html_h(), Bry_.Empty, xfer_itm.Html_orig_url().To_http_file_bry(), xfer_itm.Html_w(), xfer_itm.Html_w(), play_btn_icon);
|
||||
, xfer_itm.Html_view_url().To_http_file_bry(), xfer_itm.Html_w(), xfer_itm.Html_h(), Bry_.Empty, xfer_itm.Html_orig_url().To_http_file_bry(), xfer_itm.Html_w(), xfer_itm.Html_w());
|
||||
else if (orig_ext.Id_is_audio())
|
||||
html_wtr.Html_main_aud().Bld_bfr_many(bfr, xfer_itm.Html_orig_url().To_http_file_bry(), xowa_title, xfer_itm.Html_w(), xfer_itm.Html_w(), play_btn_icon);
|
||||
html_wtr.Html_main_aud().Bld_bfr_many(bfr, xfer_itm.Html_orig_url().To_http_file_bry(), xowa_title, xfer_itm.Html_w(), xfer_itm.Html_w());
|
||||
}
|
||||
private static final byte[] Atr_class_image = Bry_.new_a7("image");
|
||||
private static final String Str_commons_notice = String_.Concat_lines_nl_skip_last
|
||||
|
||||
@@ -100,9 +100,9 @@ class Xoh_ns_file_page_mgr_fxt {
|
||||
// file.Orig_ttl_and_redirect_(ttl_bry, Bry_.Empty);
|
||||
file.Init_at_orig(Byte_.Zero, wiki.Domain_bry(), ttl_bry, Xof_ext_.new_by_ttl_(ttl_bry), 0, 0, Bry_.Empty);
|
||||
file.Init_at_hdoc(0, Xof_html_elem.Tid_img);
|
||||
wkr.Bld_html(wiki, bfr, file, ttl, opt, Bry_.To_a7_bry(html_file_size, 0), play_btn_icon); // TEST: must pass in elem_val b/c test only uses 2nd Bld_html while app uses 1st
|
||||
wkr.Bld_html(wiki, bfr, file, ttl, opt, Bry_.To_a7_bry(html_file_size, 0)); // TEST: must pass in elem_val b/c test only uses 2nd Bld_html while app uses 1st
|
||||
Tfds.Eq_str_lines(expd, bfr.To_str_and_clear());
|
||||
} static final byte[] play_btn_icon = Bry_.new_a7("file:///mem/xowa/bin/any/xowa/file/mediawiki.file/play.png");
|
||||
}
|
||||
public static final String Hdr = String_.Concat_lines_nl_skip_last
|
||||
( "<ul id=\"filetoc\">"
|
||||
, " <li>"
|
||||
|
||||
Reference in New Issue
Block a user