summaryrefslogtreecommitdiff
path: root/web-ui/app
diff options
context:
space:
mode:
authormnandri <mnandri@eumguccion.corporate.thoughtworks.com>2015-12-10 11:46:49 +0100
committermnandri <mnandri@eumguccion.corporate.thoughtworks.com>2015-12-10 11:46:54 +0100
commit87fb6c5f30131fc01820e82f9b812f31da6b2c0a (patch)
tree21b2090ce21046c6fa218b6e6d9de41bf4cfc6c6 /web-ui/app
parentd62ea0a762f4fa80ff2e0d2c3e4ea5bf3bb6c764 (diff)
#299 +@fbernitt made tag-refreshing to listen on document directly
Diffstat (limited to 'web-ui/app')
-rw-r--r--web-ui/app/js/tags/data/tags.js9
1 files changed, 5 insertions, 4 deletions
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 () {