start on search results styling, pulled in external js libraries and css

This commit is contained in:
Shai Mor 2014-10-01 09:54:56 -04:00
parent ca8794e61b
commit 57fb6a15c4
17 changed files with 609 additions and 78 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 715 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 B

View file

@ -22,4 +22,7 @@
//= require ./src/Metamaps.Views //= require ./src/Metamaps.Views
//= require ./src/JIT //= require ./src/JIT
//= require ./src/Metamaps //= require ./src/Metamaps
//= require ./src/Metamaps.JIT //= require ./src/Metamaps.JIT
//= require_directory ./shims
//= require_directory ./require
//= require_directory ./famous

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,32 @@
var BAROMETER;
if(BAROMETER == undefined) {
BAROMETER = {};
}
BAROMETER.load = function(barometer_id) {
this.barometer_id = barometer_id;
this.empty_url = "http://getbarometer.s3.amazonaws.com/assets/barometer/images/transparent.gif";
this.feedback_url = 'http://getbarometer.com/system/feedback_form/' + this.barometer_id;
this.tab_html = '<a id="barometer_tab" onclick="BAROMETER.show();" href="#">Feedback</a>';
this.overlay_html = '<div id="barometer_overlay" style="display: none;">' +
'<div id="barometer_main" style="top: 130.95px;">' +
'<a id="barometer_close" onclick="document.getElementById(\'barometer_overlay\').style.display = \'none\';return false" href="#"/></a>' +
'<div id="overlay_header">' +
'<a href="http://getbarometer.com">Powered by Barometer</a>' +
'</div>' +
'<iframe src="' + this.empty_url + '" id="barometer_iframe" allowTransparency="true" scrolling="no" frameborder="0" class="loading"></iframe>' +
'</div>' +
'<div id="barometer_screen" onclick="document.getElementById(\'barometer_overlay\').style.display = \'none\';return false" style="height: 100%;"/>' +
'</div>' +
'</div>';
document.write(this.tab_html);
document.write(this.overlay_html);
};
BAROMETER.show = function() {
document.getElementById('barometer_iframe').setAttribute("src", this.feedback_url);
document.getElementById('barometer_overlay').style.display = "block";
return false;
};

View file

@ -0,0 +1,36 @@
/*
RequireJS 2.1.11 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
Available via the MIT or new BSD license.
see: http://github.com/jrburke/requirejs for details
*/
var requirejs,require,define;
(function(ca){function G(b){return"[object Function]"===M.call(b)}function H(b){return"[object Array]"===M.call(b)}function v(b,c){if(b){var d;for(d=0;d<b.length&&(!b[d]||!c(b[d],d,b));d+=1);}}function U(b,c){if(b){var d;for(d=b.length-1;-1<d&&(!b[d]||!c(b[d],d,b));d-=1);}}function s(b,c){return ga.call(b,c)}function j(b,c){return s(b,c)&&b[c]}function B(b,c){for(var d in b)if(s(b,d)&&c(b[d],d))break}function V(b,c,d,g){c&&B(c,function(c,h){if(d||!s(b,h))g&&"object"===typeof c&&c&&!H(c)&&!G(c)&&!(c instanceof
RegExp)?(b[h]||(b[h]={}),V(b[h],c,d,g)):b[h]=c});return b}function t(b,c){return function(){return c.apply(b,arguments)}}function da(b){throw b;}function ea(b){if(!b)return b;var c=ca;v(b.split("."),function(b){c=c[b]});return c}function C(b,c,d,g){c=Error(c+"\nhttp://requirejs.org/docs/errors.html#"+b);c.requireType=b;c.requireModules=g;d&&(c.originalError=d);return c}function ha(b){function c(a,e,b){var f,n,c,d,g,h,i,I=e&&e.split("/");n=I;var m=l.map,k=m&&m["*"];if(a&&"."===a.charAt(0))if(e){n=
I.slice(0,I.length-1);a=a.split("/");e=a.length-1;l.nodeIdCompat&&R.test(a[e])&&(a[e]=a[e].replace(R,""));n=a=n.concat(a);d=n.length;for(e=0;e<d;e++)if(c=n[e],"."===c)n.splice(e,1),e-=1;else if(".."===c)if(1===e&&(".."===n[2]||".."===n[0]))break;else 0<e&&(n.splice(e-1,2),e-=2);a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if(b&&m&&(I||k)){n=a.split("/");e=n.length;a:for(;0<e;e-=1){d=n.slice(0,e).join("/");if(I)for(c=I.length;0<c;c-=1)if(b=j(m,I.slice(0,c).join("/")))if(b=j(b,d)){f=b;
g=e;break a}!h&&(k&&j(k,d))&&(h=j(k,d),i=e)}!f&&h&&(f=h,g=i);f&&(n.splice(0,g,f),a=n.join("/"))}return(f=j(l.pkgs,a))?f:a}function d(a){z&&v(document.getElementsByTagName("script"),function(e){if(e.getAttribute("data-requiremodule")===a&&e.getAttribute("data-requirecontext")===i.contextName)return e.parentNode.removeChild(e),!0})}function g(a){var e=j(l.paths,a);if(e&&H(e)&&1<e.length)return e.shift(),i.require.undef(a),i.require([a]),!0}function u(a){var e,b=a?a.indexOf("!"):-1;-1<b&&(e=a.substring(0,
b),a=a.substring(b+1,a.length));return[e,a]}function m(a,e,b,f){var n,d,g=null,h=e?e.name:null,l=a,m=!0,k="";a||(m=!1,a="_@r"+(M+=1));a=u(a);g=a[0];a=a[1];g&&(g=c(g,h,f),d=j(p,g));a&&(g?k=d&&d.normalize?d.normalize(a,function(a){return c(a,h,f)}):c(a,h,f):(k=c(a,h,f),a=u(k),g=a[0],k=a[1],b=!0,n=i.nameToUrl(k)));b=g&&!d&&!b?"_unnormalized"+(Q+=1):"";return{prefix:g,name:k,parentMap:e,unnormalized:!!b,url:n,originalName:l,isDefine:m,id:(g?g+"!"+k:k)+b}}function q(a){var e=a.id,b=j(k,e);b||(b=k[e]=new i.Module(a));
return b}function r(a,e,b){var f=a.id,n=j(k,f);if(s(p,f)&&(!n||n.defineEmitComplete))"defined"===e&&b(p[f]);else if(n=q(a),n.error&&"error"===e)b(n.error);else n.on(e,b)}function w(a,e){var b=a.requireModules,f=!1;if(e)e(a);else if(v(b,function(e){if(e=j(k,e))e.error=a,e.events.error&&(f=!0,e.emit("error",a))}),!f)h.onError(a)}function x(){S.length&&(ia.apply(A,[A.length,0].concat(S)),S=[])}function y(a){delete k[a];delete W[a]}function F(a,e,b){var f=a.map.id;a.error?a.emit("error",a.error):(e[f]=
!0,v(a.depMaps,function(f,c){var d=f.id,g=j(k,d);g&&(!a.depMatched[c]&&!b[d])&&(j(e,d)?(a.defineDep(c,p[d]),a.check()):F(g,e,b))}),b[f]=!0)}function D(){var a,e,b=(a=1E3*l.waitSeconds)&&i.startTime+a<(new Date).getTime(),f=[],c=[],h=!1,k=!0;if(!X){X=!0;B(W,function(a){var i=a.map,m=i.id;if(a.enabled&&(i.isDefine||c.push(a),!a.error))if(!a.inited&&b)g(m)?h=e=!0:(f.push(m),d(m));else if(!a.inited&&(a.fetched&&i.isDefine)&&(h=!0,!i.prefix))return k=!1});if(b&&f.length)return a=C("timeout","Load timeout for modules: "+
f,null,f),a.contextName=i.contextName,w(a);k&&v(c,function(a){F(a,{},{})});if((!b||e)&&h)if((z||fa)&&!Y)Y=setTimeout(function(){Y=0;D()},50);X=!1}}function E(a){s(p,a[0])||q(m(a[0],null,!0)).init(a[1],a[2])}function K(a){var a=a.currentTarget||a.srcElement,e=i.onScriptLoad;a.detachEvent&&!Z?a.detachEvent("onreadystatechange",e):a.removeEventListener("load",e,!1);e=i.onScriptError;(!a.detachEvent||Z)&&a.removeEventListener("error",e,!1);return{node:a,id:a&&a.getAttribute("data-requiremodule")}}function L(){var a;
for(x();A.length;){a=A.shift();if(null===a[0])return w(C("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));E(a)}}var X,$,i,N,Y,l={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},k={},W={},aa={},A=[],p={},T={},ba={},M=1,Q=1;N={require:function(a){return a.require?a.require:a.require=i.makeRequire(a.map)},exports:function(a){a.usingExports=!0;if(a.map.isDefine)return a.exports?p[a.map.id]=a.exports:a.exports=p[a.map.id]={}},module:function(a){return a.module?
a.module:a.module={id:a.map.id,uri:a.map.url,config:function(){return j(l.config,a.map.id)||{}},exports:a.exports||(a.exports={})}}};$=function(a){this.events=j(aa,a.id)||{};this.map=a;this.shim=j(l.shim,a.id);this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};$.prototype={init:function(a,e,b,f){f=f||{};if(!this.inited){this.factory=e;if(b)this.on("error",b);else this.events.error&&(b=t(this,function(a){this.emit("error",a)}));this.depMaps=a&&a.slice(0);this.errback=
b;this.inited=!0;this.ignore=f.ignore;f.enabled||this.enabled?this.enable():this.check()}},defineDep:function(a,e){this.depMatched[a]||(this.depMatched[a]=!0,this.depCount-=1,this.depExports[a]=e)},fetch:function(){if(!this.fetched){this.fetched=!0;i.startTime=(new Date).getTime();var a=this.map;if(this.shim)i.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],t(this,function(){return a.prefix?this.callPlugin():this.load()}));else return a.prefix?this.callPlugin():this.load()}},load:function(){var a=
this.map.url;T[a]||(T[a]=!0,i.load(this.map.id,a))},check:function(){if(this.enabled&&!this.enabling){var a,e,b=this.map.id;e=this.depExports;var f=this.exports,c=this.factory;if(this.inited)if(this.error)this.emit("error",this.error);else{if(!this.defining){this.defining=!0;if(1>this.depCount&&!this.defined){if(G(c)){if(this.events.error&&this.map.isDefine||h.onError!==da)try{f=i.execCb(b,c,e,f)}catch(d){a=d}else f=i.execCb(b,c,e,f);this.map.isDefine&&void 0===f&&((e=this.module)?f=e.exports:this.usingExports&&
(f=this.exports));if(a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",w(this.error=a)}else f=c;this.exports=f;if(this.map.isDefine&&!this.ignore&&(p[b]=f,h.onResourceLoad))h.onResourceLoad(i,this.map,this.depMaps);y(b);this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a=
this.map,b=a.id,d=m(a.prefix);this.depMaps.push(d);r(d,"defined",t(this,function(f){var d,g;g=j(ba,this.map.id);var J=this.map.name,u=this.map.parentMap?this.map.parentMap.name:null,p=i.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(f.normalize&&(J=f.normalize(J,function(a){return c(a,u,!0)})||""),f=m(a.prefix+"!"+J,this.map.parentMap),r(f,"defined",t(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),g=j(k,f.id)){this.depMaps.push(f);
if(this.events.error)g.on("error",t(this,function(a){this.emit("error",a)}));g.enable()}}else g?(this.map.url=i.nameToUrl(g),this.load()):(d=t(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),d.error=t(this,function(a){this.inited=!0;this.error=a;a.requireModules=[b];B(k,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&y(a.map.id)});w(a)}),d.fromText=t(this,function(f,c){var g=a.name,J=m(g),k=O;c&&(f=c);k&&(O=!1);q(J);s(l.config,b)&&(l.config[g]=l.config[b]);try{h.exec(f)}catch(j){return w(C("fromtexteval",
"fromText eval for "+b+" failed: "+j,j,[b]))}k&&(O=!0);this.depMaps.push(J);i.completeLoad(g);p([g],d)}),f.load(a.name,p,d,l))}));i.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){W[this.map.id]=this;this.enabling=this.enabled=!0;v(this.depMaps,t(this,function(a,b){var c,f;if("string"===typeof a){a=m(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=j(N,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;r(a,"defined",t(this,function(a){this.defineDep(b,
a);this.check()}));this.errback&&r(a,"error",t(this,this.errback))}c=a.id;f=k[c];!s(N,c)&&(f&&!f.enabled)&&i.enable(a,this)}));B(this.pluginMaps,t(this,function(a){var b=j(k,a.id);b&&!b.enabled&&i.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){v(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};i={config:l,contextName:b,registry:k,defined:p,urlFetched:T,defQueue:A,Module:$,makeModuleMap:m,
nextTick:h.nextTick,onError:w,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=l.shim,c={paths:!0,bundles:!0,config:!0,map:!0};B(a,function(a,b){c[b]?(l[b]||(l[b]={}),V(l[b],a,!0,!0)):l[b]=a});a.bundles&&B(a.bundles,function(a,b){v(a,function(a){a!==b&&(ba[a]=b)})});a.shim&&(B(a.shim,function(a,c){H(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=i.makeShimExports(a);b[c]=a}),l.shim=b);a.packages&&v(a.packages,function(a){var b,
a="string"===typeof a?{name:a}:a;b=a.name;a.location&&(l.paths[b]=a.location);l.pkgs[b]=a.name+"/"+(a.main||"main").replace(ja,"").replace(R,"")});B(k,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=m(b))});if(a.deps||a.callback)i.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(ca,arguments));return b||a.exports&&ea(a.exports)}},makeRequire:function(a,e){function g(f,c,d){var j,l;e.enableBuildCallback&&(c&&G(c))&&(c.__requireJsBuild=
!0);if("string"===typeof f){if(G(c))return w(C("requireargs","Invalid require call"),d);if(a&&s(N,f))return N[f](k[a.id]);if(h.get)return h.get(i,f,a,g);j=m(f,a,!1,!0);j=j.id;return!s(p,j)?w(C("notloaded",'Module name "'+j+'" has not been loaded yet for context: '+b+(a?"":". Use require([])"))):p[j]}L();i.nextTick(function(){L();l=q(m(null,a));l.skipMap=e.skipMap;l.init(f,c,d,{enabled:!0});D()});return g}e=e||{};V(g,{isBrowser:z,toUrl:function(b){var e,d=b.lastIndexOf("."),g=b.split("/")[0];if(-1!==
d&&(!("."===g||".."===g)||1<d))e=b.substring(d,b.length),b=b.substring(0,d);return i.nameToUrl(c(b,a&&a.id,!0),e,!0)},defined:function(b){return s(p,m(b,a,!1,!0).id)},specified:function(b){b=m(b,a,!1,!0).id;return s(p,b)||s(k,b)}});a||(g.undef=function(b){x();var c=m(b,a,!0),e=j(k,b);d(b);delete p[b];delete T[c.url];delete aa[b];U(A,function(a,c){a[0]===b&&A.splice(c,1)});e&&(e.events.defined&&(aa[b]=e.events),y(b))});return g},enable:function(a){j(k,a.id)&&q(a).enable()},completeLoad:function(a){var b,
c,f=j(l.shim,a)||{},d=f.exports;for(x();A.length;){c=A.shift();if(null===c[0]){c[0]=a;if(b)break;b=!0}else c[0]===a&&(b=!0);E(c)}c=j(k,a);if(!b&&!s(p,a)&&c&&!c.inited){if(l.enforceDefine&&(!d||!ea(d)))return g(a)?void 0:w(C("nodefine","No define call for "+a,null,[a]));E([a,f.deps||[],f.exportsFn])}D()},nameToUrl:function(a,b,c){var f,d,g;(f=j(l.pkgs,a))&&(a=f);if(f=j(ba,a))return i.nameToUrl(f,b,c);if(h.jsExtRegExp.test(a))f=a+(b||"");else{f=l.paths;a=a.split("/");for(d=a.length;0<d;d-=1)if(g=a.slice(0,
d).join("/"),g=j(f,g)){H(g)&&(g=g[0]);a.splice(0,d,g);break}f=a.join("/");f+=b||(/^data\:|\?/.test(f)||c?"":".js");f=("/"===f.charAt(0)||f.match(/^[\w\+\.\-]+:/)?"":l.baseUrl)+f}return l.urlArgs?f+((-1===f.indexOf("?")?"?":"&")+l.urlArgs):f},load:function(a,b){h.load(i,a,b)},execCb:function(a,b,c,d){return b.apply(d,c)},onScriptLoad:function(a){if("load"===a.type||ka.test((a.currentTarget||a.srcElement).readyState))P=null,a=K(a),i.completeLoad(a.id)},onScriptError:function(a){var b=K(a);if(!g(b.id))return w(C("scripterror",
"Script error for: "+b.id,a,[b.id]))}};i.require=i.makeRequire();return i}var h,x,y,D,K,E,P,L,q,Q,la=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,ma=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,R=/\.js$/,ja=/^\.\//;x=Object.prototype;var M=x.toString,ga=x.hasOwnProperty,ia=Array.prototype.splice,z=!!("undefined"!==typeof window&&"undefined"!==typeof navigator&&window.document),fa=!z&&"undefined"!==typeof importScripts,ka=z&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,
Z="undefined"!==typeof opera&&"[object Opera]"===opera.toString(),F={},r={},S=[],O=!1;if("undefined"===typeof define){if("undefined"!==typeof requirejs){if(G(requirejs))return;r=requirejs;requirejs=void 0}"undefined"!==typeof require&&!G(require)&&(r=require,require=void 0);h=requirejs=function(b,c,d,g){var u,m="_";!H(b)&&"string"!==typeof b&&(u=b,H(c)?(b=c,c=d,d=g):b=[]);u&&u.context&&(m=u.context);(g=j(F,m))||(g=F[m]=h.s.newContext(m));u&&g.configure(u);return g.require(b,c,d)};h.config=function(b){return h(b)};
h.nextTick="undefined"!==typeof setTimeout?function(b){setTimeout(b,4)}:function(b){b()};require||(require=h);h.version="2.1.11";h.jsExtRegExp=/^\/|:|\?|\.js$/;h.isBrowser=z;x=h.s={contexts:F,newContext:ha};h({});v(["toUrl","undef","defined","specified"],function(b){h[b]=function(){var c=F._;return c.require[b].apply(c,arguments)}});if(z&&(y=x.head=document.getElementsByTagName("head")[0],D=document.getElementsByTagName("base")[0]))y=x.head=D.parentNode;h.onError=da;h.createNode=function(b){var c=
b.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");c.type=b.scriptType||"text/javascript";c.charset="utf-8";c.async=!0;return c};h.load=function(b,c,d){var g=b&&b.config||{};if(z)return g=h.createNode(g,c,d),g.setAttribute("data-requirecontext",b.contextName),g.setAttribute("data-requiremodule",c),g.attachEvent&&!(g.attachEvent.toString&&0>g.attachEvent.toString().indexOf("[native code"))&&!Z?(O=!0,g.attachEvent("onreadystatechange",b.onScriptLoad)):
(g.addEventListener("load",b.onScriptLoad,!1),g.addEventListener("error",b.onScriptError,!1)),g.src=d,L=g,D?y.insertBefore(g,D):y.appendChild(g),L=null,g;if(fa)try{importScripts(d),b.completeLoad(c)}catch(j){b.onError(C("importscripts","importScripts failed for "+c+" at "+d,j,[c]))}};z&&!r.skipDataMain&&U(document.getElementsByTagName("script"),function(b){y||(y=b.parentNode);if(K=b.getAttribute("data-main"))return q=K,r.baseUrl||(E=q.split("/"),q=E.pop(),Q=E.length?E.join("/")+"/":"./",r.baseUrl=
Q),q=q.replace(R,""),h.jsExtRegExp.test(q)&&(q=K),r.deps=r.deps?r.deps.concat(q):[q],!0});define=function(b,c,d){var g,h;"string"!==typeof b&&(d=c,c=b,b=null);H(c)||(d=c,c=null);!c&&G(d)&&(c=[],d.length&&(d.toString().replace(la,"").replace(ma,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c)));if(O){if(!(g=L))P&&"interactive"===P.readyState||U(document.getElementsByTagName("script"),function(b){if("interactive"===b.readyState)return P=b}),g=P;g&&(b||
(b=g.getAttribute("data-requiremodule")),h=F[g.getAttribute("data-requirecontext")])}(h?h.defQueue:S).push([b,c,d])};define.amd={jQuery:!0};h.exec=function(b){return eval(b)};h(r)}})(this);

View file

@ -0,0 +1,138 @@
/*
* classList.js: Cross-browser full element.classList implementation.
* 2011-06-15
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
/*global self, document, DOMException */
/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/
if (typeof document !== "undefined" && !("classList" in document.createElement("a"))) {
(function (view) {
"use strict";
var
classListProp = "classList"
, protoProp = "prototype"
, elemCtrProto = (view.HTMLElement || view.Element)[protoProp]
, objCtr = Object
, strTrim = String[protoProp].trim || function () {
return this.replace(/^\s+|\s+$/g, "");
}
, arrIndexOf = Array[protoProp].indexOf || function (item) {
var
i = 0
, len = this.length
;
for (; i < len; i++) {
if (i in this && this[i] === item) {
return i;
}
}
return -1;
}
// Vendors: please allow content code to instantiate DOMExceptions
, DOMEx = function (type, message) {
this.name = type;
this.code = DOMException[type];
this.message = message;
}
, checkTokenAndGetIndex = function (classList, token) {
if (token === "") {
throw new DOMEx(
"SYNTAX_ERR"
, "An invalid or illegal string was specified"
);
}
if (/\s/.test(token)) {
throw new DOMEx(
"INVALID_CHARACTER_ERR"
, "String contains an invalid character"
);
}
return arrIndexOf.call(classList, token);
}
, ClassList = function (elem) {
var
trimmedClasses = strTrim.call(elem.className)
, classes = trimmedClasses ? trimmedClasses.split(/\s+/) : []
, i = 0
, len = classes.length
;
for (; i < len; i++) {
this.push(classes[i]);
}
this._updateClassName = function () {
elem.className = this.toString();
};
}
, classListProto = ClassList[protoProp] = []
, classListGetter = function () {
return new ClassList(this);
}
;
// Most DOMException implementations don't allow calling DOMException's toString()
// on non-DOMExceptions. Error's toString() is sufficient here.
DOMEx[protoProp] = Error[protoProp];
classListProto.item = function (i) {
return this[i] || null;
};
classListProto.contains = function (token) {
token += "";
return checkTokenAndGetIndex(this, token) !== -1;
};
classListProto.add = function (token) {
token += "";
if (checkTokenAndGetIndex(this, token) === -1) {
this.push(token);
this._updateClassName();
}
};
classListProto.remove = function (token) {
token += "";
var index = checkTokenAndGetIndex(this, token);
if (index !== -1) {
this.splice(index, 1);
this._updateClassName();
}
};
classListProto.toggle = function (token) {
token += "";
if (checkTokenAndGetIndex(this, token) === -1) {
this.add(token);
} else {
this.remove(token);
}
};
classListProto.toString = function () {
return this.join(" ");
};
if (objCtr.defineProperty) {
var classListPropDesc = {
get: classListGetter
, enumerable: true
, configurable: true
};
try {
objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);
} catch (ex) { // IE 8 doesn't support enumerable:true
if (ex.number === -0x7FF5EC54) {
classListPropDesc.enumerable = false;
objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);
}
}
} else if (objCtr[protoProp].__defineGetter__) {
elemCtrProto.__defineGetter__(classListProp, classListGetter);
}
}(self));
}

View file

@ -0,0 +1,23 @@
if (!Function.prototype.bind) {
Function.prototype.bind = function (oThis) {
if (typeof this !== "function") {
// closest thing possible to the ECMAScript 5 internal IsCallable function
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
}
var aArgs = Array.prototype.slice.call(arguments, 1),
fToBind = this,
fNOP = function () {},
fBound = function () {
return fToBind.apply(this instanceof fNOP && oThis
? this
: oThis,
aArgs.concat(Array.prototype.slice.call(arguments)));
};
fNOP.prototype = this.prototype;
fBound.prototype = new fNOP();
return fBound;
};
}

View file

@ -0,0 +1,13 @@
// adds requestAnimationFrame functionality
// Source: http://strd6.com/2011/05/better-window-requestanimationframe-shim/
window.requestAnimationFrame || (window.requestAnimationFrame =
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function(callback, element) {
return window.setTimeout(function() {
callback(+new Date());
}, 1000 / 60);
});

View file

@ -533,6 +533,7 @@ Metamaps.GlobalUI.Search = {
if (dataset.length == 0) { if (dataset.length == 0) {
dataset.push({ dataset.push({
profile: "/assets/user.png", profile: "/assets/user.png",
value: "No results", value: "No results",
label: "No results", label: "No results",
rtype: "noresult" rtype: "noresult"
@ -591,14 +592,12 @@ Metamaps.GlobalUI.Search = {
if (s.css('height') == '0px') { if (s.css('height') == '0px') {
s.css({ s.css({
'height': 'auto', 'height': 'auto',
'border-top': 'none',
'overflow': 'visible' 'overflow': 'visible'
}); });
$(this).removeClass('maximizeResults').addClass('minimizeResults'); $(this).removeClass('maximizeResults').addClass('minimizeResults');
} else { } else {
s.css({ s.css({
'height': '0', 'height': '0',
'border-top': '1px solid rgb(56, 56, 56)',
'overflow': 'hidden' 'overflow': 'hidden'
}); });
$(this).removeClass('minimizeResults').addClass('maximizeResults'); $(this).removeClass('minimizeResults').addClass('maximizeResults');

View file

@ -10,9 +10,6 @@
* *
*= require_self *= require_self
*= require_tree . *= require_tree .
*= require base
*= require jquery.mCustomScrollbar
*= require jquery-ui
*/ */
/* clear styles */ /* clear styles */

View file

@ -0,0 +1,151 @@
/* =Barometer feedback tab
--------------------------------------------------------*/
a#barometer_tab {
background-image:url(../images/feedback_tab.png);
background-color:#222222;
color:#FFFFFF;
cursor:pointer;
height:102px;
left:0;
margin-left:-7px;
overflow:hidden;
position:fixed;
text-indent:-100000px;
top:25%;
width:42px;
z-index:100000;
}
/* =Barometer Overlay
--------------------------------------------------------*/
#barometer_overlay {
top:0;
left:0;
width: 100%;
height: 100%;
position: fixed;
_position: absolute;
z-index: 1000000;
}
#barometer_overlay * {
margin: 0;
padding: 0;
font-family: Arial, Helvetica, sans-serif;
font-style:normal;
font-variant:normal;
font-size: 12px;
color:#333;
}
/* =Barometer Overlay -> Main
--------------------------------------------------------*/
#barometer_main {
width: 550px;
height: 100%;
margin: 0 auto;
z-index:2;
position:relative;
background-color: transparent;
}
#barometer_main div {
padding: 5px 20px 0 20px;
margin:0;
background: #EEE;
overflow:none;
border-right: solid 2px #000;
border-left: solid 2px #000;
}
#barometer_overlay #barometer_main #overlay_loading h2 {
padding: 10px 0;
font-size:28px;
}
#barometer_overlay #barometer_main #barometer_close:hover {
background-position:-42px 0;
}
#barometer_overlay #barometer_main a#barometer_close {
background-image:url(../images/barometer_close.png);
cursor:pointer;
height:42px;
outline-color:-moz-use-text-color;
outline-style:none;
outline-width:medium;
overflow:hidden;
position:absolute;
top:-23px;
right:-22px;
width:42px;
z-index:4;
border: none;
}
#barometer_overlay #barometer_main span {
background:url(../images/close.png) no-repeat scroll 33px 0 transparent;
color:#FFFFFF;
cursor:pointer;
float:right;
font-size:11px;
height:20px;
padding-right:20px;
text-decoration:underline;
}
#barometer_iframe {
width: 550px;
height: 100%;
background: transparent url(../images/barometer_loading.png) no-repeat;
}
#barometer_iframe.loaded {
background: transparent;
}
/* =Barometer Overlay -> Main -> Overlay header
--------------------------------------------------------*/
#barometer_overlay #barometer_main #overlay_header {
padding:6px 5px 1px 0;
background-color:#333;
font-weight: bold;
height:18px;
border: solid 2px #000;
}
#barometer_overlay #barometer_main #overlay_header a {
color:#fff;
float:left;
font-size:15px;
margin-left:5px;
font-weight: normal;
}
#barometer_overlay #barometer_main #overlay_header span {
float:right;
height:20px;
padding-right:20px;
background: transparent url(../images/close.png) no-repeat 33px 0;
text-decoration:underline;
font-size:11px;
cursor:pointer;
color: #fff;
}
/* =Barometer screen id - used to close barometer
--------------------------------------------------------*/
#barometer_screen {
top:0;
left:0;
z-index:1;
width: 100%;
position: absolute;
background-color: #000;
opacity: 0.42; filter:alpha(opacity=42); -moz-opacity: 0.42;
}

View file

@ -212,6 +212,7 @@
.searchHeader { .searchHeader {
height: 42px; height: 42px;
width: 100%; width: 100%;
position: relative;
} }
.searchTopicsHeader { .searchTopicsHeader {
background: #4fc4a8; background: #4fc4a8;
@ -227,35 +228,44 @@
color: #F5F5F5; color: #F5F5F5;
font-size: 18px; font-size: 18px;
line-height: 18px; line-height: 18px;
margin: 10px 0 3px 10px; margin: 12px 0 3px 16px;
float: left; float: left;
} }
.sidebarSearch .tt-dropdown-menu .limitToMe { .sidebarSearch .tt-dropdown-menu .limitToMe {
float: left; float: left;
width: 15px; width: 12px;
height: 15px; height: 12px;
margin-top: 11px; border: 1px;
margin-left: 15px; color: #000000;
position: absolute;
top: 15px;
left: 136px;
} }
.sidebarSearch .tt-dropdown-menu .limitToMeLabel { .sidebarSearch .tt-dropdown-menu .limitToMeLabel {
float: left; float: left;
margin-top: 11px; font-family: 'din-medium', helvetica, sans-serif;
font-size: 12px;
color: #f5f5f5;
margin: 0;
position: absolute;
top: 15px;
left: 156px;
}
.sidebarSearch .tt-dropdown-menu .minimizeResults, .sidebarSearch .tt-dropdown-menu .maximizeResults {
float: right;
width: 32px;
height: 32px;
background-image: url(arrowpermswhite_sprite.png);
background-repeat: no-repeat;
cursor: pointer;
margin-top: 5px;
margin-right: 20px;
} }
.sidebarSearch .tt-dropdown-menu .minimizeResults { .sidebarSearch .tt-dropdown-menu .minimizeResults {
float: right; background-position-x: 0;
width: 35px;
height: 35px;
background: url('/assets/MMCCicon_minimize_arrow.png') no-repeat center center;
background-size: 25px 25px;
cursor: pointer;
} }
.sidebarSearch .tt-dropdown-menu .maximizeResults { .sidebarSearch .tt-dropdown-menu .maximizeResults {
float: right; background-position-x: -32px;
width: 35px;
height: 35px;
background: url('/assets/MMCCicon_maximize_arrow.png') no-repeat center center;
background-size: 25px 25px;
cursor: pointer;
} }
.sidebarSearch .tt-suggestions { .sidebarSearch .tt-suggestions {
overflow: visible; overflow: visible;
@ -292,7 +302,7 @@
.sidebarSearch .tt-dataset-topics .tt-is-under-cursor .topicIcon, .sidebarSearch .tt-dataset-topics .tt-is-under-cursor .topicIcon,
.sidebarSearch .tt-dataset-topics .tt-is-under-mouse-cursor .topicIcon { .sidebarSearch .tt-dataset-topics .tt-is-under-mouse-cursor .topicIcon {
margin: 0 auto; margin: 0 auto;
padding-left: 2px padding-left: 10px;
} }
.sidebarSearch .tt-dataset-topics .metacodeTip { .sidebarSearch .tt-dataset-topics .metacodeTip {
display: none; display: none;
@ -311,7 +321,7 @@
margin: 4px 9px 4px 4px; margin: 4px 9px 4px 4px;
} }
.sidebarSearch .resultText { .sidebarSearch .resultText {
width: 225px; width: 260px;
display: block; display: block;
float: left; float: left;
word-wrap: break-word; word-wrap: break-word;
@ -355,14 +365,19 @@
outline: none; outline: none;
} }
.sidebarSearch button.addToMap { .sidebarSearch button.addToMap {
width: 20px; width: 24px;
height: 20px; height: 24px;
background: url(/assets/MMCCicon_add.png) no-repeat center center; background: url(addtopic_sprite.png);
background-size: 18px 18px; background-repeat: no-repeat;
top: 30px; background-size: 48px 24px;
top: 19px;
left: 84px; left: 84px;
cursor: pointer; cursor: pointer;
} }
.sidebarSearch button.addToMap:hover {
background-position: -24px;
}
/*
.sidebarSearch div.goTo { .sidebarSearch div.goTo {
width: 20px; width: 20px;
height: 20px; height: 20px;
@ -370,25 +385,28 @@
background-size: 18px 18px; background-size: 18px 18px;
top: 7px; top: 7px;
left: 84px; left: 84px;
} }*/
.sidebarSearch div.mapCount { .sidebarSearch div.topicCount {
width: 20px; width: 16px;
height: 20px; height: 16px;
background: url(/assets/MMCCicon_map.png) no-repeat 0px center; background: url(topic16.png);
background-size: 14px 14px; background-repeat: no-repeat;
background-size: 16px 16px;
top: 7px; top: 7px;
left: 38px; left: 13px;
padding-left: 18px; padding-left: 18px;
font-size: 12px; font-size: 12px;
line-height: 20px; line-height: 20px;
} }
.sidebarSearch div.topicCount {
.sidebarSearch div.mapCount {
width: 20px; width: 20px;
height: 20px; height: 20px;
background: url(/assets/MMCCicon_topic.png) no-repeat 0px center; background: url(metamap16.png);
background-repeat: no-repeat;
background-size: 14px 14px; background-size: 14px 14px;
top: 7px; top: 7px;
left: 39px; left: 13px;
padding-left: 18px; padding-left: 18px;
font-size: 12px; font-size: 12px;
line-height: 20px; line-height: 20px;
@ -396,21 +414,20 @@
.sidebarSearch div.synapseCount { .sidebarSearch div.synapseCount {
width: 20px; width: 20px;
height: 20px; height: 20px;
background: url(/assets/MMCCicon_synapse.png) no-repeat 0px center; background: url(synapse16.png);
background-repeat: no-repeat;
background-size: 15px 15px; background-size: 15px 15px;
top: 30px; top: 30px;
left: 38px; left: 13px;
padding-left: 19px; padding-left: 19px;
font-size: 12px; font-size: 12px;
line-height: 20px; line-height: 20px;
} }
.sidebarSearch div.topicOriginatorIcon { .sidebarSearch div.topicOriginatorIcon {
width: 20px; width: 24px;
height: 20px; height: 24px;
background: url(/assets/MMCCicon_mapper.png) no-repeat center center;
background-size: 17px 17px;
top: 7px; top: 7px;
left: 13px; left: 47px;
} }
.sidebarSearch .tip { .sidebarSearch .tip {
position: absolute; position: absolute;
@ -444,10 +461,11 @@
} }
.sidebarSearch div.mapContributorsIcon { .sidebarSearch div.mapContributorsIcon {
height: 20px; height: 20px;
background: url(/assets/MMCCicon_mapper.png) no-repeat 0px center; background: url(/assets/MMCCicon_mapper.png);
background-repeat: no-repeat;
background-size: 17px 17px; background-size: 17px 17px;
top: 7px; top: 7px;
right: 85px; right: 25px;
padding-left: 19px; padding-left: 19px;
font-size: 12px; font-size: 12px;
line-height: 20px; line-height: 20px;
@ -455,24 +473,27 @@
} }
.sidebarSearch div.topicPermission, .sidebarSearch div.topicPermission,
.sidebarSearch div.mapPermission { .sidebarSearch div.mapPermission {
width: 20px; width: 24px;
height: 20px; height: 24px;
background-size: 19px 19px !important; background-image: url(permissions32_sprite.png);
top: 30px; background-repeat: no-repeat;
left: 13px; background-size: 72px 48px !important;
top: 27px;
left: 47px;
} }
.sidebarSearch div.topicPermission.commons, .sidebarSearch div.topicPermission.commons,
.sidebarSearch div.mapPermission.commons { .sidebarSearch div.mapPermission.commons {
background: url(/assets/MMCCicon_commons.png) no-repeat center center; background-position: 0 0;
} }
.sidebarSearch div.topicPermission.public, .sidebarSearch div.topicPermission.public,
.sidebarSearch div.mapPermission.public { .sidebarSearch div.mapPermission.public {
background: url(/assets/MMCCicon_public.png) no-repeat center center; background-position: -32px 0;
} }
.sidebarSearch div.topicPermission.private, .sidebarSearch div.topicPermission.private,
.sidebarSearch div.mapPermission.private { .sidebarSearch div.mapPermission.private {
background: url(/assets/MMCCicon_private.png) no-repeat center center; background-position: -16px 0;
} }
.sidebarSearch .tt-dataset-mappers a.goTo { .sidebarSearch .tt-dataset-mappers a.goTo {
top: 7px; top: 7px;
} }

View file

@ -0,0 +1,77 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Owner: mark@famo.us
* @license MPL 2.0
* @copyright Famous Industries, Inc. 2014
*/
html {
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
overflow: hidden;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
}
body {
position: absolute;
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-font-smoothing: antialiased;
-webkit-tap-highlight-color: transparent;
-webkit-perspective: 0;
perspective: none;
overflow: hidden;
}
.famous-container, .famous-group {
position: absolute;
top: 0px;
left: 0px;
bottom: 0px;
right: 0px;
overflow: visible;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-backface-visibility: visible;
backface-visibility: visible;
pointer-events: none;
}
.famous-group {
width: 0px;
height: 0px;
margin: 0px;
padding: 0px;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.famous-surface {
position: absolute;
-webkit-transform-origin: center center;
transform-origin: center center;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-transform-style: flat;
transform-style: preserve-3d; /* performance */
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
pointer-events: auto;
}
.famous-container-group {
position: relative;
width: 100%;
height: 100%;
}

View file

@ -8,7 +8,7 @@ module TopicsHelper
topic['id'] = t.id topic['id'] = t.id
topic['label'] = t.name topic['label'] = t.name
topic['value'] = t.name topic['value'] = t.name
topic['description'] = t.desc.truncate(35) # make this return matched results topic['description'] = t.desc.truncate(70) # make this return matched results
topic['type'] = t.metacode.name topic['type'] = t.metacode.name
topic['typeImageURL'] = t.metacode.icon topic['typeImageURL'] = t.metacode.icon
topic['permission'] = t.permission topic['permission'] = t.permission

View file

@ -83,9 +83,6 @@
<span class="tip">add to map</span> <span class="tip">add to map</span>
</button> </button>
<% end %> <% end %>
<div class="goTo hoverForTip">
<span class="tip">open in new tab</span>
</div>
<div class="mapCount hoverForTip"> <div class="mapCount hoverForTip">
<span class="tip">appears on this # of maps</span> <span class="tip">appears on this # of maps</span>
{{mapCount}} {{mapCount}}
@ -95,7 +92,8 @@
{{synapseCount}} {{synapseCount}}
</div> </div>
<div class="topicOriginatorIcon hoverForTip"> <div class="topicOriginatorIcon hoverForTip">
<span class="tip topicOriginator">created by {{originator}}</span> <img width="24" height="24" src="{{originatorImage}}">
<span class="tip topicOriginator">created by {{originator}}</span>
</div> </div>
<div class="topicPermission {{permission}} hoverForTip"> <div class="topicPermission {{permission}} hoverForTip">
<span class="tip">topic is {{permission}}</span> <span class="tip">topic is {{permission}}</span>
@ -146,6 +144,14 @@
<div class="goTo hoverForTip"> <div class="goTo hoverForTip">
<span class="tip">open in new tab</span> <span class="tip">open in new tab</span>
</div> </div>
<div class="mapCount hoverForTip">
<span>Mapping since:</span>
{{create_at}}
</div>
<div class="mapCount hoverForTip">
<span>Generation</span>
{{mapCount}}
</div>
<div class="mapCount hoverForTip"> <div class="mapCount hoverForTip">
<span class="tip">created this # of maps</span> <span class="tip">created this # of maps</span>
{{mapCount}} {{mapCount}}

View file

@ -18,18 +18,6 @@
<script type="text/javascript">try{Typekit.load();}catch(e){}</script> <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<script type="text/javascript" src="//use.typekit.net/obp7wss.js"></script> <script type="text/javascript" src="//use.typekit.net/obp7wss.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script> <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<!-- shims for backwards compatibility -->
<script type="text/javascript" src="http://code.famo.us/lib/functionPrototypeBind.js"></script>
<script type="text/javascript" src="http://code.famo.us/lib/classList.js"></script>
<script type="text/javascript" src="http://code.famo.us/lib/requestAnimationFrame.js"></script>
<!-- module loader -->
<script type="text/javascript" src="http://code.famo.us/lib/require.js"></script>
<!-- famous -->
<link rel="stylesheet" type="text/css" href="http://code.famo.us/famous/0.2/famous.css" />
<script type="text/javascript" src="http://code.famo.us/famous/0.2/famous.min.js"></script>
<!-- app code --> <!-- app code -->
<script type="text/javascript"> <script type="text/javascript">
@ -77,9 +65,6 @@
<%= render :partial => 'layouts/lightboxes' %> <%= render :partial => 'layouts/lightboxes' %>
<%= render :partial => 'layouts/templates' %> <%= render :partial => 'layouts/templates' %>
<style type='text/css'>@import url('http://getbarometer.s3.amazonaws.com/assets/barometer/css/barometer.css');</style>
<script src='http://getbarometer.s3.amazonaws.com/assets/barometer/javascripts/barometer.js'
type='text/javascript'></script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
BAROMETER.load('Scqak8nyHdFEkezKMNeQp'); BAROMETER.load('Scqak8nyHdFEkezKMNeQp');