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

[file-op]close other op-list popup when open one

This commit is contained in:
llj
2012-09-07 10:44:12 +08:00
parent 2c989de69e
commit afd6fd8ff5
2 changed files with 9 additions and 6 deletions

View File

@@ -441,6 +441,7 @@ ul.with-bg li {
font-weight:normal;
}
#simplemodal-container h3 {
word-wrap:break-word;
margin:0 0 4px;
}
.simplemodal-close {

View File

@@ -271,18 +271,20 @@ $("table tr:gt(0)").hover(
$('#main-panel').removeClass('ovhd');
var clicked_more_op;
$('.more-op').click(function(e) {
clicked_more_op = $(this);
var its_op_list = $(this).next();
if ($(this).attr('data')) { // no popup
clicked_more_op = $(this);
$(this).parent().css('position','relative');
if ($(this).offset().top + $(this).next().height() <= $('#main').offset().top + $('#main').height()) {
$(this).next().css('top', 6);
if ($(this).offset().top + its_op_list.height() <= $('#main').offset().top + $('#main').height()) {
its_op_list.css('top', 6);
} else {
$(this).next().css('bottom', 2);
its_op_list.css('bottom', 2);
}
$(this).next().removeClass('hide');
$('.op-list').addClass('hide');
its_op_list.removeClass('hide');
$(this).attr('data','');
} else {
$(this).next().addClass('hide');
its_op_list.addClass('hide');
$(this).attr('data','no-popup');
}
});