mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.11.1.1
This commit is contained in:
@@ -48,7 +48,7 @@ public class Load_page_wkr implements Gfo_thread_wkr {
|
||||
Thread_adp_.Sleep(10);
|
||||
if (hdump_enabled && page.Revision_data().Html_db_id() != -1) {
|
||||
// wiki.Parser_mgr().Parse(page, false);
|
||||
wiki.Html__hdump_rdr().Get_by_ttl(page);
|
||||
wiki.Html__hdump_mgr().Load_mgr().Load(page);
|
||||
}
|
||||
else
|
||||
wiki.Parser_mgr().Parse(page, false);
|
||||
|
||||
@@ -112,7 +112,7 @@ public class Xog_html_itm implements Xog_js_wkr, GfoInvkAble, GfoEvObj {
|
||||
GfoInvkAble_.InvkCmd_msg(cmd_sync, Invk_html_elem_atr_set, m);
|
||||
}
|
||||
}
|
||||
public void Html_redlink(String html_uid) {Html_doc_atr_append_or_set(html_uid, "class", gplx.xowa.htmls.lnkis.Xoh_redlink_utl.New_str);}
|
||||
public void Html_redlink(String html_uid) {Html_doc_atr_append_or_set(html_uid, "class", gplx.xowa.htmls.core.wkrs.lnkis.htmls.Xoh_redlink_utl.New_str);}
|
||||
private void Html_doc_atr_append_or_set(String elem_id, String atr_key, String atr_val) {
|
||||
GfoMsg m = GfoMsg_.new_cast_(Invk_html_doc_atr_append_or_set).Add("elem_id", elem_id).Add("atr_key", atr_key).Add("atr_val", atr_val);
|
||||
GfoInvkAble_.InvkCmd_msg(cmd_sync, Invk_html_doc_atr_append_or_set, m);
|
||||
|
||||
@@ -161,7 +161,7 @@ public class Xog_tab_itm implements GfoInvkAble {
|
||||
return;
|
||||
}
|
||||
if (!page.Redirected()) page.Url_(url); // NOTE: handle redirect from commons
|
||||
if (page.Ttl().Anch_bgn() != Bry_.NotFound) page.Url().Anch_bry_(page.Ttl().Anch_txt()); // NOTE: occurs when page is a redirect to an anchor; EX: w:Duck race -> Rubber duck#Races
|
||||
if (page.Ttl().Anch_bgn() != Bry_find_.Not_found) page.Url().Anch_bry_(page.Ttl().Anch_txt()); // NOTE: occurs when page is a redirect to an anchor; EX: w:Duck race -> Rubber duck#Races
|
||||
history_mgr.Add(page);
|
||||
Xog_tab_itm_read_mgr.Show_page(this, page, true);
|
||||
if (app.Api_root().Usr().History().Enabled()) {
|
||||
@@ -177,7 +177,7 @@ public class Xog_tab_itm implements GfoInvkAble {
|
||||
Xof_fsdb_mgr fsdb_mgr = wiki.File_mgr().Fsdb_mgr();
|
||||
async_wkr = new Xof_file_wkr(wiki.File__orig_mgr(), fsdb_mgr.Bin_mgr(), fsdb_mgr.Mnt_mgr(), app.Usere().User_db_mgr().Cache_mgr(), wiki.File__repo_mgr(), html_itm, page, page.Hdump_data().Imgs());
|
||||
if (wiki.Html__hdump_enabled() && page.Revision_data().Html_db_id() == -1) {
|
||||
wiki.Html__hdump_wtr().Save(page);
|
||||
wiki.Html__hdump_mgr().Save_mgr().Save(page);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -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.guis.views; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*;
|
||||
import gplx.gfui.*; import gplx.xowa.htmls.*; import gplx.xowa.wikis.pages.*;
|
||||
import gplx.gfui.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.htmls.*; import gplx.xowa.wikis.pages.*;
|
||||
import gplx.xowa.wikis.nss.*;
|
||||
import gplx.xowa.parsers.*; import gplx.xowa.parsers.tmpls.*;
|
||||
public class Xog_tab_itm_edit_mgr {
|
||||
@@ -34,7 +34,7 @@ public class Xog_tab_itm_edit_mgr {
|
||||
Invalidate(wiki);
|
||||
page.Data_raw_(new_text);
|
||||
wiki.Parser_mgr().Parse(page, true); // refresh html
|
||||
if (wiki.Html__hdump_enabled()) wiki.Html__hdump_wtr().Save(page); // must go after wiki.Parse
|
||||
if (wiki.Html__hdump_enabled()) wiki.Html__hdump_mgr().Save_mgr().Save(page); // must go after wiki.Parse
|
||||
win_itm.Usr_dlg().Prog_one("", "", "saved page ~{0}", String_.new_u8(page.Ttl().Full_txt_raw())); // NOTE: show message after Parse, b/c Parse will flash "Loading page"; DATE:2014-05-17
|
||||
if (!quick_save) { // full_save; save page and go to read mode
|
||||
page.Html_data().Edit_preview_(Bry_.Empty);
|
||||
|
||||
@@ -124,7 +124,7 @@ public class Xog_win_itm implements GfoInvkAble, GfoEvObj {
|
||||
private void Win__link_clicked(String anchor_raw) {
|
||||
String url = url_box.Text();
|
||||
int pos = String_.FindFwd(url, gplx.langs.htmls.Html_tag_.Anchor_str);
|
||||
if (pos != Bry_.NotFound) url = String_.Mid(url, 0, pos);
|
||||
if (pos != Bry_find_.Not_found) url = String_.Mid(url, 0, pos);
|
||||
String anchor_str = Parse_evt_location_changing(anchor_raw);
|
||||
byte[] anchor_bry = Bry_.new_u8(anchor_str);
|
||||
Xog_tab_itm tab = tab_mgr.Active_tab(); Xoae_page page = tab.Page();
|
||||
@@ -146,7 +146,7 @@ public class Xog_win_itm implements GfoInvkAble, GfoEvObj {
|
||||
}
|
||||
private static String Parse_evt_location_changing(String v) { // EX: about:blank#anchor -> anchor
|
||||
int pos = String_.FindFwd(v, gplx.langs.htmls.Html_tag_.Anchor_str);
|
||||
return pos == Bry_.NotFound
|
||||
return pos == Bry_find_.Not_found
|
||||
? null
|
||||
: String_.Mid(v, pos + 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user