Smile-SA / redmine_datetime_custom_field

A plugin that enables Custom Field of type DateTime (native one have only Date, not Time)
GNU General Public License v2.0
15 stars 7 forks source link

Fixing incorrect include_datetime_headers_tags #6

Closed vegaminer closed 4 years ago

vegaminer commented 4 years ago

include_datetime_headers_tags produces no output at all. But if it would do then 'jQuery.datetimepicker.setLocale' is a js error - setLocale is unknown method (probably due to incomplete or outdate version of datetime picker provided by author in jquery.datetimepicker.js)

Just added getDatetimepickerOptions for generating inline js object

Utopism commented 4 years ago

Hi, thanks for the merge request, can you describe exactly the issue it fixes ?

Utopism commented 4 years ago

Hi again it seem that you are bringing bug fixes on something that works. If you want me to merge this pull, I must get reproductible test cases to check what is the issue. Perhaps we can fix another way.

vegaminer commented 4 years ago

Yes, you are right )) It works just because result of include_datetime_headers_tags never outputs into html page. Probably I have some edge case with my setup, but I can't see it in HTML source of my RM page in browser. And this line of code jQuery.datetimepicker.setLocale('#{jquery_locale}'); will raise a JS error - unknown function 'setLocale' (it's really not present in jquery.datetimepicker.js)

Utopism commented 4 years ago

Hi, I'll close this pull request because the main point is to fix something that works well. I will be glad to merge your code refactoring in an updated pull request against V1.0.3