diff --git a/plugins/dynamix/Eth0.page b/plugins/dynamix/Eth0.page index 73753c782..6a48791b4 100644 --- a/plugins/dynamix/Eth0.page +++ b/plugins/dynamix/Eth0.page @@ -22,6 +22,7 @@ $template = "$docroot/webGui/EthX.page"; $ini = '/var/local/emhttp/network.ini'; $validIP4 = '((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)'; $validIP6 = '((?:[0-9A-Fa-f]{1,4}))((?::[0-9A-Fa-f]{1,4}))*::((?:[0-9A-Fa-f]{1,4}))((?::[0-9A-Fa-f]{1,4}))*|((?:[0-9A-Fa-f]{1,4}))((?::[0-9A-Fa-f]{1,4})){7}'; +$width = strstr('gray,azure',$display['theme']) ? [166,305]:[131,300]; // get available ethernet ports (excluding eth0) exec("ls --indicator-style=none /sys/class/net|grep -P '^eth[1-9][0-9]*$'",$ports); @@ -268,7 +269,7 @@ function checkBondingSettings(form,ctrl,port) { $('#bond-members-'+port).hide(me); } else { $('#bond-members-'+port).show(me); - $('#bond-'+port).dropdownchecklist('destroy').dropdownchecklist({emptyText:'None', width:131}); + $('#bond-'+port).dropdownchecklist('destroy').dropdownchecklist({emptyText:'None', width:=$width[0]?>}); } if (ctrl==1) checkBridgingSettings(form,1,port); } @@ -279,7 +280,7 @@ function checkBridgingSettings(form,ctrl,port) { var i = 0; if (form.BRIDGING.value=='yes' && form.BONDING.value=='no') { $('#bridge-members-'+port).show(me); - $('#bridge-'+port).dropdownchecklist('destroy').dropdownchecklist({emptyText:'None', width:131}); + $('#bridge-'+port).dropdownchecklist('destroy').dropdownchecklist({emptyText:'None', width:=$width[0]?>}); } else { $('#bridge-members-'+port).hide(me); } @@ -339,12 +340,12 @@ $(function() { var form = document.eth0_settings; $('#tab1').bind({click:function(){ - $('#bond-eth0').dropdownchecklist('destroy').dropdownchecklist({emptyText:'None', width:131}); - $('#bridge-eth0').dropdownchecklist('destroy').dropdownchecklist({emptyText:'None', width:131}); + $('#bond-eth0').dropdownchecklist('destroy').dropdownchecklist({emptyText:'None', width:=$width[0]?>}); + $('#bridge-eth0').dropdownchecklist('destroy').dropdownchecklist({emptyText:'None', width:=$width[0]?>}); }}); - $('#bond-eth0').dropdownchecklist({emptyText:'None', width:131}); - $('#bridge-eth0').dropdownchecklist({emptyText:'None', width:131}); + $('#bond-eth0').dropdownchecklist({emptyText:'None', width:=$width[0]?>}); + $('#bridge-eth0').dropdownchecklist({emptyText:'None', width:=$width[0]?>}); checkBondingSettings(form,0,'eth0'); checkBridgingSettings(form,0,'eth0'); checkNetworkAccess(form,'eth0'); diff --git a/plugins/dynamix/EthX.page b/plugins/dynamix/EthX.page index 3158c5b83..a77a72e82 100644 --- a/plugins/dynamix/EthX.page +++ b/plugins/dynamix/EthX.page @@ -56,12 +56,12 @@ $(function() { var form = document.ethX_settings; $('#tabX').bind({click:function(){ - $('#bond-ethX').dropdownchecklist('destroy').dropdownchecklist({emptyText:'None', width:131}); - $('#bridge-ethX').dropdownchecklist('destroy').dropdownchecklist({emptyText:'None', width:131}); + $('#bond-ethX').dropdownchecklist('destroy').dropdownchecklist({emptyText:'None', width:=$width[0]?>}); + $('#bridge-ethX').dropdownchecklist('destroy').dropdownchecklist({emptyText:'None', width:=$width[0]?>}); }}); - $('#bond-ethX').dropdownchecklist({emptyText:'None', width:131}); - $('#bridge-ethX').dropdownchecklist({emptyText:'None', width:131}); + $('#bond-ethX').dropdownchecklist({emptyText:'None', width:=$width[0]?>}); + $('#bridge-ethX').dropdownchecklist({emptyText:'None', width:=$width[0]?>}); checkBondingSettings(form,0,'ethX'); checkBridgingSettings(form,0,'ethX'); checkNetworkAccess(form,'ethX'); diff --git a/plugins/dynamix/NewConfig.page b/plugins/dynamix/NewConfig.page index 7a678ba3a..b15bdd6fd 100644 --- a/plugins/dynamix/NewConfig.page +++ b/plugins/dynamix/NewConfig.page @@ -17,6 +17,7 @@ Tag="hand-paper-o" $newarray = $var['mdState']=='NEW_ARRAY'; $disabled = $var['fsState']=="Started"; +$width = strstr('gray,azure',$display['theme']) ? [166,305]:[131,300]; if ($newarray) { @unlink('/boot/config/smart-one.cfg'); @unlink('/boot/config/smart-all.cfg'); @@ -39,7 +40,7 @@ function prepareNewConfig(form) { form.preset.disabled = true; } $(function() { - $('#s1').dropdownchecklist({emptyText:'None', width:131, firstItemChecksAll:true, explicitClose:'...close'}); + $('#s1').dropdownchecklist({emptyText:'None', width:=$width[0]?>, firstItemChecksAll:true, explicitClose:'...close'}); $('#s1').dropdownchecklist('disable'); diff --git a/plugins/dynamix/NewPerms.page b/plugins/dynamix/NewPerms.page index f47de3edf..32a2aae16 100644 --- a/plugins/dynamix/NewPerms.page +++ b/plugins/dynamix/NewPerms.page @@ -15,6 +15,8 @@ Tag="hand-paper-o" */ ?> +$width = strstr('gray,azure',$display['theme']) ? [166,305]:[131,300]; + function data_disks($disk) { return ($disk['type']=='Data' && $disk['status']=='DISK_OK'); } @@ -37,8 +39,8 @@ function setNewPerms(form) { if (dirs) swal({title:'Proceed?',text:'This will update folder & file permissions',type:'warning',showCancelButton:true},function(){openBox('/webGui/scripts/newperms&arg1='+dirs,'New Permissions',490,430,true);}); } $(function() { - $('#s1').dropdownchecklist({emptyText:'None', width:131, firstItemChecksAll:true, explicitClose:'...close'}); - $('#s2').dropdownchecklist({emptyText:'None', width:131, firstItemChecksAll:true, explicitClose:'...close'}); + $('#s1').dropdownchecklist({emptyText:'None', width:=$width[0]?>, firstItemChecksAll:true, explicitClose:'...close'}); + $('#s2').dropdownchecklist({emptyText:'None', width:=$width[0]?>, firstItemChecksAll:true, explicitClose:'...close'}); $('#s1').dropdownchecklist('disable'); $('#s2').dropdownchecklist('disable'); diff --git a/plugins/dynamix/NotificationAgents.page b/plugins/dynamix/NotificationAgents.page index 6b0ad7d8c..6fdb690c7 100644 --- a/plugins/dynamix/NotificationAgents.page +++ b/plugins/dynamix/NotificationAgents.page @@ -8,6 +8,7 @@ var enabledAgents = new Object(); var disabledAgents = new Object(); var openPage = true; +$width = strstr('gray,azure',$display['theme']) ? [166,305]:[131,300];?> $('#tab3').bind({click:function(){initDropdown();}}); $(function(){if ($('#tab3').is(':checked')) initDropdown();}); @@ -66,7 +67,7 @@ function testService(name) { form.submit(); } function initDropdown() { - if (openPage) {$("[id^='slot_']").dropdownchecklist({width:300,explicitClose:'...close'}); openPage = false;} + if (openPage) {$("[id^='slot_']").dropdownchecklist({width:=$width[1]?>,explicitClose:'...close'}); openPage = false;} }