Windows Media Player Skin Repeat Button - wms

I am trying to get the code for the repeat button to work. The shuffle is working, but the repeat does not. Any help would be great! The button is part of the main background. The .wms file is below. I am using .png files for my images. Not really sure what I should all add on to here.
<THEME>
<VIEW
clippingColor = "#780E85"
backgroundImage = "wmpSkin2.png"
titleBar = "False"
width="925"
height="502"
backgroundColor="none"
transparencycolor="#780E85"
scriptFile="skin.js"
onLoad="OnOpenStateChange();">
<player PlayState_onchage="OnOpenStateChange();"
OpenState_onchange="OnOpenStateChange();"
modeChange="OnOpenStateChange();"
>
</player>
<BUTTONGROUP
mappingImage = "wmpSkinMapping.png"
hoverImage = "wmpSkinHover2.png">
<!-- Control buttons -->
<PLAYELEMENT mappingColor = "#000080"
upToolTip = "Play" />
<PAUSEELEMENT mappingColor = "#0000FF"
upToolTip = "Pause" />
<STOPELEMENT mappingColor = "#FFFF00"
upToolTip = "Stop" />
<BUTTONELEMENT mappingColor = "#FF00FF"
upToolTip = "Next"
onClick="jscript:player.controls.next()"
cursor="system"
enable="wmpenabled.player.controls.next" />
<BUTTONELEMENT mappingColor = "#00FF00"
upToolTip = "Previous"
onClick="jscript:player.controls.previous()"
cursor="system"
enable="wmpenabled.player.controls.next" />
<!-- Minimize, Full Mode, Exit Buttons -->
<BUTTONELEMENT mappingColor = "#808000"
upToolTip = "Minimize"
onClick="view.minimize();" />
<BUTTONELEMENT mappingColor = "#FFA500"
upToolTip = "Return to Full Mode"
onClick="view.returnToMediaCenter();" />
<BUTTONELEMENT mappingColor = "#008000"
upToolTip = "Close"
onClick="JScript: view.close();" />
<!-- Shuffle and Repeat -->
<BUTTONELEMENT id="btnShuffle"
mappingColor="#008080"
upToolTip="Turn Shuffle On"
downToolTip="Turn Shuffle Off"
onClick="player.settings.setMode('shuffle',down);"
down="wmpprop:player.settings.getMode('shuffle')"
sticky="true"
>
</BUTTONELEMENT>
<BUTTONELEMENT id="btnRepeat"
mappingColor="#800080"
onclick="jscript:player.settings.setMode('loop',down);"
upTooltip="Enable Repeat"
downTooltip="Disable Repeat"
down="wmpprop:player.settings.getMode('loop')"
sticky="true">
</BUTTONELEMENT>
</BUTTONGROUP>
<seekSlider zindex="2"
left="230" top="141"
backgroundImage="sleekbar.png"
thumbImage="sleekbtn.png"
thumbHoverImage="sleekbtnHover.png"
transparencyColor="#780E85"
borderSize="5"
useForegroundProgress="false"
>
</seekSlider>
<text id="metadata"
left="240"
top="169"
width="275"
fontSize="6"
fontSmoothing="true"
fontFace="Arial"
foregroundColor="#003EAA"
scrollingDelay="50"
scrollingAmount="1"
justification="Center"
scrolling="true"
toolTip=""
passThrough="true"
fontStyle="normal">
</text>
<text id="metadata2"
left="240"
top="169"
width="275"
fontSize="6"
fontSmoothing="true"
fontFace="Arial"
foregroundColor="#003EAA"
scrollingDelay="50"
scrollingAmount="1"
justification="Center"
scrolling="true"
toolTip=""
passThrough="true"
fontStyle="normal">
</text>
</VIEW>
</THEME>

Related

How to Loop form elements in JSP

I'm want to use some sort of loop to go over all input fields in my form . But I'm unable to find any proper documentation on how to do it. Is it possible to loop over all the elements in my form in some way as well as dealing with multiple checkboxes ?
I tried to follow some online sources . This one outputs null value.
<html>
<body>
<form action = "main.jsp" method = "POST" target = "_blank">
<input type = "checkbox" name = "maths" checked = "checked" /> Maths
<input type = "checkbox" name = "physics" /> Physics
<input type = "checkbox" name = "chemistry" checked = "checked" /> Chemistry
<input type = "submit" value = "Select Subject" />
</form>
</body>
</html>
<%# page import = "java.io.*,java.util.*" %>
<html>
<head>
<title>HTTP Header Request Example</title>
</head>
<body>
<center>
<h2>HTTP Header Request Example</h2>
<table width = "100%" border = "1" align = "center">
<tr bgcolor = "#949494">
<th>Param Name</th>
<th>Param Value(s)</th>
</tr>
<%
Enumeration paramNames = request.getParameterNames();
while(paramNames.hasMoreElements()) {
String paramName = (String)paramNames.nextElement();
out.print("<tr><td>" + paramName + "</td>\n");
String paramValue = request.getHeader(paramName);
out.println("<td> " + paramValue + "</td></tr>\n");
}
%>
</table>
</center>
</body>
</html>
Is there any documentation source from where I can read about request object's methods ?

onClick not propagated

I'm having troubles with creating a simple gallery allowing to print pictures. I constructed the interface. When I click on the print button, I'm not able to propagate event to a function. Funny enough, it always works for just a couple of items in the gallery so that console logs foo. Could you please point me where is the problem? I am using material-ui, tileData is a json with image url etc...
Many thanks!
class Galery extends React.Component {
state = {
tileData: tileData
};
printThis = tile => {
console.log("printing tile... " + tile.target.value);
};
render() {
const classes = this.props;
return (
<div className={classes.root}>
<ButtonAppBar />
<div style={{ marginBottom: 20 }} />
<Grid container spacing={8}>
<Grid item xs={10}>
<GridList
cellHeight={250}
cellWidth={250}
cols={5}
spacing={4}
className={classes.gridList}
>
{tileData.map(tile => (
<GridListTile key={tile.img}>
<img src={tile.img} alt={tile.title} />
<GridListTileBar
title={tile.title}
subtitle={<span>by: {tile.author}</span>}
actionIcon={
<IconButton
className={classes.icon}
value="foo"
onClick={this.printThis}
>
<i className="material-icons md-24 md-light">print</i>
</IconButton>
}
secondActionIcon={
<IconButton className={classes.icon}>
<i className="material-icons md-24 md-light">delete</i>
</IconButton>
}
/>
</GridListTile>
))}
</GridList>
</Grid>
<Grid item xs={2}>
<div className={classes.stats}>
<StatsTable />
</div>
</Grid>
</Grid>
</div>
);
}
}
It works for me to access the object id through event.currentTarget as per github answer here https://github.com/mui-org/material-ui/issues/7974#issuecomment-329250974
`
So my implementation is:
printThis = (event) => {
console.log('printing tile... '+ event.currentTarget.id);
};
<IconButton className={classes.icon} id = {tile.img} onClick={this.printThis}>
<i className="material-icons md-24 md-light" >
print
</i>
</IconButton>

How to embed an external widget to a page in Bolt?

I'm trying to embed a booking system widget to my bolt homepage (the one and only homepage, using base-2018 theme). I paste it into the Content window, selecting Source first. Bolt seems to interpret what is going on, as various tags and IDs are highlighted in the code.
The widget code is roughly so:
<div id="bokun [blabla]">Loading...</div>
<p><script type="text/javascript"><br />
var w15;<br />
(function(d, t) {<br />
var host = 'widgets.bokun.io';<br />
var frameUrl = 'https://' + host + '/widgets/15';<br />
var s = d.createElement(t), options = {'host': host, 'frameUrl': frameUrl, 'widgetHash':'w15', 'autoResize':true,'height':'','width':'100%', 'minHeight': 0,'async':true, 'ssl':true, 'affiliateTrackingCode': '', 'transientSession': true, 'cookieLifetime': 43200 };<br />
s.src = 'https://' + host + '/assets/javascripts/widgets/embedder.js';<br />
s.onload = s.onreadystatechange = function() {<br />
var rs = this.readyState; if (rs) if (rs != 'complete') if (rs != 'loaded') return;<br />
try {<br />
w15 = new BokunWidgetEmbedder(); w15.initialize(options); w15.display();<br />
} catch (e) {}<br />
};<br />
var scr = d.getElementsByTagName(t)[0], par = scr.parentNode; par.insertBefore(s, scr);<br />
})(document, 'script');<br />
</script></p>
I have only edited out the unique ID this widget has. Otherwise, this is copied from the provider and works on my current Wordpress site...ALTHOUGH when I paste it into Wordpress, the editor notifies me that "there's something wrong" and offers me to correct it.
How do I insert this? Do I need to create a .js file and reference it in compliance with Twig standards and if so, how do I? I should also note that the widget will redirect to a different page within the same site once you press something within it. Thank you.
Bolt version: 3.6.5
You need to add every tag and attribute that you need into the `config.yml.

Send a flag instead a letter based in a json

i don't know if i expleined i receive a json from an odata call and i send it to my table but one field have a X or is empty but instead of showing a X i want to show a flag like in ObjectListItem with a ObjectMarker type="Flagged" and just showing the flag
my table: (i delete some colums for this but my field that i'm interested is Sucursalescolacion and Sucursalesflag)
<Table id="bSucursales"
inset="false"
items="{/}"
visible="false"
enableBusyIndicator="true">
<columns>
<Column>
<Text text="{i18n>colSucursalesid}" />
</Column>
<Column>
<Text text="{i18n>colSucursalesnombre}" />
</Column>
<Column>
<Text text="{i18n>colSucursalesdircalle}" />
</Column>
<Column>
<Text text="{i18n>colSucursalesdirnumero}" />
</Column>
</columns>
<items>
<ColumnListItem press="" type="Active">
<Text text="{Sucursalesdepto}"/>
<Text text="{Sucursalesfono1}"/>
<Text text="{Sucursalesfono2}"/>
<Text text="{Sucursalesactiva}"/>
<Text text="{Sucursaleshoraini}"/>
<Text text="{Sucursaleshorafin}"/>
<Text text="{Sucursalescolacion}"/>
<!-- <ObjectMarker type="Flagged"/> -->
<Text text="{Sucursalesflag}"/>
</ColumnListItem>
</items>
</Table>
my controller
var bSucursales = this.byId("bSucursales");
bSucursales.setVisible(true);
oDataModel.read("/" + resultado2 +"?$filter=Maestropais eq '" + resultado + "'" + "and Maestrometodo eq '" + metodo + "'", {
success: function(oData, response) {
var oResults = oData.results;
oModel.setData(oResults);
bSucursales.setModel(oModel);
},
error: function(oError) {
}
});
You could use expression binding:
<ObjectMarker type="{= ${Sucursalesflag} === 'X' : 'Flagged' : ''}" />
More info: https://sapui5.hana.ondemand.com/#/topic/5cff8d1c3fb84c5db7a00f2daca125af
Also, you can choose to use a formatter as:
<ObjectMarker type="{path: 'Sucursalesflag', formatter: '.formatSalesFlag'}"/>
Define formatter function in your controller:
.
.
.
statusText: function (sSalesFlag) {
if(sSalesFlag == 'X'){
return 'Flagged';
}
else{
return '';
}
}
}
You can write more complex custom formatters for different use-cases. Learn more about customer formatters here

required field validator not working with html editor

I have a text box using cc1:Editor and when I place a required field validator on it, it displays as soon as the page loads. How can I hide the error and allow it to display only if the html editor box is empty?
<code><cc1:Editor ID="txtDescription" Width="500px" Height="525px"
runat="server" TextMode="SingleLine" /></code>
<code>
<asp:RequiredFieldValidator ID="rfvDescription" runat="server"
ControlToValidate="txtDescription"
ErrorMessage="Must include Description" Font-Bold="True"></asp:RequiredFieldValidator>
</code>
<code><asp:Button ID="SubmitBtn" runat="server"
Text="Submit" OnClick="SubmitBtn_Click" class="form-td" Height="30px" />
<script language="javascript" type="text/javascript">
document.onkeypress = keyhandler;
function keyhandler(e) {
Key = window.event.keyCode; if (Key == 13) {
var obj = document.getElementById('<%=SubmitBtn.ClientID%>');
obj.focus();
obj.click();
}
}
</script>
Yes, you can perform custom validation on your submit button client side & server side validation on your postback event thus removing required field validator. Check following example:
On your aspx page
<p>
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="javascript:return ValidateEditor();"
ValidationGroup="myGroup" onclick="Button1_Click" />
<br />
</p>
<asp:Label ID="lblMessage" runat="server" ForeColor="Red"></asp:Label>
<cc1:Editor ID="Editor1" runat="server" />
<script type="text/javascript">
function ValidateEditor() {
var txtEditor = $find('<%=Editor1.ClientID %>');
if (txtEditor.get_content() == null || txtEditor.get_content() == '') {
alert('Text cannot be empty');
document.getElementById('<%=lblMessage.ClientID %>').innerHTML='Text cannot be empty';
return false;
}
else
return true;
}
</script>
On server side
if (string.IsNullOrEmpty(Editor1.Content.ToString()))
{
lblMessage.Text = "Text cannot be empty";
}
else
{
// Do your work here
}