Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

show time in task calendar

  • Loading branch information...
commit eacf0ef7ceba0c4d68ca0c52f6bbebe2ff86e743 1 parent 1c98a1a
Yury Kotlyarov yura authored
2  app/views/tasks/create.js.rjs
View
@@ -35,7 +35,7 @@ if @task.valid?
end
else # Couldn't create the task -- validation failed.
- page.call "crm.date_select_popup", :task_calendar, :task_bucket
+ page.call "crm.date_select_popup", :task_calendar, :task_bucket, Setting.task_calendar_with_time
page[:create_task].visual_effect :shake, :duration => 0.25, :distance => 6
page[:task_name].focus
end
2  app/views/tasks/edit.js.rjs
View
@@ -18,7 +18,7 @@ else # <---------------------------------------- Show [Edit Task] form.
end
page.call "crm.highlight_off", id # Disable onMouseOver for the list item.
page[id].replace_html :partial => "edit" # Show [Edit Task] form.
- page.call "crm.date_select_popup", :task_calendar, :task_bucket
+ page.call "crm.date_select_popup", :task_calendar, :task_bucket, Setting.task_calendar_with_time
page[:task_name].focus
end
2  app/views/tasks/new.js.rjs
View
@@ -4,7 +4,7 @@ page.call "crm.flip_form", :create_task
if params[:cancel] != "true"
page[:create_task].replace_html :partial => "create"
page.call "crm.set_title", :create_task, t(:create_task)
- page.call "crm.date_select_popup", :task_calendar, :task_bucket
+ page.call "crm.date_select_popup", :task_calendar, :task_bucket, Setting.task_calendar_with_time
else
page.call "crm.set_title", :create_task, (@view == "assigned" ? t(:assigned_tasks) : t(:tasks))
end
2  app/views/tasks/update.js.rjs
View
@@ -15,7 +15,7 @@ if @task.errors.empty?
end
else # Errors
- page.call "crm.date_select_popup", :task_calendar, :task_bucket
+ page.call "crm.date_select_popup", :task_calendar, :task_bucket, Setting.task_calendar_with_time
page[id].visual_effect :shake, :duration => 0.25, :distance => 6
page[:task_name].focus
end
2  config/settings.yml
View
@@ -168,3 +168,5 @@ task_completed:
- :completed_last_week
- :completed_this_month
- :completed_last_month
+
+task_calendar_with_time: true
4 public/javascripts/application.js
View
@@ -24,10 +24,10 @@ var crm = {
base_url : "",
//----------------------------------------------------------------------------
- date_select_popup: function(id, dropdown_id) {
+ date_select_popup: function(id, dropdown_id, show_time) {
$(id).observe("focus", function() {
if (!$(id).calendar_was_shown) { // The field recieved initial focus, show the calendar.
- var calendar = new CalendarDateSelect(this, { month_year: "label", year_range: 10, before_close: function() { this.calendar_was_shown = true } });
+ var calendar = new CalendarDateSelect(this, { month_year: "label", year_range: 10, time: show_time, before_close: function() { this.calendar_was_shown = true } });
if (dropdown_id) {
calendar.buttons_div.build("span", { innerHTML: " | ", className: "button_seperator" });
calendar.buttons_div.build("a", { innerHTML: "Back to List", href: "#", onclick: function() {
Please sign in to comment.
Something went wrong with that request. Please try again.