Een ander ding waar ook andere skins last van hebben is dat als je een spot opent, en de spotter een hele lange titel heeft ingevoerd er een horizontale scrollbar verschijnt.
Heeft iemand een mooie CSS of Javascript oplossing om de titel af te kappen of het lettertype kleiner te maken als het niet past?
Met afbreken zat ik meer te denk aan de laatste woorden niet te laten zien, dan aan meerdere regels.
Met "text-overflow: ellipsis" laten moderne browsers alleen het stuk dat past zien en vervolgens er "..." achter. Maar dat werkt met de interne spotlite browser niet.
Ik neem aan dat dat in "spot.tpl" gedaan moet worden, maar daar komen de items die je aangeeft 2 keer voor, tenminste in "RoyaleBlueFull", welke regel moet ik weghalen?
Bvd.
Edit:
Al gevonden, laat maar.
Komt 2 keer voor.
1 keer voor de spotinformatie en 1 keer voor het scherm voor het schrijven van reactie's, klopt dat?
spottert schreef:Met afbreken zat ik meer te denk aan de laatste woorden niet te laten zien, dan aan meerdere regels.
Met "text-overflow: ellipsis" laten moderne browsers alleen het stuk dat past zien en vervolgens er "..." achter. Maar dat werkt met de interne spotlite browser niet.
<html>
<head>
<!-- CSS setting the width of the DIV elements for the table columns. Assume that these widths could change. -->
<style type="text/css">
.div1 { overflow: hidden; white-space: nowrap; width: 80px; }
.div2 { overflow: hidden; white-space: nowrap; width: 150px; }
.div3 { overflow: hidden; white-space: nowrap; width: 70px; }
</style>
<!-- Make a call to Google jQuery to run the javascript below.
NOTE: jQuery is NOT necessary for the ellipses javasript to work; including jQuery to make this example work -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
//Loop through each DIV element
$('div').each(function(index)
{
var myDiv = this; //The original Div element which will have a nodeType of 1 (e.g. ELEMENT_NODE)
var divText = myDiv; //Variable used to obtain the text from the DIV element above
//Get the nodeType of 3 (e.g. TEXT_NODE) from the DIV element. For this example, it will always be the firstChild
divText = divText.firstChild;
//Create another variable to hold the display text
var sDisplayText = divText.nodeValue;
//Determin if the DIV element is longer than it's supposed to be.
if (myDiv.scrollWidth > myDiv.offsetWidth)
{
//Percentage Factor is just a way of determining how much text should be removed to append the ellipses
//With variable width fonts, there's no magic number, but 80%, should give you enough room
var percentageFactor = .8;
//This is where the magic happens.
var sliceFactor = ((myDiv.offsetWidth * percentageFactor) * sDisplayText.length) / myDiv.scrollWidth;
sliceFactor = parseInt(sliceFactor); //Get the value as an Integer
sDisplayText = sDisplayText.slice(0, sliceFactor) + "..."; //Append the ellipses
divText.nodeValue = sDisplayText; //Set the nodeValue of the Display Text
}
});
});
</script>
</head>
<body>
<table border="0">
<tr>
<td><div class="div1">Short Value</div></td>
<td><div class="div2">The quick brown fox jumps over the lazy dog; lots and lots of times</div></td>
<td><div class="div3">Prince</div></td>
</tr>
<tr>
<td><div class="div1">Longer Value</div></td>
<td><div class="div2">For score and seven year ago</div></td>
<td><div class="div3">Brown, James</div></td>
</tr>
<tr>
<td><div class="div1">Even Long Td and Div Value</div></td>
<td><div class="div2">Once upon a time</div></td>
<td><div class="div3">Schwarzenegger, Arnold</div></td>
</tr>
</table>
</body>
</html>
In deze download
- RoyaleBlueFull410.spotskin (zonder eigen filters/tags)
- De folder filters/tags op basis van jullie screenshots (los in een folder zelf kopiëren naar de folder ..\SpotLite\skins\RoyaleBlueFull\categorielijst )
Heb je vorige RB test versies verwijder of hernoem de folder RoyaleBlueFull
The views and comments posted in these fora are personal and do not necessarily represent those of the Management of Spot-net.nl Forums.
The Management of the Spot-net.nl Forums does not, under any circumstances whatsoever, accept any responsibility for any advice, or recommendations, made by, or implied by, any member or guest visitor of Spot-net.nl Forums that results in any loss whatsoever in any manner to a member of Spot-net.nl Forums, or to any other person.
Furthermore, the Management of Spot-net.nl Forums is not, and cannot be, responsible for the content of any other Internet site(s) that have been linked to from Spot-net.nl Forums.