Improve the issue due date field with JS helpers
- Add jQuery UI datepicker widget to the field - Duplicate changes on the create an issue template
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" type="text/css" href="{media '/idf/css/yui.css'}" />
|
||||
<link rel="stylesheet" type="text/css" href="{media '/idf/css/style.css'}" />
|
||||
<link rel="stylesheet" type="text/css" href="{media '/idf/css/jquery-ui-1.8.18.custom.css'}" />
|
||||
<link rel="icon" type="image/png" href="{media '/idf/img/favicon.png'}" />
|
||||
<!--[if lt IE 7]>
|
||||
<link rel="stylesheet" type="text/css" href="{media '/idf/css/ie6.css'}" />
|
||||
@@ -32,6 +33,7 @@
|
||||
{block extraheader}{/block}
|
||||
<title>{block pagetitle}{$page_title|strip_tags}{/block}{if $project} - {$project.shortdesc}{/if}</title>
|
||||
<script type="text/javascript" src="{media '/idf/js/jquery-1.7.1.min.js'}"></script>
|
||||
<script type="text/javascript" src="{media '/idf/js/jquery-ui-1.8.18.custom.min.js'}"></script>
|
||||
{appversion}
|
||||
</head>
|
||||
<body>
|
||||
|
@@ -25,6 +25,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" type="text/css" href="{media '/idf/css/yui.css'}" />
|
||||
<link rel="stylesheet" type="text/css" href="{media '/idf/css/style.css'}" />
|
||||
<link rel="stylesheet" type="text/css" href="{media '/idf/css/jquery-ui-1.8.18.custom.css'}" />
|
||||
<link rel="icon" type="image/png" href="{media '/idf/img/favicon.png'}" />
|
||||
<!--[if lt IE 7]>
|
||||
<link rel="stylesheet" type="text/css" href="{media '/idf/css/ie6.css'}" />
|
||||
@@ -32,6 +33,7 @@
|
||||
{block extraheader}{/block}
|
||||
<title>{block pagetitle}{$page_title|strip_tags}{/block}</title>
|
||||
<script type="text/javascript" src="{media '/idf/js/jquery-1.7.1.min.js'}"></script>
|
||||
<script type="text/javascript" src="{media '/idf/js/jquery-ui-1.8.18.custom.min.js'}"></script>
|
||||
{appversion}
|
||||
</head>
|
||||
<body>
|
||||
|
@@ -25,6 +25,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" type="text/css" href="{media '/idf/css/yui.css'}" />
|
||||
<link rel="stylesheet" type="text/css" href="{media '/idf/css/style.css'}" />
|
||||
<link rel="stylesheet" type="text/css" href="{media '/idf/css/jquery-ui-1.8.18.custom.css'}" />
|
||||
<link rel="icon" type="image/png" href="{media '/idf/img/favicon.png'}" />
|
||||
<!--[if lt IE 7]>
|
||||
<link rel="stylesheet" type="text/css" href="{media '/idf/css/ie6.css'}" />
|
||||
@@ -32,6 +33,7 @@
|
||||
{block extraheader}{/block}
|
||||
<title>{block pagetitle}{$page_title|strip_tags}{/block}{if $project} - {$project.shortdesc}{/if}</title>
|
||||
<script type="text/javascript" src="{media '/idf/js/jquery-1.7.1.min.js'}"></script>
|
||||
<script type="text/javascript" src="{media '/idf/js/jquery-ui-1.8.18.custom.min.js'}"></script>
|
||||
{appversion}
|
||||
</head>
|
||||
<body>
|
||||
|
@@ -66,6 +66,7 @@
|
||||
<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}" id="due_dtime_today">Today</a>
|
||||
</td>
|
||||
<tr>
|
||||
<th>{$form.f.relation_type0.labelTag}:</th>
|
||||
@@ -113,7 +114,20 @@
|
||||
<script type="text/javascript">
|
||||
document.getElementById('id_summary').focus();{literal}
|
||||
$(document).ready(function(){
|
||||
|
||||
$("#id_due_dtime").datepicker({
|
||||
changeYear: true,
|
||||
changeMonth: true,
|
||||
yearRange: '-0:+5',
|
||||
constrainInput: true,
|
||||
dateFormat: 'yy-mm-dd',
|
||||
onSelect: function(dateText, inst) {
|
||||
this.value = dateText + ' 23:59';
|
||||
}
|
||||
});
|
||||
$("#due_dtime_today").click(function(){
|
||||
$('#id_due_dtime').val($(this).attr('rel'));
|
||||
return false;
|
||||
});
|
||||
// Hide the upload forms, we insert before the first attach file
|
||||
// row an "Attach File" little link.
|
||||
// We hide all the rows.
|
||||
|
@@ -215,6 +215,16 @@
|
||||
<script type="text/javascript">
|
||||
{literal}
|
||||
$(document).ready(function(){
|
||||
$("#id_due_dtime").datepicker({
|
||||
changeYear: true,
|
||||
changeMonth: true,
|
||||
yearRange: '-0:+5',
|
||||
constrainInput: true,
|
||||
dateFormat: 'yy-mm-dd',
|
||||
onSelect: function(dateText, inst) {
|
||||
this.value = dateText + ' 23:59';
|
||||
}
|
||||
});
|
||||
$("#due_dtime_today").click(function(){
|
||||
$('#id_due_dtime').val($(this).attr('rel'));
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user