-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Prototype with JQuery for Redmine >2.1 #94
Comments
Wel, please do it an create a fork to publish for all of us. |
Has anyone done this? I'm contemplating having a go, but don't want to duplicate work that's been done elsewhere. |
@highfellow: Did you finish this? |
I did manage to get scrumbler to work, but it was a quick hack not a proper port. I installed the prototype-rails gem, and added some lines to the plugin code to require it in the right context. Roughly, I did something like: in redmine_scrumbler/init.rb:
in all the views which have their own html
I think I may have also copied some files to the site's javascript assets directory. Hope this is some help. |
Thanks for your help. |
I've just upgraded from v1.4.4 to 2.3.1 and got into this problem. I tried @highfellow patch but it didn't work. I'll appreciate when it's ready.. []s |
I was able to port it to Redmine 2.4.2 following @highfellow help, doing the following: 1 - Install the prototype-rails gem with the command: gem install prototype-rails -v=3.2.1 2 - in redmine_scrumbler/init.rb, add the line: require 'prototype-rails' 3 - in all the view files which have their own html head section, add the following lines before other javascript_include_tag (pre tag didn't work here, I don't know why...): <%= javascript_include_tag 'prototype', :plugin => 'redmine_scrumbler' %> 4 - copy the following files from the gem prototype-rails assets folder to redmine_scrumbler\assets\javascripts : prototype.js prototype_ujs.js effects.js dragdrop.js controls.js I hope it helps. I tried to make a pull request, but the git is not working behind my company's proxy... =( |
Cassiano and Andrew Following your tips it's working almost everything, but I still have some issues. For instance:
Is the plugin working fine for you? |
Hello Mauro, Yes, it has been working fine for me with the modifications I have mentioned... What browser are you using? I'm using Google Chrome. It seems to be a JQuery problem.. Are you using what versions of ruby, rails and prototype-rails? And what's your environment? Sorry I can't help much... Good luck over there! |
browser - google chrome (ie and firefox) |
I'm using ruby 1.9.3-p484 from Rails Installer. But this shouldn´t be a problem. Also, what ruby webserver are you using? I´m running on puma 2.0.0b7. Other than that, I don´t know how to help you... Sorry about that. |
Shouldn't jquery dependency be removed to make plugin work with prototype? (Cassiano, you have already helped a lot. Thanks) |
I don't know much about the JQuery and the prototype-rails, but as far as I could understand, Rails3 dropped the use of JQuery, that's why the plugin stopped working on Redmine 2.x. The prototype-rails solves this by adding the JQuery features embedding it the to the plugin. |
Redmine 2.1 uses JQuery instead of Prototype.
Instead of Growler-pack.js we can use the JQuery Growler plugin (https://github.com/ksylvest/jquery-growler)
Instead of new Ajax.Request() use $.ajax()
Instead of observe('click', function(){}); use live('click', function(){});
as you see porting to jquery is pretty simple and can be done pretty fast
The text was updated successfully, but these errors were encountered: