-
Notifications
You must be signed in to change notification settings - Fork 1
/
dashboard.html
executable file
·164 lines (155 loc) · 9.34 KB
/
dashboard.html
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<!doctype html>
<!--[if lt IE 7 ]> <html class="no-js ie6 ieHTML" lang="en"> <![endif]-->
<!--[if IE 7 ]> <html class="no-js ie7 ieHTML" lang="en"> <![endif]-->
<!--[if IE 8 ]> <html class="no-js ie8 ieHTML" lang="en"> <![endif]-->
<!--[if IE 9 ]> <html class="no-js ie9 ieHTML" lang="en"> <![endif]-->
<!--[if !(IE)]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="assets/js/modernizr-1.7.min.js"></script>
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script>
//webfont flicker issue resolution from Paul Irish
(function(){
// if firefox 3.5+, hide content till load (or 1.5 seconds) to prevent FOUT
var d = document, e = d.documentElement, s = d.createElement('style');
if (e.style.MozTransform === ''){ // gecko 1.9.1 inference
s.textContent = 'body{visibility:hidden}';
var r = document.getElementsByTagName('script')[0];
r.parentNode.insertBefore(s, r);
function f(){ s.parentNode && s.parentNode.removeChild(s); }
addEventListener('load',f,false);
setTimeout(f,1500);
}
})();
</script>
<style>#dashboard_map { height: 700px;}</style>
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="http://geoiq.akgroup/javascripts/f1.api.js"></script>
<script type="text/javascript">
function highlightFeature(layer, feature) {
dashboard_map.clearHighlights(layer);
dashboard_map.addHighlight(layer, "$["+sidebar_styles[layer].name+"] == '" + feature + "'")
return false;
}
var current_layer = 3;
sidebar_styles = [{name: "sstatus", value: "description"},{name: "sctrycode", value: "ipopulation"}, {name: "sname", value: "scomment"}, {name: "sname", value: "scomment"},{},{}]
function loadedMap() {
$('.tab').click(function(){
selectLayer($(this).attr("id"));
return false;
})
dashboard_map.showControl("Layers", false)
dashboard_map.showControl("Zoom",true);
dashboard_map.showControl("Legend",true);
dashboard_map.setStyle( {legend: { buttonBgColor:0x444444, buttonPlacement:"horizontal", buttonFontColor:0xFFFFFF, buttonBgAlpha:0.5,offset:{x:235,y:0}}});
dashboard_map.setStyle( { zoom: {bgColor: 0x444444, borderColor: 0x000000, iconColor: 0xFFFFFF, authHeight: false, height:100, height: 200, cornerRadius: 5, alpha: 1, offset: {x:15,y:50}}})
$(".liLeftSub").mouseenter(function() {
$(".dropMenu", this).show()
$(".dropMenu", this).addClass("openMenu")
})
$(".dropMenu").mouseleave(function() {
$(this).hide()
$(this).removeClass("openMenu")
})
// selectLayer(current_layer); // load the default layer
}
function selectLayer(selected_layer) {
$("#legend_" + current_layer).hide()
dashboard_map.showControl("Legend",true,"closed")
$("#" + current_layer).removeClass("selected")
$("#" + current_layer + "_data").hide()
dashboard_map.showLayer(current_layer, false);
current_layer = selected_layer;
$(this).addClass("selected")
dashboard_map.showLayer(current_layer, true);
$("#" + current_layer + "_data").show()
dashboard_map.showControl("Legend",true,"open")
$("#legend_" + current_layer).show()
html = ""
$.each(dashboard_map.getFeatures(current_layer, 100), function(i,feature) {
html += '<li class="tweetLi clearfix" onclick="highlightFeature('+current_layer+',\''+feature.attributes[sidebar_styles[current_layer].name]+'\'); return false" ><a href="#" class="tweetIcon"><img src="assets/img/tw_icon_x.png" alt="" width="22" height="22" /></a><span class="tweetTitle">' +feature.attributes[sidebar_styles[current_layer].name]+ '</span><br /><span class="tweetText">'+feature.attributes[sidebar_styles[current_layer].value]+'</span></li>';
})
$("#dropTweets").html(html)
return false;
}
dashboard_map = new F1.Maker.Map({map_id: "49", dom_id: "dashboard_map", uiZoom: false, uiLegend: false, uiLayers: false, onload: function() {loadedMap() }});
</script>
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
<header id="hdrSite" class="hdrSite clearfix">
<a href="/" rel="nofollow" class="hdrLogo">geoIQ</a>
<a href="#" class="hdrPep">Dashboard</a>
<nav class="hdrNav clearfix" role="navigation">
<!-- <a href="#" class="navData">upload data</a>
<a href="#" class="navMap">make a map</a>
<a href="#" class="navUser">ianbrinksman</a> -->
</nav>
<nav class="subNav clearfix clear">
<ul class="leftSub txtBold" id="leftSub">
<li class="liLeftSub">
<a href="#" id="3" class="tab subNavTop subKeyword">Approvals</a>
<ul class="dropMenu" id="dropKeyword" style="display:none">
<li class="liDropMenu"><label for="keyword1">Not Submitted</label><input type="checkbox" name="keyword" value="keyword1" checked="checked" /></li>
<li class="liDropMenu"><label for="keyword2">No</label><input type="checkbox" name="keyword" value="keyword2" checked="checked" /></li>
<li class="liDropMenu"><label for="keyword3">Pending</label><input type="checkbox" name="keyword" value="keyword3" checked="checked" /></li>
<li class="liDropMenu"><label for="keyword4">Yes</label><input type="checkbox" name="keyword" value="keyword4" checked="checked" /></li>
</ul>
</li>
<li class="liLeftSub">
<a href="#" id="2" class="tab subNavTop subMetric">Rejections</a>
<ul class="dropMenu" id="dropKeyword" style="display:none">
<li class="liDropMenu"><label for="keyword1">Add Research</label><input type="checkbox" name="keyword" value="keyword1" checked="checked" /></li>
<li class="liDropMenu"><label for="keyword2">Proxy Protocols Banned</label><input type="checkbox" name="keyword" value="keyword2" checked="checked" /></li>
<li class="liDropMenu"><label for="keyword3">Facility Rejected</label><input type="checkbox" name="keyword" value="keyword3" checked="checked" /></li>
<li class="liDropMenu"><label for="keyword4">Country Rejected</label><input type="checkbox" name="keyword" value="keyword4" checked="checked" /></li>
</ul>
</li>
<li class="liLeftSub">
<a href="#" id="1" class="tab subNavTop subLocType">Demographics</a>
<ul class="dropMenu" id="dropLocType" style="display:none">
<li class="liDropMenu"><label for="keyword1">Sunni</label><input type="checkbox" name="keyword" value="keyword1" checked="checked" /></li>
<li class="liDropMenu"><label for="keyword2">Shiite</label><input type="checkbox" name="keyword" value="keyword2" checked="checked" /></li>
</ul>
</li>
<li class="liLeftSub">
<a href="#" id="0" class="tab subNavTop subLocType">Phases</a>
<ul class="dropMenu" id="dropKeyword" style="display:none">
<li class="liDropMenu"><label for="keyword1">Init</label><input type="checkbox" name="keyword" value="keyword1" checked="checked" /></li>
<li class="liDropMenu"><label for="keyword2">Prod</label><input type="checkbox" name="keyword" value="keyword2" checked="checked" /></li>
<li class="liDropMenu"><label for="keyword3">Ops</label><input type="checkbox" name="keyword" value="keyword3" checked="checked" /></li>
<li class="liDropMenu"><label for="keyword4">Up</label><input type="checkbox" name="keyword" value="keyword4" checked="checked" /></li>
<li class="liDropMenu"><label for="keyword5">Down</label><input type="checkbox" name="keyword" value="keyword4" checked="checked" /></li>
</ul>
</li>
</ul>
<ul class="rightSub txtBold" id="rightSub">
<li class="liRightSub">
<a href="#" class="subNavTop subTweets openTweetsHdr">Features<span class="tweetCarat"></span></a>
<ul class="tweetList openTweets" id="dropTweets">
</ul>
</li>
</ul>
</nav>
</header> <!-- eo #hdrSite -->
<div class="mapBG" style="margin-right: 230px">
<div class="geocommons_map" id="dashboard_map" style="margin-right: 230px"></div><br/>
</div> <!-- eo #mapGB -->
<div id="legend" style="margin-top: 700px; clear:both">
<img id="legend_3" style="display:none" src="legend/layer_approval.jpg" />
<img id="legend_2" style="display:none" src="legend/layer_rejection.jpg" />
<img id="legend_1" style="display:none" src="legend/layer_demographics.jpg" />
<img id="legend_0" style="display:none" src="legend/layer_status.jpg" />
</div>
<footer id="ftrSite" class="ftrSite">
</footer> <!-- eo #ftrSite -->
</body>
</html>