feat: refs #5308 Upgrade to v7
2
LICENSE
|
@ -1,4 +1,4 @@
|
|||
Copyright (C) 2023 - Verdnatura Levante S.L.
|
||||
Copyright (C) 2024 - Verdnatura Levante S.L.
|
||||
|
||||
This package is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 959 KiB After Width: | Height: | Size: 959 KiB |
20
setup.iss
|
@ -1,6 +1,6 @@
|
|||
|
||||
#define MyAppName "Verdnatura"
|
||||
#define MyAppVersion "6"
|
||||
#define MyAppVersion "7"
|
||||
#define MyAppPublisher "Verdnatura"
|
||||
#define MyAppURL "https://www.verdnatura.es/"
|
||||
|
||||
|
@ -17,8 +17,8 @@ AppUpdatesURL={#MyAppURL}
|
|||
CreateAppDir=yes
|
||||
DefaultDirName={commonpf}\{#MyAppName}
|
||||
DefaultGroupName={#MyAppName}
|
||||
WizardSmallImageFile=iss\wizard-small.bmp
|
||||
WizardImageFile=iss\wizard.bmp
|
||||
WizardSmallImageFile=img\iss\wizard-small.bmp
|
||||
WizardImageFile=img\iss\wizard.bmp
|
||||
LicenseFile=src\LICENSE.txt
|
||||
SetupIconFile=src\icon.ico
|
||||
UninstallDisplayIcon={app}\icon.ico
|
||||
|
@ -48,13 +48,13 @@ Source: "odbc\*"; \
|
|||
DestDir: {tmp}; Flags: deleteafterinstall; AfterInstall: InstallMsi;
|
||||
Source: "src\*"; \
|
||||
DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "branches\*"; \
|
||||
DestDir: "{app}\branches"; Flags: ignoreversion
|
||||
Source: "datasources\*"; \
|
||||
DestDir: "{app}\datasources"; Flags: ignoreversion
|
||||
Source: "apiSources\*"; \
|
||||
DestDir: "{app}\apiSources"; Flags: ignoreversion
|
||||
Source: "icons\*"; \
|
||||
Source: "img\branches\*"; \
|
||||
DestDir: "{app}branches"; Flags: ignoreversion
|
||||
Source: "img\datasources\*"; \
|
||||
DestDir: "{app}datasources"; Flags: ignoreversion
|
||||
Source: "img\apiSources\*"; \
|
||||
DestDir: "{app}apiSources"; Flags: ignoreversion
|
||||
Source: "img\appIcons\*"; \
|
||||
DestDir: "{app}\icons"; Flags: ignoreversion
|
||||
Source: "ocx\*"; \
|
||||
DestDir: {sys}; Flags: onlyifdoesntexist regserver 32bit
|
||||
|
|
B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gGpQ2y4t2EVJkYVdcGBXCyWYDKegMXgJR10WunICFCaD
|
||||
kM0P3pYQdtbgr7e9AgMBAAGjUDBOMB0GA1UdDgQWBBQ9+iZdf7pLNQItxs4o43dN
|
||||
FZD0CTAfBgNVHSMEGDAWgBQ9+iZdf7pLNQItxs4o43dNFZD0CTAMBgNVHRMEBTAD
|
||||
AQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAcFzJhm3jjuexZf9tTgQfzwtsafLLsYkrm
|
||||
EZOTkhvZFJYbBd8UngL5UPF1M3buSEV1VqsWCALLrFkxzbmjk5uM8cswZR/3J6un
|
||||
7GFYWTEllVgkD8KmNA2b6j5uSuGCQmOccsR4069vwNjrvTbtQpEpEAAnDf6d5/N4
|
||||
MXuDozHq3iEYi7qyGf++5mp4D+82y2ONSUsiLgxqnMT5JX/yhDKI1IiX1ndyt+6r
|
||||
ie2i2fzdOgovlAILuTM4hoUjPYFOxwmUwpxU2EAjPqo9Bi7bQiH+fv0QBzbpQ9on
|
||||
DRHo7NuXaDG49nvatJjuf4DiDELBCTMeKBOk5hG7kyWCIwp5wr+w
|
||||
-----END CERTIFICATE-----
|
40
src/main.js
|
@ -13,7 +13,7 @@ var Conf = {
|
|||
maxCorruptSize: 600,
|
||||
odbcDriver: 'MySQL ODBC 8.0 Unicode Driver',
|
||||
driverPath: '\\MySQL\\Connector ODBC 8.0\\myodbc8w.dll',
|
||||
version: 6,
|
||||
version: 7,
|
||||
cdnURL: 'https://cdn.verdnatura.es/vn-access',
|
||||
identifier: '.vn',
|
||||
productionDatasource: 'production.vn'
|
||||
|
@ -51,11 +51,10 @@ var Locale = {
|
|||
var App = {
|
||||
shell: new ActiveXObject('WScript.Shell'),
|
||||
fso: new ActiveXObject('scripting.filesystemobject'),
|
||||
|
||||
init: function() {
|
||||
// Specify the size of window
|
||||
var width = 450;
|
||||
var height = 595;
|
||||
var height = 610;
|
||||
window.resizeTo(width, height);
|
||||
window.moveTo((screen.width - width) / 2, (screen.height - height) / 2);
|
||||
},
|
||||
|
@ -76,12 +75,15 @@ var App = {
|
|||
this.certFile = this.appDir +'\\cacert.pem';
|
||||
this.lockFile = this.moduleDir +'\\' + this.module +'.ldb';
|
||||
this.mdbFile = this.moduleDir +'\\' + this.module +'.mdb';
|
||||
this.hasDeveloperMode = this.regRead(Conf.regPath, 'hasDeveloperMode');
|
||||
document.title = "vn-access v" + Conf.version + " (" + this.module + ")";
|
||||
var mdbDsName = this.mdbGetValue(
|
||||
'SELECT dsName FROM TblConfig',
|
||||
'dsName', String
|
||||
);
|
||||
var userDefaultDatasource = this.regRead(Conf.regPath, 'defaultDatasource');
|
||||
this.dsName = mdbDsName || userDefaultDatasource || Conf.defaultDatasource;
|
||||
this.heartClicks = 0;
|
||||
|
||||
// Creates the necessary registry entries
|
||||
var lastVersion = this.regRead(Conf.regPath, 'lastExecutedVersion');
|
||||
|
@ -111,7 +113,6 @@ var App = {
|
|||
this.regWrite(Conf.regPath, 'lastExecutedVersion', Conf.version);
|
||||
this.regWrite(Conf.regPath, 'selectedApiSource', Conf.defaultApiSource);
|
||||
this.regWrite(Conf.regPath + '\\apiSources', Conf.defaultApiSource, Conf.defaultRemoteURL);
|
||||
|
||||
this.createODBC(
|
||||
Conf.odbcPath,
|
||||
Conf.productionDatasource,
|
||||
|
@ -158,6 +159,7 @@ var App = {
|
|||
userDefaultBranch = this.regRead(Conf.regPath, 'defaultBranch');
|
||||
branch = userDefaultBranch || Conf.defaultBranch;
|
||||
}
|
||||
|
||||
this.$('branch').value = branch;
|
||||
this.onChangeBranch();
|
||||
|
||||
|
@ -177,6 +179,11 @@ var App = {
|
|||
}
|
||||
this.$('datasource').value = this.dsName;
|
||||
|
||||
if (this.regRead(Conf.regPath, 'autoDeployDevOptions') && this.hasDeveloperMode)
|
||||
App.openOptions()
|
||||
|
||||
this.refreshDeveloperMode();
|
||||
|
||||
if (autoLogin) {
|
||||
this.onChangeDatasource();
|
||||
this.onEnterClick();
|
||||
|
@ -259,6 +266,18 @@ var App = {
|
|||
this.$('datasourceLogo').className = '';
|
||||
|
||||
},
|
||||
onHeartClick: function() {
|
||||
this.heartClicks++
|
||||
if (this.heartClicks >= 5) {
|
||||
var action = this.hasDeveloperMode ? 'disabled' : 'enabled'
|
||||
var isActive = !this.hasDeveloperMode ? true : false
|
||||
this.regWrite(Conf.regPath, 'hasDeveloperMode', isActive)
|
||||
this.hasDeveloperMode = isActive;
|
||||
this.showMessage(_('Developer mode ' + action), 'notice');
|
||||
this.refreshDeveloperMode();
|
||||
this.heartClicks = 0;
|
||||
}
|
||||
},
|
||||
refreshLogout: function() {
|
||||
var style = this.$('logout').style;
|
||||
var password = this.regRead(this.getOdbcPath(), 'PWD');
|
||||
|
@ -267,6 +286,15 @@ var App = {
|
|||
else
|
||||
style.display = 'none';
|
||||
},
|
||||
refreshDeveloperMode: function() {
|
||||
var stylesName = ['branchOptions', 'datasourceOptions']
|
||||
for (var n in stylesName) {
|
||||
var style = this.$(stylesName[n]).style;
|
||||
this.regRead(Conf.regPath, 'hasDeveloperMode')
|
||||
? style.visibility = 'visible'
|
||||
: style.visibility = 'hidden'
|
||||
}
|
||||
},
|
||||
onChangeBranch: function() {
|
||||
if (this.$('branch').value == 'master'||'test'||'dev') {
|
||||
this.$('branchButton').className = this.$('branch').value;
|
||||
|
@ -673,7 +701,7 @@ var App = {
|
|||
} catch (e) {}
|
||||
},
|
||||
request: function (method, url, data, cb) {
|
||||
var remoteURL = this.regRead(Conf.regPath,'remoteURL');
|
||||
var remoteURL = this.regRead(Conf.regPath, 'remoteURL');
|
||||
if (!remoteURL)
|
||||
remoteURL = Conf.defaultRemoteURL;
|
||||
|
||||
|
@ -716,7 +744,7 @@ var App = {
|
|||
err.status = status;
|
||||
err.req = req;
|
||||
if (status >= 400 && status < 600)
|
||||
err.error = JSON.parse(req.responseText);
|
||||
alert(_('Bad request') +': '+ err);
|
||||
|
||||
cb(err);
|
||||
}
|
||||
|
|
|
@ -117,7 +117,8 @@ select {
|
|||
/* Branch */
|
||||
|
||||
#branchOptions {
|
||||
margin-top: 2em;
|
||||
margin-top: 1em;
|
||||
visibility: hidden;
|
||||
}
|
||||
#branchLogo {
|
||||
cursor: pointer;
|
||||
|
@ -171,8 +172,9 @@ select.dev {
|
|||
/* Datasource */
|
||||
|
||||
#datasourceOptions {
|
||||
margin-top: 2em;
|
||||
margin-top: 1em;
|
||||
margin-left: 17.3em;
|
||||
visibility: hidden;
|
||||
}
|
||||
#datasourceLogo {
|
||||
cursor: pointer;
|
||||
|
@ -229,6 +231,20 @@ select.development {
|
|||
background-color: #31a527;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
|
||||
#footer {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
margin-top: 6em;
|
||||
color: #303030
|
||||
}
|
||||
|
||||
#heart {
|
||||
color: #97d700;
|
||||
}
|
||||
|
||||
/* Message */
|
||||
|
||||
#message {
|
||||
|
@ -243,7 +259,7 @@ select.development {
|
|||
background-color: #EBB;
|
||||
color: #644;
|
||||
text-align: center;
|
||||
font-size: .8em;
|
||||
font-size: 1em;
|
||||
display: none;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0 0 .4em rgba(1,1,1,.6);
|
||||
|
@ -288,13 +304,14 @@ select.development {
|
|||
text-align: center;
|
||||
border: 1px solid black;
|
||||
border-radius: 25px;
|
||||
font-size: 18px;
|
||||
}
|
||||
#spinner * {
|
||||
vertical-align: middle;
|
||||
}
|
||||
#spinner img {
|
||||
width: 2.5em;
|
||||
height: 2.5em;
|
||||
width: 2.7em;
|
||||
height: 2.7em;
|
||||
margin-top: .5em;
|
||||
}
|
||||
#loading-message {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<title>v6</title>
|
||||
<title>.</title>
|
||||
<link rel="stylesheet" href="style.css"/>
|
||||
<script type="text/javascript" src="main.js"></script>
|
||||
<hta:application
|
||||
|
@ -22,6 +22,7 @@
|
|||
windowsstate="normal"/>
|
||||
</head>
|
||||
<body
|
||||
onload="document.title = document.title + ' - ' + this.module()"
|
||||
onload="App.onLoad(event)"
|
||||
onunload="App.onUnload(event)"
|
||||
onkeypress="App.onKeyPress(event)"
|
||||
|
@ -69,6 +70,14 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<span>
|
||||
developed by Verdnatura with
|
||||
<span id="heart" onclick="App.onHeartClick()">
|
||||
♥
|
||||
</span>
|
||||
</span>
|
||||
<div>
|
||||
<div id="background"></div>
|
||||
<div id="spinner">
|
||||
<img alt="Cargando..." src="spinner.gif"/>
|
||||
|
|