Commit 46aa5b8d authored by Richard's avatar Richard

First commit

parent 8fd57866
//<debug>
Ext.Loader.setPath({
'Ext': 'sdk/src'
});
//</debug>
Ext.application({
controllers: ["Main"],
models: ["SimulationModel"],
stores: ['SimulationStore'],
name: 'app',
requires: [
'Ext.MessageBox'
],
views: ['Main', "Home", "Simulation", "List", 'Map'],
icon: {
57: 'resources/icons/Icon.png',
72: 'resources/icons/Icon~ipad.png',
114: 'resources/icons/Icon@2x.png',
144: 'resources/icons/Icon~ipad@2x.png'
},
phoneStartupScreen: 'resources/loading/Homescreen.jpg',
tabletStartupScreen: 'resources/loading/Homescreen~ipad.jpg',
launch: function() {
// Destroy the #appLoadingIndicator element
Ext.fly('appLoadingIndicator').destroy();
// Initialize the main view
Ext.Viewport.add(Ext.create('app.view.Main'));
},
onUpdated: function() {
Ext.Msg.confirm(
"Application Update",
"This application has just successfully been updated to the latest version. Reload now?",
function() {
window.location.reload();
}
);
}
});
{
/**
* The application's namespace, used by Sencha Command to generate classes
*/
"name": "app",
/**
* List of all JavaScript assets in the right execution order.
* Each item is an object with the following format:
* {
* "path": "path/to/script.js" // Relative path to this app.json file
* "update": "delta" // (Optional)
* // - If not specified, this file will only be loaded once, and
* // cached inside localStorage until this value is changed.
* // - "delta" to enable over-the-air delta update for this file
* // - "full" means full update will be made when this file changes
*
* }
*/
"js": [
{
"path": "sdk/sencha-touch.js"
},
{
"path": "app.js",
"update": "delta"
}
],
/**
* List of all CSS assets in the right inclusion order.
* Each item is an object with the following format:
* {
* "path": "path/to/item.css" // Relative path to this app.json file
* "update": "delta" // (Optional)
* // - If not specified, this file will only be loaded once, and
* // cached inside localStorage until this value is changed to either one below
* // - "delta" to enable over-the-air delta update for this file
* // - "full" means full update will be made when this file changes
*
* }
*/
"css": [
{
"path": "resources/css/app.css",
"update": "delta"
}
],
/**
* Used to automatically generate cache.manifest (HTML 5 application cache manifest) file when you build
*/
"appCache": {
/**
* List of items in the CACHE MANIFEST section
*/
"cache": [
"index.html"
],
/**
* List of items in the NETWORK section
*/
"network": [
"*"
],
/**
* List of items in the FALLBACK section
*/
"fallback": []
},
/**
* Extra resources to be copied along when build
*/
"extras": [
"resources/images",
"resources/icons",
"resources/loading"
],
/**
* Directory path to store all previous production builds. Note that the content generated inside this directory
* must be kept intact for proper generation of delta between updates
*/
"archivePath": "archive",
/**
* Default paths to build this application to for each environment
*/
"buildPaths": {
"testing": "build/testing",
"production": "build/production",
"package": "build/package",
"native": "build/native"
},
/**
* Build options
*/
"buildOptions": {
"product": "touch",
"minVersion": 3,
"debug": false,
"logger": "no"
},
/**
* Uniquely generated id for this application, used as prefix for localStorage keys.
* Normally you should never change this value.
*/
"id": "b67f2b40-7fd3-11e1-bda5-b5b6c868e529"
}
Ext.define('app.controller.Main', {
extend: 'Ext.app.Controller',
config: {
refs: {
map: '#mapa',
mapView: 'SimulationMap',
},
control: {
'listpanel list': {
itemtap: 'showOverlay',
},
'#mapa': {
maprender: 'overlay'
}
}
},
overlay: function(extmap, map){
console.log("allo");
this.globalMap = map;
var pos = new google.maps.LatLng(52.3700,4.89000);
console.log(map);
new google.maps.Marker({
position: pos,
icon: 'Google_Maps_Marker.png',
map: map,
title: 'YOO'
});
},
showOverlay: function(list, index, element, record) {
var bounds = record.get('visbounds');
var center = record.get('center');
var corners = record.get('corners');
var imageBounds = new google.maps.LatLngBounds(
new google.maps.LatLng(bounds[2],bounds[3]),
new google.maps.LatLng(bounds[0],bounds[1]));
var cornerBounds = [
new google.maps.LatLng(corners[0][0],corners[0][1]),
new google.maps.LatLng(corners[1][0],corners[1][1]),
new google.maps.LatLng(corners[2][0],corners[2][1]),
new google.maps.LatLng(corners[3][0],corners[3][1])
];
new google.maps.GroundOverlay('floodmap1.jpg', imageBounds, {map: this.globalMap});
var rectangle = new google.maps.Polygon({
paths: cornerBounds,
strokeColor: "#FF0000",
strokeOpacity: 0.8,
strokeWeight: 2,
fillColor: "#FF0000",
fillOpacity: 0.35
});
rectangle.setMap(this.globalMap);
this.getMap().setMapCenter(
{latitude: center[0], longitude: center[1]}
);
this.getMap().setMapOptions({
zoom: 12,
});
},
});
\ No newline at end of file
Ext.define('app.model.SimulationModel', {
extend: 'Ext.data.Model',
config: {
fields: ['name', 'corners', 'visbounds', 'area_id', 'center'],
},
});
\ No newline at end of file
var simstore = Ext.define('app.store.SimulationStore', {
extend: 'Ext.data.Store',
requires: ['Ext.data.proxy.Rest'],
id: 'simulationList',
config: {
autoLoad: true,
model: "app.model.SimulationModel",
proxy: {
type: 'rest',
url: 'http://sangkil.science.uva.nl:8003/area/list.json',
reader: {
type: 'json',
rootProperty: 'areas'
},
}
}
});
Ext.define('app.view.Home', {
extend: "Ext.tab.Panel",
xtype: 'homepanel',
config: {
title: 'Home',
iconCls: 'home',
styleHtmlContent: true,
scrollable: true,
html: [
'<h1>Home Page</h1>',
'<p>This the home page<p>',
].join('')
}
});
\ No newline at end of file
/*
* Side panel, listing all the simulations available on
* http://sangkil.science.uva.nl:8003/area/list.json
*/
Ext.define("app.view.List",
{
extend: "Ext.Container",
xtype: 'listpanel',
requires: [
'Ext.data.Store', 'Ext.dataview.List', 'Ext.Map'
],
stores: ['SimulationStore'],
config: {
layout: "vbox",
items: [
{
dock: 'top',
xtype: "toolbar",
items: [
{
text: "Button",
ui: "Square",
margin: 10
}
]
},
{
xtype: 'list',
itemTpl: '<div>{name}</div>',
store: 'SimulationStore',
flex: 1
}
],
},
});
\ No newline at end of file
Ext.define("app.view.Main", {
extend: 'Ext.Container',
requires: ['Ext.TitleBar'],
config: {
title: "Simulation Browser",
layout: "hbox",
fullscreen: true,
layout: "hbox",
items: [
{
xtype: 'listpanel',
flex: 1
},
{
xtype: 'simulationpanel',
flex: 2
},
]
}
});
\ No newline at end of file
Ext.define('app.view.Map', {
extend: "Ext.Map",
xtype: 'SimulationMap',
id: 'mapa',
config: {
mapOptions : {
zoom : 10,
mapTypeId : google.maps.MapTypeId.ROADMAP,
navigationControl: true,
navigationControlOptions: {
style: google.maps.NavigationControlStyle.DEFAULT
}
}
},
example: function() {
console.log("example function");
}
});
\ No newline at end of file
Ext.define('app.view.Simulation', {
extend: 'Ext.Container',
xtype: 'simulationpanel',
config: {
title: "Map",
layout: "vbox",
items: [
{
dock: "top",
xtype: 'toolbar',
items : [
{
text: "button",
ui: "square"
}
],
},
{
xtype: 'SimulationMap',
flex: 2,
}
],
},
});
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>My Application</string>
<key>CFBundleExecutable</key>
<string>stbuild_template</string>
<key>CFBundleIconFiles</key>
<array>
<string>resources/icons/Icon~ipad.png</string>
</array>
<key>CFBundleIdentifier</key>
<string>com.mycompany.myAppID</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>My Application</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>iPhoneSimulator</string>
</array>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>DTPlatformName</key>
<string>iphonesimulator</string>
<key>DTSDKName</key>
<string>iphonesimulator5.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIDeviceFamily</key>
<array>
<integer>2</integer>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
</dict>
</plist>
APPL????
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{"id":"b67f2b40-7fd3-11e1-bda5-b5b6c868e529","js":[{"path":"sdk/sencha-touch.js","type":"js"},{"path":"app.js","update":"delta","type":"js"}],"css":[{"path":"resources/css/app.css","update":"delta","type":"css"}]}
\ No newline at end of file
<!DOCTYPE HTML>
<html manifest="" lang="en-US">
<head>
<meta charset="UTF-8">
<title>Floodsimulation Browser</title>
<style type="text/css">
/**
* Example of an initial loading indicator.
* It is recommended to keep this as minimal as possible to provide instant feedback
* while other resources are still being loaded for the first time
*/
html, body {
height: 100%;
}
#appLoadingIndicator {
position: absolute;
top: 50%;
left: 50%;
margin-top: -10px;
margin-left: -50px;
width: 100px;
height: 20px;
}
#appLoadingIndicator > * {
background-color: #FFFFFF;
float: left;
height: 20px;
margin-left: 11px;
width: 20px;
-webkit-animation-name: appLoadingIndicator;
-webkit-border-radius: 13px;
-webkit-animation-duration: 0.8s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-direction: linear;
opacity: 0.3
}
#appLoadingIndicator > :nth-child(1) {
-webkit-animation-delay: 0.18s;
}
#appLoadingIndicator > :nth-child(2) {
-webkit-animation-delay: 0.42s;
}
#appLoadingIndicator > :nth-child(3) {
-webkit-animation-delay: 0.54s;
}
@-webkit-keyframes appLoadingIndicator{
0% {
opacity: 0.3
}
50% {
opacity: 1;
background-color:#1985D0
}
100% {
opacity:0.3
}
}
</style>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script type="text/javascript">(function(h){function f(c,d){document.write('<meta name="'+c+'" content="'+d+'">')}if("undefined"===typeof g)var g=h.Ext={};g.blink=function(c){var d=c.js||[],c=c.css||[],b,e,a;f("viewport","width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no");f("apple-mobile-web-app-capable","yes");f("apple-touch-fullscreen","yes");for(b=0,e=c.length;b<e;b++)a=c[b],"string"!=typeof a&&(a=a.path),document.write('<link rel="stylesheet" href="'+a+'">');for(b=0,e=d.length;b<
e;b++)a=d[b],"string"!=typeof a&&(a=a.path),document.write('<script src="'+a+'"><\/script>')}})(this);
;Ext.blink({"id":"b67f2b40-7fd3-11e1-bda5-b5b6c868e529","js":[{"path":"sdk/sencha-touch.js","type":"js"},{"path":"app.js","update":"delta","type":"js"}],"css":[{"path":"resources/css/app.css","update":"delta","type":"css"}]})</script>
</head>
<body>
<div id="appLoadingIndicator">
<div></div>
<div></div>
<div></div>
</div>
</body>
</html>
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
{"id":"b67f2b40-7fd3-11e1-bda5-b5b6c868e529","js":[{"path":"sdk/sencha-touch.js","type":"js"},{"path":"app.js","update":"delta","type":"js"}],"css":[{"path":"resources/css/app.css","update":"delta","type":"css"}]}
\ No newline at end of file
<!DOCTYPE HTML>
<html manifest="" lang="en-US">
<head>
<meta charset="UTF-8">
<title>Floodsimulation Browser</title>
<style type="text/css">
/**
* Example of an initial loading indicator.
* It is recommended to keep this as minimal as possible to provide instant feedback
* while other resources are still being loaded for the first time
*/
html, body {
height: 100%;
}
#appLoadingIndicator {
position: absolute;
top: 50%;
left: 50%;
margin-top: -10px;
margin-left: -50px;
width: 100px;
height: 20px;
}
#appLoadingIndicator > * {
background-color: #FFFFFF;
float: left;
height: 20px;
margin-left: 11px;
width: 20px;
-webkit-animation-name: appLoadingIndicator;
-webkit-border-radius: 13px;
-webkit-animation-duration: 0.8s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-direction: linear;
opacity: 0.3
}
#appLoadingIndicator > :nth-child(1) {
-webkit-animation-delay: 0.18s;
}
#appLoadingIndicator > :nth-child(2) {
-webkit-animation-delay: 0.42s;
}
#appLoadingIndicator > :nth-child(3) {
-webkit-animation-delay: 0.54s;
}
@-webkit-keyframes appLoadingIndicator{
0% {
opacity: 0.3
}
50% {
opacity: 1;
background-color:#1985D0
}
100% {
opacity:0.3
}
}
</style>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script type="text/javascript">(function(h){function f(c,d){document.write('<meta name="'+c+'" content="'+d+'">')}if("undefined"===typeof g)var g=h.Ext={};g.blink=function(c){var d=c.js||[],c=c.css||[],b,e,a;f("viewport","width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no");f("apple-mobile-web-app-capable","yes");f("apple-touch-fullscreen","yes");for(b=0,e=c.length;b<e;b++)a=c[b],"string"!=typeof a&&(a=a.path),document.write('<link rel="stylesheet" href="'+a+'">');for(b=0,e=d.length;b<
e;b++)a=d[b],"string"!=typeof a&&(a=a.path),document.write('<script src="'+a+'"><\/script>')}})(this);
;Ext.blink({"id":"b67f2b40-7fd3-11e1-bda5-b5b6c868e529","js":[{"path":"sdk/sencha-touch.js","type":"js"},{"path":"app.js","update":"delta","type":"js"}],"css":[{"path":"resources/css/app.css","update":"delta","type":"css"}]})</script>
</head>
<body>
<div id="appLoadingIndicator">
<div></div>
<div></div>
<div></div>
</div>
</body>
</html>
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
<!DOCTYPE HTML>
<html manifest="" lang="en-US">
<head>
<meta charset="UTF-8">
<title>Floodsimulation Browser</title>
<style type="text/css">
/**
* Example of an initial loading indicator.
* It is recommended to keep this as minimal as possible to provide instant feedback
* while other resources are still being loaded for the first time
*/
html, body {
height: 100%;
}
#appLoadingIndicator {
position: absolute;
top: 50%;
left: 50%;
margin-top: -10px;
margin-left: -50px;
width: 100px;
height: 20px;
}
#appLoadingIndicator > * {
background-color: #FFFFFF;
float: left;
height: 20px;
margin-left: 11px;
width: 20px;
-webkit-animation-name: appLoadingIndicator;
-webkit-border-radius: 13px;
-webkit-animation-duration: 0.8s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-direction: linear;
opacity: 0.3
}
#appLoadingIndicator > :nth-child(1) {
-webkit-animation-delay: 0.18s;
}
#appLoadingIndicator > :nth-child(2) {
-webkit-animation-delay: 0.42s;
}
#appLoadingIndicator > :nth-child(3) {
-webkit-animation-delay: 0.54s;
}
@-webkit-keyframes appLoadingIndicator{
0% {
opacity: 0.3
}
50% {
opacity: 1;
background-color:#1985D0
}
100% {
opacity:0.3
}
}
</style>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script id="microloader" type="text/javascript" src="sdk/microloader/development.js"></script>
</head>
<body>
<div id="appLoadingIndicator">
<div></div>
<div></div>
<div></div>
</div>
</body>
</html>
{
/**
* @cfg {String} applicationName
* @required
* This is the name of your application, which is displayed on the device when the app is installed. On IOS, this should match
* the name of your application in the Apple Provisioning Portal.
*/
"applicationName":"My Application",
/**
* @cfg {String} applicationId
* This is the name namespace for your application. On IOS, this should match the name of your application in the Apple Provisioning Portal.
*/
"applicationId":"com.mycompany.myAppID",
/**
* @cfg {String} versionString
* @required
* This is the version of your application.
*/
"versionString":"1.0",
/**
* @cfg {String} iconName
* This is file name of your icon. This should be in the same directory of this configuration file.
*
* For iOS, please refer to their documentation about icon sizes:
* https://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html
*
* For Android, please refer to the Google Launcher icons guide:
* http://developer.android.com/guide/practices/ui_guidelines/icon_design_launcher.html
*/
"iconName":"resources/icons/Icon~ipad.png",
/**
* @cfg {String} inputPath
* @required
* This is location of your Sencha Touch 2 application, relative to this configuration file.
*/
"inputPath":"build/native",
/**
* @cfg {String} outputPath
* @required
* This is where the built application file with be saved.
*/
"outputPath":"build/",
/**
* @cfg {String} configuration
* @required
* This is configuration for your application. `Debug` should always be used unless you are submitting your app to an online
* store - in which case `Release` should be specified.
*/
"configuration":"Debug",
/**
* @cfg {String} platform
* @required
* This is the platform where you will be running your application. Available options are:
* - iOSSimulator
* - iOS
* - Android
* - AndroidEmulator
*/
"platform":"iOSSimulator",
/**
* @cfg {String} deviceType
* @required
* This is device type that your application will be running on.
*
* If you are developing for Android, this is not necessary.
*
* Available options are:
* - iPhone
* - iPad
* - Universal
*/
"deviceType":"iPad",
/**
* @cfg {String} certificatePath
* This is the location of your certificate.
* This is required when you are developing for Android or you are developing on Windows.
*/
"certificatePath":"/path/to/certificate.file",
/**
* @cfg {String} certificateAlias
* This is the name of your certificate.
*
* IF you do not specify this on OSX, we will try and automatically find the certificate for you using the applicationId.
*
* This can be just a simple matcher. For example, if your certificate name is "iPhone Developer: Robert Dougan (ABCDEFGHIJ)", you
* can just put "iPhone Developer".
*
* When using a certificatePath on Windows, you do not need to specify this.
*/
"certificateAlias":"",
/**
* @cfg {String} sdkPath
* This is the path to the Android SDK, if you are developing an Android application.
*/
"sdkPath":"/path/to/android-sdk",
/**
* @cfg androidAPILevel
* This is android API level, the version of Android SDK to use, you can read more about it here: http://developer.android.com/guide/appendix/api-levels.html.
* Be sure to install corresponding platform API in android SDK manager (android_sdk/tools/android)
*/
"androidAPILevel":"15",
/**
* @cfg orientations
* @required
* This is orientations that this application can run.
*/
"orientations": [
"portrait",
"landscapeLeft",
"landscapeRight",
"portraitUpsideDown"
]
}
{"applicationName":"My Application","applicationId":"com.mycompany.myAppID","versionString":"1.0","iconName":"resources/icons/Icon~ipad.png","inputPath":"/Users/Richard/Documents/UvA/floodsimulation/senchapp/www/build/package","outputPath":"/Users/Richard/Documents/UvA/floodsimulation/senchapp/www/build/native","configuration":"Debug","platform":"iOSSimulator","deviceType":"iPad","certificatePath":"/path/to/certificate.file","certificateAlias":"","sdkPath":"/path/to/android-sdk","androidAPILevel":"15","orientations":["portrait","landscapeLeft","landscapeRight","portraitUpsideDown"]}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment