Created
November 22, 2012 03:31
-
-
Save alduro/4129319 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
************* index.html | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<meta name="format-detection" content="telephone=no" /> | |
<!-- <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /> --> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" /> | |
<link style="text/css" rel="stylesheet" href="css/jquery.mobile-1.2.0.min.css" /> | |
<link style="text/css" rel="stylesheet" href="css/style.css" /> | |
<script type="text/javascript" charset="utf-8" src="js/phonegap-1.0.0.js"></script> | |
<script data-main="js/mobile" src="js/libs/require/require.js"></script> | |
<title>Room Checking</title> | |
</head> | |
<body> | |
<div data-role="page" class="login-page" id="login"> | |
<div data-role="content" id="loginView"></div> | |
</div> | |
</body> | |
</html> | |
********** js/mobile.js | |
require.config({ | |
baseUrl:'/js', | |
paths: { | |
jquery: 'libs/jquery/jquery-1.8.2.min', | |
jquerymobile: 'libs/jquery/jquery.mobile-1.2.0.min', | |
jqueryezmark: 'libs/jquery/jquery.ezmark.min', | |
underscore: 'libs/underscore/amd-js/underscore-min', | |
backbone: 'libs/backbone/amd-js/backbone-min', | |
uikit: 'libs/uikit/ui', | |
serializeObject: 'serializeObject', | |
jqueryui: 'libs/jquery/jquery-ui-1.8.22.custom.min', | |
hbs: 'libs/require/hbs', | |
handlebars: 'libs/require/Handlebars', | |
i18nprecompile: 'libs/hbs/i18nprecompile', | |
json2: 'libs/hbs/json2', | |
text: 'libs/require/text', | |
domReady: 'libs/require/domReady', | |
order: 'libs/require/order', | |
cs: 'libs/require/cs' | |
}, | |
hbs : { | |
templateExtension : 'html', | |
disableI18n : false | |
} | |
}); | |
require(['jquery', 'jquerymobile', 'cs!app'], function($, jquerymobile, App) { | |
// console.log('Starting application'); | |
var device_ready = false; | |
var jqm_mobile_init = false; | |
var initApp = function() { | |
if ((device_ready && jqm_mobile_init) || (jqm_mobile_init && !mobile_system)) { | |
App.initialize(); | |
} | |
}; | |
var onDeviceReady = function() { | |
device_ready = true; | |
initApp(); | |
}; | |
var onMobileInit = function() { | |
$.mobile.linkBindingEnabled = false; | |
$.mobile.hashListeningEnabled = false; | |
$.mobile.ajaxEnabled = false; | |
$.mobile.pushStateEnabled = false; | |
$.mobile.allowCrossDomainPages = true; | |
$.support.cors = true; | |
jqm_mobile_init = true; | |
initApp(); | |
}; | |
$(document).bind('mobileinit', onMobileInit); | |
document.addEventListener("deviceready", onDeviceReady, false); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment