mirror of
https://github.com/redmine/redmine.git
synced 2025-11-13 16:56:00 +01:00
Merged datepicker.js into application.js.
git-svn-id: http://svn.redmine.org/redmine/trunk@13752 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -1134,7 +1134,7 @@ module ApplicationHelper
|
|||||||
|
|
||||||
def include_calendar_headers_tags
|
def include_calendar_headers_tags
|
||||||
unless @calendar_headers_tags_included
|
unless @calendar_headers_tags_included
|
||||||
tags = javascript_include_tag("datepicker")
|
tags = ''.html_safe
|
||||||
@calendar_headers_tags_included = true
|
@calendar_headers_tags_included = true
|
||||||
content_for :header_tags do
|
content_for :header_tags do
|
||||||
start_of_week = Setting.start_of_week
|
start_of_week = Setting.start_of_week
|
||||||
|
|||||||
@@ -539,6 +539,23 @@ function observeSearchfield(fieldId, targetId, url) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function beforeShowDatePicker(input, inst) {
|
||||||
|
var default_date = null;
|
||||||
|
switch ($(input).attr("id")) {
|
||||||
|
case "issue_start_date" :
|
||||||
|
if ($("#issue_due_date").size() > 0) {
|
||||||
|
default_date = $("#issue_due_date").val();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "issue_due_date" :
|
||||||
|
if ($("#issue_start_date").size() > 0) {
|
||||||
|
default_date = $("#issue_start_date").val();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$(input).datepicker("option", "defaultDate", default_date);
|
||||||
|
}
|
||||||
|
|
||||||
function initMyPageSortable(list, url) {
|
function initMyPageSortable(list, url) {
|
||||||
$('#list-'+list).sortable({
|
$('#list-'+list).sortable({
|
||||||
connectWith: '.block-receiver',
|
connectWith: '.block-receiver',
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
function beforeShowDatePicker(input, inst) {
|
|
||||||
var default_date = null;
|
|
||||||
switch ($(input).attr("id")) {
|
|
||||||
case "issue_start_date" :
|
|
||||||
if ($("#issue_due_date").size() > 0) {
|
|
||||||
default_date = $("#issue_due_date").val();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "issue_due_date" :
|
|
||||||
if ($("#issue_start_date").size() > 0) {
|
|
||||||
default_date = $("#issue_start_date").val();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
$(input).datepicker("option", "defaultDate", default_date);
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user