From 979892a109bd298cec45258bc4b2b91c8fe676cb Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 6 Jan 2007 09:08:17 +0000 Subject: [PATCH] calendar javascripts and stylesheets removed from base layout. they're now only added to html header when needed. git-svn-id: http://redmine.rubyforge.org/svn/trunk@151 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/account/register.rhtml | 7 +++++++ app/views/issues/edit.rhtml | 7 +++++++ app/views/layouts/base.rhtml | 7 +------ app/views/projects/_form.rhtml | 7 +++++++ app/views/projects/add_issue.rhtml | 7 +++++++ app/views/users/_form.rhtml | 7 +++++++ app/views/versions/_form.rhtml | 9 ++++++++- public/stylesheets/calendar.css | 2 +- 8 files changed, 45 insertions(+), 8 deletions(-) diff --git a/app/views/account/register.rhtml b/app/views/account/register.rhtml index b34aff79c..3101bd5df 100644 --- a/app/views/account/register.rhtml +++ b/app/views/account/register.rhtml @@ -37,3 +37,10 @@ <%= submit_tag l(:button_submit) %> <%= end_form_tag %> + +<% content_for :header_tags do %> +<%= javascript_include_tag 'calendar/calendar' %> +<%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %> +<%= javascript_include_tag 'calendar/calendar-setup' %> +<%= stylesheet_link_tag 'calendar' %> +<% end %> diff --git a/app/views/issues/edit.rhtml b/app/views/issues/edit.rhtml index 1666d0fdb..da3805c29 100644 --- a/app/views/issues/edit.rhtml +++ b/app/views/issues/edit.rhtml @@ -46,4 +46,11 @@ if (document.getElementById) { } //]]> +<% end %> + +<% content_for :header_tags do %> +<%= javascript_include_tag 'calendar/calendar' %> +<%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %> +<%= javascript_include_tag 'calendar/calendar-setup' %> +<%= stylesheet_link_tag 'calendar' %> <% end %> \ No newline at end of file diff --git a/app/views/layouts/base.rhtml b/app/views/layouts/base.rhtml index 56ffbcf80..cb81f55db 100644 --- a/app/views/layouts/base.rhtml +++ b/app/views/layouts/base.rhtml @@ -9,13 +9,8 @@ <%= stylesheet_link_tag "print", :media => "print" %> <%= javascript_include_tag :defaults %> <%= javascript_include_tag 'menu' %> -<%= javascript_include_tag 'calendar/calendar' %> -<%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %> -<%= javascript_include_tag 'calendar/calendar-setup' %> -<%= stylesheet_link_tag 'calendar' %> <%= stylesheet_link_tag 'jstoolbar' %> - -<%= yield :header_tags %> +<%= yield :header_tags %> diff --git a/app/views/projects/_form.rhtml b/app/views/projects/_form.rhtml index 8c5b9f108..14c7a26ee 100644 --- a/app/views/projects/_form.rhtml +++ b/app/views/projects/_form.rhtml @@ -35,3 +35,10 @@ <%= javascript_tag "Element.hide('repository');" if @project.repository.nil? %> + +<% content_for :header_tags do %> +<%= javascript_include_tag 'calendar/calendar' %> +<%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %> +<%= javascript_include_tag 'calendar/calendar-setup' %> +<%= stylesheet_link_tag 'calendar' %> +<% end %> \ No newline at end of file diff --git a/app/views/projects/add_issue.rhtml b/app/views/projects/add_issue.rhtml index dfd1b314e..88be854c2 100644 --- a/app/views/projects/add_issue.rhtml +++ b/app/views/projects/add_issue.rhtml @@ -47,4 +47,11 @@ if (document.getElementById) { } //]]> +<% end %> + +<% content_for :header_tags do %> +<%= javascript_include_tag 'calendar/calendar' %> +<%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %> +<%= javascript_include_tag 'calendar/calendar-setup' %> +<%= stylesheet_link_tag 'calendar' %> <% end %> \ No newline at end of file diff --git a/app/views/users/_form.rhtml b/app/views/users/_form.rhtml index 989cb7559..e486c1042 100644 --- a/app/views/users/_form.rhtml +++ b/app/views/users/_form.rhtml @@ -28,3 +28,10 @@ <%= password_field_tag 'password_confirmation', nil, :size => 25 %>

+ +<% content_for :header_tags do %> +<%= javascript_include_tag 'calendar/calendar' %> +<%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %> +<%= javascript_include_tag 'calendar/calendar-setup' %> +<%= stylesheet_link_tag 'calendar' %> +<% end %> \ No newline at end of file diff --git a/app/views/versions/_form.rhtml b/app/views/versions/_form.rhtml index 3d0eb0a2d..3d6c9c208 100644 --- a/app/views/versions/_form.rhtml +++ b/app/views/versions/_form.rhtml @@ -6,4 +6,11 @@

<%= f.text_field :description, :size => 60 %>

<%= f.text_field :effective_date, :size => 10, :required => true %><%= calendar_for('version_effective_date') %>

- \ No newline at end of file + + +<% content_for :header_tags do %> +<%= javascript_include_tag 'calendar/calendar' %> +<%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %> +<%= javascript_include_tag 'calendar/calendar-setup' %> +<%= stylesheet_link_tag 'calendar' %> +<% end %> \ No newline at end of file diff --git a/public/stylesheets/calendar.css b/public/stylesheets/calendar.css index f460d5cb0..7f0b908e5 100644 --- a/public/stylesheets/calendar.css +++ b/public/stylesheets/calendar.css @@ -19,7 +19,7 @@ div.calendar { position: relative; } } .calendar .nav { - background: #467aa7 url(menuarrow.gif) no-repeat 100% 100%; + background: #467aa7; } .calendar thead .title { /* This holds the current "month, year" */ -- 2.39.5