mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-15 07:19:11 -04:00
Bld
Former-commit-id: 9f827ea900697c11ec3b530e0cf729df2055e961 [formerly 8dbf0650c653c56aad94d80d695ace366c26f1a7] Former-commit-id: 2dce6de4882c80d0a7af471576bc44d2e40d1bde
This commit is contained in:
parent
d83d69f61a
commit
19d7dcb1ec
@ -275,12 +275,18 @@
|
|||||||
<p>This application needs a ZIM archive to work. You can get one from the <a href="#downloads">download links panel</a>.</p>
|
<p>This application needs a ZIM archive to work. You can get one from the <a href="#downloads">download links panel</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="openLocalFiles" style="display: none;">
|
<div id="openLocalFiles" style="display: none;">
|
||||||
<div class="row">
|
<div id="UWPInstructions" class="row">
|
||||||
<p>
|
<p>
|
||||||
If you have a single (unsplit) ZIM archive, use the <b>first</b> button.<br />
|
If you have a single (unsplit) ZIM archive, use the <b>first</b> button.<br />
|
||||||
For a split archive (.zimaa, .zimab, etc.) or multiple archives, use the <b>second</b> button.
|
For a split archive (.zimaa, .zimab, etc.) or multiple archives, use the <b>second</b> button.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="instructions" class="row" style="display:none;">
|
||||||
|
<p>
|
||||||
|
Please choose the location of your ZIM archive.<br />
|
||||||
|
For a split archive (.zimaa, .zimab, etc.) you must select <b>all</b> the split parts.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-6">
|
<div class="col-xs-6">
|
||||||
<input type="button" class="btn btn-primary" value="Select single archive" id="archiveFile" accept=".zim" />
|
<input type="button" class="btn btn-primary" value="Select single archive" id="archiveFile" accept=".zim" />
|
||||||
|
@ -429,6 +429,15 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'abstractFile
|
|||||||
if (params.localStorage && !params.pickedFolder && !params.pickedFile) {
|
if (params.localStorage && !params.pickedFolder && !params.pickedFile) {
|
||||||
params.pickedFolder = params.localStorage;
|
params.pickedFolder = params.localStorage;
|
||||||
}
|
}
|
||||||
|
if (typeof Windows === 'undefined') {
|
||||||
|
//If not UWP, display legacy File Select
|
||||||
|
document.getElementById('archiveFile').style.display = "none";
|
||||||
|
document.getElementById('archiveFiles').style.display = "none";
|
||||||
|
document.getElementById('UWPInstructions').style.display = "none";
|
||||||
|
document.getElementById('instructions').style.display = "inline";
|
||||||
|
document.getElementById('archiveFilesLegacy').style.display = "inline";
|
||||||
|
$('#archiveFilesLegacy').on('change', setLocalArchiveFromFileSelect)
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
$('#btnAbout').on('click', function (e) {
|
$('#btnAbout').on('click', function (e) {
|
||||||
@ -1124,6 +1133,10 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'abstractFile
|
|||||||
*/
|
*/
|
||||||
function displayFileSelect() {
|
function displayFileSelect() {
|
||||||
$('#openLocalFiles').show();
|
$('#openLocalFiles').show();
|
||||||
|
if (typeof Windows === 'undefined') {
|
||||||
|
//If not UWP, display legacy File Select
|
||||||
|
$('#btnConfigure').click();
|
||||||
|
}
|
||||||
//TODO - check if this is necessary or if it causes the archiveList change event to fire
|
//TODO - check if this is necessary or if it causes the archiveList change event to fire
|
||||||
//Make archive list combo box fit the number of files
|
//Make archive list combo box fit the number of files
|
||||||
//var comboArchiveList = document.getElementById('archiveList');
|
//var comboArchiveList = document.getElementById('archiveList');
|
||||||
@ -1221,7 +1234,7 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'abstractFile
|
|||||||
* Sets the localArchive from the File selects populated by user
|
* Sets the localArchive from the File selects populated by user
|
||||||
*/
|
*/
|
||||||
function setLocalArchiveFromFileSelect() {
|
function setLocalArchiveFromFileSelect() {
|
||||||
setLocalArchiveFromFileList(document.getElementById('archiveFiles').files);
|
setLocalArchiveFromFileList(document.getElementById('archiveFilesLegacy').files);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user