1 function deletePackage(project_id
, descriptor_type
, package_id
) {
2 bootbox
.confirm("Are you sure want to delete?", function (result
) {
4 location
.href
= '/projects/' + project_id
+ '/descriptors/' + descriptor_type
+ '/' + package_id
+ '/delete'
10 function openPackageContentList(project_id
, type
, pkg_id
) {
11 var dialog
= bootbox
.dialog({
12 message
: '<div class="text-center"><i class="fa fa-spin fa-spinner"></i> Loading...</div>',
16 url
: '/projects/' + project_id
+ '/descriptors/' + type
+ '/' + pkg_id
+ '/action/get_package_files_list',
19 contentType
: "application/json;charset=utf-8",
20 success: function (result
) {
21 //$('#modal_show_vim_body').empty();
23 build_file_list("Files in " + pkg_id
, result
.files
);
25 error: function (result
) {
27 bootbox
.alert("An error occurred while retrieving the package content.");
33 function build_file_list(title
, list
) {
34 $('#files_list_tbody').find('tr:gt(0)').remove();
35 $('#files_list_tbody_title').text(title
)
37 var template
= '<tr><td>-</td><td>' + list
[i
] + '</td><td><button type="button" class="btn btn-default" onclick="" disabled><i class="fa fa-folder-open"></i></button></td></tr>'
38 $('#files_list_tbody').append(template
)
40 $('#modal_files_list').modal('show');