Finish code for deleting private application
Also fixed adding from dockerhub searches not taking you back to apps tab when clicking donepull/2/head
parent
5cb416bcb3
commit
8875ea3893
Binary file not shown.
|
@ -954,7 +954,7 @@ function dockerConvert(dockerID) {
|
|||
$.post(URL,{action:'convert_docker',ID:dockerID},function(data) {
|
||||
if (data) {
|
||||
myCloseAlert();
|
||||
templateURL = "AddContainer?xmlTemplate=default:" + myTrim(data);
|
||||
templateURL = "Apps/AddContainer?xmlTemplate=default:" + myTrim(data);
|
||||
window.open(templateURL,"<?=$tabMode?>");
|
||||
$("#Total").html(totalDisplayed);
|
||||
}
|
||||
|
@ -1064,12 +1064,12 @@ function uninstallApp(application,humanName) {
|
|||
},
|
||||
function() {
|
||||
swal("Uninstalling "+humanName,"","info");
|
||||
$.post(URL,{action:'uninstall_application',application:application}, function(data) {
|
||||
if (data) {
|
||||
swal("","Uninstalled","success");
|
||||
previousApps("InstalledApps",true);
|
||||
}
|
||||
});
|
||||
$.post(URL,{action:'uninstall_application',application:application}, function(data) {
|
||||
if (data) {
|
||||
swal("","Uninstalled","success");
|
||||
previousApps("InstalledApps",true);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1087,6 +1087,15 @@ function deletePrivateApp(path,name,author) {
|
|||
closeOnConfirm: false,
|
||||
showLoaderOnConfirm: true,
|
||||
html: true
|
||||
},
|
||||
function() {
|
||||
swal("Removing "+name,"","info");
|
||||
$.post(URL,{action:'removePrivateApp',path:path},function(data) {
|
||||
if (data) {
|
||||
swal("","Removed","success");
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -596,7 +596,7 @@ function my_display_apps($viewMode,$file,$pageNumber=1,$officialFlag=false,$sele
|
|||
}
|
||||
} else {
|
||||
if ( $template['Private'] == "true" ) {
|
||||
$template['display_Uninstall'] = "<img class='ca_tooltip' src='{$communityPaths['deleteIcon']}' title='Remove Private Application' style='width:20px;height:20px;cursor:pointer' onclick='deletePrivateApp("{$template['Path']}","{$template['SortName']}","{$template['Author']}");'>";
|
||||
$template['display_Uninstall'] = "<img class='ca_tooltip' src='{$communityPaths['deleteIcon']}' title='Remove Private Application' style='width:20px;height:20px;cursor:pointer' onclick='deletePrivateApp("{$template['Path']}","{$template['SortName']}","{$template['SortAuthor']}");'>";
|
||||
}
|
||||
}
|
||||
$template['display_removable'] = $template['Removable'] ? "<img class='ca_tooltip' src='{$communityPaths['deleteIcon']}' title='Remove Application From List' style='width:20px;height:20px;cursor:pointer' onclick='removeApp("".$template['MyPath']."","".$template['Name']."");'>" : "";
|
||||
|
@ -2037,5 +2037,18 @@ case 'checkStale':
|
|||
echo "false";
|
||||
}
|
||||
break;
|
||||
|
||||
#######################################
|
||||
# #
|
||||
# Removes a private app from the list #
|
||||
# #
|
||||
#######################################
|
||||
case 'removePrivateApp':
|
||||
$path = getPost("path",false);
|
||||
if ( path ) {
|
||||
@unlink($path);
|
||||
}
|
||||
echo "done";
|
||||
break;
|
||||
}
|
||||
?>
|
Loading…
Reference in New Issue