summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlibasys <sebastian.doell@libasys.de>2012-11-14 16:47:52 +0100
committerlibasys <sebastian.doell@libasys.de>2012-11-14 16:47:52 +0100
commit493ae19bca2cd4127471d3ac12db93a571efd76b (patch)
tree962a3e5f5e11b4c78396da1e02fabb5e7d473b62
parent49f05dfadefc5ec38ff413adeeccae7fe5317dd8 (diff)
downloadnextcloud-server-493ae19bca2cd4127471d3ac12db93a571efd76b.tar.gz
nextcloud-server-493ae19bca2cd4127471d3ac12db93a571efd76b.zip
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!
-rw-r--r--core/js/share.js4
1 files changed, 3 insertions, 1 deletions
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) {