1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 15:09:14 +00:00

new design

This commit is contained in:
llj
2017-12-05 17:53:45 +08:00
parent 0acf8254aa
commit 07dea7eca4
57 changed files with 1382 additions and 1078 deletions

View File

@@ -10,15 +10,13 @@ define([
var DevicesView = Backbone.View.extend({
id: 'devices',
el: '.main-panel',
template: _.template($('#devices-tmpl').html()),
initialize: function() {
this.devices = new DevicesCollection();
this.listenTo(this.devices, 'reset', this.reset);
this.render();
},
addOne: function(device) {
@@ -39,8 +37,9 @@ define([
}
},
render: function() {
this.$el.html(this.template());
renderMainCon: function() {
this.$mainCon = $('<div class="main-panel-main" id="devices"></div>').html(this.template());
this.$el.append(this.$mainCon);
this.$table = this.$('table');
this.$tableBody = this.$('tbody');
@@ -51,12 +50,12 @@ define([
},
show: function() {
$("#right-panel").html(this.$el);
this.renderMainCon();
this.devices.fetch({reset: true});
},
hide: function() {
this.$el.detach();
this.$mainCon.detach();
}
});