Revision a379a5ff
Added by Steve Beaver about 8 years ago
src/usr/local/www/js/pfSense.js | ||
---|---|---|
157 | 157 |
if (input.val() == "") |
158 | 158 |
return; |
159 | 159 |
|
160 |
// Eat all of the options with a value greater than max. We don't want them to be available |
|
161 |
while (select.options[0].value > max) |
|
162 |
select.remove(0); |
|
163 |
|
|
164 |
if (select.options.length < max) { |
|
165 |
for (var i=select.options.length; i<=max; i++) |
|
166 |
select.options.add(new Option(i, i), 0); |
|
167 |
// Make sure index 0 is selected otherwise it will stay in "32" for V6 |
|
168 |
select.options.selectedIndex = "0"; |
|
160 |
var attr = $(select).attr('disabled'); |
|
161 |
|
|
162 |
// Don't do anything if the mask selector is disabled |
|
163 |
if (typeof attr === typeof undefined || attr === false) { |
|
164 |
// Eat all of the options with a value greater than max. We don't want them to be available |
|
165 |
while (select.options[0].value > max) |
|
166 |
select.remove(0); |
|
167 |
|
|
168 |
if (select.options.length < max) { |
|
169 |
for (var i=select.options.length; i<=max; i++) |
|
170 |
select.options.add(new Option(i, i), 0); |
|
171 |
// Make sure index 0 is selected otherwise it will stay in "32" for V6 |
|
172 |
select.options.selectedIndex = "0"; |
|
173 |
} |
|
169 | 174 |
} |
170 | 175 |
}); |
171 | 176 |
|
Also available in: Unified diff
DOn't automatically update CIDR masks if the selector is disabled