diff options
Diffstat (limited to 'src/usr/local/www/index.php')
-rw-r--r-- | src/usr/local/www/index.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/usr/local/www/index.php b/src/usr/local/www/index.php index c751af4..4e393b3 100644 --- a/src/usr/local/www/index.php +++ b/src/usr/local/www/index.php @@ -423,8 +423,13 @@ function updateWidgets(newWidget) { $('.container .col-md-<?=$columnWidth?>').each(function(idx, col) { $('.panel', col).each(function(idx, widget) { var isOpen = $('.panel-body', widget).hasClass('in'); + var widget_basename = widget.id.split('-')[1]; - sequence += widget.id.split('-')[1] + ':' + col.id.split('-')[1] + ':' + (isOpen ? 'open' : 'close') + ','; + // Only save details for panels that have id's like'widget-*' + // Some widgets create other panels, so ignore any of those. + if ((widget.id.split('-')[0] == 'widget') && (typeof widget_basename !== 'undefined')) { + sequence += widget_basename + ':' + col.id.split('-')[1] + ':' + (isOpen ? 'open' : 'close') + ','; + } }); }); |