No toolbar for comments form

Issue #31 resolved
Vyacheslav K
created an issue


"ReferenceError: jsToolBar is not defined"

As I see "jstoolbar.js" and "jstoolbar-textile.min.js" are not included during commenting.

Comments (12)

  1. Vyacheslav K reporter

    It's a bit strange that everything fine in your environment. I've tested in a few machines. No toolbar for comment form.

    And jsToolBar could not be there because jstoolbar.js is included only for wiki "edit" mode, not for viewing wiki pages (there comments are located). And in wiki_extensions no "javascript_include_tag" for jstoolbar.js

  2. Haruyuki Iida repo owner
    1. comment_form macro calls _comment_form.html.erb.
    2. _comment_form.html.erb calls wikitoolbar_for.
    3. wikitoolbar_for calls heads_for_wiki_formatter.
    4. and heads_for_wiki_formatter includes jstoolbar.
  3. Vyacheslav K reporter

    Ah, exactly. Thank you! As I see in my environment "heads_for_wiki_formatter" does not work properly.

    I tried:

                content_for :header_tags do
                  javascript_include_tag('jstoolbar/jstoolbar-textile.min') +
                  javascript_include_tag("jstoolbar/lang/jstoolbar-#{current_language.to_s.downcase}") +

    in templates directly, but it also did not work... Weird. :( I do not know why I have this issue in 2 fresh redmine's instances. Any thoughts?

    Thank you.

  4. Vyacheslav K reporter

    But in other plugins like redmine_user_profiles it works properly,

    Also in _comment_form.html.erb without "content_for :header_tags do", just <%= javascript_include_tag('jstoolbar/jstoolbar-textile.min') %> and etc. it works.

    What a strange thing.

  5. Log in to comment