From 87fb6c5f30131fc01820e82f9b812f31da6b2c0a Mon Sep 17 00:00:00 2001 From: mnandri Date: Thu, 10 Dec 2015 11:46:49 +0100 Subject: #299 +@fbernitt made tag-refreshing to listen on document directly --- web-ui/app/js/tags/data/tags.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'web-ui/app/js/tags') diff --git a/web-ui/app/js/tags/data/tags.js b/web-ui/app/js/tags/data/tags.js index 348c1832..31703b2a 100644 --- a/web-ui/app/js/tags/data/tags.js +++ b/web-ui/app/js/tags/data/tags.js @@ -35,10 +35,10 @@ define(['flight/lib/component', 'page/events', 'helpers/monitored_ajax', 'mixins }; function dataTags() { - function sendTagsBackTo(on, params) { + function sendTagsBackTo(on) { return function(data) { data.push(DataTags.all); - on.trigger(params.caller, events.tags.received, {tags: data}); + on.trigger(document, events.tags.received, {tags: data}); }; } @@ -48,11 +48,12 @@ define(['flight/lib/component', 'page/events', 'helpers/monitored_ajax', 'mixins this.fetchTags = function(event, params) { monitoredAjax(this, this.attr.tagsResource) - .done(sendTagsBackTo(this, params)); + .done(sendTagsBackTo(this)); }; this.refreshTags = function() { - this.fetchTags(null, {caller: document}); + var notTriggeredByEvent = null; + this.fetchTags(notTriggeredByEvent); }; this.after('initialize', function () { -- cgit v1.2.3