mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
* added option in settings to show task dates
This commit is contained in:
parent
3b2cc1261b
commit
32bbe8bf10
9 changed files with 28 additions and 11 deletions
|
|
@ -6,8 +6,8 @@
|
|||
Original name: Русский
|
||||
Author: Max Pozdeev
|
||||
Author Url: http://www.mytinytodo.net
|
||||
AppVersion: v1.3.3
|
||||
Date: 2010-01-23
|
||||
AppVersion: v1.3.4
|
||||
Date: 2010-02-10
|
||||
*/
|
||||
|
||||
class Lang extends DefaultLang
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ class Config
|
|||
'dateformat' => array('default'=>'j M Y', 'type'=>'s'),
|
||||
'dateformatshort' => array('default'=>'j M', 'type'=>'s'),
|
||||
'template' => array('default'=>'default', 'type'=>'s'),
|
||||
'showdate' => array('default'=>0, 'type'=>'i'),
|
||||
);
|
||||
|
||||
public static $config;
|
||||
|
|
|
|||
|
|
@ -51,4 +51,7 @@ $config['clock'] = 24;
|
|||
$config['dateformat'] = 'j M Y';
|
||||
$config['dateformatshort'] = 'j M';
|
||||
|
||||
# Show task date in list
|
||||
$config['showdate'] = 0;
|
||||
|
||||
?>
|
||||
|
|
@ -117,6 +117,7 @@ class DefaultLang
|
|||
'set_24hour' => "24-hour",
|
||||
'set_submit' => "Submit changes",
|
||||
'set_cancel' => "Cancel",
|
||||
'set_showdate' => "Show task date in list",
|
||||
);
|
||||
|
||||
var $js = array();
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
Original name: English
|
||||
Author: Max Pozdeev
|
||||
Author Url: http://www.mytinytodo.net
|
||||
AppVersion: v1.3.3
|
||||
Date: 2010-01-23
|
||||
AppVersion: v1.3.4
|
||||
Date: 2010-02-10
|
||||
*/
|
||||
|
||||
class Lang extends DefaultLang
|
||||
|
|
@ -119,6 +119,7 @@ class Lang extends DefaultLang
|
|||
'set_24hour' => "24-hour",
|
||||
'set_submit' => "Submit changes",
|
||||
'set_cancel' => "Cancel",
|
||||
'set_showdate' => "Show task date in list",
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ if(isset($_POST['save']))
|
|||
Config::set('dateformat', _post('dateformat'));
|
||||
Config::set('dateformatshort', _post('dateformatshort'));
|
||||
Config::set('title', trim(_post('title')));
|
||||
Config::set('showdate', (int)_post('showdate'));
|
||||
Config::save();
|
||||
$t['saved'] = 1;
|
||||
echo json_encode($t);
|
||||
|
|
@ -125,26 +126,26 @@ function selectOptions($a, $value, $default=null)
|
|||
</td></tr>
|
||||
|
||||
<tr>
|
||||
<th><?php _e('set_sessions');?>:</span></th>
|
||||
<th><?php _e('set_sessions');?>:</th>
|
||||
<td>
|
||||
<label><input type="radio" name="session" value="default" <?php if(_c('session')=='default') echo "checked"; ?>><?php _e('set_sessions_php');?></label> <br>
|
||||
<label><input type="radio" name="session" value="files" <?php if(_c('session')=='files') echo "checked"; ?>><?php _e('set_sessions_files');?></label> <span class="descr">(<mytinytodo_dir>/tmp/sessions)</span>
|
||||
</td></tr>
|
||||
|
||||
<tr>
|
||||
<th><?php _e('set_firstdayofweek');?>:</span></th>
|
||||
<th><?php _e('set_firstdayofweek');?>:</th>
|
||||
<td>
|
||||
<SELECT name="firstdayofweek"><?php echo selectOptions(__('days_long'), _c('firstdayofweek')); ?></SELECT>
|
||||
</td></tr>
|
||||
|
||||
<tr>
|
||||
<th><?php _e('set_duedate');?>:</span></th>
|
||||
<th><?php _e('set_duedate');?>:</th>
|
||||
<td>
|
||||
<SELECT name="duedateformat"><?php echo selectOptions(array(1=>'yyyy-mm-dd ('.date('Y-m-d').')', 2=>'m/d/yyyy ('.date('n/j/Y').')', 3=>'dd.mm.yyyy ('.date('d.m.Y').')', 4=>'dd/mm/yyyy ('.date('d/m/Y').')'), _c('duedateformat')); ?></SELECT>
|
||||
</td></tr>
|
||||
|
||||
<tr>
|
||||
<th><?php _e('set_date');?>:</span></th>
|
||||
<th><?php _e('set_date');?>:</th>
|
||||
<td>
|
||||
<input name="dateformat" value="<?php echo htmlspecialchars(_c('dateformat'));?>">
|
||||
<SELECT onChange="if(this.value!=0) this.form.dateformat.value=this.value;">
|
||||
|
|
@ -154,7 +155,7 @@ function selectOptions($a, $value, $default=null)
|
|||
</td></tr>
|
||||
|
||||
<tr>
|
||||
<th><?php _e('set_shortdate');?>:</span></th>
|
||||
<th><?php _e('set_shortdate');?>:</th>
|
||||
<td>
|
||||
<input name="dateformatshort" value="<?php echo htmlspecialchars(_c('dateformatshort'));?>">
|
||||
<SELECT onChange="if(this.value!=0) this.form.dateformatshort.value=this.value;">
|
||||
|
|
@ -163,11 +164,19 @@ function selectOptions($a, $value, $default=null)
|
|||
</td></tr>
|
||||
|
||||
<tr>
|
||||
<th><?php _e('set_clock');?>:</span></th>
|
||||
<th><?php _e('set_clock');?>:</th>
|
||||
<td>
|
||||
<SELECT name="clock"><?php echo selectOptions(array(12=>__('set_12hour').' ('.date('g:i A').')', 24=>__('set_24hour').' ('.date('H:i').')'), _c('clock')); ?></SELECT>
|
||||
</td></tr>
|
||||
|
||||
<tr>
|
||||
<th><?php _e('set_showdate');?>:</th>
|
||||
<td>
|
||||
<label><input type="radio" name="showdate" value="1" <?php if(_c('showdate')) echo "checked"; ?>><?php _e('set_enabled');?></label> <br>
|
||||
<label><input type="radio" name="showdate" value="0" <?php if(!_c('showdate')) echo "checked"; ?>><?php _e('set_disabled');?></label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="2" class="form-buttons">
|
||||
|
||||
<input type="submit" value="<?php _e('set_submit');?>">
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ $().ready(function(){
|
|||
|
||||
<br clear="all">
|
||||
|
||||
<div id="page_tasks" style="display:none">
|
||||
<div id="page_tasks" style="display:none" class="<?php if(Config::get('showdate')) echo "show-inline-date"; ?>">
|
||||
|
||||
<div id="lists">
|
||||
<ul class="mtt-tabs <?php if(isset($_GET['singletab'])) echo "mtt-tabs-only-one"; ?>"></ul>
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ li.task-expanded .task-toggle { background-position:-48px 0; }
|
|||
#tasklist li:hover { background-color:#f6f6f6; }
|
||||
.task-actions { float:right; width:25px; text-align:right; }
|
||||
.task-date { color:#999999; font-size:8pt; margin-left:4px; display:none; }
|
||||
.show-inline-date .task-date { display:inline; }
|
||||
.task-title a { color:#000000; }
|
||||
.task-title a:hover { color:#af0000; }
|
||||
#page_tasks.readonly #tasklist li .task-actions { display:none; }
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ h2 { float:right; }
|
|||
.task-left { float:right; }
|
||||
.task-toggle { float:right; }
|
||||
.task-middle { margin-right:40px; margin-left:25px; }
|
||||
.task-date { margin-right:4px; }
|
||||
.duedate { float:left; margin-left:0; margin-right:5px; }
|
||||
#taskedit-date { float:left; }
|
||||
#page_taskedit .form-row-short { float:right; margin-left:12px; margin-right:0; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue