Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge commit 'v1.2'

  • Loading branch information...
commit 75a7801ad2fcc00f3969c511238638d59628e1a6 2 parents 237ce53 + 7af9f02
Jamie Starke authored
44 breeze-ui.coffee
View
@@ -1,3 +1,24 @@
+trackEvent = (name, values, callback = null) ->
+ mixpanel.track name, values
+ if callback
+ callback()
+
+recordOutboundLink = (link, name, values) ->
+ recordEvent name, values.source, values.url
+ trackEvent name, values, () -> window.open(link.href,"_blank")
+window.recordOutboundLink = recordOutboundLink
+
+recordEvent = (category, action, label) ->
+ _gat._getTrackerByName()._trackEvent category, action, label
+window.recordEvent = recordEvent
+
+setVariable = (index, name, value) ->
+ # This custom var is set to slot #1. Required parameter.
+ # The name acts as a kind of category for the user activity. Required parameter.
+ # This value of the custom variable. Required parameter.
+ _gaq.push ["_setCustomVar", index, name, value, 2] # Sets the scope to session-level. Optional parameter.
+window.setVariable = setVariable
+
if Modernizr.svg and Modernizr.inlinesvg
if $(window).height() < 500 or $(window).width() < 500
$(".desktop").hide()
@@ -10,24 +31,9 @@ if Modernizr.svg and Modernizr.inlinesvg
$("a[rel*='external']").click(->
link = $(this)
recordEvent('External Link',link.text(),link.attr('href'))
+ trackEvent('External Link',{"Link Text":link.text(),"url":link.attr('href')})
)
- recordOutboundLink = (link, category, action, label) ->
- recordEvent category, action, label
- setTimeout "window.open(\"" + link.href + "\",\"_blank\")", 100
- window.recordOutboundLink = recordOutboundLink
-
- recordEvent = (category, action, label) ->
- _gat._getTrackerByName()._trackEvent category, action, label
- window.recordEvent = recordEvent
-
- setVariable = (index, name, value) ->
- # This custom var is set to slot #1. Required parameter.
- # The name acts as a kind of category for the user activity. Required parameter.
- # This value of the custom variable. Required parameter.
- _gaq.push ["_setCustomVar", index, name, value, 2] # Sets the scope to session-level. Optional parameter.
- window.setVariable = setVariable
-
headerToggle = (element) ->
if $("#standard-options").is(":visible")
$("#standard-options").hide "slow"
@@ -352,8 +358,8 @@ if Modernizr.svg and Modernizr.inlinesvg
output = ""
if rental.image_url
- output = output + "<a href=\"" + rental.url + "\" target=\"_blank\" onClick=\"recordOutboundLink(this, 'Outbound Links', '" + rental.source + "', '" + rental.url + "');return false;\"><img class=\"rental-img\" src=\""+ rental.image_url + "\"></a>"
- output = output + rental.source + ", " + rental.type + " <br/><ul>" + listings.join("") + "</ul><br /><a href=\"" + rental.url + "\" target=\"_blank\" onClick=\"recordOutboundLink(this, 'Outbound Links', '" + rental.source + "', '" + rental.url + "');return false;\">View Original Listing</a>"
+ output = output + "<a href=\"" + rental.url + "\" target=\"_blank\" onClick=\"recordOutboundLink(this, 'Outbound Links', {\"source\":\"" + rental.source + "\", \"url\":\"" + rental.url + "\"})\"><img class=\"rental-img\" src=\""+ rental.image_url + "\"></a>"
+ output = output + rental.source + ", " + rental.type + " <br/><ul>" + listings.join("") + "</ul><br /><a href=\"" + rental.url + "\" target=\"_blank\" onClick=\"recordOutboundLink(this, 'Outbound Links', {'source':'" + rental.source + "', 'url':'" + rental.url + "'});return false;\">View Original Listing</a>"
output
addRentals: (rentals) ->
@@ -375,6 +381,7 @@ if Modernizr.svg and Modernizr.inlinesvg
$.cookie("viewed-listings", JSON.stringify(@viewedIndices), { expires: 30 })
@selector.selectAll("g").select("rect").attr("class", @rentalClass)
recordEvent('Rental View',rental.source,rental.url)
+ trackEvent('Rental View',{"Rental Source":rental.source,"url":rental.url})
)
$(".rental").qtip(
@@ -478,3 +485,4 @@ else
$('#unsupportedBrowser').show();
$('.regular').hide();
recordEvent('Unsupported Browser','No SVG' ,navigator.userAgent)
+ trackEvent('Unsupported Browser',{"Browser":navigator.userAgent})
65 breeze-ui.js
View
@@ -1,10 +1,41 @@
// Generated by CoffeeScript 1.3.1
(function() {
- var BusRouteLayer, BusStopLayer, DistanceLayer, Layer, RentalsLayer, busRouteLayer, busStopLayer, distanceLayer, headerToggle, loadBusRoutes, loadRentals, map, polymaps, recordEvent, recordOutboundLink, rentalLayer, setVariable, setupDistanceSlider, setupPriceSlider, setupRoomsSlider, setupSharedCheckbox, toggleAdditional,
+ var BusRouteLayer, BusStopLayer, DistanceLayer, Layer, RentalsLayer, busRouteLayer, busStopLayer, distanceLayer, headerToggle, loadBusRoutes, loadRentals, map, polymaps, recordEvent, recordOutboundLink, rentalLayer, setVariable, setupDistanceSlider, setupPriceSlider, setupRoomsSlider, setupSharedCheckbox, toggleAdditional, trackEvent,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
+ trackEvent = function(name, values, callback) {
+ if (callback == null) {
+ callback = null;
+ }
+ mixpanel.track(name, values);
+ if (callback) {
+ return callback();
+ }
+ };
+
+ recordOutboundLink = function(link, name, values) {
+ recordEvent(name, values.source, values.url);
+ return trackEvent(name, values, function() {
+ return window.open(link.href, "_blank");
+ });
+ };
+
+ window.recordOutboundLink = recordOutboundLink;
+
+ recordEvent = function(category, action, label) {
+ return _gat._getTrackerByName()._trackEvent(category, action, label);
+ };
+
+ window.recordEvent = recordEvent;
+
+ setVariable = function(index, name, value) {
+ return _gaq.push(["_setCustomVar", index, name, value, 2]);
+ };
+
+ window.setVariable = setVariable;
+
if (Modernizr.svg && Modernizr.inlinesvg) {
if ($(window).height() < 500 || $(window).width() < 500) {
$(".desktop").hide();
@@ -16,21 +47,12 @@
$("a[rel*='external']").click(function() {
var link;
link = $(this);
- return recordEvent('External Link', link.text(), link.attr('href'));
+ recordEvent('External Link', link.text(), link.attr('href'));
+ return trackEvent('External Link', {
+ "Link Text": link.text(),
+ "url": link.attr('href')
+ });
});
- recordOutboundLink = function(link, category, action, label) {
- recordEvent(category, action, label);
- return setTimeout("window.open(\"" + link.href + "\",\"_blank\")", 100);
- };
- window.recordOutboundLink = recordOutboundLink;
- recordEvent = function(category, action, label) {
- return _gat._getTrackerByName()._trackEvent(category, action, label);
- };
- window.recordEvent = recordEvent;
- setVariable = function(index, name, value) {
- return _gaq.push(["_setCustomVar", index, name, value, 2]);
- };
- window.setVariable = setVariable;
headerToggle = function(element) {
if ($("#standard-options").is(":visible")) {
$("#standard-options").hide("slow");
@@ -554,9 +576,9 @@
})();
output = "";
if (rental.image_url) {
- output = output + "<a href=\"" + rental.url + "\" target=\"_blank\" onClick=\"recordOutboundLink(this, 'Outbound Links', '" + rental.source + "', '" + rental.url + "');return false;\"><img class=\"rental-img\" src=\"" + rental.image_url + "\"></a>";
+ output = output + "<a href=\"" + rental.url + "\" target=\"_blank\" onClick=\"recordOutboundLink(this, 'Outbound Links', {\"source\":\"" + rental.source + "\", \"url\":\"" + rental.url + "\"})\"><img class=\"rental-img\" src=\"" + rental.image_url + "\"></a>";
}
- output = output + rental.source + ", " + rental.type + " <br/><ul>" + listings.join("") + "</ul><br /><a href=\"" + rental.url + "\" target=\"_blank\" onClick=\"recordOutboundLink(this, 'Outbound Links', '" + rental.source + "', '" + rental.url + "');return false;\">View Original Listing</a>";
+ output = output + rental.source + ", " + rental.type + " <br/><ul>" + listings.join("") + "</ul><br /><a href=\"" + rental.url + "\" target=\"_blank\" onClick=\"recordOutboundLink(this, 'Outbound Links', {'source':'" + rental.source + "', 'url':'" + rental.url + "'});return false;\">View Original Listing</a>";
return output;
};
@@ -574,7 +596,11 @@
expires: 30
});
_this.selector.selectAll("g").select("rect").attr("class", _this.rentalClass);
- return recordEvent('Rental View', rental.source, rental.url);
+ recordEvent('Rental View', rental.source, rental.url);
+ return trackEvent('Rental View', {
+ "Rental Source": rental.source,
+ "url": rental.url
+ });
});
return $(".rental").qtip({
content: {
@@ -684,6 +710,9 @@
$('#unsupportedBrowser').show();
$('.regular').hide();
recordEvent('Unsupported Browser', 'No SVG', navigator.userAgent);
+ trackEvent('Unsupported Browser', {
+ "Browser": navigator.userAgent
+ });
}
}).call(this);
2  breeze-ui.min.js
View
@@ -1 +1 @@
-(function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w=function(a,b){return function(){return a.apply(b,arguments)}},x={}.hasOwnProperty,y=function(a,b){function d(){this.constructor=a}for(var c in b){if(x.call(b,c))a[c]=b[c]}d.prototype=b.prototype;a.prototype=new d;a.__super__=b.prototype;return a};if(Modernizr.svg&&Modernizr.inlinesvg){if($(window).height()<500||$(window).width()<500){$(".desktop").hide()}if(Modernizr.touch){$(".github").hide()}$(".header").show();$("a[rel*='external']").click(function(){var a;a=$(this);return n("External Link",a.text(),a.attr("href"))});o=function(a,b,c,d){n(b,c,d);return setTimeout('window.open("'+a.href+'","_blank")',100)};window.recordOutboundLink=o;n=function(a,b,c){return _gat._getTrackerByName()._trackEvent(a,b,c)};window.recordEvent=n;q=function(a,b,c){return _gaq.push(["_setCustomVar",a,b,c,2])};window.setVariable=q;i=function(a){if($("#standard-options").is(":visible")){$("#standard-options").hide("slow");return $(a).button("option","icons",{primary:"ui-icon-triangle-1-s"})}else{$("#standard-options").show("slow");return $(a).button("option","icons",{primary:"ui-icon-triangle-1-n"})}};$(".header-expand").button({icons:{primary:"ui-icon ui-icon-triangle-1-n"},text:false}).click(function(){return i(this)});v=function(){if($("#additional-notices").is(":visible")){$("#additional-notices").hide("slow");return $("a#additional-expand").text("additional notices")}else{$("#additional-notices").show("slow");return $("a#additional-expand").text("less notices")}};$("a#additional-expand").click(function(){return v()});m=org.polymaps;l=m.map().container(d3.select("#map").append("svg:svg").attr("width","100%").attr("height","100%").node()).zoom(13).center({lat:48.455164,lon:-123.351059}).add(m.drag()).add(m.wheel().smooth(false)).add(m.dblclick()).add(m.arrow()).add(m.touch());l.add(m.image().url(m.url("http://tile.stamen.com/toner/{Z}/{X}/{Y}.png")));d=function(){function a(a){var b=this;this.map=a;this.transform=w(this.transform,this);this.selector=d3.select("#map svg").insert("svg:g");this.map.on("move",function(){return b.update()});this.map.on("resize",function(){return b.update()})}a.name="Layer";a.prototype.zoomLevel=function(){return this.map.zoom()};a.prevZoom=0;a.distance=0;a.prototype.pixelDistance=function(){var a,b;a=this.map.pointLocation({x:0,y:0});b=this.map.pointLocation({x:1,y:1});this.distance={lat:Math.abs(a.lat-b.lat),lon:Math.abs(a.lon-b.lon)};return this.distance};a.prototype.transform=function(a){var b;b=this.map.locationPoint(a);return"translate("+b.x+","+b.y+")"};a.prototype.cluster=function(a,b){var c,d,e,f,g,h,i,j,k;f=a.slice(0);j=this.pixelDistance();g=b*j.lat;h=b*j.lon;e=[];while(f.length>0){k=f.shift();d=[];d.push(k);i=0;while(i<f.length){if(Math.abs(f[i].lat-k.lat)<g&&Math.abs(f[i].lon-k.lon)<h){c=f.splice(i,1);d.push(c[0]);i--}i++}e.push(d)}return e};a.prototype.filter=function(a,b){var c,d,e,f;f=this.map.pointLocation({x:0-b,y:0-b});c=this.map.pointLocation({x:$(window).width()+b,y:$(window).height()+b});e=function(){var b,e,g;g=[];for(b=0,e=a.length;b<e;b++){d=a[b];if(c.lat<=d[0].lat&&d[0].lat<=f.lat&&f.lon<=d[0].lon&&d[0].lon<=c.lon){g.push(d)}}return g}();return e};return a}();c=function(a){function f(){return f.__super__.constructor.apply(this,arguments)}var b,c,d,e;y(f,a);f.name="DistanceLayer";e=[];b=[];d=[];f.prototype.update=function(){var a,b=this;if(this.zoomLevel()!==this.prevZoom||this.stops&&this.prevNumStops!==this.stops.length){this.prevNumStops=this.stops.length;this.prevZoom=this.zoomLevel();this.clusters=this.cluster(this.stops,10)}this.localClusters=this.filter(this.clusters,this.distanceInPixels());if(!this.prevLocalClusters||this.prevLocalClusters!==this.localClusters){this.prevLocalClusters=this.localClusters;a=this.selector.selectAll("g").data(this.localClusters);a.enter().append("g").append("circle").attr("class","reach").attr("r",this.distanceInPixels());a.exit().remove();this.updateCircleRadius()}return this.selector.selectAll("g").attr("transform",function(a){return b.transform(a[0])})};c=$.cookie("distance")?$.cookie("distance"):500;f.prototype.distanceInMeters=function(){if(arguments.length===0){return c}else{c=arguments[0];$.cookie("distance",c,{expires:30});q(1,"Distance",c.toString());this.updateCircleRadius();return this}};f.prototype.distanceInPixels=function(){var a;a=this.map.locationPoint({lat:0,lon:.008983}).x-this.map.locationPoint({lat:0,lon:0}).x;return this.distanceInMeters()/1e3*a};f.prototype.updateCircleRadius=function(){return this.selector.selectAll("circle.reach").attr("r",this.distanceInPixels())};f.prototype.addStops=function(a){a.sort(function(a,b){return a.lat-b.lat});this.stops=a;return this.update()};return f}(d);a=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}var b;y(c,a);c.name="BusRouteLayer";b=d3.svg.line().x(function(a){return a.x}).y(function(a){return a.y}).interpolate("linear");c.prototype.update=function(){var a=this;return this.selector.selectAll("path").attr("d",function(b){return a.line(b)})};c.prototype.addRoutes=function(a,c){var d,e=this;d={};c.forEach(function(a){return d[a.id]=a});this.line=function(a){var c=this;return b(a.stops.map(function(a){return c.map.locationPoint(d[a.point_id])}))};return this.selector.selectAll("g").data(a).enter().append("path").attr("class","route").attr("d",function(a){return e.line(a)})};return c}(d);b=function(a){function f(){return f.__super__.constructor.apply(this,arguments)}var b,c,d,e;y(f,a);f.name="BusStopLayer";b=[];e=[];d=0;c=[];f.prototype.update=function(){var a,b=this;if(this.zoomLevel()!==this.prevZoom||this.stops&&this.prevNumStops!==this.stops.length){this.prevNumStops=this.stops.length;this.prevZoom=this.zoomLevel();this.clusters=this.cluster(this.stops,10)}this.localClusters=this.filter(this.clusters,10);if(!this.prevLocalClusters||this.localClusters!==this.prevLocalClusters){a=this.selector.selectAll("g").data(this.localClusters);a.select("circle").attr("r",function(a){if(a.length>1){return 5}else{return 3.5}}).attr("text",this.representCluster);a.enter().append("g").append("circle").attr("class","stop no-tip").attr("r",function(a){if(a.length>1){return 5}else{return 3.5}}).attr("text",this.representCluster);a.exit().remove()}return this.selector.selectAll("g").attr("transform",function(a){return b.transform(a[0])})};f.prototype.representCluster=function(a){var b,c,d,e,f,g,h,i,j;d=[];for(f=0,h=a.length;f<h;f++){e=a[f];j=e.routes;for(g=0,i=j.length;g<i;g++){c=j[g];d.push(c)}}d=d.sort();d=function(){var a,e,f;f=[];for(b=a=0,e=d.length;a<e;b=++a){c=d[b];if(b=0||c!==d[b-1]){f.push(c)}}return f}();d=d.sort(function(a,b){return parseInt(a.match(/^\d+/)[0])-parseInt(b.match(/^\d+/)[0])});return"<ul>"+function(){var a,b,e;e=[];for(a=0,b=d.length;a<b;a++){c=d[a];e.push("<li>"+c+"</li>")}return e}().join("")+"</ul>"};f.prototype.addStops=function(a){a.sort(function(a,b){return a.lat-b.lat});this.stops=a;if(!Modernizr.touch){$(".stop").live("mouseover",function(a){return $(this).qtip({overwrite:false,content:{attr:"text"},show:{event:a.type,ready:true},hide:"mouseout"},a)})}return this.update()};return f}(d);e=function(a){function e(){this.rentalClass=w(this.rentalClass,this);return e.__super__.constructor.apply(this,arguments)}var b,c,d;y(e,a);e.name="RentalsLayer";e.prototype.viewedIndices=$.cookie("viewed-listings")?JSON.parse($.cookie("viewed-listings")):new Object;e.prototype.rentalClass=function(a,b){if(this.viewedIndices.hasOwnProperty(a.id)){if(a.updated_at>this.viewedIndices[a.id]){delete this.viewedIndices[a.id];return"rental"}else{return"rental rental-viewed"}}else{return"rental"}};c=$.cookie("priceLow")&&$.cookie("priceHigh")?[$.cookie("priceLow"),$.cookie("priceHigh")]:[0,3e3];e.prototype.priceRange=function(){if(arguments.length===0){return c}else{c=arguments[0];$.cookie("priceLow",c[0],{expires:30});$.cookie("priceHigh",c[1],{expires:30});q(2,"Price Low",c[0].toString());q(3,"Price High",c[1].toString());this.updateVisibility();return this}};d=$.cookie("roomsLow")&&$.cookie("roomsHigh")?[$.cookie("roomsLow"),$.cookie("roomsHigh")]:[0,5];e.prototype.roomsRange=function(){if(arguments.length===0){return d}else{d=arguments[0];$.cookie("roomsLow",d[0],{expires:30});$.cookie("roomsHigh",d[1],{expires:30});q(4,"Min Rooms",d[0].toString());q(5,"Max Rooms",d[1].toString());this.updateVisibility();return this}};b=$.cookie("showShared")?$.cookie("showShared")==="true":false;e.prototype.allowShared=function(){if(arguments.length===0){return b}else{b=arguments[0];$.cookie("showShared",b,{expires:30});this.updateVisibility();return this}};e.prototype.isNotSharedOrAllowed=function(a){var c;c=/shared|room/i.test(a.type);if(c){return b}else{return true}};e.prototype.updateVisibility=function(){var a=this;return this.selector.selectAll("rect").attr("visibility",function(b){var e,f;f=function(){var a,f,g,h,i,j;g=b.availabilities;j=[];for(a=0,f=g.length;a<f;a++){e=g[a];if(e&&c[0]<=(h=e.price)&&h<=c[1]&&d[0]<=(i=e.bedrooms)&&i<=d[1]){j.push(e)}}return j}();if(f.length>0){if(a.isNotSharedOrAllowed(b)){return"visible"}else{return"hidden"}}else{return"hidden"}})};e.prototype.update=function(){this.selector.selectAll("g").attr("transform",this.transform);return $(".rental").qtip("reposition")};e.prototype.convertDateToUTC=function(a){return new Date(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds())};e.prototype.setListingDisplay=function(a){var b,c,d;b=function(){var b,c,e,f;e=a.availabilities;f=[];for(b=0,c=e.length;b<c;b++){d=e[b];f.push("<li>"+(d.bedrooms?d.bedrooms:"unknown")+" bedroom: "+(d.price>0?"$"+d.price:"Unknown")+"</li>")}return f}();c="";if(a.image_url){c=c+'<a href="'+a.url+'" target="_blank" onClick="recordOutboundLink(this, \'Outbound Links\', \''+a.source+"', '"+a.url+'\');return false;"><img class="rental-img" src="'+a.image_url+'"></a>'}c=c+a.source+", "+a.type+" <br/><ul>"+b.join("")+'</ul><br /><a href="'+a.url+'" target="_blank" onClick="recordOutboundLink(this, \'Outbound Links\', \''+a.source+"', '"+a.url+"');return false;\">View Original Listing</a>";return c};e.prototype.addRentals=function(a){var b,c=this;b=this.selector.selectAll("g").data(a).enter().append("g").attr("transform",this.transform);b.append("rect").attr("class",this.rentalClass).attr("x",-8/2).attr("y",-8/2).attr("height",8).attr("width",8).attr("text",function(a){return c.setListingDisplay(a)});this.updateVisibility();b.on("click",function(a,b){c.viewedIndices[a.id]=new Date*1;$.cookie("viewed-listings",JSON.stringify(c.viewedIndices),{expires:30});c.selector.selectAll("g").select("rect").attr("class",c.rentalClass);return n("Rental View",a.source,a.url)});return $(".rental").qtip({content:{attr:"text",title:{text:"Rental Details",button:true}},show:"mousedown",hide:false,position:{my:"bottom center",at:"top center"},style:"ui-tooltip-tipped"})};return e}(d);h=new c(l);f=new a(l);g=new b(l);p=new e(l);r=function(){var a;a=function(a){$("#slider-distance > .value").html(a+"m");return h.distanceInMeters(a)};$("#slider-distance-element").slider({range:"min",value:h.distanceInMeters(),step:10,min:0,max:2500,slide:function(b,c){return a(c.value)}});return a($("#slider-distance-element").slider("value"))};s=function(){var a;a=function(a){$("#slider-price > .value").html("$"+a[0]+" - "+a[1]);return p.priceRange(a)};$("#slider-price-element").slider({range:true,values:p.priceRange(),step:50,min:0,max:3e3,slide:function(b,c){return a(c.values)}});return a($("#slider-price-element").slider("values"))};t=function(){var a;a=function(a){$("#slider-rooms > .value").html(a[0]+" - "+a[1]+" rooms");return p.roomsRange(a)};$("#slider-rooms-element").slider({range:true,values:p.roomsRange(),min:0,max:5,slide:function(b,c){return a(c.values)}});return a($("#slider-rooms-element").slider("values"))};u=function(){$("#show-shared").attr("checked",p.allowShared());return $("#show-shared").click(function(){return p.allowShared(this.checked)})};j=function(){return d3.json("data/uvic_transit.json",function(a){h.addStops(a.stops);f.addRoutes(a.routes,a.stops);return g.addStops(a.stops)})};k=function(){return d3.json("data/rentals.json",function(a){return p.addRentals(a)})};(function(){r();s();t();u();j();return k()})()}else{$("#unsupportedBrowser").show();$(".regular").hide();n("Unsupported Browser","No SVG",navigator.userAgent)}}).call(this)
+(function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x=function(a,b){return function(){return a.apply(b,arguments)}},y={}.hasOwnProperty,z=function(a,b){function d(){this.constructor=a}for(var c in b){if(y.call(b,c))a[c]=b[c]}d.prototype=b.prototype;a.prototype=new d;a.__super__=b.prototype;return a};w=function(a,b,c){if(c==null){c=null}mixpanel.track(a,b);if(c){return c()}};o=function(a,b,c){n(b,c.source,c.url);return w(b,c,function(){return window.open(a.href,"_blank")})};window.recordOutboundLink=o;n=function(a,b,c){return _gat._getTrackerByName()._trackEvent(a,b,c)};window.recordEvent=n;q=function(a,b,c){return _gaq.push(["_setCustomVar",a,b,c,2])};window.setVariable=q;if(Modernizr.svg&&Modernizr.inlinesvg){if($(window).height()<500||$(window).width()<500){$(".desktop").hide()}if(Modernizr.touch){$(".github").hide()}$(".header").show();$("a[rel*='external']").click(function(){var a;a=$(this);n("External Link",a.text(),a.attr("href"));return w("External Link",{"Link Text":a.text(),url:a.attr("href")})});i=function(a){if($("#standard-options").is(":visible")){$("#standard-options").hide("slow");return $(a).button("option","icons",{primary:"ui-icon-triangle-1-s"})}else{$("#standard-options").show("slow");return $(a).button("option","icons",{primary:"ui-icon-triangle-1-n"})}};$(".header-expand").button({icons:{primary:"ui-icon ui-icon-triangle-1-n"},text:false}).click(function(){return i(this)});v=function(){if($("#additional-notices").is(":visible")){$("#additional-notices").hide("slow");return $("a#additional-expand").text("additional notices")}else{$("#additional-notices").show("slow");return $("a#additional-expand").text("less notices")}};$("a#additional-expand").click(function(){return v()});m=org.polymaps;l=m.map().container(d3.select("#map").append("svg:svg").attr("width","100%").attr("height","100%").node()).zoom(13).center({lat:48.455164,lon:-123.351059}).add(m.drag()).add(m.wheel().smooth(false)).add(m.dblclick()).add(m.arrow()).add(m.touch());l.add(m.image().url(m.url("http://tile.stamen.com/toner/{Z}/{X}/{Y}.png")));d=function(){function a(a){var b=this;this.map=a;this.transform=x(this.transform,this);this.selector=d3.select("#map svg").insert("svg:g");this.map.on("move",function(){return b.update()});this.map.on("resize",function(){return b.update()})}a.name="Layer";a.prototype.zoomLevel=function(){return this.map.zoom()};a.prevZoom=0;a.distance=0;a.prototype.pixelDistance=function(){var a,b;a=this.map.pointLocation({x:0,y:0});b=this.map.pointLocation({x:1,y:1});this.distance={lat:Math.abs(a.lat-b.lat),lon:Math.abs(a.lon-b.lon)};return this.distance};a.prototype.transform=function(a){var b;b=this.map.locationPoint(a);return"translate("+b.x+","+b.y+")"};a.prototype.cluster=function(a,b){var c,d,e,f,g,h,i,j,k;f=a.slice(0);j=this.pixelDistance();g=b*j.lat;h=b*j.lon;e=[];while(f.length>0){k=f.shift();d=[];d.push(k);i=0;while(i<f.length){if(Math.abs(f[i].lat-k.lat)<g&&Math.abs(f[i].lon-k.lon)<h){c=f.splice(i,1);d.push(c[0]);i--}i++}e.push(d)}return e};a.prototype.filter=function(a,b){var c,d,e,f;f=this.map.pointLocation({x:0-b,y:0-b});c=this.map.pointLocation({x:$(window).width()+b,y:$(window).height()+b});e=function(){var b,e,g;g=[];for(b=0,e=a.length;b<e;b++){d=a[b];if(c.lat<=d[0].lat&&d[0].lat<=f.lat&&f.lon<=d[0].lon&&d[0].lon<=c.lon){g.push(d)}}return g}();return e};return a}();c=function(a){function f(){return f.__super__.constructor.apply(this,arguments)}var b,c,d,e;z(f,a);f.name="DistanceLayer";e=[];b=[];d=[];f.prototype.update=function(){var a,b=this;if(this.zoomLevel()!==this.prevZoom||this.stops&&this.prevNumStops!==this.stops.length){this.prevNumStops=this.stops.length;this.prevZoom=this.zoomLevel();this.clusters=this.cluster(this.stops,10)}this.localClusters=this.filter(this.clusters,this.distanceInPixels());if(!this.prevLocalClusters||this.prevLocalClusters!==this.localClusters){this.prevLocalClusters=this.localClusters;a=this.selector.selectAll("g").data(this.localClusters);a.enter().append("g").append("circle").attr("class","reach").attr("r",this.distanceInPixels());a.exit().remove();this.updateCircleRadius()}return this.selector.selectAll("g").attr("transform",function(a){return b.transform(a[0])})};c=$.cookie("distance")?$.cookie("distance"):500;f.prototype.distanceInMeters=function(){if(arguments.length===0){return c}else{c=arguments[0];$.cookie("distance",c,{expires:30});q(1,"Distance",c.toString());this.updateCircleRadius();return this}};f.prototype.distanceInPixels=function(){var a;a=this.map.locationPoint({lat:0,lon:.008983}).x-this.map.locationPoint({lat:0,lon:0}).x;return this.distanceInMeters()/1e3*a};f.prototype.updateCircleRadius=function(){return this.selector.selectAll("circle.reach").attr("r",this.distanceInPixels())};f.prototype.addStops=function(a){a.sort(function(a,b){return a.lat-b.lat});this.stops=a;return this.update()};return f}(d);a=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}var b;z(c,a);c.name="BusRouteLayer";b=d3.svg.line().x(function(a){return a.x}).y(function(a){return a.y}).interpolate("linear");c.prototype.update=function(){var a=this;return this.selector.selectAll("path").attr("d",function(b){return a.line(b)})};c.prototype.addRoutes=function(a,c){var d,e=this;d={};c.forEach(function(a){return d[a.id]=a});this.line=function(a){var c=this;return b(a.stops.map(function(a){return c.map.locationPoint(d[a.point_id])}))};return this.selector.selectAll("g").data(a).enter().append("path").attr("class","route").attr("d",function(a){return e.line(a)})};return c}(d);b=function(a){function f(){return f.__super__.constructor.apply(this,arguments)}var b,c,d,e;z(f,a);f.name="BusStopLayer";b=[];e=[];d=0;c=[];f.prototype.update=function(){var a,b=this;if(this.zoomLevel()!==this.prevZoom||this.stops&&this.prevNumStops!==this.stops.length){this.prevNumStops=this.stops.length;this.prevZoom=this.zoomLevel();this.clusters=this.cluster(this.stops,10)}this.localClusters=this.filter(this.clusters,10);if(!this.prevLocalClusters||this.localClusters!==this.prevLocalClusters){a=this.selector.selectAll("g").data(this.localClusters);a.select("circle").attr("r",function(a){if(a.length>1){return 5}else{return 3.5}}).attr("text",this.representCluster);a.enter().append("g").append("circle").attr("class","stop no-tip").attr("r",function(a){if(a.length>1){return 5}else{return 3.5}}).attr("text",this.representCluster);a.exit().remove()}return this.selector.selectAll("g").attr("transform",function(a){return b.transform(a[0])})};f.prototype.representCluster=function(a){var b,c,d,e,f,g,h,i,j;d=[];for(f=0,h=a.length;f<h;f++){e=a[f];j=e.routes;for(g=0,i=j.length;g<i;g++){c=j[g];d.push(c)}}d=d.sort();d=function(){var a,e,f;f=[];for(b=a=0,e=d.length;a<e;b=++a){c=d[b];if(b=0||c!==d[b-1]){f.push(c)}}return f}();d=d.sort(function(a,b){return parseInt(a.match(/^\d+/)[0])-parseInt(b.match(/^\d+/)[0])});return"<ul>"+function(){var a,b,e;e=[];for(a=0,b=d.length;a<b;a++){c=d[a];e.push("<li>"+c+"</li>")}return e}().join("")+"</ul>"};f.prototype.addStops=function(a){a.sort(function(a,b){return a.lat-b.lat});this.stops=a;if(!Modernizr.touch){$(".stop").live("mouseover",function(a){return $(this).qtip({overwrite:false,content:{attr:"text"},show:{event:a.type,ready:true},hide:"mouseout"},a)})}return this.update()};return f}(d);e=function(a){function e(){this.rentalClass=x(this.rentalClass,this);return e.__super__.constructor.apply(this,arguments)}var b,c,d;z(e,a);e.name="RentalsLayer";e.prototype.viewedIndices=$.cookie("viewed-listings")?JSON.parse($.cookie("viewed-listings")):new Object;e.prototype.rentalClass=function(a,b){if(this.viewedIndices.hasOwnProperty(a.id)){if(a.updated_at>this.viewedIndices[a.id]){delete this.viewedIndices[a.id];return"rental"}else{return"rental rental-viewed"}}else{return"rental"}};c=$.cookie("priceLow")&&$.cookie("priceHigh")?[$.cookie("priceLow"),$.cookie("priceHigh")]:[0,3e3];e.prototype.priceRange=function(){if(arguments.length===0){return c}else{c=arguments[0];$.cookie("priceLow",c[0],{expires:30});$.cookie("priceHigh",c[1],{expires:30});q(2,"Price Low",c[0].toString());q(3,"Price High",c[1].toString());this.updateVisibility();return this}};d=$.cookie("roomsLow")&&$.cookie("roomsHigh")?[$.cookie("roomsLow"),$.cookie("roomsHigh")]:[0,5];e.prototype.roomsRange=function(){if(arguments.length===0){return d}else{d=arguments[0];$.cookie("roomsLow",d[0],{expires:30});$.cookie("roomsHigh",d[1],{expires:30});q(4,"Min Rooms",d[0].toString());q(5,"Max Rooms",d[1].toString());this.updateVisibility();return this}};b=$.cookie("showShared")?$.cookie("showShared")==="true":false;e.prototype.allowShared=function(){if(arguments.length===0){return b}else{b=arguments[0];$.cookie("showShared",b,{expires:30});this.updateVisibility();return this}};e.prototype.isNotSharedOrAllowed=function(a){var c;c=/shared|room/i.test(a.type);if(c){return b}else{return true}};e.prototype.updateVisibility=function(){var a=this;return this.selector.selectAll("rect").attr("visibility",function(b){var e,f;f=function(){var a,f,g,h,i,j;g=b.availabilities;j=[];for(a=0,f=g.length;a<f;a++){e=g[a];if(e&&c[0]<=(h=e.price)&&h<=c[1]&&d[0]<=(i=e.bedrooms)&&i<=d[1]){j.push(e)}}return j}();if(f.length>0){if(a.isNotSharedOrAllowed(b)){return"visible"}else{return"hidden"}}else{return"hidden"}})};e.prototype.update=function(){this.selector.selectAll("g").attr("transform",this.transform);return $(".rental").qtip("reposition")};e.prototype.convertDateToUTC=function(a){return new Date(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds())};e.prototype.setListingDisplay=function(a){var b,c,d;b=function(){var b,c,e,f;e=a.availabilities;f=[];for(b=0,c=e.length;b<c;b++){d=e[b];f.push("<li>"+(d.bedrooms?d.bedrooms:"unknown")+" bedroom: "+(d.price>0?"$"+d.price:"Unknown")+"</li>")}return f}();c="";if(a.image_url){c=c+'<a href="'+a.url+'" target="_blank" onClick="recordOutboundLink(this, \'Outbound Links\', {"source":"'+a.source+'", "url":"'+a.url+'"})"><img class="rental-img" src="'+a.image_url+'"></a>'}c=c+a.source+", "+a.type+" <br/><ul>"+b.join("")+'</ul><br /><a href="'+a.url+"\" target=\"_blank\" onClick=\"recordOutboundLink(this, 'Outbound Links', {'source':'"+a.source+"', 'url':'"+a.url+"'});return false;\">View Original Listing</a>";return c};e.prototype.addRentals=function(a){var b,c=this;b=this.selector.selectAll("g").data(a).enter().append("g").attr("transform",this.transform);b.append("rect").attr("class",this.rentalClass).attr("x",-8/2).attr("y",-8/2).attr("height",8).attr("width",8).attr("text",function(a){return c.setListingDisplay(a)});this.updateVisibility();b.on("click",function(a,b){c.viewedIndices[a.id]=new Date*1;$.cookie("viewed-listings",JSON.stringify(c.viewedIndices),{expires:30});c.selector.selectAll("g").select("rect").attr("class",c.rentalClass);n("Rental View",a.source,a.url);return w("Rental View",{"Rental Source":a.source,url:a.url})});return $(".rental").qtip({content:{attr:"text",title:{text:"Rental Details",button:true}},show:"mousedown",hide:false,position:{my:"bottom center",at:"top center"},style:"ui-tooltip-tipped"})};return e}(d);h=new c(l);f=new a(l);g=new b(l);p=new e(l);r=function(){var a;a=function(a){$("#slider-distance > .value").html(a+"m");return h.distanceInMeters(a)};$("#slider-distance-element").slider({range:"min",value:h.distanceInMeters(),step:10,min:0,max:2500,slide:function(b,c){return a(c.value)}});return a($("#slider-distance-element").slider("value"))};s=function(){var a;a=function(a){$("#slider-price > .value").html("$"+a[0]+" - "+a[1]);return p.priceRange(a)};$("#slider-price-element").slider({range:true,values:p.priceRange(),step:50,min:0,max:3e3,slide:function(b,c){return a(c.values)}});return a($("#slider-price-element").slider("values"))};t=function(){var a;a=function(a){$("#slider-rooms > .value").html(a[0]+" - "+a[1]+" rooms");return p.roomsRange(a)};$("#slider-rooms-element").slider({range:true,values:p.roomsRange(),min:0,max:5,slide:function(b,c){return a(c.values)}});return a($("#slider-rooms-element").slider("values"))};u=function(){$("#show-shared").attr("checked",p.allowShared());return $("#show-shared").click(function(){return p.allowShared(this.checked)})};j=function(){return d3.json("data/uvic_transit.json",function(a){h.addStops(a.stops);f.addRoutes(a.routes,a.stops);return g.addStops(a.stops)})};k=function(){return d3.json("data/rentals.json",function(a){return p.addRentals(a)})};(function(){r();s();t();u();j();return k()})()}else{$("#unsupportedBrowser").show();$(".regular").hide();n("Unsupported Browser","No SVG",navigator.userAgent);w("Unsupported Browser",{Browser:navigator.userAgent})}}).call(this)
2  index.html
View
@@ -1 +1 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><title>Rentals in Victoria BC</title><meta name="description" content="Mapping rental apartments, suites and roommates in the Victoria BC Area to help members of Victoria and UVic find homes."><meta http-equiv="content-type" content="text/html;charset=UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=9"><meta name="apple-mobile-web-app-capable" content="yes" /><meta name="apple-mobile-web-app-status-bar-style" content="default" /><meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0" /><link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/themes/smoothness/jquery-ui.css"><link rel="stylesheet" type="text/css" href="/lib/bootstrap.min.css" /><link rel="stylesheet" type="text/css" href="lib/cssreset-min.css"><link rel="stylesheet" type="text/css" href="lib/jquery.qtip.min.css"><link rel="stylesheet" type="text/css" href="breeze-ui.css"><script type="text/javascript">var _gaq=_gaq || [];_gaq.push(['_setAccount', 'UA-69155-28']);_gaq.push(['_trackPageview']);(function(){var ga=document.createElement('script');ga.type='text/javascript';ga.async=true;ga.src=('https:'==document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(ga, s);})();</script><script>function BlockMove(event){event.preventDefault();}</script><body ontouchmove="BlockMove(event);"><div id="map" class="regular"></div><div class="header regular"><div class="title">Rentals in Victoria BC</div><div id="standard-options"><!--TODO fix CSS for slider --><div class="slider" id="slider-distance"><span class="label">Distance from bus stop:</span><span class="value"></span><div class="slider-element" id="slider-distance-element"></div></div><div class="slider" id="slider-price"><span class="value"></span><div class="slider-element" id="slider-price-element"></div></div><div class="slider" id="slider-rooms"><span class="value"></span><div class="slider-element" id="slider-rooms-element"></div></div><div class="shared">Shared/Roommate: <input type="checkbox" id="show-shared"/></div></div><div class="header-expand"></div></div><div id="unsupportedBrowser" class="alert alert-block alert-error" style="display:none;"><h4 class="alert-heading">Unsupported Browser</h4><p>We're sorry, but your browser can't run RentalMap</p><p>Your browser does not support <a href="http://en.wikipedia.org/wiki/Scalable_Vector_Graphics">Scalable Vector Graphics (SVG)</a>.</p><p>Please ensure that your web browser updated to the latest version. Alternatively, you can try <a href="https://www.google.com/intl/en/chrome/browser/">Chrome</a>, <a href="http://www.mozilla.org/en-US/firefox/new/">Firefox</a>, or <a href="http://www.apple.com/safari/">Safari</a>.</p></div><a class="github regular desktop" href="http://github.com/lgrammel/breeze" target="_blank" rel="external"><img style="position: absolute;top: 0;right: 0;border: 0;" src="https://a248.e.akamai.net/camo.github.com/4c7dc970b89fd04b81c8e221ba88ff99a06c6b61/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f77686974655f6666666666662e706e67" alt="Fork me on GitHub"></a><div class="regular desktop" id="copyright">&copy; 2012 <a href="http://larsgrammel.de" rel="external" target="_blank">Lars Grammel</a> & <a href="http://www.jamiestarke.com/" target="_blank" rel="external">Jamie Starke</a>, under <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank" rel="external">Apache License</a>. Map tiles by <a href="http://stamen.com" target="_blank" rel="external">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0" target="_blank" rel="external">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org" target="_blank" rel="external">OpenStreetMap</a>, under <a href="http://creativecommons.org/licenses/by-sa/3.0" target="_blank" rel="external">CC BY SA</a>.<a id="additional-expand"> additional notices</a><!--Additional notices can be added to the section below--><div id="additional-notices" style="display: none;text-decoration: none;">Route and arrival data used in this product or service is provided by permission of BC Transit. BC Transit assumes no responsibility for the accuracy or currency of the Data used in this product or service.</div><div class="share" style="float:right;margin-top: -3px;"><!--AddThis Button BEGIN --><a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&pubid=jrstarke"><img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript">var addthis_config={"data_track_addressbar":true};</script><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=jrstarke"></script><!--AddThis Button END --></div><!--AddThis Follow BEGIN --><div class="addthis_toolbox addthis_default_style" style="float:right;"><a class="addthis_button_facebook_follow" addthis:userid="117333168405073"></a><a class="addthis_button_twitter_follow" addthis:userid="rentalmap"></a><a class="addthis_button_google_follow" addthis:userid="b/115568920286788379361/115568920286788379361/posts"></a></div><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=jrstarke"></script><!--AddThis Follow END --></div><script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.5.3/modernizr.min.js"></script><script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script><script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/d3/2.8.1/d3.v2.min.js"></script><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script><script src="/lib/bootstrap-alert.min.js"></script><script type="text/javascript" src="lib/polymaps.min.js"></script><script type="text/javascript" src="lib/jquery.qtip.min.js" ></script><script src="lib/jquery.ui.touch-punch.min.js"></script><script type="text/javascript" src="lib/jquery.cookie.js"></script><script type="text/javascript" src="breeze-ui.min.js"></script><!--Uncomment the following line when actively developing and replace the above line with the reference to the coffeescript --><!--<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/coffee-script/1.3.1/coffee-script.min.js"></script>--></body></html>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><title>Rentals in Victoria BC</title><meta name="description" content="Mapping rental apartments, suites and roommates in the Victoria BC Area to help members of Victoria and UVic find homes."><meta http-equiv="content-type" content="text/html;charset=UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=9"><meta name="apple-mobile-web-app-capable" content="yes" /><meta name="apple-mobile-web-app-status-bar-style" content="default" /><meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0" /><link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/themes/smoothness/jquery-ui.css"><link rel="stylesheet" type="text/css" href="/lib/bootstrap.min.css" /><link rel="stylesheet" type="text/css" href="lib/cssreset-min.css"><link rel="stylesheet" type="text/css" href="lib/jquery.qtip.min.css"><link rel="stylesheet" type="text/css" href="breeze-ui.css"><script type="text/javascript">var _gaq=_gaq || [];_gaq.push(['_setAccount', 'UA-69155-28']);_gaq.push(['_trackPageview']);(function(){var ga=document.createElement('script');ga.type='text/javascript';ga.async=true;ga.src=('https:'==document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(ga, s);})();</script><!--start Mixpanel --><script type="text/javascript">(function(c,a){window.mixpanel=a;var b,d,h,e;b=c.createElement("script");b.type="text/javascript";b.async=!0;b.src=("https:"===c.location.protocol?"https:":"http:")+'//api.mixpanel.com/site_media/js/api/mixpanel.2.js';d=c.getElementsByTagName("script")[0];d.parentNode.insertBefore(b,d);a._i=[];a.init=function(b,c,f){function d(a,b){var c=b.split(".");2==c.length&&(a=a[c[0]],b=c[1]);a[b]=function(){a.push([b].concat(Array.prototype.slice.call(arguments,0)))}}var g=a;"undefined"!==typeof f?g=a[f]=[]:f="mixpanel";g.people=g.people||[];h="disable track track_pageview track_links track_forms register register_once unregister identify name_tag set_config people.set people.increment".split(" ");for(e=0;e<h.length;e++)d(g,h[e]);a._i.push([b,c,f])};a.__SV=1.1})(document,window.mixpanel||[]);mixpanel.init("8bfd01d8432bfd40e02b37b0bbc490bc");</script><!--end Mixpanel --></head><script>function BlockMove(event){event.preventDefault();}</script><body ontouchmove="BlockMove(event);"><div id="map" class="regular"></div><div class="header regular"><div class="title">Rentals in Victoria BC</div><div id="standard-options"><!--TODO fix CSS for slider --><div class="slider" id="slider-distance"><span class="label">Distance from bus stop:</span><span class="value"></span><div class="slider-element" id="slider-distance-element"></div></div><div class="slider" id="slider-price"><span class="value"></span><div class="slider-element" id="slider-price-element"></div></div><div class="slider" id="slider-rooms"><span class="value"></span><div class="slider-element" id="slider-rooms-element"></div></div><div class="shared">Shared/Roommate: <input type="checkbox" id="show-shared"/></div></div><div class="header-expand"></div></div><div id="unsupportedBrowser" class="alert alert-block alert-error" style="display:none;"><h4 class="alert-heading">Unsupported Browser</h4><p>We're sorry, but your browser can't run RentalMap</p><p>Your browser does not support <a href="http://en.wikipedia.org/wiki/Scalable_Vector_Graphics">Scalable Vector Graphics (SVG)</a>.</p><p>Please ensure that your web browser updated to the latest version. Alternatively, you can try <a href="https://www.google.com/intl/en/chrome/browser/">Chrome</a>, <a href="http://www.mozilla.org/en-US/firefox/new/">Firefox</a>, or <a href="http://www.apple.com/safari/">Safari</a>.</p></div><a class="github regular desktop" href="http://github.com/lgrammel/breeze" target="_blank" rel="external"><img style="position: absolute;top: 0;right: 0;border: 0;" src="https://a248.e.akamai.net/camo.github.com/4c7dc970b89fd04b81c8e221ba88ff99a06c6b61/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f77686974655f6666666666662e706e67" alt="Fork me on GitHub"></a><div class="regular desktop" id="copyright">&copy; 2012 <a href="http://larsgrammel.de" rel="external" target="_blank">Lars Grammel</a> & <a href="http://www.jamiestarke.com/" target="_blank" rel="external">Jamie Starke</a>, under <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank" rel="external">Apache License</a>. Map tiles by <a href="http://stamen.com" target="_blank" rel="external">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0" target="_blank" rel="external">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org" target="_blank" rel="external">OpenStreetMap</a>, under <a href="http://creativecommons.org/licenses/by-sa/3.0" target="_blank" rel="external">CC BY SA</a>. <a id="additional-expand">additional notices</a><!--Additional notices can be added to the section below--><div id="additional-notices" style="display: none;text-decoration: none;">Route and arrival data used in this product or service is provided by permission of BC Transit. BC Transit assumes no responsibility for the accuracy or currency of the Data used in this product or service.</div><div class="share" style="float:right;margin-top: -3px;"><!--AddThis Button BEGIN --><a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&pubid=jrstarke"><img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript">var addthis_config={"data_track_addressbar":true};</script><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=jrstarke"></script><!--AddThis Button END --></div><!--AddThis Follow BEGIN --><div class="addthis_toolbox addthis_default_style" style="float:right;"><a class="addthis_button_facebook_follow" addthis:userid="117333168405073"></a><a class="addthis_button_twitter_follow" addthis:userid="rentalmap"></a><a class="addthis_button_google_follow" addthis:userid="b/115568920286788379361/115568920286788379361/posts"></a></div><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=jrstarke"></script><!--AddThis Follow END --></div><script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.5.3/modernizr.min.js"></script><script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script><script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/d3/2.8.1/d3.v2.min.js"></script><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script><script src="/lib/bootstrap-alert.min.js"></script><script type="text/javascript" src="lib/polymaps.min.js"></script><script type="text/javascript" src="lib/jquery.qtip.min.js" ></script><script src="lib/jquery.ui.touch-punch.min.js"></script><script type="text/javascript" src="lib/jquery.cookie.js"></script><script type="text/javascript" src="breeze-ui.js"></script><!--Uncomment the following line when actively developing and replace the above line with the reference to the coffeescript --><!--<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/coffee-script/1.3.1/coffee-script.min.js"></script>--></body></html>
7 index.orig.html
View
@@ -34,6 +34,11 @@
</script>
+<!-- start Mixpanel --><script type="text/javascript">(function(c,a){window.mixpanel=a;var b,d,h,e;b=c.createElement("script");b.type="text/javascript";b.async=!0;b.src=("https:"===c.location.protocol?"https:":"http:")+'//api.mixpanel.com/site_media/js/api/mixpanel.2.js';d=c.getElementsByTagName("script")[0];d.parentNode.insertBefore(b,d);a._i=[];a.init=function(b,c,f){function d(a,b){var c=b.split(".");2==c.length&&(a=a[c[0]],b=c[1]);a[b]=function(){a.push([b].concat(Array.prototype.slice.call(arguments,0)))}}var g=a;"undefined"!==
+typeof f?g=a[f]=[]:f="mixpanel";g.people=g.people||[];h="disable track track_pageview track_links track_forms register register_once unregister identify name_tag set_config people.set people.increment".split(" ");for(e=0;e<h.length;e++)d(g,h[e]);a._i.push([b,c,f])};a.__SV=1.1})(document,window.mixpanel||[]);
+mixpanel.init("8bfd01d8432bfd40e02b37b0bbc490bc");</script><!-- end Mixpanel -->
+</head>
+
<script>function BlockMove(event) { event.preventDefault(); }</script>
<body ontouchmove="BlockMove(event);">
<div id="map" class="regular"></div>
@@ -108,7 +113,7 @@ <h4 class="alert-heading">Unsupported Browser</h4>
<script src="lib/jquery.ui.touch-punch.min.js"></script>
<script type="text/javascript" src="lib/jquery.cookie.js"></script>
-<script type="text/javascript" src="breeze-ui.min.js"></script>
+<script type="text/javascript" src="breeze-ui.js"></script>
<!-- Uncomment the following line when actively developing and replace the above line with the reference to the coffeescript -->
<!--<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/coffee-script/1.3.1/coffee-script.min.js"></script>-->
</body>
Please sign in to comment.
Something went wrong with that request. Please try again.