Created
November 20, 2012 12:55
-
-
Save retorquere/4117772 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/views/hooks/_rb_include_scripts.html.erb b/app/views/hooks/_rb_include_scripts.html.erb | |
index 0bfc1de..82d1c16 100644 | |
--- a/app/views/hooks/_rb_include_scripts.html.erb | |
+++ b/app/views/hooks/_rb_include_scripts.html.erb | |
@@ -1,7 +1,12 @@ | |
<%= stylesheet_link_tag 'jquery/jquery.jqplot.min.css', :plugin => 'redmine_backlogs' %> | |
-<%= javascript_include_tag 'jquery/jquery-1.6.2.min.js', :plugin => 'redmine_backlogs' %> | |
-<%= javascript_include_tag 'jquery/jquery-ui-1.8.16.custom.min.js', :plugin => 'redmine_backlogs' %> | |
+<% if Backlogs.platform == :redmine && Redmine::VERSION.to_a[0,2] == [2, 1] %> | |
+ <%= javascript_include_tag 'jquery-1.7.2-ui-1.8.21-ujs-2.0.3', 'application' %> | |
+<% else %> | |
+ <%= javascript_include_tag 'jquery/jquery-1.6.2.min.js', :plugin => 'redmine_backlogs' %> | |
+ <%= javascript_include_tag 'jquery/jquery-ui-1.8.16.custom.min.js', :plugin => 'redmine_backlogs' %> | |
+<% end %> | |
+ | |
<%= javascript_include_tag 'jquery/jquery.jeditable.mini.js', :plugin => 'redmine_backlogs' %> | |
<%= javascript_include_tag 'jquery/jquery.scrollfollow.js', :plugin => 'redmine_backlogs' %> | |
diff --git a/lib/backlogs_hooks.rb b/lib/backlogs_hooks.rb | |
index 99318b5..92b2684 100644 | |
--- a/lib/backlogs_hooks.rb | |
+++ b/lib/backlogs_hooks.rb | |
@@ -117,7 +117,11 @@ module BacklogsPlugin | |
snippet += '</p>' | |
if issue.descendants.length != 0 && !issue.new_record? | |
- snippet += javascript_include_tag 'jquery/jquery-1.6.2.min.js', :plugin => 'redmine_backlogs' | |
+ if Backlogs.platform == :redmine && Redmine::VERSION.to_a[0,2] == [2, 1] | |
+ snippet += javascript_include_tag 'jquery-1.7.2-ui-1.8.21-ujs-2.0.3', 'application' | |
+ else | |
+ snippet += javascript_include_tag 'jquery/jquery-1.6.2.min.js', :plugin => 'redmine_backlogs' | |
+ end | |
snippet += <<-generatedscript | |
<script type="text/javascript"> | |
@@ -181,7 +185,12 @@ module BacklogsPlugin | |
# this wouldn't be necesary if the schedules plugin | |
# didn't disable the contextual hook | |
- snippet += javascript_include_tag 'jquery/jquery-1.6.2.min.js', :plugin => 'redmine_backlogs' | |
+ if Backlogs.platform == :redmine && Redmine::VERSION.to_a[0,2] == [2, 1] | |
+ snippet += javascript_include_tag 'jquery-1.7.2-ui-1.8.21-ujs-2.0.3', 'application' | |
+ else | |
+ snippet += javascript_include_tag 'jquery/jquery-1.6.2.min.js', :plugin => 'redmine_backlogs' | |
+ end | |
+ | |
snippet += <<-generatedscript | |
<script type="text/javascript"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment