Commit 68fdc0b1 authored by Richard Torenvliet's avatar Richard Torenvliet

did some changes to includes, still have an error because the API is out of date

parent 65cf9e79
//<debug>
Ext.Loader.setPath({ Ext.Loader.setPath({
'Ext': 'sdk/src' 'Ext': 'sdk/src'
}); });
//</debug>
Ext.Loader.setConfig({enabled:true});
Ext.application({ Ext.application({
controllers: ["Main", "ChartController"], controllers: ["Main", "ChartController"],
......
...@@ -97,9 +97,7 @@ Ext.define('app.controller.ChartController', { ...@@ -97,9 +97,7 @@ Ext.define('app.controller.ChartController', {
volume : parseInt(line_clmns[2]), volume : parseInt(line_clmns[2]),
}); });
} }
console.log(data);
store.setData(data); store.setData(data);
console.log(store);
this.openChart(); this.openChart();
}, },
...@@ -112,9 +110,9 @@ Ext.define('app.controller.ChartController', { ...@@ -112,9 +110,9 @@ Ext.define('app.controller.ChartController', {
this.getFloodchart().hide(); this.getFloodchart().hide();
}, },
expandChart: function(){ //TODO:
//expandChart: function(){
//}
}
}); });
...@@ -235,11 +235,11 @@ Ext.define('app.controller.Main', { ...@@ -235,11 +235,11 @@ Ext.define('app.controller.Main', {
* steps available, crucial data for the displaying the images. * steps available, crucial data for the displaying the images.
*/ */
var url = ''; var url = '';
if (this.SimulType == 'Flood') if (this.SimulType == 'Flood') {
{
url = 'http://sangkil.science.uva.nl:8003/drfsm/'+ test_id +'/info.json'; url = 'http://sangkil.science.uva.nl:8003/drfsm/'+ test_id +'/info.json';
} else {
url = 'http://sangkil.science.uva.nl:8003/lsm/'+ test_id +'/visualization/paru/info.json';
} }
else url = 'http://sangkil.science.uva.nl:8003/lsm/'+ test_id +'/visualization/paru/info.json';
this.requestInfo(test_id, cb, url); this.requestInfo(test_id, cb, url);
/*show overlay*/ /*show overlay*/
...@@ -328,12 +328,10 @@ Ext.define('app.controller.Main', { ...@@ -328,12 +328,10 @@ Ext.define('app.controller.Main', {
var me = this; var me = this;
var summary_store = Ext.getStore('SimulationsSummary'); var summary_store = Ext.getStore('SimulationsSummary');
// var mapImage ='http://maps.googleapis.com/maps/api/staticmap?center='+ center[0] +','+ center[1] + '&zoom=13&size=300x180&maptype=roadmap&sensor=false';
summary_store.each(function(record){ summary_store.each(function(record){
var test_id = record.get('test_id'); var test_id = record.get('test_id');
var setImages = function(result){ var setImages = function(result){
// document.getElementById(test_id + "_map").src = mapImage;//me.getMapView().getFloodImage(test_id, result['timesteps'][result['timesteps'].length - 1]);
var image = me.getMapView().getFloodImage(test_id, result['timesteps'][result['timesteps'].length - 1]) || 'resources/images/noimage.png'; var image = me.getMapView().getFloodImage(test_id, result['timesteps'][result['timesteps'].length - 1]) || 'resources/images/noimage.png';
document.getElementById(test_id + "_flood").src = image; document.getElementById(test_id + "_flood").src = image;
} }
...@@ -345,7 +343,7 @@ Ext.define('app.controller.Main', { ...@@ -345,7 +343,7 @@ Ext.define('app.controller.Main', {
var url = url || 'http://sangkil.science.uva.nl:8003/drfsm/'+ test_id +'/info.json'; var url = url || 'http://sangkil.science.uva.nl:8003/drfsm/'+ test_id +'/info.json';
var request = Ext.Ajax.request({ var request = Ext.Ajax.request({
method: 'GET', method: 'GET',
url: url,//'http://sangkil.science.uva.nl:8003/drfsm/'+ test_id +'/info.json', url: url,
success: function(response, opts){ success: function(response, opts){
var result = Ext.decode(response.responseText); var result = Ext.decode(response.responseText);
......
<!DOCTYPE HTML> <pDOCTYPE HTML>
<html manifest="" lang="en-US"> <html manifest="" lang="en-US">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Floodsimulation Browser</title> <title>Floodsimulation Browser</title>
<style type="text/css"> <style type="text/css">
/** /**
...@@ -120,10 +121,12 @@ ...@@ -120,10 +121,12 @@
} }
</style> </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>
<script type="text/javascript" src="sdk/touch-charts.js"></script>
<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>
<script type="text/javascript"
src="sdk/touch-charts.js"></script>
</head> </head>
<body> <body>
<div id="appLoadingIndicator"> <div id="appLoadingIndicator">
......
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