Close sharing dialog box on share success

This commit is contained in:
Michael Gapczynski 2011-07-27 19:52:10 -04:00
parent 64b5332f33
commit d36850f0f2
1 changed files with 5 additions and 2 deletions

View File

@ -1,7 +1,7 @@
$(document).ready(function() { $(document).ready(function() {
$('.share').click(function(event) { $('.share').click(function(event) {
event.preventDefault(); event.preventDefault();
var html = "<div title='Share "+getSelectedFiles('name')+"' align='center'>"; var html = "<div id='dialog' title='Share "+getSelectedFiles('name')+"' align='center'>";
html += "<label><input type='radio' name='share_type' value='private' checked='checked' /> Private</label>"; html += "<label><input type='radio' name='share_type' value='private' checked='checked' /> Private</label>";
html += "<label><input type='radio' name='share_type' value='public' /> Public</label>"; html += "<label><input type='radio' name='share_type' value='public' /> Public</label>";
html += "<br />"; html += "<br />";
@ -80,7 +80,10 @@ $(document).ready(function() {
type: 'GET', type: 'GET',
url: '../apps/files_sharing/ajax/share.php', url: '../apps/files_sharing/ajax/share.php',
cache: false, cache: false,
data: data data: data,
success: function() {
$('#dialog').dialog('close');
}
}); });
} }
}); });