mirror of
https://github.com/Squidly271/community.applications.git
synced 2025-06-03 14:52:13 +08:00
Finish code for deleting private application
Also fixed adding from dockerhub searches not taking you back to apps tab when clicking done
This commit is contained in:
parent
5cb416bcb3
commit
8875ea3893
Binary file not shown.
@ -954,7 +954,7 @@ function dockerConvert(dockerID) {
|
|||||||
$.post(URL,{action:'convert_docker',ID:dockerID},function(data) {
|
$.post(URL,{action:'convert_docker',ID:dockerID},function(data) {
|
||||||
if (data) {
|
if (data) {
|
||||||
myCloseAlert();
|
myCloseAlert();
|
||||||
templateURL = "AddContainer?xmlTemplate=default:" + myTrim(data);
|
templateURL = "Apps/AddContainer?xmlTemplate=default:" + myTrim(data);
|
||||||
window.open(templateURL,"<?=$tabMode?>");
|
window.open(templateURL,"<?=$tabMode?>");
|
||||||
$("#Total").html(totalDisplayed);
|
$("#Total").html(totalDisplayed);
|
||||||
}
|
}
|
||||||
@ -1064,12 +1064,12 @@ function uninstallApp(application,humanName) {
|
|||||||
},
|
},
|
||||||
function() {
|
function() {
|
||||||
swal("Uninstalling "+humanName,"","info");
|
swal("Uninstalling "+humanName,"","info");
|
||||||
$.post(URL,{action:'uninstall_application',application:application}, function(data) {
|
$.post(URL,{action:'uninstall_application',application:application}, function(data) {
|
||||||
if (data) {
|
if (data) {
|
||||||
swal("","Uninstalled","success");
|
swal("","Uninstalled","success");
|
||||||
previousApps("InstalledApps",true);
|
previousApps("InstalledApps",true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1087,6 +1087,15 @@ function deletePrivateApp(path,name,author) {
|
|||||||
closeOnConfirm: false,
|
closeOnConfirm: false,
|
||||||
showLoaderOnConfirm: true,
|
showLoaderOnConfirm: true,
|
||||||
html: 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 {
|
} else {
|
||||||
if ( $template['Private'] == "true" ) {
|
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']."");'>" : "";
|
$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";
|
echo "false";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# #
|
||||||
|
# Removes a private app from the list #
|
||||||
|
# #
|
||||||
|
#######################################
|
||||||
|
case 'removePrivateApp':
|
||||||
|
$path = getPost("path",false);
|
||||||
|
if ( path ) {
|
||||||
|
@unlink($path);
|
||||||
|
}
|
||||||
|
echo "done";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
Loading…
x
Reference in New Issue
Block a user