mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
JS fixes for IE (#12721)
* JS fixes for IE just a couple that caused the issues with graph loading and widget settings not saving. * remove polyfill * Update ports.inc.php
This commit is contained in:
@@ -422,9 +422,9 @@ function init_select2(selector, type, data, selected, placeholder, config) {
|
||||
|
||||
// override init values
|
||||
if (typeof config === 'object') {
|
||||
const keys = Object.keys(config)
|
||||
for (const key of keys) {
|
||||
init[key] = config[key];
|
||||
var keys = Object.keys(config);
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
init[keys[i]] = config[keys[i]];
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -565,7 +565,7 @@
|
||||
var datas = $(data).serializeArray();
|
||||
for( var field in datas ) {
|
||||
var name = datas[field].name;
|
||||
if (name.endsWith('[]')) {
|
||||
if (name.substring(name.length - 2, name.length) === '[]')
|
||||
name = name.slice(0, -2);
|
||||
if (widget_settings[name]) {
|
||||
widget_settings[name].push(datas[field].value);
|
||||
|
Reference in New Issue
Block a user