dynamicBullets is not supported in ionic-slides? - ionic-framework

dynamicBullets is not supported in ionic-slides?
ionic-slides adopted from swiper.js and swiper.js support dynamicBullets: boolean.
How can I use dynamicBullets in ionic-slides?
I even tried to inject swiper.js into the ionic project and it's not working well. I believe there is a conflict error somewhere in ionic since it was adopted from swiper.js

I am using this to add bullets in text line. try this
<ul>
<li><p>Keep your knees and tons pointing slightly outwards as you jump.</p>
</li>
<li><p>Land with soft knees on the balls of your feet to protect your knees.</p></li>
<li><p>Go as fast as you can without losing control.</p></li>
</ul>

Related

GWT 2.7: Warn users they are using an unsupported browser

I recently upgraded my application to GWT 2.7 from GWT 2.5. This has caused me to drop support for IE6 and IE7.
I would like to provide users with IE6 or IE7 with a warning that their browser is outdated and will not work. At the moment if you go to the app with one of those browsers, you get a blank screen.
I know there are a couple ways that I could hack something together but I would rather use the GWT way, rather than some hack. Is there a GWT hook for unsupported browsers?
Option (hack) One
Drop this into my main.html:
if(document.documentMode === 6 || document.documentMode === 7){
myUnsupportedBrowserWarningFunction();
}
Potential problem with this is that if someone is using a browser that GWT doesn't recognise and I don't recognise (mobile opera? Some other browser), they will still get a blank page.
Option (hack) Two
GWT looks for the compiled JS here:
gwt/myApp/ASDFKLSDJFLSFDJSLDFJLSJDFSDES.cache.js
When someone is using an unsupported browser the following is requested (and is not found):
gwt/myApp/undefined.cache.js
It would be possible to create undefined.cache.js and put your unsupported browser code there. This is obviously a brittle solution and will break with future GWT updates.
Option Three
A recent patch (available in GWT 2.7) allows you to provide a default
permutation (e.g. safari) if GWT can not detect the browser and with
deferred binding you can display a warning that the provided app might not
work correctly as the browser is generally unsupported by GWT.
-- J.
Source
I don't want to set a default permutation for unsupported browsers. I want the site to not work and to display a warning. So this solution doesn't really provide what I am looking for.
Similar Questions & Posts
The same question was asked for an eariler version of GWT in 2009. I hope that GWT has added some kind of hook or best practice in the last 6 years.
More info on setting a default (fallback) permutation
You should be able to use onLoadErrorFn for that: https://code.google.com/p/google-web-toolkit/issues/detail?id=8135
<script>
function gwtLoadError(errMsg) {
// GWT app couldn't load, reason in errorMsg
}
</script>
<meta name="gwt:onLoadErrorFn" content="gwtLoadError">
or possibly onPropertyErrorFn:
<script>
function gwtPropError(propName, allowedValues, actualValue) {
if (propName == 'user.agent') {
// unsupported browser
}
}
</script>
<meta name="gwt:onPropertyErrorFn" content="gwtPropError">
(I don't think user.agent.runtimeWarning would help in this case, but maybe have a look)
There is an easy way:
Conditional Comments
<!--[if lt IE 8]>
<p>You are using an unsupportet browser. Please perform an update</p>
<![endif]-->
I think Option 3 may be the best one, but there is a problem: This will start the actual application (which still may be incompatible).
If this is an issue and you want a clear warning, you can rewrite the permutation selection script (You would need to update the script with the upcoming GWT releases)
You will need to copy this source:
https://gwt.googlesource.com/gwt/+/2.7.0/user/src/com/google/gwt/useragent/rebind/UserAgentPropertyGenerator.java
You could add something like:
$wnd.Location.replace('nosupported.html');
between line 90 and 91

WinJS.UI Metro Animation Library

I'm starting to port over my web app that I've built with Sencha Touch into the Windows 8 world. I'm seeing a lot of WinJS.UI documentation, basically telling me that there are more 'native' feeling animations and UI actions already build into this framework.
My app is already structured, but I'd like to mix in WinJS.UI if I can. How do I go about doing this? I haven't found a link to download the library or anything of the sort.
For example, this link:
http://blogs.msdn.com/b/windowsappdev/archive/2012/05/01/fast-and-fluid-animations-in-your-metro-style-app.aspx
I see that they are using:
<script>
function runAnimation(){
enterPage = WinJS.UI.Animation.enterPage(input);
}
</script>
But I find no documentation on where to include the library.
Little bit lost, any help is appreciated!
These animations are included in the UI.Js from the WinJS Package -- this is the same WinJS that is included in the default Visual Studio Templates. Just create a new HTML Windows Store application, and the details will be there.
Here's your library: http://code.msdn.microsoft.com/windowsapps/Using-the-Animation-787f3720
You can deploy this on your computer and play with the animations.

allow arrowkey movement in typeahead bootstrap

I'm really thrilled, because my code works great for me (se below), however I cannot use the arrow keys to move up/down in the list of results.
In the demo this feature is not available either, however I know it's enabled in the jQuery autocomplete, so I'm wondering if any of you have made it work for typeahead as well?
<input type="text" class="span3" style="margin: 0 auto;" data-provide="typeahead" data-items="13" data-source='[<?php
$ii=0;
while($row = mysql_fetch_array($resultatOrter)){
if($i!=0){
echo ',';
}
echo '"'.$row['ortnamn'].'"';
$i++;
} ?>]'>
This issue has been reported here.
It seems that they fixed it according to another issue and then broke it again in 2.04. This may not be the case, it's just a guess. I tried it in Firefox and it's broken for me as well as you said.
I would suggest finding a copy of 2.03 and see if that works. (you can probably look for an older revision on the bootstrap repository # https://github.com/twbs/bootstrap
This mentions that they are aware and plan on fixing the issue in 2.1.0. And 2.03 should work.
Check jQuery version. It works with jQuery 1.7.1
This issue still exists in 2.2.1, so I made the changes likestoski mentioned to solve the problem. I tried to upvote/comment on his answer, but I don't have enough reputation points.
This has been fixed in bootstrap 2.2.2
After using the suggestion by #Theo I dug around the 2.1 wip and found that if you modify the keyup handler in bootstrap.js to use the code from 2.1 wip (below) you will get your arrow up and down working again.
keyup: function (e) {
switch(e.keyCode) {
case 38: // up arrow
e.preventDefault()
this.prev()
break
case 40: // down arrow
e.preventDefault()
this.next()
break

Custom Lift tags don't work

The following types of tags in Lift do not seem to work for me:
<lift:snippet type="MyClass:render" />
<lift:MyClass.render/>
<lift:MyClass/>
Using these tags results in a Class Not Found error. If I attempt to call a class using
<div class=lift:myclass.mymethod />
it can work. Or if I call it using span tags. For instance, the Hello World example in Pollak's Simply Lift works for me, successfully displaying the Howdy method with the following code:
<span class="lift:helloWorld.howdy">
Welcome to your Lift app at <span id="time">Time goes here</span>
</span>
Currently, my problem is coming from attempting to implement Exploring Lift's (aka The Lift Book) OpenID example in Chapter 13.1. I have downloaded OpenID4Java using sbt as well as the lift-openid library. That example can be found at http://exploring.liftweb.net/master/index-13.html. I have implemented the change to the Boot class, and created the OpenID class and the SimpleOpenIDVendor class. But creating an html file containing
<lift:OpenID.form>
<openId:renderForm/>
</lift:OpenID.form>
causes the following error to be displayed in the browser:
Error processing snippet: openid.form
Reason: Class Not Found
XML causing this error:
<lift:openid.form xmlns="http://www.w3.org/1999/xhtml">
<openid:renderform>
</openid:renderform></lift:openid.form>
The class OpenID was placed in a package that starts with the package code, which is being implicitly found by Lift. It is included in the Boot.scala file with the line
LiftRules.addToPackages("code")
So, I am at a loss. Any ideas?
Note that other lift tags such as lift:bind-at and lift:surround and the like work fine.
As dave posted under my original comment, the problem was the HTML5 parser. Lift is case-sensitive, and cannot find a class with varying case. Since the HTML5 parser automatically makes tags lowercase, you can't use custom lift tags anymore. Instead, you have to use something like
<div class="Lift:MyClass.render"></div>
Note that you CANNOT have
<div class="Lift:MyClass.render" />
as HTML5 apparently does not support such tags.
My OpenID4Java problem is therefore resolved by using:
<div class="lift:OpenID.renderForm">
</div>
Why I don't need to use openid.form still is uncertain. It could be possible I'm implementing it slightly off, but I confirmed that it will take me to an openid login page if I put in the openid link, so it is indeed functional.
Sources:
http://groups.google.com/forum/#!topic/liftweb/H-xe1uRLW1c
https://groups.google.com/group/liftweb/browse_thread/thread/3948df1eee6ec271/ (thanks fmpwizard)

Odd behavior with sc:link

I have the following code in a rendering, running on multiple environments:
<li class="formWWW">
<span class="formNumber"><sc:text field="Form Number" /></span>
<h4><sc:link field="URL"><sc:text field="Title" /></sc:link></h4>
<p><xsl:value-of select="sc:fld('Description', .)" /></p>
</li>
The issue I'm having involves the <sc:link> inside the h4. On my local machine and in our development environment, it properly generates an anchor tag the way it is supposed to; however, in our QA testing environment, it seems as though <sc:link> is just dumping the contents of the URL (General Link) field instead of rendering it as an anchor. It is very confusing since I know the renderings and the data inside the fields are both consistent among the environments.
My best guess is that there is a configuration setting somewhere relating to the behavior of <sc:link>, but I don't know. Thank you for your time.
I thought about just deleting this question, but it may be useful for others down the line to know that the problem was solved by resetting IIS. It seems as though whenever nothing makes sense, iisreset.