Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesward committed May 21, 2010
0 parents commit 5a53246
Show file tree
Hide file tree
Showing 280 changed files with 10,026 additions and 0 deletions.
1,480 changes: 1,480 additions & 0 deletions resources/ccodes.xml

Large diffs are not rendered by default.

Binary file added resources/flags/ad.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/ae.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/af.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/ag.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/ai.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/al.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/am.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/an.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/ao.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/ar.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/as.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/at.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/au.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/aw.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/ax.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/az.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/ba.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/bb.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/bd.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/be.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/bf.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/bg.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/bh.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/bi.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/bj.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/flags/bm.gif
Binary file added resources/flags/bn.gif
Binary file added resources/flags/bo.gif
Binary file added resources/flags/br.gif
Binary file added resources/flags/bs.gif
Binary file added resources/flags/bt.gif
Binary file added resources/flags/bv.gif
Binary file added resources/flags/bw.gif
Binary file added resources/flags/by.gif
Binary file added resources/flags/bz.gif
Binary file added resources/flags/ca.gif
Binary file added resources/flags/catalonia.gif
Binary file added resources/flags/cc.gif
Binary file added resources/flags/cd.gif
Binary file added resources/flags/cf.gif
Binary file added resources/flags/cg.gif
Binary file added resources/flags/ch.gif
Binary file added resources/flags/ci.gif
Binary file added resources/flags/ck.gif
Binary file added resources/flags/cl.gif
Binary file added resources/flags/cm.gif
Binary file added resources/flags/cn.gif
Binary file added resources/flags/co.gif
Binary file added resources/flags/cr.gif
Binary file added resources/flags/cs.gif
Binary file added resources/flags/cu.gif
Binary file added resources/flags/cv.gif
Binary file added resources/flags/cx.gif
Binary file added resources/flags/cy.gif
Binary file added resources/flags/cz.gif
Binary file added resources/flags/de.gif
Binary file added resources/flags/dj.gif
Binary file added resources/flags/dk.gif
Binary file added resources/flags/dm.gif
Binary file added resources/flags/do.gif
Binary file added resources/flags/dz.gif
Binary file added resources/flags/ec.gif
Binary file added resources/flags/ee.gif
Binary file added resources/flags/eg.gif
Binary file added resources/flags/eh.gif
Binary file added resources/flags/england.gif
Binary file added resources/flags/er.gif
Binary file added resources/flags/es.gif
Binary file added resources/flags/et.gif
Binary file added resources/flags/europeanunion.gif
Binary file added resources/flags/fam.gif
Binary file added resources/flags/fi.gif
Binary file added resources/flags/fj.gif
Binary file added resources/flags/fk.gif
Binary file added resources/flags/fm.gif
Binary file added resources/flags/fo.gif
Binary file added resources/flags/fr.gif
Binary file added resources/flags/ga.gif
Binary file added resources/flags/gb.gif
Binary file added resources/flags/gd.gif
Binary file added resources/flags/ge.gif
Binary file added resources/flags/gf.gif
Binary file added resources/flags/gh.gif
Binary file added resources/flags/gi.gif
Binary file added resources/flags/gl.gif
Binary file added resources/flags/gm.gif
Binary file added resources/flags/gn.gif
Binary file added resources/flags/gp.gif
Binary file added resources/flags/gq.gif
Binary file added resources/flags/gr.gif
Binary file added resources/flags/gs.gif
Binary file added resources/flags/gt.gif
Binary file added resources/flags/gu.gif
Binary file added resources/flags/gw.gif
Binary file added resources/flags/gy.gif
Binary file added resources/flags/hk.gif
Binary file added resources/flags/hm.gif
Binary file added resources/flags/hn.gif
Binary file added resources/flags/hr.gif
Binary file added resources/flags/ht.gif
Binary file added resources/flags/hu.gif
Binary file added resources/flags/id.gif
Binary file added resources/flags/ie.gif
Binary file added resources/flags/il.gif
Binary file added resources/flags/in.gif
Binary file added resources/flags/io.gif
Binary file added resources/flags/iq.gif
Binary file added resources/flags/ir.gif
Binary file added resources/flags/is.gif
Binary file added resources/flags/it.gif
Binary file added resources/flags/jm.gif
Binary file added resources/flags/jo.gif
Binary file added resources/flags/jp.gif
Binary file added resources/flags/ke.gif
Binary file added resources/flags/kg.gif
Binary file added resources/flags/kh.gif
Binary file added resources/flags/ki.gif
Binary file added resources/flags/km.gif
Binary file added resources/flags/kn.gif
Binary file added resources/flags/kp.gif
Binary file added resources/flags/kr.gif
Binary file added resources/flags/kw.gif
Binary file added resources/flags/ky.gif
Binary file added resources/flags/kz.gif
Binary file added resources/flags/la.gif
Binary file added resources/flags/lb.gif
Binary file added resources/flags/lc.gif
Binary file added resources/flags/li.gif
Binary file added resources/flags/lk.gif
Binary file added resources/flags/lr.gif
Binary file added resources/flags/ls.gif
Binary file added resources/flags/lt.gif
Binary file added resources/flags/lu.gif
Binary file added resources/flags/lv.gif
Binary file added resources/flags/ly.gif
Binary file added resources/flags/ma.gif
Binary file added resources/flags/mc.gif
Binary file added resources/flags/md.gif
Binary file added resources/flags/me.gif
Binary file added resources/flags/mg.gif
Binary file added resources/flags/mh.gif
Binary file added resources/flags/mk.gif
Binary file added resources/flags/ml.gif
Binary file added resources/flags/mm.gif
Binary file added resources/flags/mn.gif
Binary file added resources/flags/mo.gif
Binary file added resources/flags/mp.gif
Binary file added resources/flags/mq.gif
Binary file added resources/flags/mr.gif
Binary file added resources/flags/ms.gif
Binary file added resources/flags/mt.gif
Binary file added resources/flags/mu.gif
Binary file added resources/flags/mv.gif
Binary file added resources/flags/mw.gif
Binary file added resources/flags/mx.gif
Binary file added resources/flags/my.gif
Binary file added resources/flags/mz.gif
Binary file added resources/flags/na.gif
Binary file added resources/flags/nc.gif
Binary file added resources/flags/ne.gif
Binary file added resources/flags/nf.gif
Binary file added resources/flags/ng.gif
Binary file added resources/flags/ni.gif
Binary file added resources/flags/nl.gif
Binary file added resources/flags/no.gif
Binary file added resources/flags/np.gif
Binary file added resources/flags/nr.gif
Binary file added resources/flags/nu.gif
Binary file added resources/flags/nz.gif
Binary file added resources/flags/om.gif
Binary file added resources/flags/pa.gif
Binary file added resources/flags/pe.gif
Binary file added resources/flags/pf.gif
Binary file added resources/flags/pg.gif
Binary file added resources/flags/ph.gif
Binary file added resources/flags/pk.gif
Binary file added resources/flags/pl.gif
Binary file added resources/flags/pm.gif
Binary file added resources/flags/pn.gif
Binary file added resources/flags/pr.gif
Binary file added resources/flags/ps.gif
Binary file added resources/flags/pt.gif
Binary file added resources/flags/pw.gif
Binary file added resources/flags/py.gif
Binary file added resources/flags/qa.gif
Binary file added resources/flags/re.gif
Binary file added resources/flags/ro.gif
Binary file added resources/flags/rs.gif
Binary file added resources/flags/ru.gif
Binary file added resources/flags/rw.gif
Binary file added resources/flags/sa.gif
Binary file added resources/flags/sb.gif
Binary file added resources/flags/sc.gif
Binary file added resources/flags/scotland.gif
Binary file added resources/flags/sd.gif
Binary file added resources/flags/se.gif
Binary file added resources/flags/sg.gif
Binary file added resources/flags/sh.gif
Binary file added resources/flags/si.gif
Binary file added resources/flags/sj.gif
Binary file added resources/flags/sk.gif
Binary file added resources/flags/sl.gif
Binary file added resources/flags/sm.gif
Binary file added resources/flags/sn.gif
Binary file added resources/flags/so.gif
Binary file added resources/flags/sr.gif
Binary file added resources/flags/st.gif
Binary file added resources/flags/sv.gif
Binary file added resources/flags/sy.gif
Binary file added resources/flags/sz.gif
Binary file added resources/flags/tc.gif
Binary file added resources/flags/td.gif
Binary file added resources/flags/tf.gif
Binary file added resources/flags/tg.gif
Binary file added resources/flags/th.gif
Binary file added resources/flags/tj.gif
Binary file added resources/flags/tk.gif
Binary file added resources/flags/tl.gif
Binary file added resources/flags/tm.gif
Binary file added resources/flags/tn.gif
Binary file added resources/flags/to.gif
Binary file added resources/flags/tr.gif
Binary file added resources/flags/tt.gif
Binary file added resources/flags/tv.gif
Binary file added resources/flags/tw.gif
Binary file added resources/flags/tz.gif
Binary file added resources/flags/ua.gif
Binary file added resources/flags/ug.gif
Binary file added resources/flags/um.gif
Binary file added resources/flags/us.gif
Binary file added resources/flags/uy.gif
Binary file added resources/flags/uz.gif
Binary file added resources/flags/va.gif
Binary file added resources/flags/vc.gif
Binary file added resources/flags/ve.gif
Binary file added resources/flags/vg.gif
Binary file added resources/flags/vi.gif
Binary file added resources/flags/vn.gif
Binary file added resources/flags/vu.gif
Binary file added resources/flags/wales.gif
Binary file added resources/flags/wf.gif
Binary file added resources/flags/ws.gif
Binary file added resources/flags/ye.gif
Binary file added resources/flags/yt.gif
Binary file added resources/flags/za.gif
Binary file added resources/flags/zm.gif
Binary file added resources/flags/zw.gif
Binary file added resources/fullscreen.png
Binary file added resources/lc15.png
58 changes: 58 additions & 0 deletions resources/lcStyle.css
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,58 @@
global, Label
{
color: #222222;
}

ApplicationControlBar {

fillColors: #F7F7F7, #246EA0;
corner-radius: 0;
drop-shadow-enabled: false;

}

ToolTip{
fontSize: 14;
color: #222222;
background-color: #F7F7F7;
background-alpha: 1;
corner-radius: 3;
}

VRule
{
strokeWidth:1;
strokeColor:#888888;
}

VDividedBox, HDividedBox, VBox
{
horizontal-gap: 1;
vertical-gap: 1;
divider-affordance: 20;
divider-thickness: 8;
}


Container
{
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
}

.tipStyleName
{
background-color: #F7F7F7;
background-alpha: 1;
color: #222222;
font-weight:bold;
font-size:12;
}
.gaugeTitle
{
font-family: Verdana;
font-size:10;
color:#222222;
}
Binary file added resources/lcico.png
Binary file added resources/logo15.png
Binary file added resources/net0.png
Binary file added resources/net1.png
96 changes: 96 additions & 0 deletions resources/tdfStyle.css
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,96 @@
global, Label
{
color: #CECECE;
}

ToolTip{
fontSize: 14;
color: #FFFFFF;
background-color: #222222;
background-alpha: 1;
corner-radius: 3;
}

VRule
{
strokeWidth:1;
strokeColor:#888888;
}

VDividedBox, HDividedBox, VBox
{
horizontal-gap: 1;
vertical-gap: 1;
divider-affordance: 20;
divider-thickness: 8;
}


Container
{
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
}

.tipStyleName
{
background-color: #555555;
background-alpha: 1;
color: #CECECE;
font-weight:bold;
font-size:12;
}
.gaugeTitle
{
font-family: Verdana;
font-size:10;
color:#CECECE;
}

DataGrid
{
headerStyleName: "dataGridHeader";
headerColors: #888888, #222222;
color:#CECECE;
rollOverColor: #333333;
selectionColor: #333333;
disabledColor: #1e1e1e;
textRollOverColor:#ffffff;
textSelectedColor:#ffffff;
selectiondDisabledColor: #1e1e1e;
verticalGridLines: false;
alternatingItemColors: #151515, #111111;
backgroundColor: #3e3e3e;
borderStyle: solid;
borderColor:#222222;
borderThickness:1;
vertical-scroll-bar-style-name: vertScroll;
}

RadioButton, ToggleButtonBar, Button
{
textRollOverColor:#FFFFFF;
textSelectedColor:#F00205;
color:#CECECE;
}

LinkButton
{
text-roll-over-color: #000000;
}
.dataGridHeader
{
color: #cccccc;
textRollOverColor:#ffffff;
textSelectedColor:#ffffff;
}

.vertScroll
{
trackColors: black, #222222;
border-color: #555555;
fill-colors: #000000, #000000;
highlight-fill: black, black;
}
Binary file added resources/tdfico.png
79 changes: 79 additions & 0 deletions src/DashboardUtils.as
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,79 @@
///////////////////////////////////////////////////////////////////////////////
// Licensed Materials - Property of IBM
// 5724-Y31
// (c) Copyright IBM Corporation 2007, 2009. All Rights Reserved.
//
// Note to U.S. Government Users Restricted Rights:
// Use, duplication or disclosure restricted by GSA ADP Schedule
// Contract with IBM Corp.
///////////////////////////////////////////////////////////////////////////////
package
{

public class DashboardUtils
{

public static function formatDate(d:Date, local:Boolean = true, showDay:Boolean = false):String
{
var day:String = String(local ? d.date - 1 : d.dateUTC - 1);
if (day != "0")
day = day + ' day(s), ';
else
day = '';
var h:String = String(local ? d.hours : d.hoursUTC);
if (h.length == 1)
h = '0' + h;
var m:String = String(local ? d.minutes : d.minutesUTC);
if (m.length == 1)
m = '0' + m;
var s:String = String(local ? d.seconds : d.secondsUTC);
if (s.length == 1)
s = '0' + s;
return (showDay ? day : "") + h + ':' + m + ':' + s;
}

[Embed(source="../resources/ccodes.xml", mimeType = "application/octet-stream")]
private static var CC:Class;

private static var indexedByAlpha2:Object;
private static var indexedByAlpha3:Object;

private static var codes:XML = XML(new CC());


private static function initIndexedByAlpha2():void
{
if (indexedByAlpha2 == null)
{
indexedByAlpha2 = {};
indexedByAlpha3 = {};
for each (var r:Object in codes.Row)
{
indexedByAlpha2[r.Data[3]] = {name: String(r.Data[0]), iso3: String(r.Data[2])};
indexedByAlpha3[r.Data[2]] = {name: String(r.Data[0]), iso3: String(r.Data[3])};
}
}
}

public static function countryName2(code:String):String
{
initIndexedByAlpha2();
return indexedByAlpha2[code].name;
}

public static function countryName3(code:String):String
{
initIndexedByAlpha2();
if (indexedByAlpha3[code])
return indexedByAlpha3[code].name;
else
return "...";
}

public static function countryIso3(code:String):String
{
initIndexedByAlpha2();
return indexedByAlpha2[code].iso3;
}
}
}
83 changes: 83 additions & 0 deletions src/HitDataItem.as
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,83 @@
///////////////////////////////////////////////////////////////////////////////
// Licensed Materials - Property of IBM
// 5724-Y31
// (c) Copyright IBM Corporation 2007, 2009. All Rights Reserved.
//
// Note to U.S. Government Users Restricted Rights:
// Use, duplication or disclosure restricted by GSA ADP Schedule
// Contract with IBM Corp.
///////////////////////////////////////////////////////////////////////////////
package
{
import flash.events.EventDispatcher;
import flash.utils.getTimer;

public class HitDataItem extends EventDispatcher
{

public function HitDataItem()
{
playerTime = getTimer();
}

public var timestamp:Date;
public var ip:String;
[Bindable]
public var city:String;
[Bindable]
public var country:String;
public var sampleId:String;
public var lon:Number;
public var lat:Number;
public var playerTime:uint;




[Bindable]
public function get flagSource():String
{
//return "http://www.translatorscafe.com/cafe/images/flags/" + country + ".gif";
return "flags/" + country.toLowerCase() + ".gif";
}

public function set flagSource(value:String):void
{
// Avoid bindable warnings
}

public function get category():String
{
return ObjectsInfo.getSampleData(sampleId, "cat");
}

public function get title():String
{
return ObjectsInfo.getSampleData(sampleId, "title");
}

[Bindable]
public function get fullSampleTitle():String
{
if (title == "" || category == "")
return "";
return category + ' > ' + title;
}

public function set fullSampleTitle(value:String):void
{
// Avoid bindable warnings
}

public function get localHour():String
{
return DashboardUtils.formatDate(timestamp);
}

public function sameLocation(h:HitDataItem):Boolean
{
return h.lat == lat && h.lon == lon && h.city == city;
}

}
}
Loading

0 comments on commit 5a53246

Please sign in to comment.