Skip to content

Commit 841e3e0

Browse files
committed
Fixes widget not refreshing with rotation
1 parent d81832d commit 841e3e0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

js/base.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,15 @@ $(document).ready(function() {
2222
}, 1000);
2323
}).on("click", ".js-refresh-info", function(event) {
2424
event.preventDefault();
25-
var item = event.target.id.split("-").splice(-1)[0];
25+
var target = event.target;
26+
var item = target.id.split("-").splice(-1)[0];
27+
28+
// if the refresh icon is click (where in a <span>) target will not have an id, so grab its parent instead
29+
if(target.id == "") {
30+
var parent = $(target).parent()[0];
31+
item = parent.id.split("-").splice(-1)[0];
32+
}
33+
2634
dashboard.fnMap[item]();
2735
});
2836

0 commit comments

Comments
 (0)