1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-06 11:47:07 +00:00

[repo details] improvement

This commit is contained in:
llj 2017-06-28 11:37:52 +08:00
parent 88c79b4894
commit aa6416d30d
2 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,7 @@ define([
var View = Backbone.View.extend({ var View = Backbone.View.extend({
id: 'repo-details', id: 'repo-details',
className: 'details-panel right-side-panel hide', // `hide` is for 'clickItem' in `views/myhome-repos.js` className: 'details-panel right-side-panel',
template: _.template($('#repo-details-tmpl').html()), template: _.template($('#repo-details-tmpl').html()),
@ -52,7 +52,7 @@ define([
}, },
hide: function() { hide: function() {
this.$el.css({'right': '-400px'}).hide(); this.$el.css({'right': '-320px'});
}, },
close: function() { close: function() {
@ -63,7 +63,7 @@ define([
show: function(options) { show: function(options) {
this.data = options; this.data = options;
this.render(); this.render();
this.$el.css({'right': '0px'}).show(); this.$el.css({'right': '0px'});
this.setConMaxHeight(); this.setConMaxHeight();
} }

View File

@ -72,7 +72,7 @@ define([
clickItem: function(e) { clickItem: function(e) {
var target = e.target || event.srcElement; var target = e.target || event.srcElement;
if (this.$('td').is(target) && if (this.$('td').is(target) &&
$('#repo-details').is(':visible')) { // after `#repo-details` is shown $('#repo-details').css('right') == '0px') { // after `#repo-details` is shown
this.viewDetails(); this.viewDetails();
} }
}, },