feat: refs #5308 Upgrade to v7 #6
34
LICENSE
|
@ -1,17 +1,17 @@
|
||||||
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
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
On Debian systems, the complete text of the GNU General Public
|
On Debian systems, the complete text of the GNU General Public
|
||||||
License can be found in "/usr/share/common-licenses/GPL-3".
|
License can be found in "/usr/share/common-licenses/GPL-3".
|
||||||
|
|
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 MyAppName "Verdnatura"
|
||||||
#define MyAppVersion "6"
|
#define MyAppVersion "7"
|
||||||
#define MyAppPublisher "Verdnatura"
|
#define MyAppPublisher "Verdnatura"
|
||||||
#define MyAppURL "https://www.verdnatura.es/"
|
#define MyAppURL "https://www.verdnatura.es/"
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@ AppUpdatesURL={#MyAppURL}
|
||||||
CreateAppDir=yes
|
CreateAppDir=yes
|
||||||
DefaultDirName={commonpf}\{#MyAppName}
|
DefaultDirName={commonpf}\{#MyAppName}
|
||||||
DefaultGroupName={#MyAppName}
|
DefaultGroupName={#MyAppName}
|
||||||
WizardSmallImageFile=iss\wizard-small.bmp
|
WizardSmallImageFile=img\iss\wizard-small.bmp
|
||||||
WizardImageFile=iss\wizard.bmp
|
WizardImageFile=img\iss\wizard.bmp
|
||||||
LicenseFile=src\LICENSE.txt
|
LicenseFile=src\LICENSE.txt
|
||||||
SetupIconFile=src\icon.ico
|
SetupIconFile=src\icon.ico
|
||||||
UninstallDisplayIcon={app}\icon.ico
|
UninstallDisplayIcon={app}\icon.ico
|
||||||
|
@ -48,13 +48,13 @@ Source: "odbc\*"; \
|
||||||
DestDir: {tmp}; Flags: deleteafterinstall; AfterInstall: InstallMsi;
|
DestDir: {tmp}; Flags: deleteafterinstall; AfterInstall: InstallMsi;
|
||||||
Source: "src\*"; \
|
Source: "src\*"; \
|
||||||
DestDir: "{app}"; Flags: ignoreversion
|
DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "branches\*"; \
|
Source: "img\branches\*"; \
|
||||||
DestDir: "{app}\branches"; Flags: ignoreversion
|
DestDir: "{app}branches"; Flags: ignoreversion
|
||||||
Source: "datasources\*"; \
|
Source: "img\datasources\*"; \
|
||||||
DestDir: "{app}\datasources"; Flags: ignoreversion
|
DestDir: "{app}datasources"; Flags: ignoreversion
|
||||||
Source: "apiSources\*"; \
|
Source: "img\api-sources\*"; \
|
||||||
DestDir: "{app}\apiSources"; Flags: ignoreversion
|
DestDir: "{app}api-sources"; Flags: ignoreversion
|
||||||
Source: "icons\*"; \
|
Source: "img\app-icons\*"; \
|
||||||
DestDir: "{app}\icons"; Flags: ignoreversion
|
DestDir: "{app}\icons"; Flags: ignoreversion
|
||||||
Source: "ocx\*"; \
|
Source: "ocx\*"; \
|
||||||
DestDir: {sys}; Flags: onlyifdoesntexist regserver 32bit
|
DestDir: {sys}; Flags: onlyifdoesntexist regserver 32bit
|
||||||
|
|
BIN
src/7za.exe
|
@ -1,25 +0,0 @@
|
||||||
-----BEGIN CERTIFICATE-----
|
|
||||||
MIIEQzCCAyugAwIBAgIJAJimL+J4jUaQMA0GCSqGSIb3DQEBBQUAMIG2MQswCQYD
|
|
||||||
VQQGEwJFUzEdMBsGA1UECAwUQ29tdW5pZGFkIFZhbGVuY2lhbmExETAPBgNVBAcM
|
|
||||||
CFZhbGVuY2lhMR4wHAYDVQQKDBVWZXJkbmF0dXJhIExldmFudGUgU0wxFDASBgNV
|
|
||||||
BAsMC0luZm9ybWF0aWNhMRYwFAYDVQQDDA12ZXJkbmF0dXJhLmVzMScwJQYJKoZI
|
|
||||||
hvcNAQkBFhhob3N0bWFzdGVyQHZlcmRuYXR1cmEuZXMwIBcNMTMwNjExMTE1MjQ1
|
|
||||||
WhgPMjA2MzA1MzAxMTUyNDVaMIG2MQswCQYDVQQGEwJFUzEdMBsGA1UECAwUQ29t
|
|
||||||
dW5pZGFkIFZhbGVuY2lhbmExETAPBgNVBAcMCFZhbGVuY2lhMR4wHAYDVQQKDBVW
|
|
||||||
ZXJkbmF0dXJhIExldmFudGUgU0wxFDASBgNVBAsMC0luZm9ybWF0aWNhMRYwFAYD
|
|
||||||
VQQDDA12ZXJkbmF0dXJhLmVzMScwJQYJKoZIhvcNAQkBFhhob3N0bWFzdGVyQHZl
|
|
||||||
cmRuYXR1cmEuZXMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCsqq+h
|
|
||||||
1kUfZE19Inm3M2XF1ytIqXeIsXsiZ5T9aVdedQrF2xcVOr4dvJyE5zp9g7NNxy9T
|
|
||||||
FyAHPXiPWKSoX3w0uoQfLW9Hm19QZYu40hBD5oRrJy5m6l4JU3Gj0tnkvYc4m8Fl
|
|
||||||
2uEUT3ain0FE2I1XjKpL6eQi9TKjhgmWNRgDJUbllAB3lsQLkNfB6EFo2QJykiKl
|
|
||||||
aRi4UaHdSkd3zkUJyYRdcG7IxCFvsViKpwr3JF+TLXSN/oronLFgG8cKedrn+sMW
|
|
||||||
pBm2FZQKAh8hLT3QQQqQgGpQ2y4t2EVJkYVdcGBXCyWYDKegMXgJR10WunICFCaD
|
|
||||||
kM0P3pYQdtbgr7e9AgMBAAGjUDBOMB0GA1UdDgQWBBQ9+iZdf7pLNQItxs4o43dN
|
|
||||||
FZD0CTAfBgNVHSMEGDAWgBQ9+iZdf7pLNQItxs4o43dNFZD0CTAMBgNVHRMEBTAD
|
|
||||||
AQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAcFzJhm3jjuexZf9tTgQfzwtsafLLsYkrm
|
|
||||||
EZOTkhvZFJYbBd8UngL5UPF1M3buSEV1VqsWCALLrFkxzbmjk5uM8cswZR/3J6un
|
|
||||||
7GFYWTEllVgkD8KmNA2b6j5uSuGCQmOccsR4069vwNjrvTbtQpEpEAAnDf6d5/N4
|
|
||||||
MXuDozHq3iEYi7qyGf++5mp4D+82y2ONSUsiLgxqnMT5JX/yhDKI1IiX1ndyt+6r
|
|
||||||
ie2i2fzdOgovlAILuTM4hoUjPYFOxwmUwpxU2EAjPqo9Bi7bQiH+fv0QBzbpQ9on
|
|
||||||
DRHo7NuXaDG49nvatJjuf4DiDELBCTMeKBOk5hG7kyWCIwp5wr+w
|
|
||||||
-----END CERTIFICATE-----
|
|
54
src/main.js
|
@ -13,7 +13,7 @@ var Conf = {
|
||||||
maxCorruptSize: 600,
|
maxCorruptSize: 600,
|
||||||
odbcDriver: 'MySQL ODBC 8.0 Unicode Driver',
|
odbcDriver: 'MySQL ODBC 8.0 Unicode Driver',
|
||||||
driverPath: '\\MySQL\\Connector ODBC 8.0\\myodbc8w.dll',
|
driverPath: '\\MySQL\\Connector ODBC 8.0\\myodbc8w.dll',
|
||||||
version: 6,
|
version: 7,
|
||||||
cdnURL: 'https://cdn.verdnatura.es/vn-access',
|
cdnURL: 'https://cdn.verdnatura.es/vn-access',
|
||||||
identifier: '.vn',
|
identifier: '.vn',
|
||||||
productionDatasource: 'production.vn'
|
productionDatasource: 'production.vn'
|
||||||
|
@ -51,11 +51,10 @@ var Locale = {
|
||||||
var App = {
|
var App = {
|
||||||
shell: new ActiveXObject('WScript.Shell'),
|
shell: new ActiveXObject('WScript.Shell'),
|
||||||
fso: new ActiveXObject('scripting.filesystemobject'),
|
fso: new ActiveXObject('scripting.filesystemobject'),
|
||||||
|
|
||||||
init: function() {
|
init: function() {
|
||||||
// Specify the size of window
|
// Specify the size of window
|
||||||
var width = 450;
|
var width = 450;
|
||||||
var height = 595;
|
var height = 610;
|
||||||
window.resizeTo(width, height);
|
window.resizeTo(width, height);
|
||||||
window.moveTo((screen.width - width) / 2, (screen.height - height) / 2);
|
window.moveTo((screen.width - width) / 2, (screen.height - height) / 2);
|
||||||
},
|
},
|
||||||
|
@ -76,12 +75,18 @@ var App = {
|
||||||
this.certFile = this.appDir +'\\cacert.pem';
|
this.certFile = this.appDir +'\\cacert.pem';
|
||||||
this.lockFile = this.moduleDir +'\\' + this.module +'.ldb';
|
this.lockFile = this.moduleDir +'\\' + this.module +'.ldb';
|
||||||
this.mdbFile = this.moduleDir +'\\' + this.module +'.mdb';
|
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(
|
var mdbDsName = this.mdbGetValue(
|
||||||
'SELECT dsName FROM TblConfig',
|
'SELECT dsName FROM TblConfig',
|
||||||
'dsName', String
|
'dsName', String
|
||||||
);
|
);
|
||||||
var userDefaultDatasource = this.regRead(Conf.regPath, 'defaultDatasource');
|
var userDefaultDatasource = this.regRead(Conf.regPath, 'defaultDatasource');
|
||||||
this.dsName = mdbDsName || userDefaultDatasource || Conf.defaultDatasource;
|
this.dsName = mdbDsName || userDefaultDatasource || Conf.defaultDatasource;
|
||||||
|
this.heartClicks = 0;
|
||||||
|
|
||||||
|
// Change title
|
||||||
|
document.title = document.title + ' - ' + this.module;
|
||||||
|
|
||||||
// Creates the necessary registry entries
|
// Creates the necessary registry entries
|
||||||
var lastVersion = this.regRead(Conf.regPath, 'lastExecutedVersion');
|
var lastVersion = this.regRead(Conf.regPath, 'lastExecutedVersion');
|
||||||
|
@ -110,8 +115,7 @@ var App = {
|
||||||
this.regWrite(Conf.regPath, 'remoteURL', Conf.defaultRemoteURL);
|
this.regWrite(Conf.regPath, 'remoteURL', Conf.defaultRemoteURL);
|
||||||
this.regWrite(Conf.regPath, 'lastExecutedVersion', Conf.version);
|
this.regWrite(Conf.regPath, 'lastExecutedVersion', Conf.version);
|
||||||
this.regWrite(Conf.regPath, 'selectedApiSource', Conf.defaultApiSource);
|
this.regWrite(Conf.regPath, 'selectedApiSource', Conf.defaultApiSource);
|
||||||
this.regWrite(Conf.regPath + '\\apiSources', Conf.defaultApiSource, Conf.defaultRemoteURL);
|
this.regWrite(Conf.regPath + '\\api-sources', Conf.defaultApiSource, Conf.defaultRemoteURL);
|
||||||
|
|
||||||
this.createODBC(
|
this.createODBC(
|
||||||
Conf.odbcPath,
|
Conf.odbcPath,
|
||||||
Conf.productionDatasource,
|
Conf.productionDatasource,
|
||||||
|
@ -158,6 +162,7 @@ var App = {
|
||||||
userDefaultBranch = this.regRead(Conf.regPath, 'defaultBranch');
|
userDefaultBranch = this.regRead(Conf.regPath, 'defaultBranch');
|
||||||
branch = userDefaultBranch || Conf.defaultBranch;
|
branch = userDefaultBranch || Conf.defaultBranch;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$('branch').value = branch;
|
this.$('branch').value = branch;
|
||||||
this.onChangeBranch();
|
this.onChangeBranch();
|
||||||
|
|
||||||
|
@ -177,6 +182,11 @@ var App = {
|
||||||
}
|
}
|
||||||
this.$('datasource').value = this.dsName;
|
this.$('datasource').value = this.dsName;
|
||||||
|
|
||||||
|
if (this.regRead(Conf.regPath, 'autoDisplayDevOptions') && this.hasDeveloperMode)
|
||||||
|
App.openOptions()
|
||||||
|
|
||||||
|
this.refreshDeveloperMode();
|
||||||
|
|
||||||
if (autoLogin) {
|
if (autoLogin) {
|
||||||
this.onChangeDatasource();
|
this.onChangeDatasource();
|
||||||
this.onEnterClick();
|
this.onEnterClick();
|
||||||
|
@ -204,17 +214,16 @@ var App = {
|
||||||
this.$('password').select();
|
this.$('password').select();
|
||||||
},
|
},
|
||||||
createODBC: function(path, dsName, driverName, description) {
|
createODBC: function(path, dsName, driverName, description) {
|
||||||
var driverPath = this.getEnv('ProgramFiles') + Conf.driverPath;
|
|
||||||
var params = {
|
var params = {
|
||||||
Driver: driverPath,
|
Driver: this.getEnv('ProgramFiles') + Conf.driverPath,
|
||||||
DESCRIPTION: description,
|
DESCRIPTION: description,
|
||||||
SERVER: Conf.defaultServer,
|
SERVER: Conf.defaultServer,
|
||||||
DATABASE: Conf.dbName,
|
DATABASE: Conf.dbName,
|
||||||
SSLCA: this.certFile,
|
SSLCA: this.certFile,
|
||||||
SSLMODE: 'VERIFY_IDENTITY',
|
SSLMODE: 'REQUIRED',
|
||||||
SSLCIPHER: 'AES256-SHA',
|
|
||||||
AUTO_RECONNECT: 1,
|
AUTO_RECONNECT: 1,
|
||||||
NO_PROMPT: 1,
|
NO_PROMPT: 1,
|
||||||
|
NO_BIGINT: 1
|
||||||
};
|
};
|
||||||
|
|
||||||
this.regWrite(path + 'ODBC Data Sources', dsName, driverName);
|
this.regWrite(path + 'ODBC Data Sources', dsName, driverName);
|
||||||
|
@ -233,7 +242,7 @@ var App = {
|
||||||
this.$('notSignOut').disabled = disabled;
|
this.$('notSignOut').disabled = disabled;
|
||||||
this.$('autoLogin').disabled = disabled;
|
this.$('autoLogin').disabled = disabled;
|
||||||
this.$('enter').disabled = disabled;
|
this.$('enter').disabled = disabled;
|
||||||
|
|
||||||
var display = disabled ? 'block' : 'none';
|
var display = disabled ? 'block' : 'none';
|
||||||
this.$('background').style.display = display;
|
this.$('background').style.display = display;
|
||||||
this.$('spinner').style.display = display;
|
this.$('spinner').style.display = display;
|
||||||
|
@ -259,6 +268,18 @@ var App = {
|
||||||
this.$('datasourceLogo').className = '';
|
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() {
|
refreshLogout: function() {
|
||||||
var style = this.$('logout').style;
|
var style = this.$('logout').style;
|
||||||
var password = this.regRead(this.getOdbcPath(), 'PWD');
|
var password = this.regRead(this.getOdbcPath(), 'PWD');
|
||||||
|
@ -267,6 +288,15 @@ var App = {
|
||||||
else
|
else
|
||||||
style.display = 'none';
|
style.display = 'none';
|
||||||
},
|
},
|
||||||
|
refreshDeveloperMode: function() {
|
||||||
|
var stylesName = ['branchOptions', 'datasourceOptions'];
|
||||||
|
for (var n in stylesName) {
|
||||||
|
var style = this.$(stylesName[n]).style;
|
||||||
|
style.visibility = this.regRead(Conf.regPath, 'hasDeveloperMode')
|
||||||
juan
commented
Outdated
Review
```
style.visibility = this.regRead(Conf.regPath, 'hasDeveloperMode')
? 'visible'
: 'hidden';
```
|
|||||||
|
? 'visible'
|
||||||
|
: 'hidden';
|
||||||
|
}
|
||||||
|
},
|
||||||
onChangeBranch: function() {
|
onChangeBranch: function() {
|
||||||
if (this.$('branch').value == 'master'||'test'||'dev') {
|
if (this.$('branch').value == 'master'||'test'||'dev') {
|
||||||
this.$('branchButton').className = this.$('branch').value;
|
this.$('branchButton').className = this.$('branch').value;
|
||||||
|
@ -673,7 +703,7 @@ var App = {
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
},
|
},
|
||||||
request: function (method, url, data, cb) {
|
request: function (method, url, data, cb) {
|
||||||
var remoteURL = this.regRead(Conf.regPath,'remoteURL');
|
var remoteURL = this.regRead(Conf.regPath, 'remoteURL');
|
||||||
if (!remoteURL)
|
if (!remoteURL)
|
||||||
remoteURL = Conf.defaultRemoteURL;
|
remoteURL = Conf.defaultRemoteURL;
|
||||||
|
|
||||||
|
@ -716,7 +746,7 @@ var App = {
|
||||||
err.status = status;
|
err.status = status;
|
||||||
err.req = req;
|
err.req = req;
|
||||||
if (status >= 400 && status < 600)
|
if (status >= 400 && status < 600)
|
||||||
err.error = JSON.parse(req.responseText);
|
alert(_('Bad request') +': '+ err);
|
||||||
|
|
||||||
cb(err);
|
cb(err);
|
||||||
}
|
}
|
||||||
|
|
619
src/style.css
|
@ -1,302 +1,319 @@
|
||||||
body {
|
body {
|
||||||
font-family: 'Poppins', 'Verdana', 'Sans';
|
font-family: 'Poppins', 'Verdana', 'Sans';
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
padding: .8em;
|
padding: .8em;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: #222;
|
color: #222;
|
||||||
}
|
}
|
||||||
a {
|
a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Login form */
|
/* Login form */
|
||||||
|
|
||||||
#logo {
|
#logo {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
margin-bottom: 4em;
|
margin-bottom: 4em;
|
||||||
width: 62%;
|
width: 62%;
|
||||||
}
|
}
|
||||||
button,
|
button,
|
||||||
input {
|
input {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
background-color: #8d8d8d;
|
background-color: #8d8d8d;
|
||||||
}
|
}
|
||||||
option {
|
option {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
#fields {
|
#fields {
|
||||||
max-width: 14.4em;
|
max-width: 14.4em;
|
||||||
margin-left: 3.4em;
|
margin-left: 3.4em;
|
||||||
}
|
}
|
||||||
#inputs > div {
|
#inputs > div {
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
}
|
}
|
||||||
#inputs > div > * {
|
#inputs > div > * {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
#inputs label {
|
#inputs label {
|
||||||
color: rgb(155, 155, 155);
|
color: rgb(155, 155, 155);
|
||||||
font-size: .8em;
|
font-size: .8em;
|
||||||
}
|
}
|
||||||
input[type='text'],
|
input[type='text'],
|
||||||
input[type='password'] {
|
input[type='password'] {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border: none;
|
border: none;
|
||||||
border-bottom: 1px solid #c9c9c9;
|
border-bottom: 1px solid #c9c9c9;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
color: #333;
|
color: #333;
|
||||||
padding-top: .5em;
|
padding-top: .5em;
|
||||||
padding-bottom: .5em;
|
padding-bottom: .5em;
|
||||||
padding-left: .3em;
|
padding-left: .3em;
|
||||||
max-width: auto;
|
max-width: auto;
|
||||||
}
|
}
|
||||||
input[type='text']:focus,
|
input[type='text']:focus,
|
||||||
input[type='password']:focus {
|
input[type='password']:focus {
|
||||||
border-bottom: 1px solid black;
|
border-bottom: 1px solid black;
|
||||||
}
|
}
|
||||||
#optionsSection {
|
#optionsSection {
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
font-size: .8em;
|
font-size: .8em;
|
||||||
margin-bottom: 2.5em;
|
margin-bottom: 2.5em;
|
||||||
}
|
}
|
||||||
#logout {
|
#logout {
|
||||||
float: right;
|
float: right;
|
||||||
margin-top: -4.3em;
|
margin-top: -4.3em;
|
||||||
margin-left: .4em;
|
margin-left: .4em;
|
||||||
padding: .4em;
|
padding: .4em;
|
||||||
}
|
}
|
||||||
#logout:hover {
|
#logout:hover {
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
background-color: #f0f0f0;
|
background-color: #f0f0f0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
#submit {
|
#submit {
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
}
|
}
|
||||||
#clean {
|
#clean {
|
||||||
margin-top: 1.3em;
|
margin-top: 1.3em;
|
||||||
font-size: .8em;
|
font-size: .8em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
#submit,
|
#submit,
|
||||||
#cleanDiv {
|
#cleanDiv {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
#cleanDiv {
|
#cleanDiv {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
#clean:hover {
|
#clean:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
text-decoration-color: #44f;
|
text-decoration-color: #44f;
|
||||||
}
|
}
|
||||||
button {
|
button {
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
background-color: black;
|
background-color: black;
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
padding-right: 5.2em;
|
padding-right: 5.2em;
|
||||||
padding-left: 5.2em;
|
padding-left: 5.2em;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
font-size: .9em;
|
font-size: .9em;
|
||||||
}
|
}
|
||||||
button:hover {
|
button:hover {
|
||||||
background-color: #3d3f42;
|
background-color: #3d3f42;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Branch */
|
/* Branch */
|
||||||
|
|
||||||
#branchOptions {
|
#branchOptions {
|
||||||
margin-top: 2em;
|
margin-top: 1em;
|
||||||
}
|
visibility: hidden;
|
||||||
#branchLogo {
|
}
|
||||||
cursor: pointer;
|
#branchLogo {
|
||||||
padding-top: .4em;
|
cursor: pointer;
|
||||||
padding-left: .4em;
|
padding-top: .4em;
|
||||||
padding-right: .4em;
|
padding-left: .4em;
|
||||||
}
|
padding-right: .4em;
|
||||||
#branch {
|
}
|
||||||
border: none;
|
#branch {
|
||||||
cursor: pointer;
|
border: none;
|
||||||
float: right;
|
cursor: pointer;
|
||||||
}
|
float: right;
|
||||||
#branchSelector {
|
}
|
||||||
float: right;
|
#branchSelector {
|
||||||
margin-top: .7em;
|
float: right;
|
||||||
width: 125px;
|
margin-top: .7em;
|
||||||
display: none;
|
width: 125px;
|
||||||
padding-left: .4em;
|
display: none;
|
||||||
padding-right: .9em;
|
padding-left: .4em;
|
||||||
max-width: 133px;
|
padding-right: .9em;
|
||||||
}
|
max-width: 133px;
|
||||||
#branchButton {
|
}
|
||||||
float: left;
|
#branchButton {
|
||||||
border-radius: 25px;
|
float: left;
|
||||||
color: black;
|
border-radius: 25px;
|
||||||
box-shadow: 0 0 .25em rgba(1,1,1,.6);
|
color: black;
|
||||||
background-color: #8d8d8d;
|
box-shadow: 0 0 .25em rgba(1,1,1,.6);
|
||||||
}
|
background-color: #8d8d8d;
|
||||||
#branchButton:hover {
|
}
|
||||||
box-shadow: none;
|
#branchButton:hover {
|
||||||
}
|
box-shadow: none;
|
||||||
#branchButton.master {
|
}
|
||||||
background-color: #c20000;
|
#branchButton.master {
|
||||||
}
|
background-color: #c20000;
|
||||||
#branchButton.test {
|
}
|
||||||
background-color: #b1a32b;
|
#branchButton.test {
|
||||||
}
|
background-color: #b1a32b;
|
||||||
#branchButton.dev {
|
}
|
||||||
background-color: #31a527;
|
#branchButton.dev {
|
||||||
}
|
background-color: #31a527;
|
||||||
select.master {
|
}
|
||||||
background-color: #c20000;
|
select.master {
|
||||||
}
|
background-color: #c20000;
|
||||||
select.test {
|
}
|
||||||
background-color: #b1a32b;
|
select.test {
|
||||||
}
|
background-color: #b1a32b;
|
||||||
select.dev {
|
}
|
||||||
background-color: #31a527;
|
select.dev {
|
||||||
}
|
background-color: #31a527;
|
||||||
|
}
|
||||||
/* Datasource */
|
|
||||||
|
/* Datasource */
|
||||||
#datasourceOptions {
|
|
||||||
margin-top: 2em;
|
#datasourceOptions {
|
||||||
margin-left: 17.3em;
|
margin-top: 1em;
|
||||||
}
|
margin-left: 17.3em;
|
||||||
#datasourceLogo {
|
visibility: hidden;
|
||||||
cursor: pointer;
|
}
|
||||||
padding-top: .4em;
|
#datasourceLogo {
|
||||||
padding-left: .4em;
|
cursor: pointer;
|
||||||
padding-right: .4em;
|
padding-top: .4em;
|
||||||
}
|
padding-left: .4em;
|
||||||
#datasourceLogo.on {
|
padding-right: .4em;
|
||||||
cursor: pointer;
|
}
|
||||||
padding-top: .4em;
|
#datasourceLogo.on {
|
||||||
padding-left: .4em;
|
cursor: pointer;
|
||||||
padding-right: .4em;
|
padding-top: .4em;
|
||||||
margin-left: 8em;
|
padding-left: .4em;
|
||||||
}
|
padding-right: .4em;
|
||||||
#datasource {
|
margin-left: 8em;
|
||||||
border: none;
|
}
|
||||||
cursor: pointer;
|
#datasource {
|
||||||
padding-left: .2em;
|
border: none;
|
||||||
float: left;
|
cursor: pointer;
|
||||||
}
|
padding-left: .2em;
|
||||||
#datasourceSelector {
|
float: left;
|
||||||
float: right;
|
}
|
||||||
display: none;
|
#datasourceSelector {
|
||||||
padding-left: .5em;
|
float: right;
|
||||||
margin-top: -1.91em;
|
display: none;
|
||||||
width: 180px;
|
padding-left: .5em;
|
||||||
}
|
margin-top: -1.91em;
|
||||||
#datasourceButton {
|
width: 180px;
|
||||||
float: right;
|
}
|
||||||
border-radius: 25px;
|
#datasourceButton {
|
||||||
color: black;
|
float: right;
|
||||||
box-shadow: 0 0 .25em rgba(1,1,1,.6);
|
border-radius: 25px;
|
||||||
background-color: #8d8d8d;
|
color: black;
|
||||||
}
|
box-shadow: 0 0 .25em rgba(1,1,1,.6);
|
||||||
#datasourceButton:hover {
|
background-color: #8d8d8d;
|
||||||
box-shadow: none;
|
}
|
||||||
}
|
#datasourceButton:hover {
|
||||||
#datasourceButton.production {
|
box-shadow: none;
|
||||||
background-color: #c20000;
|
}
|
||||||
}
|
#datasourceButton.production {
|
||||||
#datasourceButton.test {
|
background-color: #c20000;
|
||||||
background-color: #b1a32b;
|
}
|
||||||
}
|
#datasourceButton.test {
|
||||||
#datasourceButton.development {
|
background-color: #b1a32b;
|
||||||
background-color: #31a527;
|
}
|
||||||
}
|
#datasourceButton.development {
|
||||||
select.production {
|
background-color: #31a527;
|
||||||
background-color: #c20000;
|
}
|
||||||
}
|
select.production {
|
||||||
select.test {
|
background-color: #c20000;
|
||||||
background-color: #b1a32b;
|
}
|
||||||
}
|
select.test {
|
||||||
select.development {
|
background-color: #b1a32b;
|
||||||
background-color: #31a527;
|
}
|
||||||
}
|
select.development {
|
||||||
|
background-color: #31a527;
|
||||||
/* Message */
|
}
|
||||||
|
|
||||||
#message {
|
/* Footer */
|
||||||
z-index: 2;
|
|
||||||
position: absolute;
|
#footer {
|
||||||
top: 1.8em;
|
width: 100%;
|
||||||
left: 11.8em;
|
text-align: center;
|
||||||
width: 20em;
|
font-size: 14px;
|
||||||
padding: .5em;
|
margin-top: 6em;
|
||||||
margin-left: -7.25em;
|
color: #303030
|
||||||
margin-top: 2.5em;
|
}
|
||||||
background-color: #EBB;
|
|
||||||
color: #644;
|
#heart {
|
||||||
text-align: center;
|
color: #97d700;
|
||||||
font-size: .8em;
|
}
|
||||||
display: none;
|
|
||||||
border-radius: 5px;
|
/* Message */
|
||||||
box-shadow: 0 0 .4em rgba(1,1,1,.6);
|
|
||||||
}
|
#message {
|
||||||
#message.error {
|
z-index: 2;
|
||||||
border-color: black;
|
position: absolute;
|
||||||
background-color: #ffcdd2;
|
top: 1.8em;
|
||||||
color: #bf0000;
|
left: 11.8em;
|
||||||
}
|
width: 20em;
|
||||||
#message.notice {
|
padding: .5em;
|
||||||
border-color: black;
|
margin-left: -7.25em;
|
||||||
background-color: #d0cdff;
|
margin-top: 2.5em;
|
||||||
color: #0d00bf;
|
background-color: #EBB;
|
||||||
}
|
color: #644;
|
||||||
|
text-align: center;
|
||||||
/* Spinner */
|
font-size: 1em;
|
||||||
|
display: none;
|
||||||
#background {
|
border-radius: 5px;
|
||||||
z-index: 1;
|
box-shadow: 0 0 .4em rgba(1,1,1,.6);
|
||||||
position: absolute;
|
}
|
||||||
width: 100%;
|
#message.error {
|
||||||
height: 100%;
|
border-color: black;
|
||||||
background-color: black;
|
background-color: #ffcdd2;
|
||||||
opacity: .7;
|
color: #bf0000;
|
||||||
filter: alpha(opacity=50);
|
}
|
||||||
top: 0;
|
#message.notice {
|
||||||
left: 0;
|
border-color: black;
|
||||||
display: none;
|
background-color: #d0cdff;
|
||||||
}
|
color: #0d00bf;
|
||||||
#spinner {
|
}
|
||||||
z-index: 2;
|
|
||||||
position: absolute;
|
/* Spinner */
|
||||||
padding: 1em;
|
|
||||||
width: 10em;
|
#background {
|
||||||
height: 5em;
|
z-index: 1;
|
||||||
margin-top: -4em;
|
position: absolute;
|
||||||
margin-left: -6.1em;
|
width: 100%;
|
||||||
top: 50%;
|
height: 100%;
|
||||||
left: 50%;
|
background-color: black;
|
||||||
background-color: white;
|
opacity: .7;
|
||||||
display: none;
|
filter: alpha(opacity=50);
|
||||||
text-align: center;
|
top: 0;
|
||||||
border: 1px solid black;
|
left: 0;
|
||||||
border-radius: 25px;
|
display: none;
|
||||||
}
|
}
|
||||||
#spinner * {
|
#spinner {
|
||||||
vertical-align: middle;
|
z-index: 2;
|
||||||
}
|
position: absolute;
|
||||||
#spinner img {
|
padding: 1em;
|
||||||
width: 2.5em;
|
width: 10em;
|
||||||
height: 2.5em;
|
height: 5em;
|
||||||
margin-top: .5em;
|
margin-top: -4em;
|
||||||
}
|
margin-left: -6.1em;
|
||||||
#loading-message {
|
top: 50%;
|
||||||
font-size: .9em;
|
left: 50%;
|
||||||
|
background-color: white;
|
||||||
|
display: none;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid black;
|
||||||
|
border-radius: 25px;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
#spinner * {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
#spinner img {
|
||||||
|
width: 2.7em;
|
||||||
|
height: 2.7em;
|
||||||
|
margin-top: .5em;
|
||||||
|
}
|
||||||
|
#loading-message {
|
||||||
|
font-size: .9em;
|
||||||
}
|
}
|
|
@ -1,82 +1,90 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" http-equiv="X-UA-Compatible" content="IE=9"/>
|
<meta charset="UTF-8" http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||||
<title>v6</title>
|
<title>.</title>
|
||||||
<link rel="stylesheet" href="style.css"/>
|
<link rel="stylesheet" href="style.css"/>
|
||||||
<script type="text/javascript" src="main.js"></script>
|
<script type="text/javascript" src="main.js"></script>
|
||||||
<hta:application
|
<hta:application
|
||||||
id="Verdnatura"
|
id="Verdnatura"
|
||||||
applicationname="Verdnatura"
|
applicationname="Verdnatura"
|
||||||
border="dialog"
|
border="dialog"
|
||||||
maximizebutton="no"
|
maximizebutton="no"
|
||||||
scrollflat="yes"
|
scrollflat="yes"
|
||||||
caption="yes"
|
caption="yes"
|
||||||
selection="no"
|
selection="no"
|
||||||
innerborder="no"
|
innerborder="no"
|
||||||
icon="icon.ico"
|
icon="icon.ico"
|
||||||
scroll="no"
|
scroll="no"
|
||||||
showintaskbar="yes"
|
showintaskbar="yes"
|
||||||
singleinstance="no"
|
singleinstance="no"
|
||||||
sysmenu="yes"
|
sysmenu="yes"
|
||||||
windowsstate="normal"/>
|
windowsstate="normal"/>
|
||||||
</head>
|
</head>
|
||||||
<body
|
<body
|
||||||
onload="App.onLoad(event)"
|
onload="App.onLoad(event)"
|
||||||
juan
commented
Esto ya se hace en el método Esto ya se hace en el método `App.onLoad(event)`
|
|||||||
onunload="App.onUnload(event)"
|
onunload="App.onUnload(event)"
|
||||||
onkeypress="App.onKeyPress(event)"
|
onkeypress="App.onKeyPress(event)"
|
||||||
onclick="App.onBodyClick(event)">
|
onclick="App.onBodyClick(event)">
|
||||||
<img id="logo" src="verdnatura.svg" alt="Verdnatura"/>
|
<img id="logo" src="verdnatura.svg" alt="Verdnatura"/>
|
||||||
<div id="fields">
|
<div id="fields">
|
||||||
<div id="inputs">
|
<div id="inputs">
|
||||||
<div>
|
<div>
|
||||||
<label for="user">Usuario</label>
|
<label for="user">Usuario</label>
|
||||||
<input id="user" type="text"/>
|
<input id="user" type="text"/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="password">Contraseña</label>
|
<label for="password">Contraseña</label>
|
||||||
<input id="password" type="password"/>
|
<input id="password" type="password"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="optionsSection">
|
<div id="optionsSection">
|
||||||
<input id="notSignOut" type="checkbox">
|
<input id="notSignOut" type="checkbox">
|
||||||
<label for="notSignOut">No cerrar sesión</label>
|
<label for="notSignOut">No cerrar sesión</label>
|
||||||
<br/>
|
<br/>
|
||||||
<input id="autoLogin" type="checkbox"/>
|
<input id="autoLogin" type="checkbox"/>
|
||||||
<label for="autoLogin">Auto-login</label>
|
<label for="autoLogin">Auto-login</label>
|
||||||
</div>
|
</div>
|
||||||
<img id="logout" src="logout.png" onclick="App.logout()"/>
|
<img id="logout" src="logout.png" onclick="App.logout()"/>
|
||||||
</div>
|
</div>
|
||||||
<div id="submit">
|
<div id="submit">
|
||||||
<button id="enter" onclick="App.onEnterClick()">Iniciar sesión</button>
|
<button id="enter" onclick="App.onEnterClick()">Iniciar sesión</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="cleanDiv">
|
<div id="cleanDiv">
|
||||||
<a id="clean" href="#" onclick="App.onCleanCacheClick()">Limpiar caché</a>
|
<a id="clean" href="#" onclick="App.onCleanCacheClick()">Limpiar caché</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="branchOptions">
|
<div id="branchOptions">
|
||||||
<div id="branchButton">
|
<div id="branchButton">
|
||||||
<img id="branchLogo" src="branch.png" onclick="App.openOptions()" alt="Change branch"/>
|
<img id="branchLogo" src="branch.png" onclick="App.openOptions()" alt="Change branch"/>
|
||||||
<div id="branchSelector">
|
<div id="branchSelector">
|
||||||
<select id="branch" onchange="App.onChangeBranch()"></select>
|
<select id="branch" onchange="App.onChangeBranch()"></select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="datasourceOptions">
|
<div id="datasourceOptions">
|
||||||
<div id="datasourceButton">
|
<div id="datasourceButton">
|
||||||
<img id="datasourceLogo" src="datasource.png" onclick="App.openOptions()" alt="Change datasource"/>
|
<img id="datasourceLogo" src="datasource.png" onclick="App.openOptions()" alt="Change datasource"/>
|
||||||
<div id="datasourceSelector">
|
<div id="datasourceSelector">
|
||||||
<select id="datasource" onchange="App.onChangeDatasource()"></select>
|
<select id="datasource" onchange="App.onChangeDatasource()"></select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="background"></div>
|
<div id="footer">
|
||||||
<div id="spinner">
|
<span>
|
||||||
<img alt="Cargando..." src="spinner.gif"/>
|
developed by Verdnatura with
|
||||||
<br/>
|
<span id="heart" onclick="App.onHeartClick()">
|
||||||
<span id="loading-message"></span>
|
♥
|
||||||
</div>
|
</span>
|
||||||
<div id="message">
|
</span>
|
||||||
</div>
|
<div>
|
||||||
</body>
|
<div id="background"></div>
|
||||||
</html>
|
<div id="spinner">
|
||||||
|
<img alt="Cargando..." src="spinner.gif"/>
|
||||||
|
<br/>
|
||||||
|
<span id="loading-message"></span>
|
||||||
|
</div>
|
||||||
|
<div id="message">
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|