From aa6416d30d308dbcc47c3f6d7cf77419e154c35c Mon Sep 17 00:00:00 2001 From: llj Date: Wed, 28 Jun 2017 11:37:52 +0800 Subject: [PATCH] [repo details] improvement --- static/scripts/app/views/repo-details.js | 6 +++--- static/scripts/app/views/repo.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/static/scripts/app/views/repo-details.js b/static/scripts/app/views/repo-details.js index 8fca3ec4f1..f62a93a911 100644 --- a/static/scripts/app/views/repo-details.js +++ b/static/scripts/app/views/repo-details.js @@ -8,7 +8,7 @@ define([ var View = Backbone.View.extend({ 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()), @@ -52,7 +52,7 @@ define([ }, hide: function() { - this.$el.css({'right': '-400px'}).hide(); + this.$el.css({'right': '-320px'}); }, close: function() { @@ -63,7 +63,7 @@ define([ show: function(options) { this.data = options; this.render(); - this.$el.css({'right': '0px'}).show(); + this.$el.css({'right': '0px'}); this.setConMaxHeight(); } diff --git a/static/scripts/app/views/repo.js b/static/scripts/app/views/repo.js index 40dc7870c6..22e79b5ad3 100644 --- a/static/scripts/app/views/repo.js +++ b/static/scripts/app/views/repo.js @@ -72,7 +72,7 @@ define([ clickItem: function(e) { var target = e.target || event.srcElement; 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(); } },