fix ical import

This commit is contained in:
Georg Ehrke 2011-10-04 10:17:11 +02:00
parent 77e12a15b1
commit 33b660857a
1 changed files with 8 additions and 3 deletions

View File

@ -58,13 +58,18 @@ function importcal(importtype){
var file = $("#filename").val(); var file = $("#filename").val();
if(importtype == "existing"){ if(importtype == "existing"){
var calid = $("input:radio[name='calendar']:checked").val(); var calid = $("input:radio[name='calendar']:checked").val();
$.getJSON(OC.filePath('calendar', '', 'import.php') + "?import=existing&calid=" + calid + "&path=" + path + "&file=" + file); $.getJSON(OC.filePath('calendar', '', 'import.php') + "?import=existing&calid=" + calid + "&path=" + path + "&file=" + file, function(){
$("#importdialog").dialog('destroy').remove();
$("#importdialogholder").remove();
});
} }
if(importtype == "new"){ if(importtype == "new"){
var calname = $("#displayname").val(); var calname = $("#displayname").val();
var description = $("#description").val(); var description = $("#description").val();
$.post(OC.filePath('calendar', '', 'import.php'), {'import':'new', 'calname':calname, 'description':description, 'path':path, 'file':file}); $.post(OC.filePath('calendar', '', 'import.php'), {'import':'new', 'calname':calname, 'description':description, 'path':path, 'file':file}, function(){
$("#importdialog").dialog('destroy').remove();
$("#importdialogholder").remove();
});
} }
window.location = oc_webroot + "/apps/calendar/";
} }
</script> </script>