Closed LeeThompson closed 2 years ago
That definitely could be useful for people with a lot of services running and who still want to keep the dashboard looking clean. I first looked here since Dasherr is built on Bootstrap framework, but it turns out it's an optional add-on, so your posted code should definitely have a much lesser overhead - thank you for posting that, makes my job easier :)
You should know I got the base code form somewhere on the web (some CSS tooltip thing) although I did make some changes to it, it's not completely mine. (I don't remember any license stuff on the site though.)
I also modified it for github since for my own usage I have a section that sets up all the options as CSS variables so there may be some typo issues.
Stuff like:
background-color: var(--tooltipbackgroundcolor);
color: var(--tooltiptextcolor);
text-align: var(--tooltiptextalign);
EDIT:
I found the sites I referenced:
https://www.w3schools.com/css/css_tooltip.asp http://www.menucool.com/tooltip/css-tooltip
The second one I didn't use but it gave me some ideas.
It's just a bit of CSS & HTML, hardly a standalone function, let alone a library or application - I wouldn't worry too much about licensing for it. And no one here is profiting from it anyway. And I looked at both the demos - w3schools is nice and clean, menucool is pretty fancy - both are good though. I think I'll go with w3schools and put that in the next update. Thank you!
I liked the clean simplicity myself.
I had a little spare time today and thought I'd quickly add this feature, figuring I'll just have to use the code you gave - I updated custom.css in file, and updated the webpage code in-browser (just in developer view for testing), since the actual update would be dynamically creating these elements via javascript - but turns out it didn't show the tooltip or the innerText of span, for whatever reason. At the moment I didn't have the time to troubleshoot it so I left it for later, but in case you're able to get it to work, pls feel free to lend me a hand by sending a working html page - else I promise I'll get to it soon-ish anyway
@erohtar I'll take a look.
I did some really really crude testing, basically putting the tooltip in the name field in settings and it does not work. I think there's some conflicting css as there is a class="tile btn overflow-hidden"
which (I think) is part of bootstrap.
I'm not familiar with bootstrap but maybe using the bootstrap tooltip will be necessary.
Yeah I think you may be on to something there. But I haven't given up yet - I'll soon give it a proper shot before using the BS-approved method (which I have a feeling might come with a slightly bigger overhead on page loading time).
Thoughts?
I think that works. Maybe a little bit of transparency? (Better yet if that can be configured but ok if not)
Added in v1.02.00 I coded it such that tooltips function doesn't get enabled unless there's at least one info tooltip actually created by user
Pls feel free to try it out and close the thread
This is certainly not a high priority but users may find this useful. It would be a css-style tooltip (unless it's easier to do it in js).
It would be an optional parameter for any object with a
"name"
field.Example:
Sample HTML Code:
<div class=tooltip data-container=body><span class=tooltiptext>This is a tooltip.</span>This is what is displayed normally.</div>
Sample CSS: