refs #4974 Minor changes
This commit is contained in:
parent
0184c570a3
commit
8556d44daa
29
src/main.js
29
src/main.js
|
@ -100,9 +100,9 @@ var App = {
|
||||||
this.certFile = this.appDir + '\\cacert.pem';
|
this.certFile = this.appDir + '\\cacert.pem';
|
||||||
|
|
||||||
// Creates the necessary registry entries
|
// Creates the necessary registry entries
|
||||||
var myVersion = this.regRead(Conf.regPath, 'version');
|
var lastVersion = this.regRead(Conf.regPath, 'lastExecutedVersion');
|
||||||
|
|
||||||
if (!myVersion || myVersion != Conf.version) {
|
if (!lastVersion || lastVersion != Conf.version) {
|
||||||
var path = 'HKCU\\Software\\Microsoft\\Office\\11.0\\Access\\';
|
var path = 'HKCU\\Software\\Microsoft\\Office\\11.0\\Access\\';
|
||||||
|
|
||||||
// Creates the Access configuration entries
|
// Creates the Access configuration entries
|
||||||
|
@ -120,25 +120,15 @@ var App = {
|
||||||
Conf.odbcDriver
|
Conf.odbcDriver
|
||||||
);
|
);
|
||||||
|
|
||||||
//Delete old strings values
|
this.createDatasources();
|
||||||
|
this.regWrite(Conf.regPath, 'remoteURL', Conf.defaultRemoteURL);
|
||||||
|
this.regWrite(Conf.regPath, 'lastExecutedVersion', Conf.version);
|
||||||
|
|
||||||
|
// Delete old strings values (REMOVE IN VERSION 5)
|
||||||
this.regDelete(Conf.regPath + 'configured');
|
this.regDelete(Conf.regPath + 'configured');
|
||||||
this.regDelete(Conf.regPath + 'remember');
|
this.regDelete(Conf.regPath + 'remember');
|
||||||
|
|
||||||
// Datasources creation
|
|
||||||
this.createDatasources();
|
|
||||||
|
|
||||||
// Upload the remote URL
|
|
||||||
this.regWrite(Conf.regPath, 'remoteURL', Conf.defaultRemoteURL);
|
|
||||||
|
|
||||||
// Upload the string value to version installed
|
|
||||||
this.regWrite(Conf.regPath, 'version', Conf.version);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.regRead(Conf.regPath, 'currentDatasource'))
|
|
||||||
this.regWrite(Conf.regPath, 'currentDatasource', Conf.defaultDatasource);
|
|
||||||
|
|
||||||
if (!this.regRead(Conf.regPath, 'notSignOut'))
|
|
||||||
this.regWrite(Conf.regPath, 'notSignOut', 0);
|
|
||||||
var notSignOut = this.regRead(Conf.regPath, 'notSignOut');
|
var notSignOut = this.regRead(Conf.regPath, 'notSignOut');
|
||||||
var password = this.regRead(Conf.odbcPath + Conf.dsName, 'PWD');
|
var password = this.regRead(Conf.odbcPath + Conf.dsName, 'PWD');
|
||||||
|
|
||||||
|
@ -712,7 +702,7 @@ var App = {
|
||||||
*/
|
*/
|
||||||
getDatasource: function() {
|
getDatasource: function() {
|
||||||
var datasource = this.regRead(
|
var datasource = this.regRead(
|
||||||
'HKCU\\SOFTWARE\\Verdnatura\\vn-access',
|
Conf.regPath,
|
||||||
'currentDatasource'
|
'currentDatasource'
|
||||||
);
|
);
|
||||||
return datasource || Conf.defaultDatasource;
|
return datasource || Conf.defaultDatasource;
|
||||||
|
@ -724,7 +714,7 @@ var App = {
|
||||||
*/
|
*/
|
||||||
getRemoteURL: function() {
|
getRemoteURL: function() {
|
||||||
var remoteURL = this.regRead(
|
var remoteURL = this.regRead(
|
||||||
'HKCU\\SOFTWARE\\Verdnatura\\vn-access',
|
Conf.regPath,
|
||||||
'remoteURL'
|
'remoteURL'
|
||||||
);
|
);
|
||||||
return remoteURL || Conf.defaultRemoteURL;
|
return remoteURL || Conf.defaultRemoteURL;
|
||||||
|
@ -765,7 +755,6 @@ var App = {
|
||||||
}
|
}
|
||||||
this.regWrites(myPath, params);
|
this.regWrites(myPath, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue