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'
11 function openPackageContentList(project_id
, type
, pkg_id
) {
12 var dialog
= bootbox
.dialog({
13 message
: '<div class="text-center"><i class="fa fa-spin fa-spinner"></i> Loading...</div>',
17 url
: '/projects/' + project_id
+ '/descriptors/' + type
+ '/' + pkg_id
+ '/action/get_package_files_list',
20 contentType
: "application/json;charset=utf-8",
21 success: function (result
) {
22 //$('#modal_show_vim_body').empty();
24 build_file_list("Files in " + pkg_id
, result
.files
);
26 error: function (result
) {
28 bootbox
.alert("An error occurred while retrieving the package content.");
34 function build_file_list(title
, list
) {
35 $('#files_list_tbody').find('tr:gt(0)').remove();
36 $('#files_list_tbody_title').text(title
)
38 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>'
39 $('#files_list_tbody').append(template
)
41 $('#modal_files_list').modal('show');