Add version info on loading and settings screens

master
Skylar Ittner 8 years ago
parent 1d80b50063
commit 8bb500efe2

@ -49,4 +49,5 @@
<plugin name="cordova-plugin-geolocation" spec="https://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation.git" />
<plugin name="com.phonegap.plugins.barcodescanner" spec="https://github.com/Telerik-Verified-Plugins/BarcodeScanner" />
<plugin name="cordova-plugin-inapppurchase" spec="~1.0.0" />
<plugin name="cordova_app_version_plugin" spec="~0.2.6" />
</widget>

@ -20,4 +20,5 @@ cordova-plugin-network-information=https://git-wip-us.apache.org/repos/asf/cordo
cordova-plugin-console=https://git-wip-us.apache.org/repos/asf/cordova-plugin-console.git
cordova-plugin-device=https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git
com.phonegap.plugins.barcodescanner=https://github.com/Telerik-Verified-Plugins/BarcodeScanner3
cordova-plugin-inapppurchase=https://github.com/AlexDisler/cordova-plugin-inapppurchase
cordova-plugin-inapppurchase=https://github.com/AlexDisler/cordova-plugin-inapppurchase
cordova_app_version_plugin=https://github.com/Binarypark/cordova_app_version_plugin

@ -436,4 +436,12 @@ body {
#menutabcontent {
padding-top: 85px;
}
.splash-version {
position: fixed;
bottom: 0px;
right: 10px;
color: white;
z-index: 90000;
}

@ -23,6 +23,7 @@
<br /><i class="fa fa-spinner fa-pulse fa-fw"></i>
<br />
<span id="loading-error"></span></p>
<p class="splash-version"></p>
<div style="background: url(assets/mountains-simple.svg) repeat-x; background-size: auto 100%; height: 20%; position: absolute; bottom: 0; width: 100%;"></div>
</div>
</div>
@ -95,6 +96,7 @@
</div>
<div id="map"></div>
<script>
$('.splash-version').text("v" + window.cordova.plugins.version.getAppVersion());
$('#namedisp').text(username);
navigator.splashscreen.hide();

@ -207,13 +207,20 @@ limitations under the License.
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
<h4>cordova-plugin-inapppurchase</h4>
<p>The MIT License</p>
<p>Copyright (c) 2016 Alex Disler</p>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
<h4>cordova_app_version_plugin</h4>
<p>The MIT License</p>
<p>Copyright (c) 2016 Binarypark</p>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
</div>
<div class="modal-footer">
<button type="button" data-dismiss="modal" class="btn btn-default"><i class="fa fa-times"></i> Close</button>

@ -15,75 +15,78 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<div id="loading">
<div style="position: absolute; width: 100%; height: 100%; top: 0; left: 0; background-color: #324150;">
<img src="assets/logonobg.svg" alt="" style="display: block; position: absolute; max-width: 90%; top: 0; left: 0; right: 0; bottom: 25%; margin: auto; max-height: 20%;" />
<p style="font-family: sans-serif; color: white; position: absolute; max-width: 90%; left: 0; right: 0; bottom: 30%; margin: auto; text-align: center;">
<span data-localize="logging-in-spin">Logging in...</span>
<br /><i class="fa fa-spinner fa-pulse fa-fw"></i>
<br />
<span id="loading-error"></span></p>
<div style="background: url(assets/mountains-simple.svg) repeat-x; background-size: auto 100%; height: 20%; position: absolute; bottom: 0; width: 100%;"></div>
</div>
</div>
<div class="row">
<div class="col-lg-12 text-center">
<div class="panel panel-default">
<div class="panel-heading whitetext" id="loginheader" style="color: white;" data-localize="login-header">
Login to TerranQuest
</div>
<div class="panel-body">
<div id="errorbase" class="alert alert-danger alert-dismissable" style="display: none;">
<p id="errormsg">An error occurred.</p>
</div>
<div class="input-group">
<span class="input-group-addon" id="basic-addon-usericon"><i class="fa fa-user fa-fw"></i></span>
<input type="text" placeholder="Username" id="usernameBox" class="form-control" aria-describedby="basic-addon-usericon" autocorrect="off" autocapitalize="off" spellcheck="false" />
</div>
<br />
<div class="input-group">
<span class="input-group-addon" id="basic-addon-passicon"><i class="fa fa-key fa-fw"></i></span>
<input type="password" placeholder="Password" id="passwordBox" class="form-control" aria-describedby="basic-addon-passicon" autocorrect="off" autocapitalize="off" spellcheck="false" />
</div>
</div>
<div class="panel-footer">
<a href="#" onclick="dologin()" id="loginBtn" class="btn btn-success btn-wide"><i class="fa fa-sign-in"></i> Login</a><br /><br />
<p><i data-localize="signup-question">Don't have a Netsyms account?</i></p>
<a href="#" onclick="openscreen('signup')" id="openSignupBtn" class="btn btn-primary btn-wide"><i class="fa fa-user-plus"></i> Sign Up</a>
</div>
</div>
</div>
</div>
<script>
$("[data-localize]").localize("login-screen", i18n_options);
userset = false;
passset = false;
if (localStorage.getItem("username") !== null && localStorage.getItem("username") !== '') {
$('#usernameBox').val(localStorage.getItem("username"));
userset = true;
}
if (localStorage.getItem("password") !== null && localStorage.getItem("password") !== '') {
$('#passwordBox').val(localStorage.getItem("password"));
passset = true;
}
if (userset && passset) {
// Try to login with stored credentials
$.post("https://sso.netsyms.com/api/simpleauth.php",
{user: localStorage.getItem("username"), pass: localStorage.getItem("password")},
function (data) {
if (data === 'OK') {
dologin();
} else {
$('#loading').css('display', 'none');
}
}).fail(function () {
$('#loading').css('display', 'none');
});
} else {
$('#loading').css('display', 'none');
}
navigator.splashscreen.hide();
<div id="loading">
<div style="position: absolute; width: 100%; height: 100%; top: 0; left: 0; background-color: #324150;">
<img src="assets/logonobg.svg" alt="" style="display: block; position: absolute; max-width: 90%; top: 0; left: 0; right: 0; bottom: 25%; margin: auto; max-height: 20%;" />
<p style="font-family: sans-serif; color: white; position: absolute; max-width: 90%; left: 0; right: 0; bottom: 30%; margin: auto; text-align: center;">
<span data-localize="logging-in-spin">Logging in...</span>
<br /><i class="fa fa-spinner fa-pulse fa-fw"></i>
<br />
<span id="loading-error"></span></p>
<p class="splash-version"></p>
<div style="background: url(assets/mountains-simple.svg) repeat-x; background-size: auto 100%; height: 20%; position: absolute; bottom: 0; width: 100%;"></div>
</div>
</div>
<div class="row">
<div class="col-lg-12 text-center">
<div class="panel panel-default">
<div class="panel-heading whitetext" id="loginheader" style="color: white;" data-localize="login-header">
Login to TerranQuest
</div>
<div class="panel-body">
<div id="errorbase" class="alert alert-danger alert-dismissable" style="display: none;">
<p id="errormsg">An error occurred.</p>
</div>
<div class="input-group">
<span class="input-group-addon" id="basic-addon-usericon"><i class="fa fa-user fa-fw"></i></span>
<input type="text" placeholder="Username" id="usernameBox" class="form-control" aria-describedby="basic-addon-usericon" autocorrect="off" autocapitalize="off" spellcheck="false" />
</div>
<br />
<div class="input-group">
<span class="input-group-addon" id="basic-addon-passicon"><i class="fa fa-key fa-fw"></i></span>
<input type="password" placeholder="Password" id="passwordBox" class="form-control" aria-describedby="basic-addon-passicon" autocorrect="off" autocapitalize="off" spellcheck="false" />
</div>
</div>
<div class="panel-footer">
<a href="#" onclick="dologin()" id="loginBtn" class="btn btn-success btn-wide"><i class="fa fa-sign-in"></i> Login</a><br /><br />
<p><i data-localize="signup-question">Don't have a Netsyms account?</i></p>
<a href="#" onclick="openscreen('signup')" id="openSignupBtn" class="btn btn-primary btn-wide"><i class="fa fa-user-plus"></i> Sign Up</a>
</div>
</div>
</div>
</div>
<script>
$("[data-localize]").localize("login-screen", i18n_options);
$('.splash-version').text("v" + window.cordova.plugins.version.getAppVersion());
userset = false;
passset = false;
if (localStorage.getItem("username") !== null && localStorage.getItem("username") !== '') {
$('#usernameBox').val(localStorage.getItem("username"));
userset = true;
}
if (localStorage.getItem("password") !== null && localStorage.getItem("password") !== '') {
$('#passwordBox').val(localStorage.getItem("password"));
passset = true;
}
if (userset && passset) {
// Try to login with stored credentials
$.post("https://sso.netsyms.com/api/simpleauth.php",
{user: localStorage.getItem("username"), pass: localStorage.getItem("password")},
function (data) {
if (data === 'OK') {
dologin();
} else {
$('#loading').css('display', 'none');
}
}).fail(function () {
$('#loading').css('display', 'none');
});
} else {
$('#loading').css('display', 'none');
}
navigator.splashscreen.hide();
</script>

@ -53,5 +53,11 @@
<div class='list-group-item' onclick="openmodal('licenses', '#license-modal');">
Open Source Licenses
</div>
<div class="list-group-item">
Version: <span id="settings-version-code"></span>
</div>
</div>
</div>
</div>
<script>
$('#settings-version-code').text(window.cordova.plugins.version.getAppVersion());
</script>

@ -15,12 +15,16 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<div style="position: absolute; width: 100%; height: 100%; top: 0; left: 0; background-color: #324150; z-index: 9999;">
<img src="assets/logonobg.svg" alt="" style="display: block; position: absolute; max-width: 90%; top: 0; left: 0; right: 0; bottom: 25%; margin: auto; max-height: 20%;" />
<p style="font-family: sans-serif; color: white; position: absolute; max-width: 90%; left: 0; right: 0; bottom: 30%; margin: auto; text-align: center;">
Loading...
<br /><i class="fa fa-spinner fa-pulse fa-fw"></i>
<br />
<span id="loading-error"></span></p>
<div style="background: url(assets/mountains-simple.svg) repeat-x; background-size: auto 100%; height: 20%; position: absolute; bottom: 0; width: 100%;"></div>
</div>
<div style="position: absolute; width: 100%; height: 100%; top: 0; left: 0; background-color: #324150; z-index: 9999;">
<img src="assets/logonobg.svg" alt="" style="display: block; position: absolute; max-width: 90%; top: 0; left: 0; right: 0; bottom: 25%; margin: auto; max-height: 20%;" />
<p style="font-family: sans-serif; color: white; position: absolute; max-width: 90%; left: 0; right: 0; bottom: 30%; margin: auto; text-align: center;">
Loading...
<br /><i class="fa fa-spinner fa-pulse fa-fw"></i>
<br />
<span id="loading-error"></span></p>
<p class="splash-version"></p>
<div style="background: url(assets/mountains-simple.svg) repeat-x; background-size: auto 100%; height: 20%; position: absolute; bottom: 0; width: 100%;"></div>
</div>
<script>
$('.splash-version').text("v" + window.cordova.plugins.version.getAppVersion());
</script>