Skip to content
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

Adding Block Javascript to Show Page #432

Open
cdesch opened this issue Feb 5, 2018 · 0 comments
Open

Adding Block Javascript to Show Page #432

cdesch opened this issue Feb 5, 2018 · 0 comments

Comments

@cdesch
Copy link

cdesch commented Feb 5, 2018

Would adding a javascript block to the show view be fairly straightforward as dropping javascript macro onto show.ex. Or is there a reason why it is limited to the forms (form.ex)

  @doc """
  Add javascript to the form
  Adds a block of javascript code to the form. Typically used to add
  change or click handlers to elements on the page
  """
  defmacro javascript(do: block) do
    quote do
      var!(script_block, ExAdmin.Form) = unquote(block)
    end
  end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant