From af526beb411857f9abfee46db5b4714b52bb4be9 Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Fri, 28 Feb 2014 00:58:14 +0100 Subject: [PATCH] Remove unused && improve dependencies detection --- www/scripts/apps/admin/tasks-manager/views/refresh.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/www/scripts/apps/admin/tasks-manager/views/refresh.js b/www/scripts/apps/admin/tasks-manager/views/refresh.js index 5ff294aa2f..f5a4c26a05 100644 --- a/www/scripts/apps/admin/tasks-manager/views/refresh.js +++ b/www/scripts/apps/admin/tasks-manager/views/refresh.js @@ -10,20 +10,19 @@ define([ "jquery", "underscore", - "backbone", - "" + "backbone" ], function ($, _, Backbone) { var RefreshView = Backbone.View.extend({ initialize: function(options) { - if (!"pingView" in options) { + if (false === ("pingView" in options)) { throw "You must set the ping view" } this.pingView = options.pingView; - if (!"scheduler" in options) { + if (false === ("scheduler" in options)) { throw "You must set the scheduler model" } this.scheduler = options.scheduler; - if (!"tasksCollection" in options) { + if (false === ("tasksCollection" in options)) { throw "You must set the tasks collection model" } this.tasksCollection = options.tasksCollection; @@ -38,7 +37,6 @@ define([ $.ajax({ dataType: "json", url: $this.refreshUrl, - data: {}, success: function(response) { $this.pingView.render(); $this.scheduler.set({