diff options
Diffstat (limited to 'apps/calendar/js/settings.js')
-rw-r--r-- | apps/calendar/js/settings.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/calendar/js/settings.js b/apps/calendar/js/settings.js index fcbfc423db3..c768a47a797 100644 --- a/apps/calendar/js/settings.js +++ b/apps/calendar/js/settings.js @@ -17,6 +17,14 @@ $(document).ready(function(){ } }); }); + $('#firstday').change( function(){ + var data = $('#firstday').serialize(); + $.post( OC.filePath('calendar', 'ajax/settings', 'setfirstday.php'), data, function(data){ + if(data == 'error'){ + console.log('saving firstday failed'); + } + }); + }); $('#timezonedetection').change( function(){ var post = $('#timezonedetection').serialize(); $.post( OC.filePath('calendar', 'ajax/settings', 'timezonedetection.php'), post, function(data){ @@ -32,4 +40,8 @@ $(document).ready(function(){ $('#timezonedetection').attr('checked', 'checked'); } }); + $.getJSON(OC.filePath('calendar', 'ajax/settings', 'getfirstday.php'), function(jsondata, status) { + $('#' + jsondata.firstday).attr('selected',true); + $('#firstday').chosen(); + }); }); |