From 601cedfdfe7f48e7c82564e2dba06de877c9fbdc Mon Sep 17 00:00:00 2001 From: Matheod Date: Wed, 21 May 2014 17:59:32 +0200 Subject: [PATCH] Fix a problem preventing to delete a widget if the widget path have some special characters --- lib/modules/dashboard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/modules/dashboard.js b/lib/modules/dashboard.js index 30b31924c7..9b6a31b85b 100644 --- a/lib/modules/dashboard.js +++ b/lib/modules/dashboard.js @@ -517,7 +517,7 @@ modules['dashboard'] = { for (var i = 0, len = modules['dashboard'].widgets.length; i < len; i++) { if (modules['dashboard'].widgets[i].basePath == optionsObject.basePath) { exists = true; - $('#' + modules['dashboard'].widgets[i].basePath.replace(/\/|\+/g, '_')).fadeOut('slow', function(ele) { + $(document.getElementById(modules['dashboard'].widgets[i].basePath.replace(/\/|\+/g, '_'))).fadeOut('slow', function(ele) { $(this).detach(); }); modules['dashboard'].widgets.splice(i, 1);