From d4d6fba318bfe4f3eb3f04ee31bc61c95015a86b Mon Sep 17 00:00:00 2001 From: Marcin Lulek Date: Wed, 1 Mar 2017 01:39:52 +0100 Subject: [PATCH] notifications: different approach with fixed/standard container --- .../rhodecode-app/rhodecode-app.html | 1 - .../components/rhodecode-app/rhodecode-app.js | 6 ++- .../rhodecode-toast/rhodecode-toast.html | 26 ++++------ .../rhodecode-toast/rhodecode-toast.js | 51 ++++++++++++++++--- .../rhodecode-toast/rhodecode-toast.less | 35 +++++-------- rhodecode/templates/base/base.mako | 3 ++ 6 files changed, 75 insertions(+), 47 deletions(-) diff --git a/rhodecode/public/js/src/components/rhodecode-app/rhodecode-app.html b/rhodecode/public/js/src/components/rhodecode-app/rhodecode-app.html index 47b896ea..7606373a 100644 --- a/rhodecode/public/js/src/components/rhodecode-app/rhodecode-app.html +++ b/rhodecode/public/js/src/components/rhodecode-app/rhodecode-app.html @@ -12,7 +12,6 @@ on-channelstream-subscribed="handleSubscribed"> - diff --git a/rhodecode/public/js/src/components/rhodecode-app/rhodecode-app.js b/rhodecode/public/js/src/components/rhodecode-app/rhodecode-app.js index 41f6daa1..3e2d50e6 100644 --- a/rhodecode/public/js/src/components/rhodecode-app/rhodecode-app.js +++ b/rhodecode/public/js/src/components/rhodecode-app/rhodecode-app.js @@ -25,7 +25,11 @@ var rhodeCodeApp = Polymer({ }, handleNotifications: function (data) { - this.$['notifications'].handleNotification(data); + var elem = document.getElementById('notifications'); + if(elem){ + elem.handleNotification(data); + } + }, faviconUpdate: function (data) { diff --git a/rhodecode/public/js/src/components/rhodecode-toast/rhodecode-toast.html b/rhodecode/public/js/src/components/rhodecode-toast/rhodecode-toast.html index 70064e96..0fd59bd8 100644 --- a/rhodecode/public/js/src/components/rhodecode-toast/rhodecode-toast.html +++ b/rhodecode/public/js/src/components/rhodecode-toast/rhodecode-toast.html @@ -5,25 +5,19 @@