Sfoglia il codice sorgente

Bug fix, the new version is not showing up

Diego Najar 2 anni fa
parent
commit
600724da2b
2 ha cambiato i file con 6 aggiunte e 4 eliminazioni
  1. 4 2
      bl-plugins/version/js/version.js
  2. 2 2
      bl-plugins/version/plugin.php

+ 4 - 2
bl-plugins/version/js/version.js

@@ -8,10 +8,12 @@ function getLatestVersion() {
 		method: "GET",
 		dataType: 'json',
 		success: function(json) {
+			console.log("[INFO] [PLUGIN VERSION] Request completed.");
+
 			// Constant BLUDIT_BUILD is defined on variables.js
 			if (json.stable.build > BLUDIT_BUILD) {
-				$("#current-version").hide();
-				$("#new-version").show();
+				$(".current-version").hide();
+				$(".new-version").show();
 			}
 		},
 		error: function(json) {

+ 2 - 2
bl-plugins/version/plugin.php

@@ -42,10 +42,10 @@ class pluginVersion extends Plugin {
 		global $L;
 		$html = '';
 		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')) {
-			$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;
 	}