From 493ae19bca2cd4127471d3ac12db93a571efd76b Mon Sep 17 00:00:00 2001 From: libasys Date: Wed, 14 Nov 2012 16:47:52 +0100 Subject: [PATCH] If you using the sharing by link the array monthNames don't exist and causes errors in all browsers! so we check if the type of the variable isn't undefined! --- core/js/share.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/js/share.js b/core/js/share.js index 73c74a7cb6d..8fcea84af88 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -364,6 +364,8 @@ OC.Share={ } $(document).ready(function() { + + if(typeof monthNames != 'undefined'){ $.datepicker.setDefaults({ monthNames: monthNames, monthNamesShort: $.map(monthNames, function(v) { return v.slice(0,3)+'.'; }), @@ -372,7 +374,7 @@ $(document).ready(function() { dayNamesShort: $.map(dayNames, function(v) { return v.slice(0,3)+'.'; }), firstDay: firstDay }); - + } $('a.share').live('click', function(event) { event.stopPropagation(); if ($(this).data('item-type') !== undefined && $(this).data('item') !== undefined) {