From 0ba305501d3b0836faf2b395e0a7521ce42df4d0 Mon Sep 17 00:00:00 2001 From: gfjardim Date: Tue, 15 Mar 2016 10:39:36 -0300 Subject: [PATCH 1/2] Add a dropdown menu to Category selection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Please note that in black theme the dropdownchecklist widget don’t inherit colors from the dynamix css. I’ll remove the “advanced” class from this row until Ronald can fix it. --- .../include/CreateDocker.php | 60 ++++++++++++++++++- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/plugins/dynamix.docker.manager/include/CreateDocker.php b/plugins/dynamix.docker.manager/include/CreateDocker.php index 0a405a8211..59e65e0afb 100644 --- a/plugins/dynamix.docker.manager/include/CreateDocker.php +++ b/plugins/dynamix.docker.manager/include/CreateDocker.php @@ -709,6 +709,8 @@ function setXmlVal(&$xml, $value, $el, $attr = null, $pos = 0) { $('.advanced-switch').change(function () { var status = $(this).is(':checked'); toggleRows('advanced,.hidden', status, 'basic'); + $("#catSelect").dropdownchecklist("destroy"); + $("#catSelect").dropdownchecklist({emptyText:'Select categories...', width:300, explicitClose:'...close'}); }); }); @@ -1005,6 +1007,15 @@ function resetField(el) { target.val(reset); } } + + function prepareCategory() { + var values = $.map($('#catSelect option') ,function(option) { + if ($(option).is(":selected")) { + return option.value; + } + }); + $("input[name='contCategory']").val(values.join(" ")); + }
@@ -1112,9 +1123,46 @@ function resetField(el) { - + Categories: - + + + + Support Thread: @@ -1352,6 +1400,12 @@ function reloadTriggers() { } } + // Load the confCategory input into the s1 select + categories=$("input[name='contCategory']").val().split(" "); + for (var i = 0; i < categories.length; i++) { + $("#catSelect option[value='"+categories[i]+"']").prop("selected", true); + } + // Remove empty description if (!Settings.Description.length) { $('#canvas').find('#Overview:first').hide(); @@ -1380,6 +1434,8 @@ function reloadTriggers() { // Add switchButton $('.switch-on-off').each(function(){var checked = $(this).is(":checked");$(this).switchButton({labels_placement: "right", checked:checked});}); + $("#catSelect").dropdownchecklist({emptyText:'Select categories...', width:300, explicitClose:'...close'}); + }); From 9d81f11c612d0922c8447a1af59d61e6cc84b493 Mon Sep 17 00:00:00 2001 From: gfjardim Date: Tue, 15 Mar 2016 18:30:05 -0300 Subject: [PATCH 2/2] Add RW/Shared option to paths --- plugins/dynamix.docker.manager/include/CreateDocker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/dynamix.docker.manager/include/CreateDocker.php b/plugins/dynamix.docker.manager/include/CreateDocker.php index 59e65e0afb..70b3646308 100644 --- a/plugins/dynamix.docker.manager/include/CreateDocker.php +++ b/plugins/dynamix.docker.manager/include/CreateDocker.php @@ -940,7 +940,7 @@ function toggleMode(el) { var index = $(el)[0].selectedIndex; if (index == 0) { // Path - mode.html("
Mode
"); + mode.html("
Mode
"); value.bind("click", function(){openFileBrowser(this,$(this).val(), 'sh', true, false);}); } else if (index == 1) { // Port