Skip to content

Commit

Permalink
Fix more fmp bugs, add hiding the button for update checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Sturmer committed Oct 14, 2016
1 parent 2186f8e commit f32e48c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 2 additions & 3 deletions fmp/fmp.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,8 @@ function installUnpackedPackage(manifest_filename) {
}

function filterPackages(registry, options) {
if(!registry) { return []; }

var packages = registry.packages.filter(function(package) {
if(!registry || !registry.packages) { return []; }
var packages = registry.packages.filter(function(package) {
for(var key in options) {
if(options.hasOwnProperty(key)) {
try {
Expand Down
3 changes: 3 additions & 0 deletions static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,11 @@ <h1>&nbsp;<span class="fa fa-info-circle"></span> System Information</h1>
<div class="content-pane" id="view-updates">
<h1><span class="fa fa-download"></span> Software Update</h1>
<p>
<div id="check-for-updates-controls">
<p id="message-noupdates">There are no software updates available. </p>
<button id="btn-check-for-updates" class="btn"><i class="fa fa-cloud-download fa-lg" id="check-button-icon"></i> <span id="check-button-text"> Check for Updates</span></button>
</div>

<div id="message-updates" class="hide">
<p>A software update is available!</p>
<p><pre id="message-changelog"></pre></p>
Expand Down
4 changes: 3 additions & 1 deletion static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,10 @@ $(document).ready(function() {
$('#update-button-text').text('Update ' + update.product + ' to ' + update.version);
$('#message-updates').removeClass('hide');
$('#message-noupdates').addClass('hide');
$('.update-indicator').addClass('updates-available')
$('.update-indicator').addClass('updates-available')
$('#check-for-updates-controls').addClass('hide');
} else {
$('#check-for-updates-controls').removeClass('hide');
$('#message-updates').addClass('hide');
$('#message-noupdates').removeClass('hide');
$('.update-indicator').removeClass('updates-available')
Expand Down

0 comments on commit f32e48c

Please sign in to comment.