Skip to content
Snippets Groups Projects
Commit 33b66085 authored by Georg Ehrke's avatar Georg Ehrke
Browse files

fix ical import

parent 77e12a15
No related branches found
No related tags found
No related merge requests found
...@@ -58,13 +58,18 @@ function importcal(importtype){ ...@@ -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>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment