From 85404a0689cd3750973f74e6c97d60b3268bb331 Mon Sep 17 00:00:00 2001 From: bergware Date: Tue, 11 Feb 2020 09:08:33 +0100 Subject: [PATCH] Miscellaneous updates --- .../dynamix.docker.manager/include/CreateDocker.php | 8 ++++---- plugins/dynamix.docker.manager/javascript/docker.js | 11 +++++------ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/plugins/dynamix.docker.manager/include/CreateDocker.php b/plugins/dynamix.docker.manager/include/CreateDocker.php index 7cbe1892c..9fbcea559 100644 --- a/plugins/dynamix.docker.manager/include/CreateDocker.php +++ b/plugins/dynamix.docker.manager/include/CreateDocker.php @@ -308,7 +308,7 @@ button[type=button]{margin:0 20px 0 0} for (var x=1; x<=last; x++) if(x != this_tab) $('#tab'+x).bind({click:function(){$('#'+elementId).hide();}}); $('.advanced-switch').switchButton({labels_placement: "left", on_label: 'Advanced View', off_label: 'Basic View'}); - $('.advanced-switch').change(function () { + $('.advanced-switch').change(function() { var status = $(this).is(':checked'); toggleRows('advanced', status, 'basic'); load_contOverview(); @@ -665,13 +665,13 @@ button[type=button]{margin:0 20px 0 0} allowBrowsing: true }, function(file){if(on_files){p.val(file);p.trigger('change');if(close_on_select){ft.slideUp('fast',function(){ft.remove();});}}}, - function(folder){if(on_folders){p.val(folder);p.trigger('change');if(close_on_select){$(ft).slideUp('fast',function (){$(ft).remove();});}}}); + function(folder){if(on_folders){p.val(folder);p.trigger('change');if(close_on_select){$(ft).slideUp('fast',function(){$(ft).remove();});}}}); // Format fileTree according to parent position, height and width ft.css({'left':p.position().left,'top':(p.position().top+p.outerHeight()),'width':(p.width())}); // close if click elsewhere - $(document).mouseup(function(e){if(!ft.is(e.target) && ft.has(e.target).length === 0){ft.slideUp('fast',function (){$(ft).remove();});}}); + $(document).mouseup(function(e){if(!ft.is(e.target) && ft.has(e.target).length === 0){ft.slideUp('fast',function(){$(ft).remove();});}}); // close if parent changed - p.bind("keydown", function(){ft.slideUp('fast', function (){$(ft).remove();});}); + p.bind("keydown", function(){ft.slideUp('fast', function(){$(ft).remove();});}); // Open fileTree ft.slideDown('fast'); } diff --git a/plugins/dynamix.docker.manager/javascript/docker.js b/plugins/dynamix.docker.manager/javascript/docker.js index 33e43302b..2d39fd944 100644 --- a/plugins/dynamix.docker.manager/javascript/docker.js +++ b/plugins/dynamix.docker.manager/javascript/docker.js @@ -56,11 +56,6 @@ function dockerTerminal(container,shell) { var win = window.open('', container, 'resizeable=yes,scrollbars=yes,height='+height+',width='+width+',top='+top+',left='+left); $.get(eventURL,{action:'terminal',name:container,shell:shell},function(){win.location='/dockerterminal/'+container+'/'; win.focus();}); } -function execUpContainer(container) { - var title = 'Updating the container: '+container; - var cmd = '/plugins/dynamix.docker.manager/include/CreateDocker.php?updateContainer=true&ct[]='+encodeURIComponent(container); - popupWithIframe(title, cmd, true, 'loadlist'); -} function popupWithIframe(title, cmd, reload, func) { pauseEvents(); $('#iframe-popup').html(''); @@ -89,6 +84,11 @@ function popupWithIframe(title, cmd, reload, func) { $('.ui-dialog .ui-dialog-title').css('text-align', 'center').css('width', '100%'); $('.ui-dialog .ui-dialog-content').css('padding', '12'); } +function execUpContainer(container) { + var title = 'Updating the container: '+container; + var cmd = '/plugins/dynamix.docker.manager/include/CreateDocker.php?updateContainer=true&ct[]='+encodeURIComponent(container); + popupWithIframe(title, cmd, true, 'loadlist'); +} function addContainer() { var path = location.pathname; var x = path.indexOf('?'); @@ -192,7 +192,6 @@ function checkAll() { } function updateAll() { $('input[type=button]').prop('disabled',true); - $('div.spinner.fixed').show('slow'); var ct = ''; for (var i=0,d; d=docker[i]; i++) if (d.update==1) ct += '&ct[]='+encodeURI(d.name); var cmd = '/plugins/dynamix.docker.manager/include/CreateDocker.php?updateContainer=true'+ct;