From 6ac3f5ae6ec1ce006ab5365402deae0cbcd7f5f4 Mon Sep 17 00:00:00 2001 From: llj Date: Tue, 10 Oct 2017 16:16:37 +0800 Subject: [PATCH] [devices] fix --- static/scripts/app/views/devices.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/static/scripts/app/views/devices.js b/static/scripts/app/views/devices.js index 3bd51a4f26..9b162ece1c 100644 --- a/static/scripts/app/views/devices.js +++ b/static/scripts/app/views/devices.js @@ -4,7 +4,7 @@ define([ 'backbone', 'common', 'app/views/device', - 'app/collections/devices', + 'app/collections/devices' ], function($, _, Backbone, Common, Device, DevicesCollection) { 'use strict'; @@ -17,6 +17,7 @@ define([ initialize: function() { this.devices = new DevicesCollection(); this.listenTo(this.devices, 'reset', this.reset); + this.render(); }, @@ -40,12 +41,13 @@ define([ render: function() { this.$el.html(this.template()); - $("#right-panel").html(this.$el); this.$table = this.$('table'); this.$tableBody = this.$('tbody'); this.$loadingTip = this.$('.loading-tip'); this.$emptyTip = this.$('.empty-tips'); + + return this; }, show: function() {