]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix double new calendar button - bugfix for oc 59
authorGeorg Ehrke <dev@georgswebsite.de>
Thu, 19 Jan 2012 11:27:16 +0000 (12:27 +0100)
committerGeorg Ehrke <dev@georgswebsite.de>
Thu, 19 Jan 2012 11:27:16 +0000 (12:27 +0100)
apps/calendar/js/calendar.js

index 5c0998d4ae2250e9ccf84b95eeb418715d2bd798..a4e08b56fa2791810455b58218b3fbd544f1ee20 100644 (file)
@@ -435,7 +435,9 @@ Calendar={
                                                        $(button).closest('tr').prev().html(data.page).show().next().remove();
                                                        $('#calendar_holder').fullCalendar('removeEventSource', data.eventSource.url);
                                                        $('#calendar_holder').fullCalendar('addEventSource', data.eventSource);
-                                                       $('#choosecalendar_dialog > table').append('<tr><td colspan="6"><a href="#" onclick="Calendar.UI.Calendar.newCalendar(this);"><input type="button" value="' + newcalendar + '"></a></td></tr>');
+                                                       if (calendarid == 'new'){
+                                                               $('#choosecalendar_dialog > table').append('<tr><td colspan="6"><a href="#" onclick="Calendar.UI.Calendar.newCalendar(this);"><input type="button" value="' + newcalendar + '"></a></td></tr>');
+                                                       }
                                                }
                                        }, 'json');
                        },