mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-17 02:31:02 +01:00
Fixed JS error while checking updates for plugins symlinked
This commit is contained in:
@@ -248,12 +248,18 @@ $(function () {
|
|||||||
|
|
||||||
if (details){
|
if (details){
|
||||||
var slug = $('[data-gpm-' + type + ']').data('gpm-' + type),
|
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!';
|
if (resource) {
|
||||||
content = jQuery.substitute(content, {available: resources[type + 's'][slug].available});
|
content = '<strong>v{available}</strong> of this ' + type + ' is now available!';
|
||||||
button = jQuery.substitute(button, {Type: Type, location: GravAdmin.config.base_url_relative + '/' + type + 's/' + slug});
|
content = jQuery.substitute(content, { available: resource.available });
|
||||||
$(details).html('<p>' + icon + content + button + '</p>');
|
button = jQuery.substitute(button, {
|
||||||
|
Type: Type,
|
||||||
|
location: GravAdmin.config.base_url_relative + '/' + type + 's/' + slug
|
||||||
|
});
|
||||||
|
$(details).html('<p>' + icon + content + button + '</p>');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user