- status: done --> closed
Schnark: this notice is more for you, but I suppose it's helpful to try to document this for any one else extending the XOWA html / javascript system.
I've made a number of changes to the html skin in preparation for the Android version later this year. This cleanup was long overdue as I've just been accumulating new features without taking a step back and redesigning.
This effort can be broken up into two categories:
** (1) Cleanup xowa.gfs, the page_read, page_edit and page_html formats **
In the xowa.gfs, the page_read, page_edit and page_html formats have been cleaned up. Most of this involved removing a lot of the declarations from the head and having them programatically controlled from the XOWA Java code.
My main objective was to selectively turn elements on / off...
For example, the stylesheet for search_suggest.js was hard-coded into the page_read, page_edit, page_html sections. I've removed it entirely and now insert it dynamically if it's enabled / disabled in home/wiki/Help:Options/Search_suggest. It will probably also be disabled for v1 of Android.
I list a preliminary version of the page_read format below.
** (2) /javascript/ filesystem layout to be change to a more MediaWiki like format **
For historical reasons, most of the javascript is in /xowa/bin/any/javascript. I've moved most of these to /xowa/bin/any/xowa/html/resources/ instead. My main objective here is to build a filesystem that approximates the MediaWiki one.
Here is an explanation of the path:
There are certain exceptions:
Hope the above makes sense. Any feedback / suggestion is welcome.
Thanks.
:::text
<!DOCTYPE html>
<html dir="~{page_lang_ltr}">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title>~{page_name} - XOWA</title>
<link rel="shortcut icon" href="~{app_root_dir}user/anonymous/app/img/window/chrome/xowa.png" />
<link rel="stylesheet" href="~{html_css_common_path}" type="text/css">
<link rel="stylesheet" href="~{html_css_wiki_path}" type="text/css">~{xowa_head}
<script type='text/javascript'>
window.onload = function() {
if ('~{<>app.user.wiki.gui.cfg_browser.content_editable;<>}' == 'y') {
var elem = document.getElementById('firstHeading');
xowa_elem_select(elem);
}
}
</script>
<style type="text/css">
div#simpleSearch #searchButton,
div#simpleSearch #mw-searchButton {
~{<>lang.x_axis_end;<>}: 0;
direction: ~{<>lang.dir_str;<>};
}
</style>
</head>
<body class="mediawiki ~{page_lang_ltr} sitedir-~{page_lang_ltr} ~{page_body_cls} skin-vector action-submit vector-animateLayout"~{html_content_editable} spellcheck="false">
<div id="mw-page-base" class="noprint"></div>
<div id="mw-head-base" class="noprint"></div>
<div id="content" class="mw-body">
<h1 id="firstHeading" class="firstHeading"><span>~{page_title}</span></h1>
<div id="bodyContent" class="mw-body-content">
<div id="siteSub">From XOWA: a free, open-source, offline wiki application</div>
<div id="contentSub">~{page_content_sub}</div>~{page_jumpto}
<div id="mw-content-text" lang="en" dir="~{page_lang_ltr}" class="mw-content-~{page_lang_ltr}">~{page_data}
<div class="visualClear">
~{page_langs}<br/><br/>
~{page_modified_on_msg}
<div style='float:right'>
<ul style='-moz-column-count: 2; list-style:none;font-size:xx-small;'>
<li>~{<>app.user.msgs.get('xowa-portal-version');<>}</li>
<li>~{<>app.user.msgs.get('xowa-portal-build_time');<>}</li>
<li>~{app_version}</li>
<li>~{app_build_date}</li>
</ul>
</div>
<br/>
</div>
</div>
</div>
</div>
<div id="mw-head" class="noprint">
~{portal_div_personal}
~{portal_div_ns}
~{portal_div_view}
</div>
<div id='mw-panel' class='noprint'>
~{portal_div_logo}
~{portal_div_home}
~{portal_sidebar}
~{portal_div_xtn}
~{portal_div_wikis}
</div>
</body>
</html>
<!-- page_id=~{page_id} -->
Anonymous