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

Custom JS file? #265

Closed
adrianbj opened this issue Oct 9, 2017 · 5 comments
Closed

Custom JS file? #265

adrianbj opened this issue Oct 9, 2017 · 5 comments

Comments

@adrianbj
Copy link
Contributor

adrianbj commented Oct 9, 2017

  • bug report? no
  • feature request? yes

Description

Hi @dg - after you added Debugger::$customCssFile today, it got me thinking about JS assets.
What about a Debugger::$customJsFile that is added to renderAssets(). I add some custom JS to the bar itself which doesn't work on a bluescreen page - this would fix this problem.

Another possibility here - what do you think about adding the ability to easily load custom js files for each panel. I have found that I have to use a dynamic JS loader in case an exception occurs which causes normal loading to fail.

@dg
Copy link
Member

dg commented Oct 9, 2017

I would divide it into four things:

  1. custom JS for Bluescreen stored in log file
  2. custom JS for displayed Bluescreen
  3. custom JS for Bar
  4. custom JS for specific Bar panel

I assume that 1) is not needed (it is a little bit complicated to implement), and from the point of view of modularity seems 4) better to me than 3).

@adrianbj
Copy link
Contributor Author

adrianbj commented Oct 9, 2017

  1. I don't personally care about the bluescreen in the log file.
  2. I don't specifically add any JS to the bluescreen - it's just that JS added to the bar doesn't get loaded when on a bluescreen page (without using a dynamic loader approach) - that is what I would like to fix. Although perhaps others would like custom JS on the bluescreen?
  3. This would fix my needs for the bar on the bluescreen I think.
  4. Yes, this would be great although I don't see it as a replacement for 3.

@adrianbj
Copy link
Contributor Author

adrianbj commented Oct 9, 2017

PS - as one example of 3, I replace the x with a minimize/maximize button:

See the new button at the bottom right?
screen shot 2017-10-09 at 10 21 23 am

After clicking it, the bar and all panels are hidden (like the close), but now you have the option to restore with this button:
screen shot 2017-10-09 at 10 21 35 am

@dg dg closed this as completed in 01ba3a8 Oct 9, 2017
@dg
Copy link
Member

dg commented Oct 9, 2017

I added $customJsFiles for to solve 2) and 3)

The 4) is usually solved via <script> embedded in panel code.

@adrianbj
Copy link
Contributor Author

adrianbj commented Oct 9, 2017

Thanks - that should be great.

I do embed <script> in the code for panels, but there are times when I have had issues with this. I need to look into this again when I have a little more time. Will get back to you later on this.

Thanks again!

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

2 participants