pull/11/head
Squidly271 2021-07-15 08:47:51 -04:00
parent 5678117ca6
commit 4e3a573ee7
5 changed files with 29 additions and 12 deletions

View File

@ -272,7 +272,7 @@ $(function(){
$('.mainArea').on("click",".dockerUpdate",function() {
var container = $(this).attr("data-name");
openBox('/plugins/community.applications/scripts/installUpdate.php?ct[]='+encodeURIComponent(container),tr('Update Container'),600,1100,true,refreshDisplay);
openBox('/plugins/community.applications/scripts/installUpdate.php?ct[]='+encodeURIComponent(container),tr('Update Container'),600,1100,true,"refreshDisplay");
});
$('.mainArea').on("click",".ca_non_favouriteRepo",function() {
if ( popupVisible(this) ) return;
@ -827,6 +827,7 @@ function enableButtons() {
}
function refreshDisplay() {
console.log("refreshDisplay");
changeSortOrder(null,null,null);
}
@ -970,12 +971,13 @@ function installPlugin(pluginURL,popup=false,update=false) {
if ( popupVisible() )
return;
type = update ? "update" : "install";
title = update ? "<?tr("Update Plugin")?>" : "<?tr("Install Plugin")?>";
$(".tooltipstered").tooltipster("hide");
disableSearch();
<? if ( $translations ): ?>
openBox('/plugins/community.applications/scripts/pluginInstall.sh&arg1='+type+'&arg2='+pluginURL,"<?tr('Install Plugin')?>",600,900,true,"refreshDisplay");
openBox('/plugins/community.applications/scripts/pluginInstall.sh&arg1='+type+'&arg2='+pluginURL,title,600,900,true,"refreshDisplay");
<? else: ?>
my_openBox('/plugins/community.applications/scripts/pluginInstall.sh&arg1='+type+'&arg2='+pluginURL,"<?tr('Install Plugin')?>",600,900,true,"refreshDisplay");
my_openBox('/plugins/community.applications/scripts/pluginInstall.sh&arg1='+type+'&arg2='+pluginURL,title,600,900,true,"refreshDisplay");
<? endif; ?>
}

View File

@ -1,6 +1,6 @@
767d6f2203fed9541daeb57bbf7b58b3 ./Apps.page
83b3f89cd42e8601c7c217d5b4889c81 ./CA_notices.page
464e08e065233dd9fca3fabcbe6f6669 ./CommunityApps.page
80565ac2e8bbb492119a4faee2f86d5f ./CommunityApps.page
6db73582f22dab13d329e862067ee84e ./PluginAPI.page
b398273cf7daa62ab00d2de2336ca25f ./README.md
2cdb7da0d67a11278ada7fd029707738 ./ca_settings.page
@ -17,7 +17,7 @@ e1b21f84d170c618893784002be3e4ad ./include/exec.php
eb76c1b6ed3da5e5b393f22d2ec18430 ./javascript/libraries.js
e29c13353bc1277fc2c3597782d7c954 ./skins/Narrow/css.php
adc2d62d429accb264cedad58e6ef7a5 ./skins/Narrow/skin.html
2759ebf01131ddedffa08e44523724ea ./skins/Narrow/skin.php
fec47d6ee2853645a9263b8bee1bb9a6 ./skins/Narrow/skin.php
430966e5646376b62905b63a30de7102 ./scripts/PluginAPI.php
11eecc7264a3057ee70cc00a24c8299b ./scripts/installMulti.php
ce2c904b6a40c4677a3ff3484776959e ./scripts/installMultiPlugin.sh
@ -29,4 +29,4 @@ f9c3f431935fb20801f3fef152dc7b58 ./scripts/showStatistics.php
4425f8fd4ef662a7dc65cee01de3e419 ./scripts/updatePLG.sh
02759ea835ee4ce5a051fead96ab9b9b ./scripts/updatePluginSupport.php
0a4b291ae29b73cea0437a11ba28c8d9 ./scripts/checkForUpdates.php
4d085a2c11108ac26a5591c2ac5ccda9 ./scripts/installUpdate.php
ce77df69331ccd3bf4037389325a01e1 ./scripts/installUpdate.php

View File

@ -1,11 +1,18 @@
<?
###############################################################
# #
# Community Applications copyright 2015-2021, Andrew Zawadzki #
# Licenced under GPLv2 #
# #
###############################################################
require_once "/usr/local/emhttp/plugins/dynamix/include/Helpers.php";
$_GET['updateContainer'] = "true";
// $_GET['communityApplications'] = true;
include("/usr/local/emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php");
?>
<script src='<?autov("/plugins/dynamix/javascript/dynamix.js")?>'></script>
<script>
function addCloseButton() {
addLog("<p class='centered'><button class='logLine' type='button' onclick='" + (top.Shadowbox ? "top.Shadowbox" : "window") + ".close()'>Done</button></p>");
}
addCloseButton();
</script>
// Redefine the done button to something CA can use
$(":button").attr("onclick","top.Shadowbox.close();");
</script>

View File

@ -30,7 +30,7 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false)
global $caPaths, $caSettings, $plugin, $displayDeprecated, $sortOrder;
$info = getRunningContainers();
$dockerUpdateStatus = readJsonFile($caPaths['dockerUpdateStatus']);
if ( ! $selectedApps )
$selectedApps = array();
@ -82,6 +82,7 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false)
}
}
$template['icon'] = $template['icon'] ?: "/plugins/dynamix.docker.manager/images/question.png";
$template['display_iconClickable'] = "<img class='displayIcon ca_tooltip ca_repoPopup' title='".tr("Click for more information")."' src='{$template['icon']}' data-repository='".htmlentities($template['RepoName'],ENT_QUOTES)."'></img>";
$template['display_infoIcon'] = "<a class='appIcons ca_repoinfo ca_tooltip' title='".tr("Click for more information")."' data-repository='".htmlentities($template['RepoName'],ENT_QUOTES)."'></a>";
@ -134,6 +135,13 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false)
$name = $template['Name'];
$appName = str_replace(" ","",$template['SortName']);
$ID = $template['ID'];
$tmpRepo = strpos($template['Repository'],":") ? $template['Repository'] : $template['Repository'].":latest";
if ( $dockerUpdateStatus[$tmpRepo] == "false" ) {
$template['UpdateAvailable'] = true;
} else {
$template['UpdateAvailable'] = false;
}
$template['ModeratorComment'] .= $template['CAComment'];
$template['RepoName_highlighted'] = $template['RepoName_highlighted'] ?: $template['RepoName'];