Skip to content

Instantly share code, notes, and snippets.

<!-- Start of 3rd page -->
<div data-role="page" id="bar">
<div data-role="header" data-backbtn="false">
<h1>Bar</h1>
</div><!-- /header -->
<div data-role="content">
<p>I'm first in the source order so I'm shown as the page.</p>
<p><a href="#badz">Back to badz</a></p>
<html class="splitview ui-mobile landscape min-width-320px min-width-480px min-width-768px min-width-1024px"><head>
<title>About SplitView</title>
<meta content="width=device-width, minimum-scale=1, maximum-scale=1" name="viewport">
<link href="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.css" rel="stylesheet">
<!-- Be sure to link to local files for these if using! -->
<link href="jquery.mobile.splitview.css" rel="stylesheet">
<link href="jquery.mobile.scrollview.css" rel="stylesheet">
<link href="jquery.mobile.grids.collapsible.css" rel="stylesheet">
</head>
<a href="index.html" data-role="button" data-icon="delete">Delete</a>
<a href="index.html" data-role="button" data-icon="delete">Delete</a>
@zachlendon
zachlendon / gist:1881650
Created February 22, 2012 05:20
backbone pushstate version
//document.ready() js function contains backbone.js instantiating code which:
$.mobile.pushStateEnabled = false;
new App.Routers.TodosRouter();
Backbone.history = Backbone.history || new Backbone.History({});
Backbone.history.start({pushState:true});
//Backbone Router
App.Routers.TodosRouter = Backbone.Router.extend({
@zachlendon
zachlendon / gist:1881657
Created February 22, 2012 05:21
backbone hashbang version
//document.ready() js function contains backbone.js instantiating code which:
$.mobile.pushStateEnabled = false;
new App.Routers.TodosRouter();
Backbone.history = Backbone.history || new Backbone.History({});
Backbone.history.start();
//Backbone Router
App.Routers.TodosRouter = Backbone.Router.extend({
Runnning one of:
grails -Dgeb.env=local-iphone test-app functional:
grails -Dgeb.env=local-ipad test-app functional:
grails test-app functional:
at the command line, with the following files:
GebConfig.groovy
/*
driver = { new FirefoxDriver() }
environments {
// when system property 'geb.env' is set to 'win-ie' use a remote IE driver
'win-ie' {
driver = {
new RemoteWebDriver(new URL("http://windows.ci-server.local"), DesiredCapabilities.internetExplorer())
}
}
@zachlendon
zachlendon / gist:2707275
Created May 16, 2012 04:05
GebRemotePage
class GebRemotePage extends Page {
/**
* Returns the constant part of the url to this page.
* <p>
* This implementation returns the static url property of the class.
*/
@Override
class MobileSpec extends GebReportingSpec {
@Shared
def isMobile = false
def setupSpec() {
if (getBrowser().driver instanceof RemoteWebDriver) {
RemoteWebDriver remoteWebDriver = getBrowser().driver
DesiredCapabilities capabilities = remoteWebDriver.getCapabilities()
if (["android", "iPhone", "iPad"].contains(capabilities.browserName)) {