I want to split the following element structure based on the break element as mentioned below. Tell me some suggestions to convert using XSLT.
INPUT:
<root>
<div>
<p>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<break/>
<li>Item 3</li>
<li>Item 4</li>
<break/>
<li>Item 5</li>
<li>Item 6</li>
</ul>
</p>
</div>
</root>
OUTPUT:
<root>
<div>
<p>
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
</p>
<p>
<ul>
<li>Item 3</li>
<li>Item 4</li>
</ul>
</p>
<p>
<ul>
<li>Item 5</li>
<li>Item 6</li>
</ul>
</p>
<div>
</root>
Related
I am trying to get a Shopping glyphcon near the "Shop" ActionLink, and this is what I get:
I want the home icon to be before the "Shop" and in the same line.
I'm using MVC5 .cshtml file
This is the Code:
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
#* Glasses Menu *#
<li class="dropdown">
Glasses <span class="caret"></span>
<ul class="dropdown-menu" role="menu">
<li>#Html.ActionLink("InfinityAR", "InfinityAR", "Glasses")</li>
<li>#Html.ActionLink("Google Glass", "GoogleGlass", "Glasses")</li>
#*<li class="divider"></li> //TODO: Enter here something
<li>Separated link</li>*#
</ul>
</li>
#* SDK's Menu *#
<li class="dropdown">
Developers <span class="caret"></span>
<ul class="dropdown-menu" role="menu">
<li style="margin-left:10px">SDK</li>
<li class="divider"></li>
<li>#Html.ActionLink("METAIO", "Metaio", "Developers")</li>
</ul>
</li>
<li>
<span class="glyphicon glyphicon-home" />
</li>
<li>#Html.ActionLink("About", "About", "Home")</li>
<li>#Html.ActionLink("Contact", "Contact", "Home")</li>
</ul>
#Html.Partial("_LoginPartial")
</div>
I think you've confused what HTML.ActionLink() does. It generates the anchor link with tags.
So if you inspect the generated HTML code of this line:
#Html.ActionLink("Shop", "Shop", "Glasses")
It will produce something like this:
Shop
Your code will produce something like this:
Shop"><span class="glyphicon glyphicon-home" /></a>
You want to use the URL.Action() helper:
<span class="glyphicon glyphicon-home"></span> Shop
AngularJS supports a ng-repeat-start and ng-repeat-end directive to have the ng-repeat repeat with several elements that are siblings. Is there a similar feature in Angular Dart or a different method to accomplish this?
I am trying to loop through a menu object and display it in a Bootstrap dropdown menu. Every time I repeat the dropdown-header element I would like the divider to appear before it (except the first time, which I will deal with later).
<div class="btn-group open">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
Dropdown <span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li class="dropdown-header">Category 1</li>
<li>Item 1</li>
<li>Item 2</li>
<li class="divider"></li>
<li class="dropdown-header">Category 2</li>
<li>Item 3</li>
<li>Item 4<a></a></li><a>
</a></ul><a>
</a></div>
Demo
Here's what I have but I'm not sure what to do with the divider:
<ul class="dropdown-menu" ng-if="menuItem.hasSubPages">
<li class="divider"></li><!-- not sure what to do with this -->
<li ng-class="{'dropdown-header': subMenuItem.isCategory}" ng-repeat="subMenuItem in menuItem.subMenuItems" ng-switch="subMenuItem.isCategory">
{{subMenuItem.name}}
<span ng-switch-when="true">{{subMenuItem.name}}</span>
</li>
</ul>
Thanks!
Actually AngularDart doesn't support the ng-repeat-start and ng-repeat-end directives.
As you can see in the AngularDart API, no reference is available for this kind of directive.
BUT you can accomplish what you want by encapsulating the elements into a new Component as explained here : Creating a Custom Component
I am trying to create rounded style checkbox using Jquery mobile. In the below link, under multiple selects, choose option select menu i saw this type of checkbox. Is it possible to create that type of checkbox in listview of JQM?
http://jquerymobile.com/test/docs/forms/selects/custom.html#&ui-state=dialog
Thanks...
<ul data-role="listview" id="options">
<li data-icon="checkbox-off"><a>test</a></li>
<li data-icon="checkbox-on"><a>test</a></li>
</ul>
This code snippet makes round edges for listview, you can have any element inside it:
<ol data-role="listview">
<li class="ui-corner-bottom ui-corner-top" data-theme="a" >List Item 1</li>
<li class="ui-corner-bottom ui-corner-top" data-theme="a">List Item 2</li>
<li class="ui-corner-bottom ui-corner-top" data-theme="a">List Item 3</li>
</ol>
See the Demo here
http://jsfiddle.net/qXr79/5/
A quick sketch of my situation is:
<ul id="selectable">
<li class="table" id="header-row">
<ul class="row">
...
</ul>
</li>
<li class="table">
<ul class="row">
...
</ul>
</li>
...
</ul>
How do I disable li#header-row from being selectable?
You can use the filter option to include (or with :not, exclude) options
$("#selectable").selectable({
filter: ":not(#header-row)"
});
JSFiddle: http://jsfiddle.net/M7pmU/
I have:
<div class="ui-widget">
<div class="ui-widget-header">
My Menu<span class="ui-icon ui-icon-circle-triangle-n"></span>
</div>
<ul class="ui-widget-content">
<li>Menu Item 1</li>
<li>Menu Item 2</li>
<li>Menu Item 3</li>
</ul>
</div>
Right now, the ui-icon is appearing below "My Menu"
Q: How can I get "My Menu" to appear on the same line as the UI widget?
add the style "display: inline-block;" to ui-icon,
or wrap My Menu in a span and use floats