forked from verdnatura/hedera-web
Version displayed in testing mode
This commit is contained in:
parent
86674c2a30
commit
5ddfaf1d6c
|
@ -1,4 +1,4 @@
|
|||
hedera-web (1.405.70) stable; urgency=low
|
||||
hedera-web (1.405.71) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -195,9 +195,8 @@
|
|||
|
||||
.vn-gui .test-link
|
||||
{
|
||||
display: block;
|
||||
margin: 1em auto;
|
||||
max-width: 70%;
|
||||
display: none;
|
||||
margin: .5em;
|
||||
background-color: #3f51b5;
|
||||
color: white;
|
||||
padding: 0 1em;
|
||||
|
@ -209,6 +208,24 @@
|
|||
{
|
||||
background-color: #4f61c5;
|
||||
}
|
||||
.vn-gui .dev-info
|
||||
{
|
||||
display: none;
|
||||
padding: .3em .5em;
|
||||
color: white;
|
||||
background-color: #3f51b5;
|
||||
font-size: .9em;
|
||||
margin: .5em;
|
||||
border-radius: .1em;
|
||||
}
|
||||
.vn-gui .dev-info > p
|
||||
{
|
||||
margin: .2em 0;
|
||||
}
|
||||
.vn-gui .dev-info > .mode
|
||||
{
|
||||
color: #BBF;
|
||||
}
|
||||
|
||||
/* Menu */
|
||||
|
||||
|
|
|
@ -58,6 +58,7 @@ module.exports = new Class
|
|||
var sql = 'SELECT nickname FROM account.userView;'
|
||||
+'SELECT default_form FROM config;'
|
||||
+'SELECT url FROM imageConfig;'
|
||||
+'SELECT dbproduccion FROM vn2008.tblContadores;'
|
||||
+'SELECT production_domain, test_domain FROM config;';
|
||||
this._conn.execQuery (sql, this.onMainQueryDone.bind (this));
|
||||
|
||||
|
@ -154,26 +155,37 @@ module.exports = new Class
|
|||
|
||||
// Retrieving configuration parameters
|
||||
|
||||
var isTesting = !resultSet.fetchValue ();
|
||||
|
||||
if (isTesting)
|
||||
{
|
||||
this.$('dev-info').style.display = 'block';
|
||||
this.$('version').textContent = Vn.Cookie.get ('vnVersion');
|
||||
}
|
||||
|
||||
// Retrieving configuration parameters
|
||||
|
||||
var res = resultSet.fetchResult ();
|
||||
|
||||
if (res.next () && res.get ('test_domain'))
|
||||
{
|
||||
if (location.host != res.get ('production_domain'))
|
||||
{
|
||||
var linkText = 'ReturnToOldWebsite';
|
||||
var linkText = 'Old website';
|
||||
var linkField = 'production_domain';
|
||||
}
|
||||
else
|
||||
{
|
||||
var linkText = 'TestTheNewWebsite';
|
||||
var linkText = 'Test the new website';
|
||||
var linkField = 'test_domain';
|
||||
}
|
||||
|
||||
Vn.Node.setText (this.$('test-link'), _(linkText));
|
||||
this.$('test-link').href = '//'+ res.get (linkField);
|
||||
this.$('test-link').style.display = 'block';
|
||||
}
|
||||
else
|
||||
Vn.Node.hide (this.$('test-link'));
|
||||
this.$('test-link').style.display = 'none';
|
||||
|
||||
// Loading the default form
|
||||
|
||||
|
|
|
@ -25,7 +25,11 @@
|
|||
<p id="supplanted"/>
|
||||
</div>
|
||||
</div>
|
||||
<a id="test-link" class="test-link" href="#"/>
|
||||
<div id="dev-info" class="dev-info">
|
||||
<p class="mode">Testing</p>
|
||||
<p><t>Version</t> <span id="version"/></p>
|
||||
</div>
|
||||
<a id="test-link" class="test-link" href="#">Old website</a>
|
||||
<ul id="main-menu" class="main-menu"/>
|
||||
</div>
|
||||
<div class="social">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hedera-web",
|
||||
"version": "1.405.70",
|
||||
"version": "1.405.71",
|
||||
"description": "Verdnatura web page",
|
||||
"license": "GPL-3.0",
|
||||
"repository": {
|
||||
|
|
|
@ -10,7 +10,7 @@ body
|
|||
}
|
||||
body.idle
|
||||
{
|
||||
background-color: #08d;
|
||||
background-color: #08D;
|
||||
}
|
||||
body.doing
|
||||
{
|
||||
|
@ -18,7 +18,7 @@ body.doing
|
|||
}
|
||||
body.done
|
||||
{
|
||||
background-color: #4a0;
|
||||
background-color: #4A0;
|
||||
}
|
||||
#container
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue