Skip to content
This repository was archived by the owner on Mar 14, 2020. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/js/projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -978,10 +978,14 @@ $(function () {
// TODO: will list all the uploaded resource and show the reference
// count of them. It will depend on the user if delete or not.
if (pmUtils.resourceRef[refPath] <= 0) {
$.rib.confirm('Unused resource: "' + refPath +
'". \nWould you like to delete it from the project?', function () {
$.rib.fsUtils.rm(projectDir + refPath);
delete pmUtils.resourceRef[refPath];
delete pmUtils.resourceRef[refPath];
$.rib.fsUtils.pathToEntry(projectDir + refPath, function (entry) {
$.rib.confirm('Unused resource: "' + entry.name +
'". \nWould you like to delete it from the project?', function () {
$.rib.fsUtils.rm(entry.fullPath);
}, function () {
pmUtils.resourceRef[refPath] = 0;
});
});
}
} else {
Expand Down