diff options
-rw-r--r-- | app/helpers/application_helper.rb | 2 | ||||
-rw-r--r-- | public/javascripts/application.js | 17 | ||||
-rw-r--r-- | public/javascripts/datepicker.js | 16 |
3 files changed, 18 insertions, 17 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 0b3f5fe0b..166c87325 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1134,7 +1134,7 @@ module ApplicationHelper def include_calendar_headers_tags unless @calendar_headers_tags_included - tags = javascript_include_tag("datepicker") + tags = ''.html_safe @calendar_headers_tags_included = true content_for :header_tags do start_of_week = Setting.start_of_week diff --git a/public/javascripts/application.js b/public/javascripts/application.js index dc8837bbd..7a8317adb 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -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) { $('#list-'+list).sortable({ connectWith: '.block-receiver', diff --git a/public/javascripts/datepicker.js b/public/javascripts/datepicker.js deleted file mode 100644 index 9acae0cd4..000000000 --- a/public/javascripts/datepicker.js +++ /dev/null @@ -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); -} |