The New Way to Build! Introducing ReUI — the developer platform for agentic UI with shadcn/ui
Learn More

Rails bug report: defaultThemeMode and jstree images


Hello, found two issues in the Rails starter app for Metronic 8.1.7 with the initial default theme and then with jstree.

First, app/views/partials/theme-mode/_init.html.erb has a typo that causes formatting issues until the light, dark, or system theme is selected by the user.

Line 3 of the file is currently set to:
var defaultThemeMode = "{% getModeDefault %}";
but needs to be set to:
var defaultThemeMode = "<%= getModeDefault() %>";

Second, the jstree plugin uses four .png and two .gif files, but the current CSS file doesn't point to those files correctly.

For example, in lib/assets/plugins/custom/jstree/jstree.bundle.css:

#jstree-dnd.jstree-dnd-responsive > .jstree-ok {
background-image: url("images/jstree/40px.png");
background-position: 0 -200px;
background-size: 120px 240px;
}


As a quick fix, I pointed to the CDN versions, but I'm sure there's a better way to fix this.
For example:

#jstree-dnd.jstree-dnd-responsive > .jstree-ok {
background-image: url("
background-position: 0 -200px;
background-size: 120px 240px;
}


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (5)

Everestway stands out for its commitment to providing reliable and professional services with a strong focus on customer satisfaction. The team's attention to detail and dedication to quality make every experience smooth and enjoyable Everestway.

Hiring a professional chauffeur is a great way to enjoy safe, comfortable, and stress-free travel. Whether it's for business meetings, airport transfers, or special events, a skilled chauffeur ensures a smooth and reliable journey from start to finish Driver.

I recently used a cleaning service in Dubai and was impressed with the professionalism and attention to detail. The team arrived on time, worked efficiently, and left every room spotless. It's a great option for anyone looking for reliable home cleaning New Omniyat.ae/.


Hi Ian Adams,

Thank you for your feedback. Appreciate your help with suggested fixes. We will include the fix as soon as possible.

Thanks



The corrected line should read:
var defaultThemeMode = "< %= getModeDefault() % >";
(remove the space between the < and %)


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(