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

improved popup(send-link, share-repo, grpmember/admin-add) and textarea

This commit is contained in:
llj
2012-12-12 19:43:17 +08:00
parent 09a070ca2e
commit 0ab3058a43
9 changed files with 84 additions and 64 deletions

View File

@@ -3,15 +3,15 @@ function addConfirmTo(ele, confirm_hd, confirm_con) {
ele.click(function() {
var con = '<h3>' + confirm_hd + '</h3>',
target = '';
if ($(this).attr('data-target')) {
target = ' <span class="op-target">' + $(this).attr('data-target') + '</span>';
if ($(this).data('target')) {
target = ' <span class="op-target">' + $(this).data('target') + '</span>';
}
con += '<p>' + confirm_con + target + ' ?</p>';
$('#confirm-con').html(con);
$('#confirm-popup').modal({appendTo:'#main'});
$('#confirm-yes')
.attr('data', $(this).attr('data-url'))
.click(function() { location.href = $(this).attr('data'); });
.data('url', $(this).data('url'))
.click(function() { location.href = $(this).data('url'); });
return false;//in case ele is '<a>'
});
}