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!

This commit is contained in:
libasys 2012-11-14 16:47:52 +01:00
parent 49f05dfade
commit 493ae19bca
1 changed files with 3 additions and 1 deletions

View File

@ -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) {