diff --git a/archive/community.applications-2021.08.10-x86_64-1.txz b/archive/community.applications-2021.08.10-x86_64-1.txz
index b65c8be8..8885ff55 100644
Binary files a/archive/community.applications-2021.08.10-x86_64-1.txz and b/archive/community.applications-2021.08.10-x86_64-1.txz differ
diff --git a/archive/community.applications-2021.08.11-x86_64-1.txz b/archive/community.applications-2021.08.11-x86_64-1.txz
new file mode 100644
index 00000000..0b292638
Binary files /dev/null and b/archive/community.applications-2021.08.11-x86_64-1.txz differ
diff --git a/source/community.applications/usr/local/emhttp/plugins/community.applications/CommunityApps.page b/source/community.applications/usr/local/emhttp/plugins/community.applications/CommunityApps.page
index ebb4a994..8d3e03dc 100644
--- a/source/community.applications/usr/local/emhttp/plugins/community.applications/CommunityApps.page
+++ b/source/community.applications/usr/local/emhttp/plugins/community.applications/CommunityApps.page
@@ -304,7 +304,6 @@ $(function(){
doSearch(false,repo);
});
-
$('.favouriteRepo').on("click",function() {
if ( popupVisible(this) ) return;
if ( $(this).hasClass("caMenuDisabled") )
@@ -324,7 +323,32 @@ $(function(){
}
});
});
+
+ $('body').on("click",".pluginInstall",function() {
+ if ( popupVisible(this) ) return;
+
+ var plugin = $(this).data("url");
+ var type = $(this).data("update") ? true : false;
+ installPlugin(plugin,type);
+ });
+
+ $("body").on("click",".uninstallApp",function() {
+ if ( popupVisible(this) ) return;
+ var type = $(this).data("type");
+ var name = $(this).data("name");
+ var app = $(this).data("app");
+ switch (type) {
+ case "docker":
+ uninstallDocker(app,name);
+ break;
+ case "plugin":
+ uninstallApp(app,name);
+ break;
+ }
+ });
+
+
$('.menuItems').on("click",'.categoryMenu',function() {
if ( popupVisible(this) ) return;
if ( $(this).hasClass("caMenuDisabled") )
@@ -457,25 +481,40 @@ $(function(){
});
});
- $('.mainArea').on("click",".languageSwitch",function() {
+ $('body').on("click",".languageSwitch",function() {
if ( popupVisible(this) ) return;
CAswitchLanguage($(this).data("language"));
});
- $('.mainArea').on("click",".languageInstall",function() {
+ $('body').on("click",".languageInstall",function() {
installLanguage($(this).data("language_xml"),$(this).data("language"));
});
- $('.mainArea').on("click",".languageRemove",function() {
+ $('body').on("click",".languageRemove",function() {
if ( popupVisible(this) ) return;
removeLanguage($(this).data("language"));
});
- $('.mainArea').on("click",".languageUpdate",function() {
+ $('body').on("click",".languageUpdate",function() {
if ( popupVisible(this) ) return;
updateLanguage($(this).data("language"));
});
+ $('body').on("click",".deletePrivateApp",function() {
+ if ( popupVisible(this) ) return;
+ var path = $(this).data("path");
+ var name = $(this).data("name");
+ var author = $(this).data("author");
+ deletePrivateApp(path,name,author);
+ });
+
+ $("body").on("click",".removeApp",function() {
+ if ( popupVisible(this) ) return;
+ var path = $(this).data("path");
+ var name = $(this).data("name");
+ removeApp(path,name);
+ });
+
$('.mainArea').on("mouseover",".ca_discord",function() {
$(this).attr("src","/plugins/community.applications/images/discord-hover.svg");
@@ -974,10 +1013,7 @@ function popupVisible(el) {
return $(".popupHolder").is(":visible");
}
-function installPlugin(pluginURL,popup=false,update=false) {
- if ( ! popup)
- if ( popupVisible() )
- return;
+function installPlugin(pluginURL,update=false) {
type = update ? "update" : "install";
title = update ? "" : "";
$(".tooltipstered").tooltipster("hide");
@@ -1036,7 +1072,7 @@ function removeApp(application, humanName) {
disableSearch();
swal({
title: "",
- text: sprintf(tr("Are you sure you want to delete %s from the list of previously installed applications?"),""+humanName+"")+"
"+application+"",
+ text: sprintf(tr("Are you sure you want to delete %s from the list of previously installed applications?"),""+humanName+"")+"
"+application+"",
type: "warning",
confirmButtonText: "",
cancelButtonText: "",
@@ -1062,7 +1098,7 @@ function uninstallApp(application,humanName) {
disableSearch();
swal({
title: "",
- text: sprintf(tr("Are you sure you want to uninstall %s?"),""+humanName+""),
+ text: sprintf(tr("Are you sure you want to uninstall %s?"),""+humanName+""),
type: "warning",
showCancelButton: true,
showConfirmButton: true,
@@ -1100,7 +1136,7 @@ function deletePrivateApp(path,name,author) {
disableSearch();
swal({
title: "",
- text: sprintf(tr("Are you sure you want to remove the private application %s by %s?"),""+name+"",""+author+"")+"
("+displayPath+")",
+ text: sprintf(tr("Are you sure you want to remove the private application %s by %s?"),""+name+"",""+author+"")+"
("+displayPath+")",
type: "warning",
showCancelButton: true,
showConfirmButton: true,
@@ -1129,7 +1165,7 @@ function uninstallDocker(application,humanName) {
disableSearch();
swal({
title: "",
- text: sprintf(tr("Are you sure you want to uninstall %s?"),""+humanName+""),
+ text: sprintf(tr("Are you sure you want to uninstall %s?"),""+humanName+""),
type: "warning",
showCancelButton: true,
showConfirmButton: true,
@@ -1337,7 +1373,7 @@ function deleteMulti() {
var selected = getSelectedApps();
swal({
title: "",
- text: sprintf(tr("Are you sure you want to delete %s applications from the previously installed list?"),""+selected.deletePaths.length+""),
+ text: sprintf(tr("Are you sure you want to delete %s applications from the previously installed list?"),""+selected.deletePaths.length+""),
type: "warning",
confirmButtonText: "",
cancelButtonText: "",
@@ -1396,7 +1432,7 @@ function installMulti() {
}
var text = sprintf(tr("Are you sure you want to install %s docker and %s plugin application(s)?"),dockerCount,pluginCount);
text = text.concat(dockerCount ? "
" : "");
- text = text.concat(cookieWarning ? "
"+cookieWarning+"" : "");
+ text = text.concat(cookieWarning ? "
{$template['ModeratorComment']}" : "";
+ $template['display_ModeratorComment'] .= $template['ModeratorComment'] ? "{$template['ModeratorComment']}" : "";
if ( $pinnedApps["{$template['Repository']}&{$template['SortName']}"] ) {
$pinned = "pinned";
@@ -188,14 +188,14 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false)
unset($template['display_pinButton']);
if ( $template['Uninstall'] && $template['Name'] != "Community Applications" ) {
- $template['display_Uninstall'] = "" : "onclick='uninstallDocker("{$info[$name]['template']}","{$template['Name']}");'>";
+ $template['display_Uninstall'] = "" : "data-type='docker' data-app='{$info[$name]['template']}' data-name='{$template['Name']}'>";
$template['display_Uninstall'] .= "";
} else {
if ( $template['Private'] == "true" )
- $template['display_Uninstall'] = "";
+ $template['display_Uninstall'] = "";
}
- $template['display_removable'] = $template['Removable'] && ! $selected ? "" : "";
+ $template['display_removable'] = $template['Removable'] && ! $selected ? "" : "";
if ( $template['display_Uninstall'] && $template['display_removable'] )
unset($template['display_Uninstall']); # prevent previously installed private apps from having 2 x's in previous apps section
@@ -216,10 +216,10 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false)
unset($template['display_multi_install']);
unset($template['display_removable']);
} else {
- $template['display_pluginInstallIcon'] = "";
+ $template['display_pluginInstallIcon'] = "";
}
if ( $template['UpdateAvailable'] ) {
- $template['display_pluginUpdate'] = "";
+ $template['display_pluginUpdate'] = "";
}
} else {
if ( $caSettings['dockerRunning'] ) {
@@ -652,7 +652,7 @@ function getPopupDescriptionSkin($appNumber) {
if ( file_exists("/var/log/plugins/$pluginName") ) {
if ( plugin("version","/var/log/plugins/$pluginName") != plugin("version",$caPaths['pluginTempDownload']) ) {
copy($caPaths['pluginTempDownload'],"/tmp/plugins/$pluginName");
- $installLine .= "";
+ $installLine .= "";
}
}
if ( file_exists("/var/log/plugins/$pluginName") ) {
@@ -661,7 +661,7 @@ function getPopupDescriptionSkin($appNumber) {
$installLine .= "";
} else {
$buttonTitle = $template['InstallPath'] ? tr("Reinstall") : tr("Install");
- $installLine .= "";
+ $installLine .= "";
}
}
}
@@ -677,14 +677,14 @@ function getPopupDescriptionSkin($appNumber) {
$currentLanguage = (is_dir("/usr/local/emhttp/languages/$currentLanguage") ) ? $currentLanguage : "en_US";
if ( in_array($countryCode,$installedLanguages) ) {
if ( $currentLanguage != $countryCode ) {
- $installLine .= "";
+ $installLine .= "";
}
} else {
- $installLine .= "";
+ $installLine .= "";
}
if ( file_exists("/var/log/plugins/lang-$countryCode.xml") ) {
if ( languageCheck($template) ) {
- $installLine .= "";
+ $installLine .= "";
}
}
if ( $countryCode !== "en_US" ) {
@@ -696,8 +696,8 @@ function getPopupDescriptionSkin($appNumber) {
if ( $template['Support'] || $template['Project'] ) {
$supportText = $template['SupportLanguage'] ?: tr("Support");
- $installLine .= $template['Support'] ? "" : "";
- $installLine .= $template['Project'] ? "" : "";
+ $installLine .= $template['Support'] ? "" : "";
+ $installLine .= $template['Project'] ? "" : "";
}
$installLine .= "";
$installLine .= "";