Skip to content

Commit

Permalink
Wired up routing
Browse files Browse the repository at this point in the history
  • Loading branch information
atruskie committed Dec 31, 2014
1 parent 5fad329 commit 967b3fb
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 8 deletions.
10 changes: 9 additions & 1 deletion src/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ var app = angular.module('baw',
'bawApp.search',
'bawApp.tags',
'bawApp.users',
'bawApp.birdWalks'
'bawApp.birdWalks',
"bawApp.visualize"
])

.config(['$routeProvider', '$locationProvider', '$httpProvider', 'conf.paths', 'conf.constants', '$sceDelegateProvider', 'growlProvider', 'localStorageServiceProvider', "$urlProvider", "casingTransformers",
Expand Down Expand Up @@ -172,6 +173,13 @@ var app = angular.module('baw',
when('/demo/rendering', {templateUrl: paths.site.files.demo.rendering, controller: 'RenderingCtrl', title: 'Rendering' , fullWidth: true }).
when('/demo/BDCloud2014', {templateUrl: paths.site.files.demo.bdCloud2014, controller: 'BdCloud2014Ctrl', title: 'BDCloud2014 demo' , fullWidth: true }).

when(paths.site.ngRoutes.visualize, {
templateUrl: paths.site.files.visualize,
controller: "VisualizeController",
title: "Visualize audio distribution",
fullWidth: true
}).

// missing route page
when('/', {templateUrl: paths.site.files.home, controller: 'HomeCtrl'}).
when('/404', {templateUrl: paths.site.files.error404, controller: 'ErrorCtrl'}).
Expand Down
4 changes: 2 additions & 2 deletions src/app/demo/rendering.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ angular.module("bawApp.demo.rendering", [])
//. "C:\Program Files\ImageMagick-6.9.0-Q16\convert.exe" -crop 1435x1@ .\eabad986-56d9-47b5-bec6-47458ffd3eae_101023-0000.ACI-ENT-EVN-trimmed72.png tiles/tile_%d.png
$scope.loadTiles60 = function () {
$scope.tiles60 = [];
tileStart = performance.now()
tileStart = performance.now();
for (var i = min60; i < max60; i++) {
// i == minute of day
if (i % 60) {
Expand All @@ -152,7 +152,7 @@ angular.module("bawApp.demo.rendering", [])
if (tileCount >= 24) {
$scope.tileLoadTime = Math.round(performance.now() - tileStart);
}
}
};

}
]
Expand Down
3 changes: 0 additions & 3 deletions src/app/visualize/_visualize.scss
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
dddddddd {

}
11 changes: 11 additions & 0 deletions src/app/visualize/visualize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
angular
.module("bawApp.visualize", [])
.controller(
"VisualizeController",
[
"$scope",
function($scope) {

}
]
);
52 changes: 52 additions & 0 deletions src/app/visualize/visualize.tpl.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<div id="content">
<h1>Audio distribution visualisation</h1>
<small>Current filter: e.g. Project 341</small>

<section>
<h2>Large scale</h2>
<p>
year's long view of data with "selector"
</p>
</section>

<section>
<h2>Detail</h2>
<p>
selector's length of data
<ol>
for each project
<li>
<ol>
for each site
<li>
list meta data
</li>
<li>
list meta data
</li>
<li>
list meta data
</li>
</ol>
</li>
</ol>
</p>
</section>

<section>
<h2>Day</h2>
<p>
24 hours long,
two sections

</p>
<div>
<div>
meta data tracks
</div>
<div>
false color spectrogram
</div>
</div>
</section>
</div>
6 changes: 4 additions & 2 deletions src/baw.configuration.tpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,16 @@ angular.module('bawApp.configuration', ['url'])
d3: 'demo/d3TestPage.tpl.html',
rendering: 'demo/rendering.tpl.html',
bdCloud2014: 'demo/BDCloud2014Demo.tpl.html'
}
},
visualize: "visualize/visualize.tpl.html"
},
// routes used by angular
ngRoutes: {
recentRecordings: "/listen",
listen: "/listen/{recordingId}",
library: "/library",
libraryItem: "/library/{recordingId}/audio_events/{audioEventId}"
libraryItem: "/library/{recordingId}/audio_events/{audioEventId}",
visualize: "/visualize"
},
// general links for use in <a />'s
links: {
Expand Down

0 comments on commit 967b3fb

Please sign in to comment.