Fixed proper display version of updatable plugins when in details page

This commit is contained in:
Djamil Legato
2016-04-29 11:02:01 -07:00
parent 3fb572d4ea
commit 6e68fd9e02
2 changed files with 12 additions and 9 deletions

View File

@@ -107,7 +107,8 @@ export default class Updates {
Object.keys(resources).forEach(function(item) {
// listing page
let element = $(`[data-gpm-${singles[index]}="${item}"] .gpm-name`);
let container = $(`[data-gpm-${singles[index]}="${item}"]`);
let element = container.find('.gpm-name');
let url = element.find('a');
if (type === 'plugins' && !element.find('.badge.update').length) {
@@ -117,6 +118,7 @@ export default class Updates {
}
// details page
if (container.length) {
let details = $(`.grav-update.${singles[index]}`);
if (details.length) {
let releaseType = resources[item].type === 'testing' ? '<span class="gpm-testing">test release</span>' : '';
@@ -131,6 +133,7 @@ export default class Updates {
// display update bar for themes/plugins details
$(`[data-gpm-${singles[index]}="${item}"]`).css('display', 'block');
}
}
});
});
}

File diff suppressed because one or more lines are too long