1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-08 20:54:47 +00:00
seahub/media/js/utils.js

28 lines
608 B
JavaScript
Raw Normal View History

2012-03-27 09:42:08 +00:00
//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;
});
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');
}
);