fix bw select again
This commit is contained in:
parent
fc6c8ac33d
commit
5665eb14f5
|
@ -497,16 +497,16 @@ function getBandwidthHTML($bandwidth_options, $user) {
|
|||
}
|
||||
|
||||
$result = '<li id="getBandwidthHTML" class="nav-item dropdown mx-2">'.PHP_EOL;
|
||||
$result .= '<a class="dropdown-toggle mr-2" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="material-icons md-18 mr-1">network_check</i>'.translate($bandwidth_options[$_COOKIE['zmBandwidth']]).'</a>'.PHP_EOL;
|
||||
$result .= '<a class="dropdown-toggle mr-2" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" id="dropdown_bandwidth"><i class="material-icons md-18 mr-1">network_check</i>'.translate($bandwidth_options[$_COOKIE['zmBandwidth']]).'</a>'.PHP_EOL;
|
||||
|
||||
$result .= '<div class="dropdown-menu" id="dropdown_bandwidth" aria-labelledby="dropdown_bandwidth">'.PHP_EOL;
|
||||
$result .= '<div class="dropdown-menu" aria-labelledby="dropdown_bandwidth">'.PHP_EOL;
|
||||
if ( count($bandwidth_options) > 1 ) {
|
||||
if ( isset($bandwidth_options['high']) )
|
||||
$result .= '<a data-pdsa-dropdown-val="high" class="dropdown-item" href="#">' .translate('High'). '</a>'.PHP_EOL;
|
||||
$result .= '<a data-pdsa-dropdown-val="high" class="dropdown-item bwselect" href="#">' .translate('High'). '</a>'.PHP_EOL;
|
||||
if ( isset($bandwidth_options['medium']) )
|
||||
$result .= '<a data-pdsa-dropdown-val="medium" class="dropdown-item" href="#">' .translate('Medium'). '</a>'.PHP_EOL;
|
||||
$result .= '<a data-pdsa-dropdown-val="medium" class="dropdown-item bwselect" href="#">' .translate('Medium'). '</a>'.PHP_EOL;
|
||||
# low is theoretically always available
|
||||
$result .= '<a data-pdsa-dropdown-val="low" class="dropdown-item" href="#">' .translate('Low'). '</a>'.PHP_EOL;
|
||||
$result .= '<a data-pdsa-dropdown-val="low" class="dropdown-item bwselect" href="#">' .translate('Low'). '</a>'.PHP_EOL;
|
||||
}
|
||||
$result .= '</div>'.PHP_EOL;
|
||||
|
||||
|
|
|
@ -639,7 +639,7 @@ function delCookie(name) {
|
|||
}
|
||||
|
||||
function bwClickFunction() {
|
||||
$j(".dropdown-menu a").click(function() {
|
||||
$j(".dropdown-menu.bwselect").click(function() {
|
||||
var bwval = $j(this).data('pdsa-dropdown-val');
|
||||
setCookie("zmBandwidth", bwval, 3600);
|
||||
getNavBar();
|
||||
|
|
Loading…
Reference in New Issue