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

[org view] modified 'add library'

This commit is contained in:
llj
2015-05-28 13:57:00 +08:00
parent 5e5b578d89
commit cb4e0d7493
4 changed files with 46 additions and 13 deletions

View File

@@ -31,11 +31,33 @@ define([
this.listenTo(this.repos, 'reset', this.reset);
this.dirView = options.dirView;
// show/hide 'add lib' menu
var $add_lib = $('#add-pub-lib'),
$add_lib_menu = $('#add-pub-lib-menu');
$add_lib.click(function() {
$add_lib_menu.toggleClass('hide');
$add_lib_menu.css({
'top': $add_lib.position().top + $add_lib.outerHeight(),
'left': $add_lib.position().left
});
});
$('.item', $add_lib_menu).hover(
function() {
$(this).css({'background':'#f3f3f3'});
},
function() {
$(this).css({'background':'transparent'});
}
);
$(document).click(function(e) {
Common.closePopup(e, $add_lib_menu, $add_lib);
});
},
events: {
'click #organization-repos .repo-create': 'createRepo',
'click #organization-repos .add-pub-repo': 'addRepo',
'click #organization-repos .share-existing': 'addRepo',
'click #organization-repos .create-new': 'createRepo',
'click #organization-repos .by-name': 'sortByName',
'click #organization-repos .by-time': 'sortByTime'
},