1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-08 12:44:03 +00:00
seahub/media/js/utils.js
2012-05-18 14:46:07 +08:00

28 lines
608 B
JavaScript

//add delete confirm dialog
var Del_url = '';
function addConfirmTo(ele) {
ele.each(function() {
$(this).click(function() {
$('#dialog-delete-confirm').modal({appendTo:'#main'});
Del_url = $(this).attr('data');
});
});
}
$('#yes-btn').click(function() {
location.href = Del_url;
});
//handle table
$("table tr:nth-child(even)").addClass("even");
$("table tr:nth-child(odd)").addClass("odd");
//highlight the tr when mouse hover on it
$("table tr:gt(0)").hover(
function() {
$(this).addClass('hl');
},
function() {
$(this).removeClass('hl');
}
);