mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
'v3.4.4.1'
This commit is contained in:
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.addons.apps.file_browsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*;
|
||||
import gplx.xowa.specials.*;
|
||||
public class Fbrow_addon implements Xoax_addon_itm, Xoax_addon_itm__sp {
|
||||
public class Fbrow_addon implements Xoax_addon_itm, Xoax_addon_itm__special {
|
||||
public Xows_page[] Pages_ary() {
|
||||
return new Xows_page[]
|
||||
{ Fbrow_special_page.Prototype
|
||||
|
||||
@@ -16,9 +16,8 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.addons.apps.file_browsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*;
|
||||
import gplx.core.ios.*; import gplx.core.net.*;
|
||||
import gplx.xowa.specials.*;
|
||||
import gplx.xowa.wikis.pages.*;
|
||||
import gplx.xowa.specials.*; import gplx.core.net.*; import gplx.xowa.wikis.pages.*;
|
||||
import gplx.core.ios.*;
|
||||
public class Fbrow_special_page implements Xows_page {
|
||||
public void Special__gen(Xow_wiki wiki, Xoa_page page, Xoa_url url, Xoa_ttl ttl) {
|
||||
Xopage_html_data html_data = Write_html(wiki.App(), url.Qargs_ary());
|
||||
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.addons.apps.file_browsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*;
|
||||
import gplx.xowa.specials.*; import gplx.core.ios.*; import gplx.core.net.*;
|
||||
import gplx.xowa.specials.*; import gplx.core.net.*; import gplx.xowa.wikis.pages.*;
|
||||
public class Wikis_list_page implements Xows_page {
|
||||
public void Special__gen(Xow_wiki wiki, Xoa_page page, Xoa_url url, Xoa_ttl ttl) {
|
||||
Xoa_url_arg_mgr arg_mgr = new Xoa_url_arg_mgr(null).Init(url.Qargs_ary());
|
||||
|
||||
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.addons.apps.file_browsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*;
|
||||
import gplx.core.primitives.*; import gplx.core.net.*;
|
||||
class Xoa_url_arg_mgr {
|
||||
public class Xoa_url_arg_mgr {
|
||||
private final Hash_adp_bry hash = Hash_adp_bry.cs();
|
||||
private final Xoa_url_enum_mgr enm_mgr;
|
||||
public Xoa_url_arg_mgr(Xoa_url_enum_mgr enm_mgr) {this.enm_mgr = enm_mgr;}
|
||||
@@ -48,27 +48,3 @@ class Xoa_url_arg_mgr {
|
||||
return arg == null ? null : String_.new_u8(arg.Val_bry());
|
||||
}
|
||||
}
|
||||
class Xoa_url_enum_mgr {
|
||||
private final Hash_adp_bry hash = Hash_adp_bry.cs();
|
||||
public Xoa_url_enum_mgr(Xoa_url_enum_itm... ary) {
|
||||
int len = ary.length;
|
||||
for (int i = 0; i < len; ++i) {
|
||||
Xoa_url_enum_itm itm = ary[i];
|
||||
hash.Add_bry_obj(itm.Key(), itm);
|
||||
}
|
||||
}
|
||||
public Xoa_url_enum_itm Get(byte[] key) {return (Xoa_url_enum_itm)hash.Get_by_bry(key);}
|
||||
}
|
||||
class Xoa_url_enum_itm {
|
||||
private final Hash_adp_bry hash = Hash_adp_bry.cs();
|
||||
public Xoa_url_enum_itm(byte[] key) {this.key = key;}
|
||||
public byte[] Key() {return key;} private final byte[] key;
|
||||
public Xoa_url_enum_itm Add(String key, int val) {
|
||||
hash.Add_bry_obj(Bry_.new_u8(key), Int_obj_val.new_(val));
|
||||
return this;
|
||||
}
|
||||
public int Get_as_int_or(byte[] val, int or) {
|
||||
Int_obj_val rv = (Int_obj_val)hash.Get_by_bry(val);
|
||||
return rv == null ? or : rv.Val();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
XOWA: the XOWA Offline Wiki Application
|
||||
Copyright (C) 2012 gnosygnu@gmail.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.addons.apps.file_browsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*;
|
||||
public class Xoa_url_enum_itm {
|
||||
private final Hash_adp_bry hash = Hash_adp_bry.cs();
|
||||
public Xoa_url_enum_itm(byte[] key) {this.key = key;}
|
||||
public byte[] Key() {return key;} private final byte[] key;
|
||||
public Xoa_url_enum_itm Add(String key, int val) {
|
||||
hash.Add_bry_int(Bry_.new_u8(key), val);
|
||||
return this;
|
||||
}
|
||||
public int Get_as_int_or(byte[] val, int or) {return hash.Get_as_int_or(val, or);}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
XOWA: the XOWA Offline Wiki Application
|
||||
Copyright (C) 2012 gnosygnu@gmail.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.addons.apps.file_browsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*;
|
||||
public class Xoa_url_enum_mgr {
|
||||
private final Hash_adp_bry hash = Hash_adp_bry.cs();
|
||||
public Xoa_url_enum_mgr(Xoa_url_enum_itm... ary) {
|
||||
int len = ary.length;
|
||||
for (int i = 0; i < len; ++i) {
|
||||
Xoa_url_enum_itm itm = ary[i];
|
||||
hash.Add_bry_obj(itm.Key(), itm);
|
||||
}
|
||||
}
|
||||
public Xoa_url_enum_itm Get(byte[] key) {return (Xoa_url_enum_itm)hash.Get_by_bry(key);}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
XOWA: the XOWA Offline Wiki Application
|
||||
Copyright (C) 2012 gnosygnu@gmail.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.addons.apps.file_browsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*;
|
||||
import gplx.xowa.wikis.pages.*;
|
||||
public class Xopage_html_data {
|
||||
public Xopage_html_data(byte[] display_ttl, byte[] body) {
|
||||
this.display_ttl = display_ttl;
|
||||
this.body = body;
|
||||
}
|
||||
public byte[] Display_ttl() {return display_ttl;} private byte[] display_ttl;
|
||||
public byte[] Body() {return body;} private final byte[] body;
|
||||
public Xopg_tag_mgr Head_tags() {return head_tags;} private final Xopg_tag_mgr head_tags = new Xopg_tag_mgr();
|
||||
public Xopg_tag_mgr Tail_tags() {return tail_tags;} private final Xopg_tag_mgr tail_tags = new Xopg_tag_mgr();
|
||||
|
||||
public void Apply(Xoa_page page) {
|
||||
page.Html_data().Html_restricted_n_();
|
||||
page.Html_data().Skip_parse_(Bool_.Y);
|
||||
page.Html_data().Display_ttl_(display_ttl);
|
||||
page.Html_data().Custom_body_(this.Body());
|
||||
page.Html_data().Custom_head_tags().Copy(head_tags);
|
||||
page.Html_data().Custom_tail_tags().Copy(head_tags);
|
||||
}
|
||||
|
||||
public static Xopage_html_data err_(String msg) {return new Xopage_html_data(Bry_.Empty, Bry_.new_u8(msg));}
|
||||
}
|
||||
Reference in New Issue
Block a user