diff --git a/src/IDF/Views/Issue.php b/src/IDF/Views/Issue.php
index 5490edd..232af17 100644
--- a/src/IDF/Views/Issue.php
+++ b/src/IDF/Views/Issue.php
@@ -476,6 +476,14 @@ class IDF_Views_Issue
'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)
@@ -715,6 +723,14 @@ class IDF_Views_Issue
'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),
diff --git a/src/IDF/templates/idf/issues/create.html b/src/IDF/templates/idf/issues/create.html
index 97b5c2d..4bbfd3a 100644
--- a/src/IDF/templates/idf/issues/create.html
+++ b/src/IDF/templates/idf/issues/create.html
@@ -66,7 +66,20 @@
{$form.f.due_dtime.labelTag}: |
{if $form.f.due_dtime.errors}{$form.f.due_dtime.fieldErrors}{/if}
{$form.f.due_dtime|unsafe}
-Today
+
|
{$form.f.relation_type0.labelTag}: |
@@ -125,7 +138,12 @@ $(document).ready(function(){
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;
});
diff --git a/src/IDF/templates/idf/issues/view.html b/src/IDF/templates/idf/issues/view.html
index 811b491..29dba26 100644
--- a/src/IDF/templates/idf/issues/view.html
+++ b/src/IDF/templates/idf/issues/view.html
@@ -131,7 +131,20 @@
{$form.f.due_dtime.labelTag}: |
{if $form.f.due_dtime.errors}{$form.f.due_dtime.fieldErrors}{/if}
{$form.f.due_dtime|unsafe}
-Today
+
|
@@ -226,7 +239,12 @@ $(document).ready(function(){
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;
});
diff --git a/www/media/idf/css/style.css b/www/media/idf/css/style.css
index 6cd717a..dee2842 100644
--- a/www/media/idf/css/style.css
+++ b/www/media/idf/css/style.css
@@ -325,6 +325,34 @@ div.issue-submit-info h2 {
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;