From ab6429c578d409c53e47bd062b7e9b431511477e Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sun, 22 Jun 2014 17:08:55 -0400 Subject: [PATCH] closes #1734 --- public/src/widgets.js | 32 +++++++++----------------------- src/routes/api.js | 12 ++++++------ 2 files changed, 15 insertions(+), 29 deletions(-) diff --git a/public/src/widgets.js b/public/src/widgets.js index 46b8d6fed3..4c035e5c0f 100644 --- a/public/src/widgets.js +++ b/public/src/widgets.js @@ -31,24 +31,16 @@ } function renderWidgets(location) { - // remove when https://code.google.com/p/chromium/issues/detail?id=357625 is fixed - try { - var temp = localStorage.getItem('cache:widgets:' + url + ':' + location); - } catch (e) { - var temp = null; - } - - var area = $('#content [widget-area="' + location + '"]') - .html(temp); - + var area = $('#content [widget-area="' + location + '"]'); socket.emit('widgets.render', {template: tpl_url + '.tpl', url: url, location: location}, function(err, renderedWidgets) { + if (err) { + return; + } var html = ''; - for (var widget in renderedWidgets) { - if (renderedWidgets.hasOwnProperty(widget)) { - html += templates.parse(renderedWidgets[widget].html, {}); - } + for (var i=0; i