diff --git a/templates/repo.html b/templates/repo.html
index 7254b8845d..3dca344c3d 100644
--- a/templates/repo.html
+++ b/templates/repo.html
@@ -148,7 +148,7 @@
{% if not view_history and request.user.is_authenticated %}
- 
+
- 删除
- 重命名
@@ -175,7 +175,7 @@
{{ dirent.file_size|filesizeformat }} |
- 
+
- 下载
{% if not view_history and request.user.is_authenticated %}
@@ -269,19 +269,25 @@ $('#main-panel').removeClass('ovhd');
var clicked_more_op;
$('.more-op').click(function(e) {
clicked_more_op = $(this);
- $(this).parent().css('position','relative');
- $('.op-list').attr('class', 'op-list hide');
- if ($(this).offset().top + $(this).next().height() <= $('#main').offset().top + $('#main').height()) {
- $(this).next().css('top', 6);
+ if ($(this).attr('data')) { // no popup
+ $(this).parent().css('position','relative');
+ if ($(this).offset().top + $(this).next().height() <= $('#main').offset().top + $('#main').height()) {
+ $(this).next().css('top', 6);
+ } else {
+ $(this).next().css('bottom', 2);
+ }
+ $(this).next().removeClass('hide');
+ $(this).attr('data','');
} else {
- $(this).next().css('bottom', 2);
+ $(this).next().addClass('hide');
+ $(this).attr('data','no-popup');
}
- $(this).next().removeClass('hide');
});
$(document).click(function(e) {
var target = e.target || event.srcElement;
if (target != clicked_more_op[0]) {
clicked_more_op.next().addClass('hide');
+ clicked_more_op.attr('data','no-popup');
}
});
$('.op-list li').hover(
| |