Skip to content

Commit

Permalink
Work on adapt-it#539
Browse files Browse the repository at this point in the history
Work in progress. Also removed unused windows and firefoxos platform data, and expanded the chooser plugin's accepted files to */* for Android (logic to filter out unsupported file types is in the file import code)
  • Loading branch information
eb1 committed Dec 23, 2023
1 parent e1e806d commit 2a2f6b8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 16 deletions.
15 changes: 0 additions & 15 deletions config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -328,21 +328,6 @@
<preference name="www/res/icon/electron/icon.png" />
<preference name="www/res/icon/electron/icon@2x.png" target="installer" />
</platform>
<platform name="windows">
<plugin name="cordova-sqlite-evcore-extbuild-free" spec="^0.15.1" />
<plugin name="cordova-plugin-statusbar" spec="^2.4.3" />
<preference name="WindowsStoreDisplayName" value="Adapt It Mobile" />
<preference name="StatusBarOverlaysWebView" value="true" />
<icon src="www/res/icon/windows/storelogo.png" target="StoreLogo" />
<icon src="www/res/icon/windows/Square30x30Logo.png" target="Square30x30Logo" />
<icon src="www/res/icon/windows/Square44x44Logo.png" target="Square44x44Logo" />
<icon src="www/res/icon/windows/Square70x70Logo.png" target="Square70x70Logo" />
<icon src="www/res/icon/windows/Square71x71Logo.png" target="Square71x71Logo" />
<icon src="www/res/icon/windows/Square150x150Logo.png" target="Square150x150Logo" />
<icon src="www/res/icon/windows/Square310x310Logo.png" target="Square310x310Logo" />
<icon src="www/res/icon/windows/Wide310x150Logo.png" target="Wide310x150Logo" />
<splash src="www/res/screen/windows/splashscreen.png" target="SplashScreen" />
</platform>
<plugin name="cordova-plugin-chooser" spec="^1.3.1" />
<plugin name="cordova-plugin-fonts" spec="^0.6.5" />
<plugin name="cordova-plugin-filepath" spec="https://github.com/VIAVI-Solutions/cordova-plugin-filepath.git" />
Expand Down
3 changes: 2 additions & 1 deletion www/js/views/DocumentViews.js
Original file line number Diff line number Diff line change
Expand Up @@ -3863,6 +3863,7 @@ define(function (require) {
} else if (fileName.toLowerCase().indexOf(".aic") > 0) {
// project settings file reader is held in ProjectViews - call it
result = ProjectViews.importSettingsFile({model: proj});
return result; // in this case, we've already notified the user in ProjectViews::importFail();
} else {
if (isClipboard === true) {
// this came from the clipboard -- we'll need to do some tests to try to identify the content type.
Expand Down Expand Up @@ -6273,7 +6274,7 @@ define(function (require) {
// call getFile() on the chooser plugin, and if we get a file back, import it
onBtnBrowse: function () {
var model = this.model;
chooser.getFile('text/*', function (file) {
chooser.getFile('*/*', function (file) {
console.log(file ? file.name : 'canceled');
if (file) {
isClipboard = false;
Expand Down
7 changes: 7 additions & 0 deletions www/js/views/ProjectViews.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ define(function (require) {
};
// split out the .aic file into an array (one entry per line of the file)
lines = evt.target.result.split("\n");
// first off, a couple of sanity checks:
// 1. Is this .aic file an Adapt It project file?
// 2. Is this for a file we've already configured or imported (i.e., do the source and target languages
// match a project in our project list)?

// We've successfully opened an Adapt It project file (.aic) -
// populate our AIM model object with values
// from the .aic file
Expand Down Expand Up @@ -297,8 +302,10 @@ define(function (require) {

if (result === false) {
importFail(new Error(errMsg));
return false;
} else {
importSuccess();
return true;
}

};
Expand Down
Binary file removed www/res/icon/firefoxos/icon-60.png
Binary file not shown.

0 comments on commit 2a2f6b8

Please sign in to comment.