Docker: more intuitive handling of images

This commit is contained in:
bergware
2020-07-17 11:01:12 +02:00
parent 3ad5a638f0
commit 0877742875
3 changed files with 5 additions and 16 deletions
@@ -873,7 +873,7 @@ function updateLocation(val) {
}
}
function checkbox_state(value) {
$.post('/plugins/dynamix.docker.manager/include/DoesExist.php',{name:value},function(state){$('.deleteCheckbox').prop('disabled',state==0?false:true);});
$.post('/plugins/dynamix.docker.manager/include/UpdateConfig.php',{action:'exist',name:value},function(state){$('.deleteCheckbox').prop('disabled',state==0?false:true);});
}
$(function() {
<?if ($DockerStopped):?>
@@ -1,15 +0,0 @@
<?PHP
/* Copyright 2005-2020, Lime Technology
* Copyright 2012-2020, Bergware International.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*/
?>
<?
echo file_exists($_POST['name']) ? 0 : 1;
?>
@@ -69,5 +69,9 @@ case 'templates':
$DockerTemplates = new DockerTemplates();
$DockerTemplates->downloadTemplates();
break;
case 'exist':
// docker file or folder exists?
echo file_exists($_POST['name']) ? 0 : 1;
break;
}
?>