1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-10 05:35:10 +00:00
seahub/media/js/utils.js

31 lines
675 B
JavaScript
Raw Normal View History

//add op confirm dialog
var Op_url = '';
function addConfirmTo(ele, confirm_con) {
2012-03-27 09:42:08 +00:00
ele.each(function() {
$(this).click(function() {
if (confirm_con) {
$('#confirm-con').html(confirm_con);
}
$('#dialog-confirm').modal({appendTo:'#main'});
Op_url = $(this).attr('data');
2012-03-27 09:42:08 +00:00
});
});
}
$('#yes-btn').click(function() {
location.href = Op_url;
2012-03-27 09:42:08 +00:00
});
2012-03-30 05:49:32 +00:00
//handle table
$("table tr:nth-child(even)").addClass("even");
$("table tr:nth-child(odd)").addClass("odd");
2012-05-18 06:45:27 +00:00
//highlight the tr when mouse hover on it
$("table tr:gt(0)").hover(
function() {
$(this).addClass('hl');
},
function() {
$(this).removeClass('hl');
}
);