public
Created

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
************* 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);
});

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.