i would like to ask, if someone had encountered problem with Microsoft Mediaroom ADK version 3.0.3.3. I am trying to create application using Boundlist as vertical list, which gets data from xml file.
But when I set attribute "VisibleItemCount" to value 1 or 2 and my xml file contains more than 5 entries, which I need to display, I encounter a problem that I am not able to fix.
When I reach the last entry, I am still able to push "down" button on remote, which will get me to the first entry again, when I push it again, its still stuck at the first entry.
I was trying to debug my application with Simulator Console, but what I got suprised me: the client asks for more entries, than XML contains, e.g. last entry is at index 5, but client asks for more : "XMLFile.xml?startIndex=12&itemCount=1&direction=Down"
Important code in my project:
MRML file:
<mrml:TVXmlDataSource ID="_menu" runat="server" AutoLoad="false" Style="position: absolute;
top: 514px; left: 2px;" Url="XMLFile.xml">
</mrml:TVXmlDataSource>
<mrml:TVBoundList ID="TVBoundList1" runat="server" Style="position: absolute; left: 1px; width: 636px; top: 60px; height: 353px;"
AutoFlow="Vertical" ScrollUpArrowUrl="file:///Arrow_Scroll_up.png"
ScrollDownArrowUrl="file:///Arrow_Scroll_Down.png" ArrowHeight="20" ArrowWidth="20"
DataBinder="XmlDataBinder,_menu," ListCounterID="TVLabel10"
VisibleItemCount="1">
<mrml:TVListItemTemplate ID="TVListItemTemplate1"
FocusGlow="ARGB(40,227,0,115)" FocusBackground="ARGB(40,227,0,115)" runat="server"
Style="position: absolute; top: 0px; left: 0px; height: 350px; width: 631px; margin-left: 0px;"
DataBinder=",,TemplateName:Detail;ValuePath:">
<mrml:TVImage ID="TVImage2" runat="server"
Style="position: absolute; width: 240px; height: 340px; top: 6px; left: 5px;"
DataPath="#img">
</mrml:TVImage>
</mrml:TVListItemTemplate>
</mrml:TVBoundList>
XML file:
<?xml version="1.0" encoding="utf-8" ?>
<Data>
<listitems>
<Entry img="img/Motorola_VIP1216E.png" title="VIP1216E" url="RCpage1.aspx?id=vip1216e" id="vip1216e">
<Detail img="img/Motorola1_1.png">
<Button title="Tlačidlo TV STB DVD" img="img/iptv1_tv_stb_dvd.png" popis="Výber príslušného zariadenia TV, STB alebo DVD"></Button>
<Button title="Tlačidlo Teletext" img="img/iptv1_teletext.png" popis="Zobrazí teletext" ></Button>
<Button title="Tlačidlo TV/Video" img="img/iptv1_tv_video.png" popis="Prepínanie medzi vstupmi TV" ></Button>
<Button title="Tlačidlo Setup" img="img/iptv1_setup.png" popis="Naprogramovanie ovládača na ovládanie iných zariadení"></Button>
<Button title="Tlačidlo Power button" img="img/iptv1_power_btn.png" popis="Zapnúť/vypnúť Magio Box" ></Button>
</Detail>
<Detail img="img/Motorola1_2.png">
<Button title="Tlačidlá 0-9" img="img/iptv1_0-9.png" popis="Zadávanie čísel kanálov/zadávanie písmen pri vyhľadávaní"></Button>
<Button title="Tlačidlo Mute" img="img/iptv1_mute.png" popis="Vypnutie/zapnutie zvuku" ></Button>
<Button title="Tlačidlo Enter" img="img/iptv1_enter.png" popis="Potvrdiť zadaný údaj/zmena formátu obrazu"></Button>
</Detail>
<Detail img="img/Motorola1_3.png">
<Button title="Tlačidlá Volume" img="img/iptv1_volume.png" popis="Ovládanie hlasitosti: hlasnejšie/tichšie"></Button>
<Button title="Tlačidlo Channel" img="img/iptv1_channel.png" popis="Prepínanie programov/ posúvanie v ponuke o jednu stranu"></Button>
<Button title="Tlačidlo Del" img="img/iptv1_del.png" popis="Vymazať zadaný údaj"></Button>
<Button title="Tlačidlo Menu" img="img/iptv1_menu.png" popis="Zobrazí hlavné menu"></Button>
<Button title="Tlačidlo Options" img="img/iptv1_options.png" popis="Ponúka doplnkové funkcie a služby"></Button>
</Detail>
<Detail img="img/Motorola1_4.png">
<Button title="Tlačidlo Info" img="img/iptv1_info.png" popis="Zobrazí informácie o aktuálnom televíznom programe alebo o fi lme z Videopožičovne"></Button>
<Button title="Tlačidlo Guide" img="img/iptv1_guide.png" popis="Elektronický programový sprievodca"></Button>
<Button title="Tlačidlo Back" img="img/iptv1_back.png" popis="Návrat o krok alebo o stránku späť"></Button>
<Button title="Tlačidlo Exit" img="img/iptv1_exit.png" popis="Ukončí Magio Menu alebo spustenú aplikáciu"></Button>
<Button title="Tlačidlo OK" img="img/iptv1_ok.png" popis="Potvrdenie výberu v ponuke"></Button>
</Detail>
<Detail img="img/Motorola1_5.png">
<Button title="Ovládanie" img="" popis="Navigačné tlačidlá – používajú sa na pohyb v menu"></Button>
<Button title="Tlačidlá hore/dole" img="img/iptv1_up_down.png" popis="Tlačidlá hore/dole – prepínanie o kanál vyššie/nižšie v PIP"></Button>
<Button title="Vysvetlenie_nothing" img="" popis=""></Button>
<Button title="Tlačidlá doľava/doprava" img="img/left_right.png" popis="Tlačidlá doľava/doprava – prepínanie v zvolenom kanáli na predchádzajúci/ nasledujúci TV program"></Button>
</Detail>
<Detail img="img/Motorola1_6.png">
<Button title="Multifunkčné tlačidlá" img="img/iptv1_farebne.png" popis="Multifunkčné tlačidlá"></Button>
<Button title="Vysvetlenie_1" img="" popis="–na spúštanie/ ovládanie Magio aplikácií"></Button>
<Button title="Vysvetlenie_2" img="" popis="–na prepínanie stránok v režime teletext"></Button>
</Detail>
<Detail img="img/Motorola1_7.png">
<Button title="Tlačidlá pretáčania " img="img/iptv1_forward_backward.png" popis="Pretáčanie dozadu alebo dopredu"></Button>
<Button title="Tlačidlo Play" img="img/iptv1_play.png" popis="Spustenie prehrávania pozastaveného programu"></Button>
<Button title="Tlačidlo Pause" img="img/iptv1_pause.png" popis="Pozastavenie prehrávaného programu"></Button>
<Button title="Tlačidlo Stop" img="img/iptv1_stop.png" popis="Zastavenie nahrávania alebo prehrávania"></Button>
<Button title="Tlačidlo Record" img="img/iptv1_record.png" popis="Priame nahrávanie aktuálneho programu/ programovanie nahrávania"></Button>
</Detail>
</Entry>
I am sorry for my bad english, but I would really appreciate any help. I am stuck at this problem for a looong time, and it seems I am getting no results.
thanks in advance,
John
DataBinder=",,TemplateName:Detail;ValuePath:" I'm not sure about the ,, I'm also new to media room.
With a visible count of 1, I'm not really sure that's OK. Did you try setting all of the list items to the same number of items in each list and setting the visible count to the number of items (say 5)?
Sorry for the late answer. I'd try that and see what you get. Also, try the simplest possible example and go from there (1 list of items, say 5 items, and go from there).
Related
I have several buttons that I want to trigger a block of HML code based on which button is clicked. I want to capture the clicked button id and use it in my switch case statement. I am new and trying to teach myself.
Do I need to enclose my group of buttns in a script. Where do I place the HTML code for my case statement. here is my related cod3.
<button type="button" id = "seahawks" onClick="GetStadium(this.id)"> </button>
<button type="button" id = "buccaneers" onClick="GetStadium(this.id)"> </button>
<button type="button" id = "titans" onClick="GetStadium(this.id)"> </button>
<button type="button" id = "commanders" onClick="GetStadium(this.id)"> </button>
<script>
function GetStadium(team) {
Switch (team) {
case "seahawks":
Code for seahawks here. Should this HTML code be in a div or something else?
break;
case 'buccaneers';
break;
case 'titans';
break;}}
I am expecting a mapped image f the stadium seating chart to appear.
<button type="button" id = "seahawks" onClick="GetStadium(this.id)"> </button>
<button type="button" id = "buccaneers" onClick="GetStadium(this.id)"> </button>
<button type="button" id = "titans" onClick="GetStadium(this.id)"> </button>
<button type="button" id = "commanders" onClick="GetStadium(this.id)"> </button>
<script>
function GetStadium(team) {
Switch (team) {
case "seahawks":
Code for seahawks here. Should this HTML code be in a div or something else?
break;
case 'buccaneers';
break;
case 'titans';
break;}}
<P style="text-align:center; font-family:times new roman;font-size:50px; color:purple"><b>RAVENS S TADIUM SEATING CHART</b></p>
<p style="text-align:center; font-family:times new roman;font-size:20px; color:black>" <b>CLICK ON SECTION IN SEATING CHART TO SEE YOUR VIEW FROM THAT SECTION </b></p>
<center>
<img clas="contain" src="https://static.wixstatic.com/media/785ee8_aaeb22067b9c43088809130df1ac153b~mv2.jpg" alt="Ravens Stadium" usemap="#ravens" </img>
< /center>
<map name="ravens">
<area target="_blank" alt="Sect 100" title="Sect 100" href="https://www.youtube.com/watch?v=977dYY_k0HA" coords="781,300,852,300,843,424,782,425" shape="poly">
<area target="_blank" alt="Sect 101" title="Sect 101" href="https://www.youtube.com/watch?v=977dYY_k0HA" coords="856,302,915,305,908,424,852,421" shape="poly">
<area target="_blank" alt="Sect 102" title="Sect 102" href="https://www.youtube.com/watch?v=977dYY_k0HA" coords="924,305,980,307,966,429,918,427" shape="poly">
<area target="_blank" alt="Sect 103" title="Sect 103" href="https://www.youtube.com/watch?v=977dYY_k0HA" oords="992,311,1052,316,1034,439,979,434" shape="poly">
I'm looking for a way to check if my mat-menu is open so I can add a class to the button that opened it using [ngClass] based on the state of the menu.
<button mat-stroked-button mdbWavesEffect [matMenuTriggerFor]="menu">Actions</button>
<mat-menu #menu="matMenu" [overlapTrigger]="false" panelClass="custom">
<a routerLink="/attendence/detail" mat-menu-item>View Attendance</a>
<a routerLink="/adherence/detail" mat-menu-item>View Adherece</a>
<button mat-menu-item>Edit Agent</button>
<button mat-menu-item>Upload photo</button>
<button mat-menu-item>Deactivate Agent</button>
</mat-menu>
You can use Material matMenuTrigger directive to check whether the menu is open or not
<button mat-button [matMenuTriggerFor]="menu" #t="matMenuTrigger">Menu</button>
<mat-menu #menu="matMenu">
<button mat-menu-item>Item 1</button>
<button mat-menu-item>Item 2</button>
</mat-menu>
{{t.menuOpen}}
Check the example here: https://stackblitz.com/edit/angular-9hbzdw
Now you use ngClass binding to change the style of your button!
You can bind your method on "menuOpened", that method will be invoked whenever Menu is opened
<mat-menu #menu="matMenu" [overlapTrigger]="false" (menuOpened)="isOpened($event)" panelClass="custom">
<a routerLink="/attendence/detail" mat-menu-item>View Attendance</a>
<a routerLink="/adherence/detail" mat-menu-item>View Adherece</a>
<button mat-menu-item>Edit Agent</button>
<button mat-menu-item>Upload photo</button>
<button mat-menu-item>Deactivate Agent</button>
</mat-menu>
And add this method in your component,
isOpened(evt:any){
// set you flag here that you can use in ng-class for the button.
}
Hope this helps.
I faced the same suituation. And I made a CSS work around.
While we click on the menu a custom aria tag is appended to the menu and get removed while we close the dropdoen. With this we can use CSS custom selector (It works with most mordern browsers)
.parentclass a[aria-expanded] { whatever you need }
Some case (if button)
.parentclass button[aria-expanded] { whatever you need }
Thanks,
<button mat-stroked-button mdbWavesEffect [matMenuTriggerFor]="menu">Actions</button>
<mat-menu #menu="matMenu" [overlapTrigger]="false" panelClass="custom">
<a routerLink="/attendence/detail" mat-menu-item>View Attendance</a>
<a routerLink="/adherence/detail" mat-menu-item>View Adherece</a>
<button [ngClass]="selectedMenuItem ===1 ? 'active' : ''" (click)="onSelectMenuItem(1)" mat-menu-item>Edit Agent</button>
<button [ngClass]="selectedMenuItem ===2 ? 'active' : ''" (click)="onSelectMenuItem(2)" mat-menu-item>Upload photo</button>
<button [ngClass]="selectedMenuItem ===3 ? 'active' : ''" (click)="onSelectMenuItem(3)" mat-menu-item>Deactivate Agent</button>
</mat-menu>
selectedMenuItem = 1 // Initial value set to 1
onSelectMenuItem(id): void {
this.selectedMenuItem = id;
}
Sometimes you might face an issue with the mat-menu when your angular application uses the onPush changeDetection. So in that case you need to let Angular know that menu is open or closed.
Angular Material provides the event to detect if the menu is open or not.
menuOpened: Event emitted when the associated menu is opened.
menuClosed: Event emitted when the associated menu is closed.
Here is the code:
<button mat-button #menuOption="matMenuTrigger" [matMenuTriggerFor]="menu"
(menuOpened)="menuOption.menuOpen" (menuClosed)="menuOption.menuOpen">
Menu
<span>{{menuOption.menuOpen ? 'open': 'closed'}}</span>
</button>
In this JSBin: http://jsbin.com/fitiha/10/edit?js,output
Why is the "Tweet button" to the right of the "Add Photo" button. Per the code below, I believe it should be to the left?
<button className="btn btn-primary pull-right"
disabled={this.state.text.length === 0 && !this.state.photoAdded}>Tweet
</button>
<button className="btn btn-default pull-right"
onClick={this.togglePhoto}>
{this.state.photoAdded ? "✓ Photo Added" : "Add Photo" }
</button>
You are using the pull-right class which is essentially float:right and that's how it works.
It stacks the elements in inverted order of their occurence.
Since, Tweet occured before Add Photo, it got floated to the right, and then add photo followed.
You could read up the CSS Spec here:
http://www.w3.org/TR/CSS2/visuren.html#floats
Or this SO answer for more info on how float works.
im trying to get the sqrt symbol to display inside my button. I cant seem to get it to work. Here is my button code
<input type="button" id="sqrt" value="sqrt" onclick="insert function here">
We the value, i need to get the sqrt symbol to show up and I cant seem to figure out how.
If you need to find a specific symbol you can refer to W3's Character Entity Reference Chart.
The Square Root (√) symbol can be displayed using one of the following:
√
√
√
√
For example:
<input type="button" value="√" /> <!-- or... -->
<input type="button" value="√" /> <!-- or... -->
<input type="button" value="√" /> <!-- or... -->
<input type="button" value="√" />
Personally I'd opt for either √ or √ as these directly reference the symbol's Unicode ID. A browser may not necessarily have any mapping defined for √ or √.
JSFiddle demo.
Use √:
<input class="sqrt-input" type="submit" value="√" />
Change the font if you don't like the default look:
/* If find Verdana pretty good for this and it's available
on almost every browser. */
.sqrt-input {
font-family: Verdana;
}
The simplest way is to use the character itself:
<input type="button" id="sqrt" value="√" onclick="...">
You then need to make sure that the character encoding is utf-8 and this is declared in HTTP headers, but you should do that anyway.
Use an img tag inside a button tag like this :-
<button TYPE="submit" >
<img src="" >
</button>
Here put the path of your image in the src attribute. You can also add hieght and width properties to define size for your button and attributes like align="absmiddle" to position image in middle of the button.
for example
<button TYPE="submit" >
<img style="height:25px;width:65px;" src="http://2.bp.blogspot.com/_0agwm6I7YZE/TO_DccbrDBI/AAAAAAAAMEU/0OADo56Xqxw/s1600/square-root.jpg" align="absmiddle" >
</button>
net MVC View. At the end of the view I have the following Buttons
<div style="clear: both; padding-top: 40px; width: 720px;">
<button name="buttonHelp" value="Help" onclick="window.open('Help.htm',target='_blank');return false;">
Help</button>
<span style="float: right;">
<button name="button" value="Reset">
Reset</button>
<button name="button" value="Save">
Save</button>
</span>
</div>
The Save and Reset causes a postback and the screen gets refreshed properly.
If I click the help button it opens the Help screen in s new TAB which is what I require.
Now after using the help screen I press Save/Reset it always open a new window which I dont want and I find puzzling.
Any idea how to solve this ?
The following change solved the problem. the help still opens in a new tab as I wanted
> <button name="buttonHelp" value="Help"
> onclick="window.open('Help.htm');return false;">
> Help</button>
Check to ensure that the target isn't staying "_blank" after you click Help and that the target of the form is _self.