Bug fix, the new version is not showing up
This commit is contained in:
parent
e5a7735360
commit
600724da2b
2 changed files with 6 additions and 4 deletions
|
@ -8,10 +8,12 @@ function getLatestVersion() {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
|
console.log("[INFO] [PLUGIN VERSION] Request completed.");
|
||||||
|
|
||||||
// Constant BLUDIT_BUILD is defined on variables.js
|
// Constant BLUDIT_BUILD is defined on variables.js
|
||||||
if (json.stable.build > BLUDIT_BUILD) {
|
if (json.stable.build > BLUDIT_BUILD) {
|
||||||
$("#current-version").hide();
|
$(".current-version").hide();
|
||||||
$("#new-version").show();
|
$(".new-version").show();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function(json) {
|
error: function(json) {
|
||||||
|
|
|
@ -42,10 +42,10 @@ class pluginVersion extends Plugin {
|
||||||
global $L;
|
global $L;
|
||||||
$html = '';
|
$html = '';
|
||||||
if ($this->getValue('showCurrentVersion')) {
|
if ($this->getValue('showCurrentVersion')) {
|
||||||
$html = '<a id="current-version" class="nav-link" href="'.HTML_PATH_ADMIN_ROOT.'about'.'">'.$L->get('Version').' '.(defined('BLUDIT_PRO')?'<span class="fa fa-heart" style="color: #ffc107"></span>':'').'<span class="badge badge-warning badge-pill">'.BLUDIT_VERSION.'</span></a>';
|
$html = '<a class="current-version" class="nav-link" href="'.HTML_PATH_ADMIN_ROOT.'about'.'"><span class="fa fa-info"></span> '.$L->get('Version').' '.(defined('BLUDIT_PRO')?'<span class="fa fa-heart" style="color: #ffc107"></span>':'').'<span class="badge badge-warning badge-pill">'.BLUDIT_VERSION.'</span></a>';
|
||||||
}
|
}
|
||||||
if ($this->getValue('newVersionAlert')) {
|
if ($this->getValue('newVersionAlert')) {
|
||||||
$html .= '<a id="new-version" style="display: none;" target="_blank" href="https://www.bludit.com">'.$L->get('New version available').' <span class="fa fa-bell" style="color: red"></span></a>';
|
$html .= '<a class="new-version" style="display: none;" target="_blank" href="https://www.bludit.com"><span class="fa fa-bell" style="color: red"></span> '.$L->get('New version available').'</a>';
|
||||||
}
|
}
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue