]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix ical import
authorGeorg Ehrke <georg.stefan.germany@googlemail.com>
Tue, 4 Oct 2011 08:17:11 +0000 (10:17 +0200)
committerGeorg Ehrke <georg.stefan.germany@googlemail.com>
Tue, 4 Oct 2011 08:17:11 +0000 (10:17 +0200)
apps/calendar/templates/part.import.php

index c1beb49a7f70bd3312ae50229f58e04f08388452..374936743719f0945a5a5e8d36bcebc93487b409 100644 (file)
@@ -58,13 +58,18 @@ function importcal(importtype){
        var file = $("#filename").val();
        if(importtype == "existing"){
                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"){
                var calname = $("#displayname").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>
\ No newline at end of file