Fixed JS error while checking updates for plugins symlinked

This commit is contained in:
Djamil Legato
2015-07-28 11:51:50 -07:00
parent d13da2a820
commit c1ea4715a9

View File

@@ -248,12 +248,18 @@ $(function () {
if (details){
var slug = $('[data-gpm-' + type + ']').data('gpm-' + type),
Type = type.charAt(0).toUpperCase() + type.substring(1);
Type = type.charAt(0).toUpperCase() + type.substring(1),
resource = resources[type + 's'][slug];
content = '<strong>v{available}</strong> of this ' + type + ' is now available!';
content = jQuery.substitute(content, {available: resources[type + 's'][slug].available});
button = jQuery.substitute(button, {Type: Type, location: GravAdmin.config.base_url_relative + '/' + type + 's/' + slug});
$(details).html('<p>' + icon + content + button + '</p>');
if (resource) {
content = '<strong>v{available}</strong> of this ' + type + ' is now available!';
content = jQuery.substitute(content, { available: resource.available });
button = jQuery.substitute(button, {
Type: Type,
location: GravAdmin.config.base_url_relative + '/' + type + 's/' + slug
});
$(details).html('<p>' + icon + content + button + '</p>');
}
}
}
}