Indefero

Indefero Commit Details


Date:2012-04-10 15:46:58 (12 years 8 months ago)
Author:Simon Holywell
Branch:develop
Commit:10e5f350f78340a5f97b631650c686b703fb8253
Parents: 1690fa8416af30191dd32556d18bdd7cba5b35b0
Message:Add in helpful shortcuts menu to issue due dates

Changes:

File differences

src/IDF/Views/Issue.php
476476
477477
478478
479
480
481
482
483
484
485
486
479487
480488
481489
......
715723
716724
717725
726
727
728
729
730
731
732
733
718734
719735
720736
'preview' => $preview,
'issue' => new IDF_Issue(),
'date_today' => date('Y-m-d'),
'date_tomorrow' => date('Y-m-d', strtotime('tomorrow')),
'date_eow' => date('Y-m-d', strtotime('next friday')),
'date_eom' => date('Y-m-d', strtotime('last day of this month')),
'date_2_hours' => date('Y-m-d H:i', strtotime('+2 hours')),
'date_2_days' => date('Y-m-d', strtotime('+2 days')),
'date_1_week' => date('Y-m-d', strtotime('+1 week')),
'date_two_weeks' => date('Y-m-d', strtotime('+2 week')),
'date_one_month' => date('Y-m-d', strtotime('+1 month')),
'default_time' => Pluf::f('issue_default_due_date_time'),
),
self::autoCompleteArrays($prj)
'next_issue_id' => $next_issue_id,
'related_issues' => $related_issues,
'date_today' => date('Y-m-d'),
'date_tomorrow' => date('Y-m-d', strtotime('tomorrow')),
'date_eow' => date('Y-m-d', strtotime('next friday')),
'date_eom' => date('Y-m-d', strtotime('last day of this month')),
'date_2_hours' => date('Y-m-d H:i', strtotime('+2 hours')),
'date_2_days' => date('Y-m-d', strtotime('+2 days')),
'date_1_week' => date('Y-m-d', strtotime('+1 week')),
'date_two_weeks' => date('Y-m-d', strtotime('+2 week')),
'date_one_month' => date('Y-m-d', strtotime('+1 month')),
'default_time' => Pluf::f('issue_default_due_date_time'),
),
$arrays),
src/IDF/templates/idf/issues/create.html
6666
6767
6868
69
69
70
71
72
73
74
75
76
77
78
79
80
81
82
7083
7184
7285
......
125138
126139
127140
128
141
142
143
144
145
146
129147
130148
131149
<th>{$form.f.due_dtime.labelTag}:</th>
<td>{if $form.f.due_dtime.errors}{$form.f.due_dtime.fieldErrors}{/if}
{$form.f.due_dtime|unsafe}
<a href="#" rel="{$date_today} {$default_time}" id="due_dtime_today">Today</a>
<div id="due_dtime_wrapper">
<a href="#" rel="{$date_today} {$default_time}" class="due_dtime_shortcut" id="due_dtime_today">Today</a>
<div id="due_dtime_more_shortcuts" style="display: none">
<a href="#" rel="{$date_today} {$default_time}" class="due_dtime_shortcut" id="due_dtime_today_more">Today</a> -
<a href="#" rel="{$date_tomorrow} {$default_time}" class="due_dtime_shortcut" id="due_dtime_tomorrow">Tomorrow</a> -
<a href="#" rel="{$date_eow} {$default_time}" class="due_dtime_shortcut" id="due_dtime_eow">End of the Week</a> -
<a href="#" rel="{$date_eom} {$default_time}" class="due_dtime_shortcut" id="due_dtime_eom">End of the Month</a><br />
<a href="#" rel="{$date_2_hours}" class="due_dtime_shortcut" id="due_dtime_2_hours">2 Hours</a> -
<a href="#" rel="{$date_2_days} {$default_time}" class="due_dtime_shortcut" id="due_dtime_2_days">2 Days</a> -
<a href="#" rel="{$date_1_week} {$default_time}" class="due_dtime_shortcut" id="due_dtime_1_week">1 Week</a> -
<a href="#" rel="{$date_two_weeks} {$default_time}" class="due_dtime_shortcut" id="due_dtime_two_weeks">A Fortnight</a> -
<a href="#" rel="{$date_one_month} {$default_time}" class="due_dtime_shortcut" id="due_dtime_one_month">1 Month</a>
</div>
</div>
</td>
<tr>
<th>{$form.f.relation_type0.labelTag}:</th>
this.value = dateText + ' ' + default_time;
}
});
$("#due_dtime_today").click(function(){
$('#due_dtime_wrapper').mouseover(function(){
$('#due_dtime_more_shortcuts').show();
}).mouseout(function(){
$('#due_dtime_more_shortcuts').hide();
});
$(".due_dtime_shortcut").click(function(){
$('#id_due_dtime').val($(this).attr('rel'));
return false;
});
src/IDF/templates/idf/issues/view.html
131131
132132
133133
134
134
135
136
137
138
139
140
141
142
143
144
145
146
147
135148
136149
137150
......
226239
227240
228241
229
242
243
244
245
246
247
230248
231249
232250
<th>{$form.f.due_dtime.labelTag}:</th>
<td>{if $form.f.due_dtime.errors}{$form.f.due_dtime.fieldErrors}{/if}
{$form.f.due_dtime|unsafe}
<a href="#" rel="{$date_today} {$default_time}" id="due_dtime_today">Today</a>
<div id="due_dtime_wrapper">
<a href="#" rel="{$date_today} {$default_time}" class="due_dtime_shortcut" id="due_dtime_today">Today</a>
<div id="due_dtime_more_shortcuts" style="display: none">
<a href="#" rel="{$date_today} {$default_time}" class="due_dtime_shortcut" id="due_dtime_today_more">Today</a> -
<a href="#" rel="{$date_tomorrow} {$default_time}" class="due_dtime_shortcut" id="due_dtime_tomorrow">Tomorrow</a> -
<a href="#" rel="{$date_eow} {$default_time}" class="due_dtime_shortcut" id="due_dtime_eow">End of the Week</a> -
<a href="#" rel="{$date_eom} {$default_time}" class="due_dtime_shortcut" id="due_dtime_eom">End of the Month</a><br />
<a href="#" rel="{$date_2_hours}" class="due_dtime_shortcut" id="due_dtime_2_hours">2 Hours</a> -
<a href="#" rel="{$date_2_days} {$default_time}" class="due_dtime_shortcut" id="due_dtime_2_days">2 Days</a> -
<a href="#" rel="{$date_1_week} {$default_time}" class="due_dtime_shortcut" id="due_dtime_1_week">1 Week</a> -
<a href="#" rel="{$date_two_weeks} {$default_time}" class="due_dtime_shortcut" id="due_dtime_two_weeks">A Fortnight</a> -
<a href="#" rel="{$date_one_month} {$default_time}" class="due_dtime_shortcut" id="due_dtime_one_month">1 Month</a>
</div>
</div>
</td>
<tr>
<tr>
this.value = dateText + ' ' + default_time;
}
});
$("#due_dtime_today").click(function(){
$('#due_dtime_wrapper').mouseover(function(){
$('#due_dtime_more_shortcuts').show();
}).mouseout(function(){
$('#due_dtime_more_shortcuts').hide();
});
$(".due_dtime_shortcut").click(function(){
$('#id_due_dtime').val($(this).attr('rel'));
return false;
});
www/media/idf/css/style.css
325325
326326
327327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
328356
329357
330358
margin-top: 0;
}
#due_dtime_wrapper {
position: relative;
float: right;
width: 350px;
}
#due_dtime_more_shortcuts {
display: none;
width: 345px;
position: absolute;
top: -3px;
left: -6px;
background: white;
padding: 2px 5px;
border: 1px solid black;
}
#due_dtime_wrapper a {
text-decoration: none;
color: black;
padding: 0 2px;
}
#due_dtime_wrapper a:hover {
background-color: #4E9A06;
color: white;
}
span.label {
color: #204a87;
padding-left: 0.5em;

Archive Download the corresponding diff file

Page rendered in 0.08933s using 13 queries.