|
|
|
@ -46,6 +46,43 @@
|
|
|
|
|
<p><%= f.text_field :estimated_hours, :size => 3, :disabled => !@issue.leaf?, :required => @issue.required_attribute?('estimated_hours') %> <%= l(:field_hours) %></p>
|
|
|
|
|
<% end %>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
// window.onload=function(){
|
|
|
|
|
// var img=$("#issue_due_date").next("img");
|
|
|
|
|
// img.attr("onclick","SetMinValue();");
|
|
|
|
|
// }
|
|
|
|
|
function TimeClose(dateText, inst) {
|
|
|
|
|
if(inst.id=="issue_start_date"){
|
|
|
|
|
time=dateText;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
var time=new Date();
|
|
|
|
|
function TimeBeforeShow(input){
|
|
|
|
|
if(input.id=="issue_due_date"){
|
|
|
|
|
//var minDate = $(input).datepicker('option', 'minDate');
|
|
|
|
|
var tempdata=$("#issue_start_date").attr("value");
|
|
|
|
|
|
|
|
|
|
$(input).datepicker('option', 'minDate',new Date(tempdata.replace(/-/g, "/")));
|
|
|
|
|
//$('.selector').datepicker('option', 'minDate', '12/25/2012');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SetMinValue(){
|
|
|
|
|
/// var tempdata=$("#issue_start_date").attr("value");
|
|
|
|
|
//$('.selector').datepicker('option', 'minDate', '12/25/2012');
|
|
|
|
|
//alert(tempdata);
|
|
|
|
|
//$("#issue_due_date").datepicker({
|
|
|
|
|
// minDate: new Date(2014,08,23)
|
|
|
|
|
//var datepickerOptions=
|
|
|
|
|
//{dateFormat: 'yy-mm-dd',minDate: new Date(2014,08,23), showOn: 'button', buttonImageOnly: true, buttonImage: "path_to_image('/images/calendar.png')", showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true};
|
|
|
|
|
//alert( $('.issue_due_date').length);
|
|
|
|
|
//$('.selector')[1].datepicker('option', 'minDate', new Date(2014, 0 - 8, 23));
|
|
|
|
|
//$("#issue_due_date").datepicker(datepickerOptions);
|
|
|
|
|
//$("##{issue_due_date}").datepicker(datepickerOptions);
|
|
|
|
|
//$("#issue_due_date").datepicker(
|
|
|
|
|
// {dateFormat: 'yy-mm-dd',minDate: new Date(2014,08,23), showOn: 'button', buttonImageOnly: true, buttonImage: "path_to_image('/images/calendar.png')", showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true}
|
|
|
|
|
//)
|
|
|
|
|
//});
|
|
|
|
|
}
|
|
|
|
|
function PrecentChange(obj){
|
|
|
|
|
var _v= obj;
|
|
|
|
|
if(_v==100)
|
|
|
|
|