From e05d987ca5cb14f970e6540f49d80168b63899ca Mon Sep 17 00:00:00 2001 From: Max Pozdeev Date: Thu, 27 Aug 2009 18:40:29 +0400 Subject: [PATCH] + added config option to set first day of week --- src/db/config.php.default | 3 +++ src/index.php | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/db/config.php.default b/src/db/config.php.default index 16a7fc6..2250ccc 100644 --- a/src/db/config.php.default +++ b/src/db/config.php.default @@ -32,6 +32,9 @@ $config['autotag'] = 1; # duedate calendar format: 1 => y-m-d (default), 2 => m/d/y, 3 => d.m.y $config['duedateformat'] = 1; +# First day of week: 0-Sunday, 1-Monday, 2-Tuesday, .. 6-Saturday +$config['firstdayofweek'] = 1; + # select session handling mechanism: files or default (php default) $config['session'] = 'files'; diff --git a/src/index.php b/src/index.php index 683b071..83c0f52 100644 --- a/src/index.php +++ b/src/index.php @@ -23,6 +23,9 @@ if($config['duedateformat'] == 2) $duedateformat = 'm/d/yy'; elseif($config['duedateformat'] == 3) $duedateformat = 'dd.mm.yy'; else $duedateformat = 'yy-mm-dd'; +if(!isset($config['firstdayofweek']) || !is_int($config['firstdayofweek']) || + $config['firstdayofweek']<0 || $config['firstdayofweek']>6) $config['firstdayofweek'] = 1; + function __($s) { global $lang; @@ -72,8 +75,9 @@ $().ready(function(){ } ?> preloadImg(); - $("#duedate").datepicker({dateFormat: '', firstDay: 1, showOn: 'button', buttonImage: 'images/calendar.png', buttonImageOnly: true, - changeMonth:true, changeYear:true, constrainInput: false, duration:'', nextText:'>', prevText:'<', dayNamesMin:lang.daysMin, + $("#duedate").datepicker({dateFormat: '', firstDay: , + showOn: 'button', buttonImage: 'images/calendar.png', buttonImageOnly: true, changeMonth:true, + changeYear:true, constrainInput: false, duration:'', nextText:'>', prevText:'<', dayNamesMin:lang.daysMin, monthNamesShort:lang.monthsShort }); $("#page_taskedit").draggable({ stop: function(e,ui){ flag.windowTaskEditMoved=true; tmp.editformpos=[$(this).css('left'),$(this).css('top')]; } }); @@ -183,7 +187,7 @@ $().ajaxStop( function(r,s) {$("#loading").fadeOut();} );
- +