updated the 404 page. fixed merge conflicts. removed generation code

This commit is contained in:
Connor Turland 2014-11-23 22:58:30 -05:00
commit 54bb3d2c3d
35 changed files with 894 additions and 439 deletions

View file

@ -1,2 +1 @@
https://github.com/heroku/heroku-buildpack-ruby.git https://github.com/heroku/heroku-buildpack-ruby.git
https://github.com/stomita/heroku-buildpack-phantomjs.git

View file

@ -6,8 +6,6 @@ gem 'rails', '3.2.17'
# Bundle edge Rails instead: # Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git' # gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'phantomjs'
gem 'devise' gem 'devise'
gem 'redis' gem 'redis'
gem 'pg' gem 'pg'
@ -19,9 +17,6 @@ gem 'rails3-jquery-autocomplete'
gem 'best_in_place' #in-place editing gem 'best_in_place' #in-place editing
gem 'kaminari' # pagination gem 'kaminari' # pagination
gem 'uservoice-ruby' gem 'uservoice-ruby'
gem 'sidekiq' # worker processes
gem 'sinatra', require: false
gem 'slim'
gem 'paperclip' gem 'paperclip'
gem 'aws-sdk' gem 'aws-sdk'

View file

@ -41,8 +41,6 @@ GEM
rails (~> 3.1) rails (~> 3.1)
builder (3.0.4) builder (3.0.4)
cancan (1.6.10) cancan (1.6.10)
celluloid (0.15.2)
timers (~> 1.1.0)
climate_control (0.0.3) climate_control (0.0.3)
activesupport (>= 3.0) activesupport (>= 3.0)
cocaine (0.5.4) cocaine (0.5.4)
@ -54,7 +52,6 @@ GEM
coffee-script-source coffee-script-source
execjs execjs
coffee-script-source (1.8.0) coffee-script-source (1.8.0)
connection_pool (2.0.0)
devise (3.4.0) devise (3.4.0)
bcrypt (~> 3.0) bcrypt (~> 3.0)
orm_adapter (~> 0.1) orm_adapter (~> 0.1)
@ -100,13 +97,10 @@ GEM
mime-types mime-types
pg (0.17.1) pg (0.17.1)
pg (0.17.1-x86-mingw32) pg (0.17.1-x86-mingw32)
phantomjs (1.9.7.1)
polyglot (0.3.5) polyglot (0.3.5)
rack (1.4.5) rack (1.4.5)
rack-cache (1.2) rack-cache (1.2)
rack (>= 0.4) rack (>= 0.4)
rack-protection (1.5.3)
rack
rack-ssl (1.3.4) rack-ssl (1.3.4)
rack rack
rack-test (0.6.2) rack-test (0.6.2)
@ -132,8 +126,6 @@ GEM
rdoc (3.12.2) rdoc (3.12.2)
json (~> 1.4) json (~> 1.4)
redis (3.1.0) redis (3.1.0)
redis-namespace (1.5.1)
redis (~> 3.0, >= 3.0.4)
responders (1.1.1) responders (1.1.1)
railties (>= 3.2, < 4.2) railties (>= 3.2, < 4.2)
sass (3.4.5) sass (3.4.5)
@ -141,29 +133,14 @@ GEM
railties (~> 3.2.0) railties (~> 3.2.0)
sass (>= 3.1.10) sass (>= 3.1.10)
tilt (~> 1.3) tilt (~> 1.3)
sidekiq (3.2.5)
celluloid (= 0.15.2)
connection_pool (>= 2.0.0)
json
redis (>= 3.0.6)
redis-namespace (>= 1.3.1)
sinatra (1.4.5)
rack (~> 1.4)
rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4)
slim (2.0.3)
temple (~> 0.6.6)
tilt (>= 1.3.3, < 2.1)
sprockets (2.2.2) sprockets (2.2.2)
hike (~> 1.2) hike (~> 1.2)
multi_json (~> 1.0) multi_json (~> 1.0)
rack (~> 1.0) rack (~> 1.0)
tilt (~> 1.1, != 1.3.0) tilt (~> 1.1, != 1.3.0)
temple (0.6.8)
thor (0.19.1) thor (0.19.1)
thread_safe (0.3.4) thread_safe (0.3.4)
tilt (1.4.1) tilt (1.4.1)
timers (1.1.0)
treetop (1.4.15) treetop (1.4.15)
polyglot polyglot
polyglot (>= 0.3.1) polyglot (>= 0.3.1)
@ -196,13 +173,9 @@ DEPENDENCIES
kaminari kaminari
paperclip paperclip
pg pg
phantomjs
rails (= 3.2.17) rails (= 3.2.17)
rails3-jquery-autocomplete rails3-jquery-autocomplete
redis redis
sass-rails sass-rails
sidekiq
sinatra
slim
uglifier (>= 1.0.3) uglifier (>= 1.0.3)
uservoice-ruby uservoice-ruby

6
LiveSiteUpdatesNotes.txt Normal file
View file

@ -0,0 +1,6 @@
make sure that root individuals have same 'joinedwithcode' as 'code'
User.all.each do |u|
u.generation = u.get_generation
u.save
end

View file

@ -1,2 +1 @@
web: bundle exec rails server -p $PORT web: bundle exec rails server -p $PORT
worker: bundle exec sidekiq -c 5 -v

Binary file not shown.

View file

@ -2495,7 +2495,7 @@ Extras.Classes.Navigation = new Class({
//START METAMAPS CODE //START METAMAPS CODE
var rightClick = e.button == 2 || (navigator.platform.indexOf("Mac") != -1 && e.ctrlKey); var rightClick = e.button == 2 || (navigator.platform.indexOf("Mac") != -1 && e.ctrlKey);
// TODO make sure this works across browsers // TODO make sure this works across browsers
if (!Metamaps.Mouse.boxStartCoordinates && ((e.button == 0 && e.shiftKey) || (e.button == 0 && e.ctrlKey) || (rightClick && e.ctrlKey))) { if (!Metamaps.Mouse.boxStartCoordinates && ((e.button == 0 && e.shiftKey) || (e.button == 0 && e.ctrlKey) || rightClick)) {
Metamaps.Mouse.boxStartCoordinates = eventInfo.getPos(); Metamaps.Mouse.boxStartCoordinates = eventInfo.getPos();
//console.log('mouse down'); //console.log('mouse down');
} }
@ -2525,13 +2525,13 @@ Extras.Classes.Navigation = new Class({
// START METAMAPS CODE // START METAMAPS CODE
var rightClick = e.button == 2 || (navigator.platform.indexOf("Mac") != -1 && e.ctrlKey); var rightClick = e.button == 2 || (navigator.platform.indexOf("Mac") != -1 && e.ctrlKey);
if (!Metamaps.Mouse.boxStartCoordinates && ((e.button == 0 && e.shiftKey) || (e.button == 0 && e.ctrlKey) || (rightClick && e.ctrlKey))) { if (!Metamaps.Mouse.boxStartCoordinates && ((e.button == 0 && e.shiftKey) || (e.button == 0 && e.ctrlKey) || rightClick)) {
Metamaps.Visualize.mGraph.busy = true; Metamaps.Visualize.mGraph.busy = true;
Metamaps.boxStartCoordinates = eventInfo.getPos(); Metamaps.boxStartCoordinates = eventInfo.getPos();
//console.log('mouse move'); //console.log('mouse move');
return; return;
} }
if (Metamaps.Mouse.boxStartCoordinates && ((e.button == 0 && e.shiftKey) || (e.button == 0 && e.ctrlKey) || (rightClick && e.ctrlKey))) { if (Metamaps.Mouse.boxStartCoordinates && ((e.button == 0 && e.shiftKey) || (e.button == 0 && e.ctrlKey) || rightClick)) {
Metamaps.Visualize.mGraph.busy = true; Metamaps.Visualize.mGraph.busy = true;
Metamaps.JIT.drawSelectBox(eventInfo,e); Metamaps.JIT.drawSelectBox(eventInfo,e);
//console.log('mouse move'); //console.log('mouse move');
@ -7493,7 +7493,7 @@ Graph.Label.Native = new Class({
// START METAMAPS CODE // START METAMAPS CODE
var index; var index;
for (index = 0; index < customLabel.length; ++index) { for (index = 0; index < customLabel.length; ++index) {
ctx.fillText(customLabel[index], pos.x, pos.y + node.getData("height") + 9 + (25*index)); ctx.fillText(customLabel[index], pos.x, pos.y + node.getData("height") + 23 + (25*index));
} }
// END METAMAPS CODE // END METAMAPS CODE
}, },

View file

@ -167,6 +167,9 @@ Metamaps.GlobalUI = {
clearTimeout(self.notifyTimeOut); clearTimeout(self.notifyTimeOut);
Metamaps.Famous.toast.hide(); Metamaps.Famous.toast.hide();
},
shareInvite: function(inviteLink) {
window.prompt("To copy the invite link, press: Ctrl+C, Enter", inviteLink);
} }
}; };
@ -326,6 +329,8 @@ Metamaps.GlobalUI.Account = {
Metamaps.Realtime.close(); Metamaps.Realtime.close();
Metamaps.Filter.close(); Metamaps.Filter.close();
$('.sidebarAccountIcon .tooltipsUnder').addClass('hide');
if (!self.isOpen && !self.changing) { if (!self.isOpen && !self.changing) {
self.changing = true; self.changing = true;
@ -339,6 +344,7 @@ Metamaps.GlobalUI.Account = {
close: function () { close: function () {
var self = Metamaps.GlobalUI.Account; var self = Metamaps.GlobalUI.Account;
$('.sidebarAccountIcon .tooltipsUnder').removeClass('hide');
if (!self.changing) { if (!self.changing) {
self.changing = true; self.changing = true;
$('.sidebarAccountBox #user_email').blur(); $('.sidebarAccountBox #user_email').blur();

View file

@ -175,7 +175,8 @@ Metamaps.JIT = {
context.fillStyle = '#424242'; context.fillStyle = '#424242';
context.textAlign = 'center'; context.textAlign = 'center';
context.font = '14px din-medium'; context.font = '14px din-medium';
context.fillText(count, x, y - 6);
context.fillText(count, x, y + 5);
}; };
if (!canvas.denySelected && desc != "" && showDesc) { if (!canvas.denySelected && desc != "" && showDesc) {
@ -186,7 +187,7 @@ Metamaps.JIT = {
var ctx = canvas.getCtx(); var ctx = canvas.getCtx();
ctx.font = 'bold 14px arial'; ctx.font = 'bold 14px arial';
ctx.fillStyle = '#FFF'; ctx.fillStyle = '#FFF';
ctx.textBaseline = 'hanging'; ctx.textBaseline = 'alphabetic';
var arrayOfLabelLines = Metamaps.Util.splitLine(desc, 30).split('\n'); var arrayOfLabelLines = Metamaps.Util.splitLine(desc, 30).split('\n');
var index, lineWidths = []; var index, lineWidths = [];
@ -222,7 +223,7 @@ Metamaps.JIT = {
ctx.fillStyle = '#424242'; ctx.fillStyle = '#424242';
ctx.textAlign = 'center'; ctx.textAlign = 'center';
for (index = 0; index < arrayOfLabelLines.length; ++index) { for (index = 0; index < arrayOfLabelLines.length; ++index) {
ctx.fillText(arrayOfLabelLines[index], x + (width / 2), y + 7 + (16 * index)); ctx.fillText(arrayOfLabelLines[index], x + (width / 2), y + 18 + (16 * index));
} }
if (synapseNum > 1) { if (synapseNum > 1) {
@ -306,7 +307,7 @@ Metamaps.JIT = {
type: 'Native', //Native or HTML type: 'Native', //Native or HTML
size: 20, size: 20,
family: 'arial', family: 'arial',
textBaseline: 'hanging', textBaseline: 'alphabetic',
color: Metamaps.Settings.colors.labels.text color: Metamaps.Settings.colors.labels.text
}, },
//Add Tips //Add Tips
@ -374,14 +375,14 @@ Metamaps.JIT = {
$('.rightclickmenu').remove(); $('.rightclickmenu').remove();
if (Metamaps.Mouse.boxStartCoordinates) { if (Metamaps.Mouse.boxStartCoordinates) {
if(e.ctrlKey && e.shiftKey){ if(e.ctrlKey){
Metamaps.Visualize.mGraph.busy = false; Metamaps.Visualize.mGraph.busy = false;
Metamaps.Mouse.boxEndCoordinates = eventInfo.getPos(); Metamaps.Mouse.boxEndCoordinates = eventInfo.getPos();
Metamaps.JIT.zoomToBox(e); Metamaps.JIT.zoomToBox(e);
//console.log('called zoom to box'); //console.log('called zoom to box');
return; return;
} }
else if (e.ctrlKey || e.shiftKey) { else if (e.shiftKey) {
Metamaps.Visualize.mGraph.busy = false; Metamaps.Visualize.mGraph.busy = false;
Metamaps.Mouse.boxEndCoordinates = eventInfo.getPos(); Metamaps.Mouse.boxEndCoordinates = eventInfo.getPos();
Metamaps.JIT.selectWithBox(e); Metamaps.JIT.selectWithBox(e);
@ -410,10 +411,10 @@ Metamaps.JIT = {
// remove the rightclickmenu // remove the rightclickmenu
$('.rightclickmenu').remove(); $('.rightclickmenu').remove();
if (Metamaps.Mouse.boxStartCoordinates && e.ctrlKey) { if (Metamaps.Mouse.boxStartCoordinates) {
Metamaps.Visualize.mGraph.busy = false; Metamaps.Visualize.mGraph.busy = false;
Metamaps.Mouse.boxEndCoordinates = eventInfo.getPos(); Metamaps.Mouse.boxEndCoordinates = eventInfo.getPos();
Metamaps.JIT.zoomToBox(e); Metamaps.JIT.selectWithBox(e);
return; return;
} }
@ -1097,7 +1098,7 @@ Metamaps.JIT = {
eX = Metamaps.Mouse.boxEndCoordinates.x, eX = Metamaps.Mouse.boxEndCoordinates.x,
eY = Metamaps.Mouse.boxEndCoordinates.y; eY = Metamaps.Mouse.boxEndCoordinates.y;
if(!(e.shiftKey) && !(e.ctrlKey)){ if(!e.shiftKey){
Metamaps.Control.deselectAllNodes(); Metamaps.Control.deselectAllNodes();
Metamaps.Control.deselectAllEdges(); Metamaps.Control.deselectAllEdges();
} }
@ -1108,7 +1109,7 @@ Metamaps.JIT = {
y = n.pos.y; y = n.pos.y;
if ((sX < x && x < eX && sY < y && y < eY) || (sX > x && x > eX && sY > y && y > eY) || (sX > x && x > eX && sY < y && y < eY) || (sX < x && x < eX && sY > y && y > eY)) { if ((sX < x && x < eX && sY < y && y < eY) || (sX > x && x > eX && sY > y && y > eY) || (sX > x && x > eX && sY < y && y < eY) || (sX < x && x < eX && sY > y && y > eY)) {
if(e.ctrlKey){ if(e.shiftKey){
if(n.selected){ if(n.selected){
Metamaps.Control.deselectNode(n); Metamaps.Control.deselectNode(n);
} }
@ -1211,7 +1212,7 @@ Metamaps.JIT = {
var node2id = synapse.get('edge').nodeTo.id; var node2id = synapse.get('edge').nodeTo.id;
var edge = Metamaps.Visualize.mGraph.graph.getAdjacence(node1id, node2id); var edge = Metamaps.Visualize.mGraph.graph.getAdjacence(node1id, node2id);
if(selectTest){ if(selectTest){
if(e.ctrlKey){ if(e.shiftKey){
if(Metamaps.Selected.Edges.indexOf(synapse.get('edge')) != -1 ){ if(Metamaps.Selected.Edges.indexOf(synapse.get('edge')) != -1 ){
Metamaps.Control.deselectEdge(synapse.get('edge')); Metamaps.Control.deselectEdge(synapse.get('edge'));
} }
@ -1273,23 +1274,19 @@ Metamaps.JIT = {
// wait a certain length of time, then check again, then run this code // wait a certain length of time, then check again, then run this code
setTimeout(function () { setTimeout(function () {
if (!Metamaps.JIT.nodeWasDoubleClicked()) { if (!Metamaps.JIT.nodeWasDoubleClicked()) {
if (!e.shiftKey && !e.ctrlKey) {
var nodeAlreadySelected = node.selected;
if (!e.shiftKey) {
Metamaps.Control.deselectAllNodes(); Metamaps.Control.deselectAllNodes();
Metamaps.Control.deselectAllEdges(); Metamaps.Control.deselectAllEdges();
}
if (nodeAlreadySelected) {
Metamaps.Control.deselectNode(node);
} else {
Metamaps.Control.selectNode(node,e); Metamaps.Control.selectNode(node,e);
} }
else if(e.shiftKey && e.ctrlKey){
//no result
}
else if(e.ctrlKey){
if (node.selected) {
Metamaps.Control.deselectNode(node);
} else {
Metamaps.Control.selectNode(node,e);
}
}else if(e.shiftKey){
Metamaps.Control.selectNode(node,e);
}
//trigger animation to final styles //trigger animation to final styles
Metamaps.Visualize.mGraph.fx.animate({ Metamaps.Visualize.mGraph.fx.animate({
@ -1531,22 +1528,17 @@ Metamaps.JIT = {
// wait a certain length of time, then check again, then run this code // wait a certain length of time, then check again, then run this code
setTimeout(function () { setTimeout(function () {
if (!Metamaps.JIT.nodeWasDoubleClicked()) { if (!Metamaps.JIT.nodeWasDoubleClicked()) {
if (!e.shiftKey && !e.ctrlKey) {
var edgeAlreadySelected = Metamaps.Selected.Edges.indexOf(adj) !== -1;
if (!e.shiftKey) {
Metamaps.Control.deselectAllNodes(); Metamaps.Control.deselectAllNodes();
Metamaps.Control.deselectAllEdges(); Metamaps.Control.deselectAllEdges();
Metamaps.Control.selectEdge(adj);
} }
else if (e.shiftKey && e.ctrlKey){
//no result if (edgeAlreadySelected) {
} Metamaps.Control.deselectEdge(adj);
else if (e.ctrlKey){ } else {
if (Metamaps.Selected.Edges.indexOf(adj) !== -1) {
Metamaps.Control.deselectEdge(adj);
} else {
Metamaps.Control.selectEdge(adj);
}
}
else if (e.shiftKey){
Metamaps.Control.selectEdge(adj); Metamaps.Control.selectEdge(adj);
} }
@ -1861,7 +1853,7 @@ Metamaps.JIT = {
var x = n.pos.x, var x = n.pos.x,
y = n.pos.y; y = n.pos.y;
if (counter == 0){ if (counter == 0 && n.getData('alpha') == 1){
maxX = x; maxX = x;
minX = x; minX = x;
maxY = y; maxY = y;
@ -1880,12 +1872,15 @@ Metamaps.JIT = {
} }
var width = Math.max.apply(null, lineWidths) + 8; var width = Math.max.apply(null, lineWidths) + 8;
maxX = Math.max(x + width /2,maxX); // only adjust these values if the node is not filtered
maxY = Math.max(y + n.getData("height") + 5 + height,maxY); if (n.getData('alpha') == 1) {
minX = Math.min(x - width /2,minX); maxX = Math.max(x + width /2,maxX);
minY = Math.min(y - dim,minY); maxY = Math.max(y + n.getData("height") + 5 + height,maxY);
minX = Math.min(x - width /2,minX);
minY = Math.min(y - dim,minY);
counter++; counter++;
}
}); });
var spanX = maxX - minX; var spanX = maxX - minX;

View file

@ -741,7 +741,7 @@ Metamaps.Create = {
} }
}, },
engine: Hogan, engine: Hogan,
header: "<h3>Existing Synapses</h3>" header: "<h3>Existing synapses</h3>"
} }
]); ]);
@ -1043,8 +1043,8 @@ Metamaps.TopicCard = {
}); });
$(showCard).find('.best_in_place_desc').bind("ajax:success", function () { $(showCard).find('.best_in_place_desc').bind("ajax:success", function () {
this.innerHTML = this.innerHTML.replace(/\r/g, '') this.innerHTML = this.innerHTML.replace(/\r/g, '');
var desc = $(this).html(); var desc = $(this).html() === $(this).data('nil') ? "" : $(this).html();
topic.set("desc", desc); topic.set("desc", desc);
topic.trigger('saved'); topic.trigger('saved');
}); });
@ -1289,7 +1289,7 @@ Metamaps.SynapseCard = {
}); });
}, },
add_drop_down: function (edge, synapse) { add_drop_down: function (edge, synapse) {
var list, i, synapses, l; var list, i, synapses, l, desc;
synapses = edge.getData("synapses"); synapses = edge.getData("synapses");
l = synapses.length; l = synapses.length;
@ -1311,7 +1311,9 @@ Metamaps.SynapseCard = {
list = '<ul id="switchSynapseList">'; list = '<ul id="switchSynapseList">';
for (i = 0; i < l; i++) { for (i = 0; i < l; i++) {
if (synapses[i] !== synapse) { // don't add the current one to the list if (synapses[i] !== synapse) { // don't add the current one to the list
list += '<li data-synapse-index="' + i + '">' + synapses[i].get('desc') + '</li>'; desc = synapses[i].get('desc');
desc = desc === "" || desc === null ? "(no description)" : desc;
list += '<li data-synapse-index="' + i + '">' + desc + '</li>';
} }
} }
list += '</ul>' list += '</ul>'
@ -1333,7 +1335,7 @@ Metamaps.SynapseCard = {
add_user_info: function (synapse) { add_user_info: function (synapse) {
var u = '<div id="edgeUser" class="hoverForTip">'; var u = '<div id="edgeUser" class="hoverForTip">';
u += '<img src="" width="24" height="24" />' u += '<img src="" width="24" height="24" />'
u += '<div class="tip">Created by ' + synapse.get("user_name") + '</div></div>'; u += '<div class="tip">' + synapse.get("user_name") + '</div></div>';
$('#editSynLowerBar').append(u); $('#editSynLowerBar').append(u);
// get mapper image // get mapper image
@ -1826,6 +1828,7 @@ Metamaps.Realtime = {
Metamaps.GlobalUI.Account.close(); Metamaps.GlobalUI.Account.close();
Metamaps.Filter.close(); Metamaps.Filter.close();
$('.sidebarCollaborateIcon div').addClass('hide');
if (!self.isOpen && !self.changing) { if (!self.isOpen && !self.changing) {
self.changing = true; self.changing = true;
@ -1837,7 +1840,7 @@ Metamaps.Realtime = {
}, },
close: function () { close: function () {
var self = Metamaps.Realtime; var self = Metamaps.Realtime;
$(".sidebarCollaborateIcon div").removeClass('hide');
if (!self.changing) { if (!self.changing) {
self.changing = true; self.changing = true;
$('.sidebarCollaborateBox').fadeOut(200, function () { $('.sidebarCollaborateBox').fadeOut(200, function () {
@ -1884,13 +1887,13 @@ Metamaps.Realtime = {
turnOn: function (notify) { turnOn: function (notify) {
var self = Metamaps.Realtime; var self = Metamaps.Realtime;
if (!self.status) { if (notify) self.sendRealtimeOn();
if (notify) self.sendRealtimeOn(); $(".rtMapperSelf").removeClass('littleRtOff').addClass('littleRtOn');
$(".rtMapperSelf").removeClass('littleRtOff').addClass('littleRtOn'); $('.rtOn').addClass('active');
self.status = true; $('.rtOff').removeClass('active');
$(".sidebarCollaborateIcon").addClass("blue"); self.status = true;
$(".collabCompass").show(); $(".sidebarCollaborateIcon").addClass("blue");
} $(".collabCompass").show();
}, },
turnOff: function (silent) { turnOff: function (silent) {
var self = Metamaps.Realtime; var self = Metamaps.Realtime;
@ -1898,6 +1901,8 @@ Metamaps.Realtime = {
if (self.status) { if (self.status) {
if (!silent) self.sendRealtimeOff(); if (!silent) self.sendRealtimeOff();
$(".rtMapperSelf").removeClass('littleRtOn').addClass('littleRtOff'); $(".rtMapperSelf").removeClass('littleRtOn').addClass('littleRtOff');
$('.rtOn').removeClass('active');
$('.rtOff').addClass('active');
self.status = false; self.status = false;
$(".sidebarCollaborateIcon").removeClass("blue"); $(".sidebarCollaborateIcon").removeClass("blue");
$(".collabCompass").hide(); $(".collabCompass").hide();
@ -3067,6 +3072,8 @@ Metamaps.Filter = {
Metamaps.GlobalUI.Account.close(); Metamaps.GlobalUI.Account.close();
Metamaps.Realtime.close(); Metamaps.Realtime.close();
$('.sidebarFilterIcon div').addClass('hide');
if (!self.isOpen && !self.changing) { if (!self.isOpen && !self.changing) {
self.changing = true; self.changing = true;
@ -3080,6 +3087,8 @@ Metamaps.Filter = {
}, },
close: function () { close: function () {
var self = Metamaps.Filter; var self = Metamaps.Filter;
$('.sidebarFilterIcon div').removeClass('hide');
if (!self.changing) { if (!self.changing) {
self.changing = true; self.changing = true;
@ -3103,6 +3112,8 @@ Metamaps.Filter = {
$('#filter_by_metacode ul').empty(); $('#filter_by_metacode ul').empty();
$('#filter_by_mapper ul').empty(); $('#filter_by_mapper ul').empty();
$('#filter_by_synapse ul').empty(); $('#filter_by_synapse ul').empty();
$('.filterBox .showAll').addClass('active');
}, },
/* /*
Most of this data essentially depends on the ruby function which are happening for filter inside view filterBox Most of this data essentially depends on the ruby function which are happening for filter inside view filterBox
@ -3231,36 +3242,48 @@ Metamaps.Filter = {
filterAllMetacodes: function (e) { filterAllMetacodes: function (e) {
var self = Metamaps.Filter; var self = Metamaps.Filter;
$('#filter_by_metacode ul li').addClass('toggledOff'); $('#filter_by_metacode ul li').addClass('toggledOff');
$('.showAllMetacodes').removeClass('active');
$('.hideAllMetacodes').addClass('active');
self.visible.metacodes = []; self.visible.metacodes = [];
self.passFilters(); self.passFilters();
}, },
filterNoMetacodes: function (e) { filterNoMetacodes: function (e) {
var self = Metamaps.Filter; var self = Metamaps.Filter;
$('#filter_by_metacode ul li').removeClass('toggledOff'); $('#filter_by_metacode ul li').removeClass('toggledOff');
$('.showAllMetacodes').addClass('active');
$('.hideAllMetacodes').removeClass('active');
self.visible.metacodes = self.filters.metacodes.slice(); self.visible.metacodes = self.filters.metacodes.slice();
self.passFilters(); self.passFilters();
}, },
filterAllMappers: function (e) { filterAllMappers: function (e) {
var self = Metamaps.Filter; var self = Metamaps.Filter;
$('#filter_by_mapper ul li').addClass('toggledOff'); $('#filter_by_mapper ul li').addClass('toggledOff');
$('.showAllMappers').removeClass('active');
$('.hideAllMappers').addClass('active');
self.visible.mappers = []; self.visible.mappers = [];
self.passFilters(); self.passFilters();
}, },
filterNoMappers: function (e) { filterNoMappers: function (e) {
var self = Metamaps.Filter; var self = Metamaps.Filter;
$('#filter_by_mapper ul li').removeClass('toggledOff'); $('#filter_by_mapper ul li').removeClass('toggledOff');
$('.showAllMappers').addClass('active');
$('.hideAllMappers').removeClass('active');
self.visible.mappers = self.filters.mappers.slice(); self.visible.mappers = self.filters.mappers.slice();
self.passFilters(); self.passFilters();
}, },
filterAllSynapses: function (e) { filterAllSynapses: function (e) {
var self = Metamaps.Filter; var self = Metamaps.Filter;
$('#filter_by_synapse ul li').addClass('toggledOff'); $('#filter_by_synapse ul li').addClass('toggledOff');
$('.showAllSynapses').removeClass('active');
$('.hideAllSynapses').addClass('active');
self.visible.synapses = []; self.visible.synapses = [];
self.passFilters(); self.passFilters();
}, },
filterNoSynapses: function (e) { filterNoSynapses: function (e) {
var self = Metamaps.Filter; var self = Metamaps.Filter;
$('#filter_by_synapse ul li').removeClass('toggledOff'); $('#filter_by_synapse ul li').removeClass('toggledOff');
$('.showAllSynapses').addClass('active');
$('.hideAllSynapses').removeClass('active');
self.visible.synapses = self.filters.synapses.slice(); self.visible.synapses = self.filters.synapses.slice();
self.passFilters(); self.passFilters();
}, },
@ -3284,14 +3307,53 @@ Metamaps.Filter = {
toggleMetacode: function () { toggleMetacode: function () {
var self = Metamaps.Filter; var self = Metamaps.Filter;
self.toggleLi.call(this, 'metacodes'); self.toggleLi.call(this, 'metacodes');
if (self.visible.metacodes.length === self.filters.metacodes.length) {
$('.showAllMetacodes').addClass('active');
$('.hideAllMetacodes').removeClass('active');
}
else if (self.visible.metacodes.length === 0) {
$('.showAllMetacodes').removeClass('active');
$('.hideAllMetacodes').addClass('active');
}
else {
$('.showAllMetacodes').removeClass('active');
$('.hideAllMetacodes').removeClass('active');
}
}, },
toggleMapper: function () { toggleMapper: function () {
var self = Metamaps.Filter; var self = Metamaps.Filter;
self.toggleLi.call(this, 'mappers'); self.toggleLi.call(this, 'mappers');
if (self.visible.mappers.length === self.filters.mappers.length) {
$('.showAllMappers').addClass('active');
$('.hideAllMappers').removeClass('active');
}
else if (self.visible.mappers.length === 0) {
$('.showAllMappers').removeClass('active');
$('.hideAllMappers').addClass('active');
}
else {
$('.showAllMappers').removeClass('active');
$('.hideAllMappers').removeClass('active');
}
}, },
toggleSynapse: function () { toggleSynapse: function () {
var self = Metamaps.Filter; var self = Metamaps.Filter;
self.toggleLi.call(this, 'synapses'); self.toggleLi.call(this, 'synapses');
if (self.visible.synapses.length === self.filters.synapses.length) {
$('.showAllSynapses').addClass('active');
$('.hideAllSynapses').removeClass('active');
}
else if (self.visible.synapses.length === 0) {
$('.showAllSynapses').removeClass('active');
$('.hideAllSynapses').addClass('active');
}
else {
$('.showAllSynapses').removeClass('active');
$('.hideAllSynapses').removeClass('active');
}
}, },
passFilters: function () { passFilters: function () {
var self = Metamaps.Filter; var self = Metamaps.Filter;
@ -4196,6 +4258,7 @@ Metamaps.Map = {
Metamaps.Create.newTopic.hide(); Metamaps.Create.newTopic.hide();
Metamaps.Create.newSynapse.hide(); Metamaps.Create.newSynapse.hide();
Metamaps.Filter.close(); Metamaps.Filter.close();
Metamaps.Map.InfoBox.close();
Metamaps.Realtime.endActiveMap(); Metamaps.Realtime.endActiveMap();
} }
}, },
@ -4242,6 +4305,7 @@ Metamaps.Map = {
Metamaps.GlobalUI.CreateMap.topicsToMap = nodes_data; Metamaps.GlobalUI.CreateMap.topicsToMap = nodes_data;
Metamaps.GlobalUI.CreateMap.synapsesToMap = synapses_data; Metamaps.GlobalUI.CreateMap.synapsesToMap = synapses_data;
}, },
leavePrivateMap: function(){ leavePrivateMap: function(){
var map = Metamaps.Active.Map; var map = Metamaps.Active.Map;
@ -4495,7 +4559,7 @@ Metamaps.Map.InfoBox = {
isOpen: false, isOpen: false,
changing: false, changing: false,
selectingPermission: false, selectingPermission: false,
changePermissionText: "<div class='tip'>As the creator, you can change the permission of this map, but the permissions of the topics and synapses on it must be changed independently.</div>", changePermissionText: "<div class='tooltips'>As the creator, you can change the permission of this map, but the permissions of the topics and synapses on it must be changed independently.</div>",
nameHTML: '<span class="best_in_place best_in_place_name" id="best_in_place_map_{{id}}_name" data-url="/maps/{{id}}" data-object="map" data-attribute="name" data-type="textarea" data-activator="#mapInfoName">{{name}}</span>', nameHTML: '<span class="best_in_place best_in_place_name" id="best_in_place_map_{{id}}_name" data-url="/maps/{{id}}" data-object="map" data-attribute="name" data-type="textarea" data-activator="#mapInfoName">{{name}}</span>',
descHTML: '<span class="best_in_place best_in_place_desc" id="best_in_place_map_{{id}}_desc" data-url="/maps/{{id}}" data-object="map" data-attribute="desc" data-nil="Click to add description..." data-type="textarea" data-activator="#mapInfoDesc">{{desc}}</span>', descHTML: '<span class="best_in_place best_in_place_desc" id="best_in_place_map_{{id}}_desc" data-url="/maps/{{id}}" data-object="map" data-attribute="desc" data-nil="Click to add description..." data-type="textarea" data-activator="#mapInfoDesc">{{desc}}</span>',
init: function () { init: function () {
@ -4521,7 +4585,7 @@ Metamaps.Map.InfoBox = {
}, },
open: function () { open: function () {
var self = Metamaps.Map.InfoBox; var self = Metamaps.Map.InfoBox;
$('.mapInfoIcon div').addClass('hide');
if (!self.isOpen && !self.changing) { if (!self.isOpen && !self.changing) {
self.changing = true; self.changing = true;
$('.mapInfoBox').fadeIn(200, function () { $('.mapInfoBox').fadeIn(200, function () {
@ -4533,12 +4597,14 @@ Metamaps.Map.InfoBox = {
close: function () { close: function () {
var self = Metamaps.Map.InfoBox; var self = Metamaps.Map.InfoBox;
$('.mapInfoIcon div').removeClass('hide');
if (!self.changing) { if (!self.changing) {
self.changing = true; self.changing = true;
$('.mapInfoBox').fadeOut(200, function () { $('.mapInfoBox').fadeOut(200, function () {
self.changing = false; self.changing = false;
self.isOpen = false; self.isOpen = false;
self.hidePermissionSelect(); self.hidePermissionSelect();
$('.mapContributors .tip').hide();
}); });
} }
}, },
@ -4613,6 +4679,17 @@ Metamaps.Map.InfoBox = {
$('.mapInfoBox.yourMap').unbind('.yourMap').bind('click.yourMap', self.hidePermissionSelect); $('.mapInfoBox.yourMap').unbind('.yourMap').bind('click.yourMap', self.hidePermissionSelect);
$('.yourMap .mapInfoDelete').unbind().click(self.deleteActiveMap); $('.yourMap .mapInfoDelete').unbind().click(self.deleteActiveMap);
$('.mapContributors span, #mapContribs').unbind().click(function(event){
$('.mapContributors .tip').toggle();
event.stopPropagation();
});
$('.mapContributors .tip').unbind().click(function(event){
event.stopPropagation();
});
$('.mapInfoBox').unbind('.hideTip').bind('click.hideTip', function(){
$('.mapContributors .tip').hide();
});
}, },
updateNameDescPerm: function(name, desc, perm) { updateNameDescPerm: function(name, desc, perm) {
$('.mapInfoName .best_in_place_name').html(name); $('.mapInfoName .best_in_place_name').html(name);
@ -4622,9 +4699,17 @@ Metamaps.Map.InfoBox = {
createContributorList: function () { createContributorList: function () {
var self = Metamaps.Map.InfoBox; var self = Metamaps.Map.InfoBox;
var mapperNames = Metamaps.Mappers.pluck("name"); var string = "";
return mapperNames.length > 0 ? mapperNames.join(", ") : "No one has added anything yet."; string += "<ul>";
Metamaps.Mappers.each(function(m){
string += '<li><img class="rtUserImage" width="25" height="25" src="' + m.get("image") + '" />' + m.get("name") + '</li>';
});
string += "</ul>";
return string;
}, },
updateNumbers: function () { updateNumbers: function () {
var self = Metamaps.Map.InfoBox; var self = Metamaps.Map.InfoBox;
@ -4641,7 +4726,7 @@ Metamaps.Map.InfoBox = {
} }
$('.mapContributors img').attr('src', contributors_image).removeClass('multiple mTwo').addClass(contributors_class); $('.mapContributors img').attr('src', contributors_image).removeClass('multiple mTwo').addClass(contributors_class);
$('.mapContributors span').text(Metamaps.Mappers.length) $('.mapContributors span').text(Metamaps.Mappers.length)
$('.mapContributors .tip').text(self.createContributorList()); $('.mapContributors .tip').html(self.createContributorList());
$('.mapTopics').text(Metamaps.Topics.length); $('.mapTopics').text(Metamaps.Topics.length);
$('.mapSynapses').text(Metamaps.Synapses.length); $('.mapSynapses').text(Metamaps.Synapses.length);

View file

@ -141,7 +141,7 @@ input[type="submit"]:active {
} }
.leaveSpace { .leaveSpace {
display: block; display: block;
height: 50px; height: 25px;
} }
.hidden { .hidden {
display: none; display: none;
@ -531,7 +531,7 @@ input[type="submit"]:active {
background: #FFFFFF; background: #FFFFFF;
height: 14px; height: 14px;
margin: 0; margin: 0;
padding: 10px 6px; padding: 14px 6px;
border: none; border: none;
border-radius: 2px; border-radius: 2px;
outline: none; outline: none;
@ -581,7 +581,7 @@ input[type="submit"]:active {
} }
.new_synapse #synapse_desc, .new_synapse #synapse_desc,
.new_synapse .tt-hint { .new_synapse .tt-hint {
width: 244px; width: 258px;
background: #FFFFFF; background: #FFFFFF;
height: 14px; height: 14px;
margin: 0; margin: 0;
@ -1007,7 +1007,7 @@ h3.filterBox {
cursor: pointer; cursor: pointer;
font-size:12px; font-size:12px;
} }
.sidebarFilterBox span:hover { .sidebarFilterBox span:hover, .sidebarFilterBox span.active {
color: #00BCD4; color: #00BCD4;
} }
.sidebarFilterBox ul { .sidebarFilterBox ul {
@ -1104,7 +1104,7 @@ h3.realtimeBoxTitle {
text-align: center; text-align: center;
font-size:12px; font-size:12px;
} }
.sidebarCollaborateBox .realtimeOnOff:hover { .sidebarCollaborateBox .realtimeOnOff:hover, .sidebarCollaborateBox .realtimeOnOff.active {
color: #00bcd4; color: #00bcd4;
} }
.sidebarCollaborateBox .rtOff { .sidebarCollaborateBox .rtOff {
@ -1137,6 +1137,7 @@ h3.realtimeBoxTitle {
left: 0; left: 0;
border-radius: 14px; border-radius: 14px;
} }
.littleJuntoIcon { .littleJuntoIcon {
width: 24px; width: 24px;
height:24px; height:24px;
@ -1359,9 +1360,14 @@ float: left;
#new_topic .tt-suggestion, #new_topic .tt-suggestion,
#new_synapse .tt-suggestion { #new_synapse .tt-suggestion {
background: #F5F5F5; background: #F5F5F5;
width: 256px;
position: relative; position: relative;
} }
#new_topic .tt-suggestion {
width: 256px;
}
#new_synapse .tt-suggestion {
width: 270px;
}
#new_topic .autocompleteSection { #new_topic .autocompleteSection {
float: left; float: left;
} }
@ -1380,9 +1386,9 @@ float: left;
line-height: 14px; line-height: 14px;
font-size: 14px; font-size: 14px;
padding: 9px 0 9px 8px; padding: 9px 0 9px 8px;
display: inline-block;
} }
#new_topic .expandTopicMetadata, #new_topic .expandTopicMetadata {
#new_synapse .expandSynapseMetadata {
display:none; display:none;
width: 16px; width: 16px;
height: 16px; height: 16px;
@ -1394,19 +1400,14 @@ float: left;
background-position: 0 -32px; background-position: 0 -32px;
} }
#new_topic .tt-suggestion.tt-is-under-cursor .expandTopicMetadata, #new_topic .tt-suggestion.tt-is-under-cursor .expandTopicMetadata,
#new_topic .tt-suggestion.tt-is-under-mouse-cursor .expandTopicMetadata, #new_topic .tt-suggestion.tt-is-under-mouse-cursor .expandTopicMetadata {
#new_synapse .tt-suggestion.tt-is-under-cursor .expandSynapseMetadata,
#new_synapse .tt-suggestion.tt-is-under-mouse-cursor .expandSynapseMetadata {
display: block; display: block;
} }
#new_topic .tt-suggestion.tt-is-under-cursor .topicMetadata, #new_topic .tt-suggestion.tt-is-under-cursor .topicMetadata,
#new_topic .tt-suggestion.tt-is-under-mouse-cursor .topicMetadata, #new_topic .tt-suggestion.tt-is-under-mouse-cursor .topicMetadata {
#new_synapse .tt-suggestion.tt-is-under-cursor .synapseMetadata,
#new_synapse .tt-suggestion.tt-is-under-mouse-cursor .synapseMetadata {
display: block; display: block;
} }
#new_topic .topicMetadata, #new_topic .topicMetadata {
#new_synapse .synapseMetadata {
position: absolute; position: absolute;
display: none; display: none;
top: -18px; top: -18px;
@ -1417,8 +1418,7 @@ float: left;
font-family: 'din-regular', helvetica, sans-serif; font-family: 'din-regular', helvetica, sans-serif;
font-size: 14px; font-size: 14px;
} }
#new_topic .topicPermission, #new_topic .topicPermission {
#new_synapse .synapsePermission {
width: 32px; width: 32px;
height: 32px; height: 32px;
background-repeat: no-repeat; background-repeat: no-repeat;
@ -1439,8 +1439,7 @@ float: left;
#new_synapse .synapsePermission.private { #new_synapse .synapsePermission.private {
background-position: -32px 0; background-position: -32px 0;
} }
#new_topic .topicNumMaps, #new_topic .topicNumMaps {
#new_synapse .synapseNumMaps {
height: 14px; height: 14px;
padding: 1px 0 1px 32px; padding: 1px 0 1px 32px;
background-image: url(metamap16.png); background-image: url(metamap16.png);
@ -1458,52 +1457,92 @@ float: left;
position: absolute; position: absolute;
bottom: 10px; bottom: 10px;
} }
#new_topic .topicOriginatorIcon, #new_topic .topicOriginatorIcon {
#new_synapse .synapseOriginatorIcon {
position: absolute; position: absolute;
top: 8px; top: 8px;
right: 8px; right: 8px;
} }
#new_topic .topicOriginatorIcon img, #new_topic .topicOriginatorIcon img {
#new_synapse .synapseOriginatorIcon img {
border-radius: 12px; border-radius: 12px;
} }
#new_topic .topicOriginatorIcon:hover .tip, #new_topic .topicOriginatorIcon .tooltips {
#new_synapse .synapseOriginatorIcon:hover .tip { left: 32px;
display: block; top: -2px;
right: auto;
} }
#new_topic .tip, #new_topic .topicOriginatorIcon .tooltips:after {
#new_synapse .tip { content: '';
display: none;
position: absolute; position: absolute;
background: white; top: 57%;
width: auto; left: -4px;
top: 0; margin-top: -6px;
left: 23px; width: 0;
color: black; height: 0;
white-space: nowrap; border-right: 4px solid #000000;
border-radius: 4px; border-top: 5px solid transparent;
font-size: 15px !important; border-bottom: 5px solid transparent;
line-height: 15px; }
padding: 2px 5px 2px; #new_topic .topicOriginatorIcon:hover .tooltips {
z-index: 100; display:block;
} }
#new_synapse .tt-dropdown-menu { #new_synapse .tt-dropdown-menu {
background: #F5F5F5; background: #F5F5F5;
} }
#new_synapse .tt-dropdown-menu h3 { #new_synapse .tt-dropdown-menu h3 {
font-family: 'vinyl', helvetica, sans-serif; font-size: 14px;
text-transform: uppercase;
font-style: italic;
font-size: 14pxpx;
line-height: 16px; line-height: 16px;
margin: 3px; padding: 8px;
border-top: 1px solid #BFBFBF;
color: #808080;
} }
#new_synapse .tt-suggestion .resultnoresult .synapsePermission, #new_synapse .tt-suggestion .resultnoresult .synapsePermission,
#new_synapse .tt-suggestion .resultnoresult .synapseOriginatorIcon { #new_synapse .tt-suggestion .resultnoresult .synapseOriginatorIcon {
display: none; display: none;
} }
#new_synapse .synapseMetadata {
width: 64px;
padding-left: 4px;
height: 32px;
position: absolute;
left: 202px;
top: 0;
}
#new_synapse .synapseOriginatorIcon {
position: absolute;
top: 4px;
}
#new_synapse .synapseOriginatorIcon .tooltips {
right: 32px;
top: -2px;
}
#new_synapse .synapseOriginatorIcon .tooltips:after {
content: '';
position: absolute;
top: 57%;
left: 100%;
margin-top: -6px;
width: 0;
height: 0;
border-left: 4px solid #000000;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
}
#new_synapse .synapseOriginatorIcon:hover .tooltips {
display:block;
}
#new_synapse .synapseOriginatorIcon img {
border-radius: 12px;
}
#new_synapse .synapsePermission {
position: absolute;
left: 32px;
width: 32px;
height: 32px;
background-repeat: no-repeat;
background-image: url(permissions32_sprite.png);
}
/* map info box */ /* map info box */
/* map info box */ /* map info box */
@ -1575,7 +1614,6 @@ float: left;
margin: 9px 0px 9px 56px; margin: 9px 0px 9px 56px;
padding: 0; padding: 0;
width: 64px; width: 64px;
cursor: pointer;
} }
#mapContribs { #mapContribs {
float: left; float: left;
@ -1584,6 +1622,7 @@ float: left;
width: 25px; width: 25px;
height: 25px; height: 25px;
border-radius: 15px; border-radius: 15px;
cursor: pointer;
} }
#mapContribs.multiple.mTwo { #mapContribs.multiple.mTwo {
box-shadow: 1px 1px 0 0 #B5B5B5,3px 2px 0 0 #424242; box-shadow: 1px 1px 0 0 #B5B5B5,3px 2px 0 0 #424242;
@ -1596,12 +1635,22 @@ float: left;
padding-top: 5px; padding-top: 5px;
padding-left: 8px; padding-left: 8px;
float: left; float: left;
cursor: pointer;
}
#mapContribsTip {
border: 2px solid #424242;
background-color: #fff;
width: 25px;
height: 25px;
border-radius: 15px;
} }
.infoStatIcon .tip { .infoStatIcon .tip {
display: none; display: none;
position: absolute; position: absolute;
background: white; background: #202020;
min-width: 180px; min-width: 180px;
max-width: 250px; max-width: 250px;
text-align: center; text-align: center;
@ -1609,20 +1658,78 @@ float: left;
border-radius: 4px; border-radius: 4px;
font-size: 15px !important; font-size: 15px !important;
line-height: 17px; line-height: 17px;
padding: 3px 5px 2px; padding: 6px 8px 6px 8px;
z-index: 100; z-index: 100;
} }
.mapContributors .tip { .mapContributors .tip {
top: 38px; top: 45px;
left: 6px; left: -10px;
} }
.mapInfoBox .mapPermission .tip {
top: 0; .mapContributors .tip ul {
right: 32px; max-height: 188px;
overflow-y: auto;
} }
.mapInfoBox .hoverForTip:hover .tip {
display: none; .mapContributors .tip li {
list-style-type: none;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding: 12px 40px;
display: block;
height: 14px;
font-family: 'din-regular', helvetica, sans-serif;
font-size: 14px;
line-height: 14px;
position: relative;
text-align: left;
color: white;
} }
.mapContributors div:after {
content: '';
position: absolute;
top: -4px;
left: 21px;
width: 0;
height: 0;
border-bottom: 4px solid #202020;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
}
.mapContributors .tip img {
border: 2px solid #bdbdbd;
position: absolute;
top: 4px;
left: 4px;
border-radius: 14px;
}
.mapInfoBox .mapPermission .tooltips {
top: -20px;
right: 36px;
width: 155px;
white-space: normal;
text-align: center;
}
.mapInfoBox .mapPermission .tooltips:after {
content: '';
position: absolute;
right: -4px;
top: 24px;
width: 0;
height: 0;
border-left: 4px solid black;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
}
.mapInfoBox.yourMap .mapPermission.hoverForTip:hover .tooltips {
display: block;
}
.mapTopics { .mapTopics {
background-image: url(topic32.png); background-image: url(topic32.png);
background-position: 13px center; background-position: 13px center;
@ -1902,6 +2009,9 @@ and it won't be important on password protected instances */
color: #424242; color: #424242;
text-align: left; text-align: left;
} }
.lightboxContent li {
list-style: none;
}
.openLightbox { .openLightbox {
cursor: pointer; cursor: pointer;
} }
@ -2101,10 +2211,20 @@ and it won't be important on password protected instances */
float: left; float: left;
} }
#about > p, #getInvolved > p, #invite > p, #colophon p { #colophon {
/* color: #000; overflow-y: scroll;
font-size: 16px;*/ height:434px;
margin: 0px 0px 20px 0px; }
#colophonLinks {
padding-left:20px;
}
#colophoneHeader {
padding-bottom:12px;
}
#about > p, #colophon p {
margin: 0px 0px 10px 0px;
line-height: 20px; line-height: 20px;
} }
#about ul { #about ul {
@ -2232,6 +2352,9 @@ and it won't be important on password protected instances */
#joinCodesBox { #joinCodesBox {
margin-top: 30px; margin-top: 30px;
} }
#joinCodesBox button {
margin: 16px 198px 0;
}
/* new map */ /* new map */
.new_map { .new_map {

View file

@ -19,11 +19,12 @@
#center-container { #center-container {
position:relative; position:relative;
height:100%; height:100%;
width:100%; width:100%;
/* background-color:#031924; */
color:#444; /* background-color:#031924; */
color:#444;
} }
.showcard { .showcard {
@ -121,18 +122,18 @@
.CardOnGraph .best_in_place_desc textarea { .CardOnGraph .best_in_place_desc textarea {
font-size: 13px; font-size: 13px;
line-height:15px; line-height:15px;
font-family: helvetica, sans-serif; font-family: helvetica, sans-serif;
color: #424242; color: #424242;
padding: 0; padding: 0;
width: 100%; width: 100%;
margin: 0; margin: 0;
border: 0; border: 0;
outline: none; outline: none;
font-size: 12px; font-size: 12px;
line-height: 15px; line-height: 15px;
background: none; background: none;
resize: none; resize: none;
} }
.CardOnGraph .desc h3 { .CardOnGraph .desc h3 {
@ -198,9 +199,40 @@ resize: none;
left: 0; left: 0;
border-radius: 16px; border-radius: 16px;
} }
.contributorName {
display:none; .contributor:hover .contributorName {
display: block;
} }
.contributorName {
display: none;
position: absolute;
background: black;
text-align: center;
color: white;
border-radius: 2px;
font-family: din-regular;
line-height: 15px;
font-size: 12px;
padding: 3px 5px 2px;
white-space: nowrap;
margin-top: 36px;
margin-left: -32px;
}
.contributor div:before {
content: '';
position: absolute;
top: 128%;
left: 13px;
margin-top: -30px;
width: 0;
height: 0;
border-bottom: 4px solid #000000;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
}
.linkItem.mapCount { .linkItem.mapCount {
margin-left: 12px; margin-left: 12px;
width: 24px; width: 24px;
@ -425,7 +457,21 @@ background-color: #E0E0E0;
bottom: 0; bottom: 0;
} }
.CardOnGraph .hoverForTip:hover .tip, .mapCard .hoverForTip:hover .tip { .tip li {
list-style-type: none;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding: 10px 34px;
display: block;
height: 14px;
font-family: 'din-regular', helvetica, sans-serif;
font-size: 14px;
line-height: 14px;
position: relative;
}
.CardOnGraph .hoverForTip:hover .tip, .mapCard .hoverForTip:hover .tip, #mapContribs:hover .tip {
display:block; display:block;
} }
.CardOnGraph .tip, .mapCard .tip { .CardOnGraph .tip, .mapCard .tip {
@ -626,6 +672,7 @@ font-family: 'din-regular', helvetica, sans-serif;
#editSynUpperBar { #editSynUpperBar {
background: #FFFFFF url(synapse32.png) no-repeat 8px center; background: #FFFFFF url(synapse32.png) no-repeat 8px center;
min-height: 48px; min-height: 48px;
height: 48px;
border-bottom: 1px solid #222222; border-bottom: 1px solid #222222;
display: table; display: table;
width: 100%; width: 100%;
@ -701,14 +748,14 @@ font-family: 'din-regular', helvetica, sans-serif;
border-bottom: 1px solid #BBBBBB; border-bottom: 1px solid #BBBBBB;
} }
#switchSynapseList li { #switchSynapseList li {
padding: 8px; padding: 8px 8px 8px 68px;
cursor: pointer; cursor: pointer;
font-family: 'din-regular'; font-family: 'din-regular';
font-size: 14px; font-size: 14px;
line-height: 16px; line-height: 16px;
} }
#switchSynapseList li:hover { #switchSynapseList li:hover {
background: #E0E0E0; background: #DAB539;
} }
#edgeUser { #edgeUser {
@ -723,18 +770,32 @@ font-family: 'din-regular', helvetica, sans-serif;
display:block; display:block;
} }
#edgeUser .tip { #edgeUser .tip {
background: none repeat scroll 0 0 #000000; display: none;
border-radius: 4px; position: absolute;
color: #FFFFFF; background: black;
display: none; text-align: center;
font-size: 15px !important; text-transform: none;
line-height: 17px; color: white;
padding: 3px 5px 2px; border-radius: 2px;
position: absolute; font-family: din-regular;
left: 0; line-height: 15px;
text-align: center; font-size: 12px;
top: 23px; padding: 3px 5px 2px;
z-index: 100; white-space: nowrap;
margin-top: 9px;
font-style: normal;
}
#edgeUser:hover div:before{
content: '';
position: absolute;
margin-top: -7px;
margin-left: 2px;
width: 0;
height: 0;
border-bottom: 4px solid #000000;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
} }
#edit_synapse .mapPerm { #edit_synapse .mapPerm {

View file

@ -214,10 +214,28 @@
top: 40px !important; top: 40px !important;
background: #F5F5F5; background: #F5F5F5;
width: 472px; width: 472px;
overflow-y: auto; overflow-y: visible;
overflow-x: hidden; overflow-x: visible;
box-shadow: 0 1px 1.5px rgba(0,0,0,0.12), 0 1px 1px rgba(0,0,0,0.24); box-shadow: 0 1px 1.5px rgba(0,0,0,0.12), 0 1px 1px rgba(0,0,0,0.24);
} }
.autoOptions #mapContribs {
width: 15px;
height: 15px;
border: 1px solid #424242;
margin-top: 4px;
margin-left: 4px;
}
.mapContributorsIcon span {
margin-left: 5px;
}
.mapContributorsIcon li span {
margin-left: 10px;
}
.searchHeader { .searchHeader {
height: 42px; height: 42px;
width: 100%; width: 100%;
@ -462,6 +480,12 @@
.sidebarSearch .topicOriginatorIcon img { .sidebarSearch .topicOriginatorIcon img {
border-radius: 9px; border-radius: 9px;
} }
.sidebarSearch .topicOriginatorIcon .tip {
left: 30px;
right: auto;
top: 1px;
}
.sidebarSearch .tip { .sidebarSearch .tip {
position: absolute; position: absolute;
background: #424242; background: #424242;
@ -480,6 +504,58 @@
.sidebarSearch .hoverForTip:hover .tip { .sidebarSearch .hoverForTip:hover .tip {
display: block; display: block;
} }
.sidebarSearch .mapContributorsIcon .tip {
left: 40px;
right: auto;
top: -5px;
padding-top: 5px;
padding-bottom: 5px;
}
.sidebarSearch .hoverForTip .tip li {
padding-left: 28px;
padding-top: 4px;
}
.tipUserImage {
position: absolute;
top: 0px;
left: 7px;
border-radius: 14px;
}
.sidebarSearch .hoverForTip .tip:before {
content: '';
position: absolute;
width: 0;
height: 0;
border-right: 4px solid #424242;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
}
.sidebarSearch .hoverForTip.addToMap .tip {
right: 30px;
}
.sidebarSearch .hoverForTip.addToMap .tip:before {
right: -4px;
border-left: 4px solid #424242;
border-right: none;
}
.sidebarSearch .mapContributorsIcon .tip:before {
top: 65px;
left: -4px;
margin-top: -53px;
}
.sidebarSearch .topicOriginatorIcon .tip:before {
top: 58px;
left: -4px;
margin-top: -53px;
}
.sidebarSearch .mapContributorsIcon .mapContributors { .sidebarSearch .mapContributorsIcon .mapContributors {
top: auto; top: auto;
right: 0; right: 0;
@ -736,9 +812,13 @@
/* infoAndHelp */ /* infoAndHelp */
.mapPage .infoAndHelp, .topicPage .infoAndHelp{ .mapPage .infoAndHelp, .topicPage .infoAndHelp {
right: 70px; right: 70px;
} }
.mapPage .openCheatsheet .tooltipsAbove, .topicPage .openCheatsheet .tooltipsAbove {
left: 29px;
}
.infoAndHelp { .infoAndHelp {
position: fixed; position: fixed;
bottom: 20px; bottom: 20px;
@ -790,6 +870,10 @@
right: 24px; right: 24px;
} }
.topicPage .zoomExtents {
display: none;
}
.mapControl { .mapControl {
width:32px; width:32px;
height:32px; height:32px;
@ -798,6 +882,11 @@
background-position: 0 0; background-position: 0 0;
cursor:pointer; cursor:pointer;
} }
.mapControls:hover, .infoAndHelp:hover {
z-index: 4;
}
.takeScreenshot { .takeScreenshot {
margin-bottom: 5px; margin-bottom: 5px;
border-radius: 2px; border-radius: 2px;
@ -810,17 +899,157 @@
.canEditMap .takeScreenshot { .canEditMap .takeScreenshot {
display: block; display: block;
} }
.zoomExtents { .zoomExtents {
margin-bottom:5px; margin-bottom:5px;
border-radius: 2px; border-radius: 2px;
background-image: url(extents_sprite.png); background-image: url(extents_sprite.png);
} }
.zoomExtents:hover { .zoomExtents:hover {
background-position: -32px 0; background-position: -32px 0;
} }
.zoomExtents:hover .tooltips, .zoomIn:hover .tooltips, .zoomOut:hover .tooltips, .takeScreenshot:hover .tooltips, .sidebarCollaborateIcon:hover .tooltipsUnder,
.sidebarFilterIcon:hover .tooltipsUnder, .sidebarForkIcon:hover .tooltipsUnder, .addMap:hover .tooltipsUnder, .authenticated .sidebarAccountIcon:hover .tooltipsUnder,
.mapInfoIcon:hover .tooltipsAbove, .openCheatsheet:hover .tooltipsAbove {
display: block;
}
.hide {
display: none !important;
}
.tooltips {
display: none;
position: absolute;
background: black;
text-align: center;
right: 45px;
color: white;
border-radius: 2px;
font-family: din-regular;
line-height: 15px;
font-size: 12px;
padding: 3px 5px 2px;
white-space: nowrap;
margin-top: 5px;
}
.tooltipsUnder {
display: none;
position: absolute;
background: black;
text-align: center;
color: white;
border-radius: 2px;
font-family: din-regular;
line-height: 15px;
font-size: 12px;
padding: 3px 5px 2px;
white-space: nowrap;
margin-top: 36px;
}
.tooltipsAbove {
display: none;
position: absolute;
background: black;
text-align: center;
text-transform: none;
color: white;
border-radius: 2px;
font-family: din-regular;
line-height: 15px;
font-size: 12px;
padding: 3px 5px 2px;
white-space: nowrap;
margin-top: -23px;
font-style: normal;
}
.sidebarCollaborateIcon .tooltipsUnder {
margin-left: -3px;
}
.sidebarFilterIcon .tooltipsUnder {
margin-left: -4px;
}
.sidebarForkIcon .tooltipsUnder {
margin-left: -34px;
}
.sidebarForkIcon div:after{
left: 45%;
}
.addMap .tooltipsUnder {
margin-left: -36px;
}
.addMap div:after {
left: 45%;
}
.mapInfoIcon .tooltipsAbove {
left: -11px;
}
.openCheatsheet .tooltipsAbove {
left: -4px;
}
.sidebarAccountIcon .tooltipsUnder {
margin-left: -8px;
margin-top: 40px;
}
.zoomExtents div::after, .zoomIn div::after, .zoomOut div::after, .takeScreenshot div:after {
content: '';
position: absolute;
top: 57%;
left: 100%;
margin-top: -6px;
width: 0;
height: 0;
border-left: 4px solid #000000;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
}
.sidebarCollaborateIcon div:after, .sidebarFilterIcon div:after, .sidebarAccountIcon .tooltipsUnder:after {
left: 38%;
}
.sidebarCollaborateIcon div:after, .sidebarFilterIcon div:after, .sidebarForkIcon div:after, .addMap div:after, .sidebarAccountIcon .tooltipsUnder:after {
content: '';
position: absolute;
top: 128%;
margin-top: -30px;
width: 0;
height: 0;
border-bottom: 4px solid #000000;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
}
.mapInfoIcon div:after, .openCheatsheet div:after {
content: '';
position: absolute;
top: 77%;
left: 41%;
margin-top: 5px;
width: 0;
height: 0;
border-top: 4px solid #000000;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
}
.zoomIn { .zoomIn {
background-image: url(zoom_sprite.png); background-image: url(zoom_sprite.png);
background-position: 0 0; background-position: 0 /0;
border-top-left-radius: 2px; border-top-left-radius: 2px;
border-top-right-radius: 2px; border-top-right-radius: 2px;
} }

View file

@ -194,9 +194,24 @@ class MainController < ApplicationController
topic2id = params[:topic2id] topic2id = params[:topic2id]
if term && !term.empty? if term && !term.empty?
@synapses = Synapse.select('DISTINCT "desc"'). @synapses = Synapse.select('DISTINCT "desc"').where('LOWER("desc") like ?', '%' + term.downcase + '%').order('"desc"')
where('LOWER("desc") like ?', '%' + term.downcase + '%').limit(5).order('"desc"')
# remove any duplicate synapse types that just differ by
# leading or trailing whitespaces
collectedDesc = []
@synapses.delete_if {|s|
desc = s.desc == nil || s.desc == "" ? "" : s.desc.strip
if collectedDesc.index(desc) == nil
collectedDesc.push(desc)
boolean = false
else
boolean = true
end
}
#limit to 5 results
@synapses = @synapses.slice(0,5)
render json: autocomplete_synapse_generic_json(@synapses) render json: autocomplete_synapse_generic_json(@synapses)
elsif topic1id && !topic1id.empty? elsif topic1id && !topic1id.empty?

View file

@ -15,19 +15,19 @@ module MapsHelper
map['contributorCount'] = m.contributors.count map['contributorCount'] = m.contributors.count
map['rtype'] = "map" map['rtype'] = "map"
contributorList = m.user.name + ' created this map. ' contributorTip = ''
firstContributorImage = '/assets/user.png'
if m.contributors.count > 0 if m.contributors.count > 0
m.contributors.each_with_index do |c, index| firstContributorImage = m.contributors[0].image.url(:square)
comma = (index+1) == m.contributors.count ? '' : ', ' m.contributors.each_with_index do |c, index|
contributorList += c.name + comma userImage = c.image.url(:square)
end name = c.name
contributorList += ' has edited it.' if m.contributors.count == 1 contributorTip += '<li> <img class="tipUserImage" width="25" height="25" src=' + userImage + ' />' + '<span>' + name + '</span> </li>'
contributorList += ' have edited it.' if m.contributors.count > 1 end
else
contributorList += 'No one has added anything yet.'
end end
map['contributorList'] = contributorList map['contributorTip'] = contributorTip
map['mapContributorImage'] = firstContributorImage
temp.push map temp.push map
end end
return temp return temp

View file

@ -20,12 +20,12 @@ module SynapsesHelper
synapses.each do |s| synapses.each do |s|
synapse = {} synapse = {}
synapse['id'] = s.id synapse['id'] = s.id
synapse['label'] = s.desc synapse['label'] = s.desc == nil || s.desc == "" ? "(no description)" : s.desc
synapse['value'] = s.desc synapse['value'] = s.desc
synapse['permission'] = s.permission synapse['permission'] = s.permission
synapse['mapCount'] = s.maps.count synapse['mapCount'] = s.maps.count
synapse['originator'] = s.user.name synapse['originator'] = s.user.name
synapse['originatorImage'] = s.user.image synapse['originatorImage'] = s.user.image.url(:square)
synapse['rtype'] = "synapse" synapse['rtype'] = "synapse"
temp.push synapse temp.push synapse

View file

@ -15,7 +15,7 @@ module TopicsHelper
topic['mapCount'] = t.maps.count topic['mapCount'] = t.maps.count
topic['synapseCount'] = t.synapses.count topic['synapseCount'] = t.synapses.count
topic['originator'] = t.user.name topic['originator'] = t.user.name
topic['originatorImage'] = t.user.image topic['originatorImage'] = t.user.image.url(:square)
topic['rtype'] = "topic" topic['rtype'] = "topic"
temp.push topic temp.push topic

View file

@ -8,8 +8,6 @@ class Map < ActiveRecord::Base
has_many :topics, :through => :topicmappings has_many :topics, :through => :topicmappings
has_many :synapses, :through => :synapsemappings has_many :synapses, :through => :synapsemappings
#after_touch :save_screenshot
# This method associates the attribute ":image" with a file attachment # This method associates the attribute ":image" with a file attachment
has_attached_file :screenshot, :styles => { has_attached_file :screenshot, :styles => {
:thumb => ['188x126#', :png] :thumb => ['188x126#', :png]
@ -121,17 +119,6 @@ class Map < ActiveRecord::Base
return true return true
end end
def save_screenshot
# TODO - this will grab a map every single frickin' time a map is touched
# we need a system to throttle the amount to 1/hour or something like that
# maybe have a flag - last time this map was screenshotted
# don't update if it was less than an hour ago
# except this has the issue of a user updating map 7x, and it only screenshotting after
# the first time. We only want it to screenhsot the 7th time.
# We need to store a timestamp somewhere and do processing every hour, I think.
GrabMapScreenshotWorker.perform_async(self.id)
end
def decode_base64(imgBase64) def decode_base64(imgBase64)
decoded_data = Base64.decode64(imgBase64) decoded_data = Base64.decode64(imgBase64)

View file

@ -28,12 +28,7 @@ class User < ActiveRecord::Base
validates_uniqueness_of :name # done by devise validates_uniqueness_of :name # done by devise
validates_uniqueness_of :email # done by devise validates_uniqueness_of :email # done by devise
if ActiveRecord::Base.connection.table_exists? 'users' validates :joinedwithcode, :presence => true, :inclusion => { :in => $codes, :message => "%{value} is not valid" }, :on => :create
codes = ActiveRecord::Base.connection.execute("SELECT code FROM users").map {|user| user["code"] }
else
codes = []
end
validates :joinedwithcode, :presence => true, :inclusion => { :in => codes, :message => "%{value} is not valid" }, :on => :create
# This method associates the attribute ":image" with a file attachment # This method associates the attribute ":image" with a file attachment
has_attached_file :image, :styles => { has_attached_file :image, :styles => {
@ -54,6 +49,8 @@ class User < ActiveRecord::Base
def generate_code def generate_code
#generate a random 8 letter/digit code that they can use to invite people #generate a random 8 letter/digit code that they can use to invite people
self.code = rand(36**8).to_s(36) self.code = rand(36**8).to_s(36)
$codes.push(self.code)
end end
def settings def settings

View file

@ -19,7 +19,7 @@
<div id="rightAboutParms"> <div id="rightAboutParms">
<p>PRIVATE BETA</p> <p>PRIVATE BETA</p>
<p>2.6 (Catalpa)</p> <p>2.6 (Catalpa)</p>
<p>Nov 11, 2014</p> <p>Nov 23, 2014</p>
</div> </div>
<div class="clearfloat"> <div class="clearfloat">
</div> </div>

View file

@ -1,13 +1,13 @@
<div class="mapControls mapElement"> <div class="mapControls mapElement">
<div class="takeScreenshot mapControl"></div> <div class="takeScreenshot mapControl"><div class="tooltips">Capture Screenshot</div></div>
<div class="zoomExtents mapControl"></div> <div class="zoomExtents mapControl"><div class="tooltips">Center View</div></div>
<div class="zoomIn mapControl"></div> <div class="zoomIn mapControl"><div class="tooltips">Zoom In</div></div>
<div class="zoomOut mapControl"></div> <div class="zoomOut mapControl"><div class="tooltips">Zoom Out</div></div>
</div> </div>
<div class="infoAndHelp"> <div class="infoAndHelp">
<%= render :partial => 'maps/mapinfobox' %> <%= render :partial => 'maps/mapinfobox' %>
<div class="mapInfoIcon infoElement mapElement"></div> <div class="mapInfoIcon infoElement mapElement"><div class="tooltipsAbove">Map Info</div></div>
<div class="openCheatsheet openLightbox infoElement" data-open="cheatsheet"></div> <div class="openCheatsheet openLightbox infoElement" data-open="cheatsheet"><div class="tooltipsAbove">Help</div></div>
<div class="clearfloat"></div> <div class="clearfloat"></div>
</div> </div>

View file

@ -13,7 +13,7 @@
<img id="mapContribs" class="{{contributors_class}}" <img id="mapContribs" class="{{contributors_class}}"
width="25" height="25" src="{{contributor_image}}" /> width="25" height="25" src="{{contributor_image}}" />
<span>{{contributor_count}}</span> <span>{{contributor_count}}</span>
<div class="tip">{{contributor_list}}</div> <div class="tip">{{{contributor_list}}}</div>
</div> </div>
<div class="infoStatIcon mapTopics"> <div class="infoStatIcon mapTopics">
{{topic_count}} {{topic_count}}
@ -121,8 +121,13 @@
{{synapseCount}} {{synapseCount}}
</div> </div>
<div class="mapContributorsIcon hoverForTip"> <div class="mapContributorsIcon hoverForTip">
<span class="tip mapContributors">{{contributorList}}</span> <img id="mapContribs" width="25" height="25" src="{{mapContributorImage}}" />
{{contributorCount}} <div class="tip">
<ul>
{{{contributorTip}}}
</ul>
</div>
<span>{{contributorCount}}</span>
</div> </div>
<div class="mapPermission {{permission}}"> <div class="mapPermission {{permission}}">
</div> </div>
@ -143,9 +148,6 @@
<div class="mapperCreated"> <div class="mapperCreated">
<p>Mapping since: {{created_at}}</p> <p>Mapping since: {{created_at}}</p>
</div> </div>
<div class="mapperGeneration">
<p>Generation: 1</p>
</div>
<div class="mapCount"> <div class="mapCount">
{{mapCount}} {{mapCount}}
</div> </div>
@ -156,13 +158,11 @@
<script type="text/template" id="synapseAutocompleteTemplate"> <script type="text/template" id="synapseAutocompleteTemplate">
<div class="result{{rtype}}"> <div class="result{{rtype}}">
<p class="autocompleteSection synapseDesc">{{label}}</p> <p class="autocompleteSection synapseDesc">{{label}}</p>
<div class="expandSynapseMetadata"></div>
<div class="synapseMetadata"> <div class="synapseMetadata">
<div class="synapseNumMaps">{{mapCount}}</div>
<div class="synapseOriginatorIcon hoverForTip"> <div class="synapseOriginatorIcon hoverForTip">
<img width="24" height="24" src="{{originatorImage}}" /> <img width="24" height="24" src="{{originatorImage}}" />
<span class="tip synapseOriginator">{{originator}}</span> <span class="tooltips synapseOriginator">{{originator}}</span>
</div> </div>
<div class="synapsePermission {{permission}}"></div> <div class="synapsePermission {{permission}}"></div>
</div> </div>
@ -179,7 +179,7 @@
<div class="topicNumSynapses">{{synapseCount}}</div> <div class="topicNumSynapses">{{synapseCount}}</div>
<div class="topicOriginatorIcon hoverForTip"> <div class="topicOriginatorIcon hoverForTip">
<img width="24" height="24" src="{{originatorImage}}" /> <img width="24" height="24" src="{{originatorImage}}" />
<span class="tip topicOriginator">{{originator}}</span> <span class="tooltips topicOriginator">{{originator}}</span>
</div> </div>
<div class="topicPermission {{permission}}"></div> <div class="topicPermission {{permission}}"></div>
</div> </div>

View file

@ -21,7 +21,7 @@
<div class="mapElement upperRightEl upperRightMapButtons"> <div class="mapElement upperRightEl upperRightMapButtons">
<!-- Realtime --> <!-- Realtime -->
<div class="sidebarCollaborate upperRightEl"> <div class="sidebarCollaborate upperRightEl">
<div class="sidebarCollaborateIcon upperRightIcon blue"></div> <div class="sidebarCollaborateIcon upperRightIcon blue"><div class="tooltipsUnder">Junto</div></div>
<div class="sidebarCollaborateBox upperRightBox"> <div class="sidebarCollaborateBox upperRightBox">
<h3 class="realtimeBoxTitle">REALTIME</h3> <h3 class="realtimeBoxTitle">REALTIME</h3>
<span class="realtimeOnOff rtOff">OFF</span> <span class="realtimeOnOff rtOff">OFF</span>
@ -41,7 +41,7 @@
<!-- filtering --> <!-- filtering -->
<div class="sidebarFilter upperRightEl"> <div class="sidebarFilter upperRightEl">
<div class="sidebarFilterIcon upperRightIcon"></div> <div class="sidebarFilterIcon upperRightIcon"><div class="tooltipsUnder">Filter</div></div>
<div class="sidebarFilterBox upperRightBox"> <div class="sidebarFilterBox upperRightBox">
<%= render :partial => 'shared/filterBox' %> <%= render :partial => 'shared/filterBox' %>
</div> </div>
@ -49,19 +49,20 @@
<!-- fork map --> <!-- fork map -->
<div class="sidebarFork upperRightEl"> <div class="sidebarFork upperRightEl">
<div class="sidebarForkIcon upperRightIcon"></div> <div class="sidebarForkIcon upperRightIcon"><div class="tooltipsUnder">Save To New Map</div></div>
</div> <!-- end sidebarFork --> </div> <!-- end sidebarFork -->
<div class="clearfloat"></div> <div class="clearfloat"></div>
</div> <!-- end mapElement --> </div> <!-- end mapElement -->
<!-- create new map --> <!-- create new map -->
<div class="addMap openLightbox upperRightEl upperRightIcon" data-open="newmap"> <div class="addMap openLightbox upperRightEl upperRightIcon" data-open="newmap"><div class="tooltipsUnder">Create New Map</div>
</div><!-- end addMap --> </div><!-- end addMap -->
<!-- Account / Sign in --> <!-- Account / Sign in -->
<div class="sidebarAccount upperRightEl"> <div class="sidebarAccount upperRightEl">
<div class="sidebarAccountIcon"> <div class="sidebarAccountIcon">
<div class="tooltipsUnder">Account</div>
<%= image_tag user.image.url(:square), :size => "32x32" %> <%= image_tag user.image.url(:square), :size => "32x32" %>
</div> </div>
<div class="sidebarAccountBox upperRightBox"> <div class="sidebarAccountBox upperRightBox">

View file

@ -149,6 +149,10 @@
<% end %> <% end %>
</script> </script>
<% if !authenticated? %>
<iframe width="1" height="1" src="http://support.metamaps.cc/logout.json"; style="visibility:hidden;"></iframe>
<% end %>
<%= render :partial => 'layouts/googleanalytics' if Rails.env.production? %> <%= render :partial => 'layouts/googleanalytics' if Rails.env.production? %>
</body> </body>
</html> </html>

View file

@ -22,15 +22,11 @@
<img id="mapContribs" width="25" height="25" src="<%= @map.contributors[0].image.url(:square) %>" class="multiple" /> <img id="mapContribs" width="25" height="25" src="<%= @map.contributors[0].image.url(:square) %>" class="multiple" />
<% end %> <% end %>
<span><%= @map.contributors.count %></span> <span><%= @map.contributors.count %></span>
<% contributorList = '' <div class="tip"> <ul><% @map.contributors.each_with_index do |c, index| %>
@map.contributors.each_with_index do |c, index| <li > <img class="rtUserImage" width="25" height="25" src="<%= c.image.url(:square) %>" />
comma = (index+1) == @map.contributors.count ? '' : ', ' <%= c.name %>
contributorList += c.name + comma </li>
end <% end %></ul></div>
if @map.contributors.count == 0
contributorList = 'No one has added anything yet.'
end %>
<div class="tip"><%= contributorList %></div>
</div> </div>
<div class="infoStatIcon mapTopics"> <div class="infoStatIcon mapTopics">
<%= @map.topics.count %> <%= @map.topics.count %>
@ -39,9 +35,7 @@
<%= @map.synapses.count %> <%= @map.synapses.count %>
</div> </div>
<div class="infoStatIcon mapPermission <%= @map.permission %> hoverForTip"> <div class="infoStatIcon mapPermission <%= @map.permission %> hoverForTip">
<% if @map.user == user %> <div class="tooltips">As the creator, you can change the permission of this map, but the permissions of the topics and synapses on it must be changed independently.</div>
<div class="tip">As the creator, you can change the permission of this map, but the permissions of the topics and synapses on it must be changed independently.</div>
<% end %>
</div> </div>
<div class="clearfloat"></div> <div class="clearfloat"></div>
</div> </div>

View file

@ -91,7 +91,7 @@
<div id="filter_by_mapper" class="filterBySection"> <div id="filter_by_mapper" class="filterBySection">
<h3><%= @map ? "MAPPERS" : @topic ? "CREATORS" : "" %></h3> <h3><%= @map ? "MAPPERS" : @topic ? "CREATORS" : "" %></h3>
<span class="hideAll hideAllMappers">NONE</span> <span class="hideAll hideAllMappers">NONE</span>
<span class="showAll showAllMappers">ALL</span> <span class="active showAll showAllMappers">ALL</span>
<div class="clearfloat"></div> <div class="clearfloat"></div>
<ul> <ul>
<%= @mapperlist.html_safe %> <%= @mapperlist.html_safe %>
@ -102,7 +102,7 @@
<div id="filter_by_metacode" class="filterBySection"> <div id="filter_by_metacode" class="filterBySection">
<h3>METACODES</h3> <h3>METACODES</h3>
<span class="hideAll hideAllMetacodes">NONE</span> <span class="hideAll hideAllMetacodes">NONE</span>
<span class="showAll showAllMetacodes">ALL</span> <span class="active showAll showAllMetacodes">ALL</span>
<div class="clearfloat"></div> <div class="clearfloat"></div>
<ul> <ul>
<%= @metacodelist.html_safe %> <%= @metacodelist.html_safe %>
@ -113,7 +113,7 @@
<div id="filter_by_synapse" class="filterBySection"> <div id="filter_by_synapse" class="filterBySection">
<h3>SYNAPSES</h3> <h3>SYNAPSES</h3>
<span class="hideAll hideAllSynapses">NONE</span> <span class="hideAll hideAllSynapses">NONE</span>
<span class="showAll showAllSynapses">ALL</span> <span class="active showAll showAllSynapses">ALL</span>
<div class="clearfloat"></div> <div class="clearfloat"></div>
<ul> <ul>
<%= @synapselist.html_safe %> <%= @synapselist.html_safe %>

View file

@ -18,7 +18,7 @@
<%= f.password_field :password_confirmation %></div> <%= f.password_field :password_confirmation %></div>
<div><%= f.label "Access Code:", :class => "fieldText" %> <div><%= f.label "Access Code:", :class => "fieldText" %>
<%= f.text_field :joinedwithcode %></div> <%= f.text_field :joinedwithcode, :value => params[:code] %></div>
<div><%= f.submit "Sign up!" %></div> <div><%= f.submit "Sign up!" %></div>
<% end %> <% end %>

View file

@ -1,10 +0,0 @@
# app/workers/grab_map_screenshot_worker.rb
class GrabMapScreenshotWorker
include Sidekiq::Worker
def perform(map_id)
imgBase64 = `phantomjs ./script/phantomjs-save-screenshot.js #{map_id} #{Rails.env}`
map = Map.find(map_id)
map.decode_base64(imgBase64)
end
end

View file

@ -0,0 +1,2 @@
https://github.com/heroku/heroku-buildpack-ruby.git
https://github.com/stomita/heroku-buildpack-phantomjs.git

View file

@ -0,0 +1,4 @@
$codes = []
if ActiveRecord::Base.connection.table_exists? 'users'
$codes = ActiveRecord::Base.connection.execute("SELECT code FROM users").map {|user| user["code"] }
end

View file

@ -1,9 +0,0 @@
redis_url = Rails.env.development? ? 'redis://localhost:6379/0' : ENV['REDISTOGO_URL']
Sidekiq.configure_server do |config|
config.redis = { :url => redis_url, :namespace => 'metamaps' }
end
Sidekiq.configure_client do |config|
config.redis = { :url => redis_url, :namespace => 'metamaps' }
end

View file

@ -1,12 +1,7 @@
require 'sidekiq/web'
Metamaps::Application.routes.draw do Metamaps::Application.routes.draw do
root to: 'main#home', via: :get root to: 'main#home', via: :get
#To debug sidekiq and monitor processes, enable this route
#mount Sidekiq::Web, at: '/sidekiq'
match 'search/topics', to: 'main#searchtopics', via: :get, as: :searchtopics match 'search/topics', to: 'main#searchtopics', via: :get, as: :searchtopics
match 'search/maps', to: 'main#searchmaps', via: :get, as: :searchmaps match 'search/maps', to: 'main#searchmaps', via: :get, as: :searchmaps
match 'search/mappers', to: 'main#searchmappers', via: :get, as: :searchmappers match 'search/mappers', to: 'main#searchmappers', via: :get, as: :searchmappers

View file

@ -1,134 +1,134 @@
# encoding: UTF-8 # encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead # This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to # of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition. # incrementally modify your database, and then regenerate this schema definition.
# #
# Note that this schema.rb definition is the authoritative source for your # Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another # database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations # system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations # from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues). # you'll amass, the slower it'll run and the greater likelihood for issues).
# #
# It's strongly recommended to check this file into your version control system. # It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20140930013020) do ActiveRecord::Schema.define(:version => 20141121204712) do
create_table "in_metacode_sets", :force => true do |t| create_table "in_metacode_sets", :force => true do |t|
t.integer "metacode_id" t.integer "metacode_id"
t.integer "metacode_set_id" t.integer "metacode_set_id"
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
end end
add_index "in_metacode_sets", ["metacode_id"], :name => "index_in_metacode_sets_on_metacode_id" add_index "in_metacode_sets", ["metacode_id"], :name => "index_in_metacode_sets_on_metacode_id"
add_index "in_metacode_sets", ["metacode_set_id"], :name => "index_in_metacode_sets_on_metacode_set_id" add_index "in_metacode_sets", ["metacode_set_id"], :name => "index_in_metacode_sets_on_metacode_set_id"
create_table "mappings", :force => true do |t| create_table "mappings", :force => true do |t|
t.text "category" t.text "category"
t.integer "xloc" t.integer "xloc"
t.integer "yloc" t.integer "yloc"
t.integer "topic_id" t.integer "topic_id"
t.integer "synapse_id" t.integer "synapse_id"
t.integer "map_id" t.integer "map_id"
t.integer "user_id" t.integer "user_id"
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
end end
create_table "maps", :force => true do |t| create_table "maps", :force => true do |t|
t.text "name" t.text "name"
t.boolean "arranged" t.boolean "arranged"
t.text "desc" t.text "desc"
t.text "permission" t.text "permission"
t.integer "user_id" t.integer "user_id"
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
t.boolean "featured" t.boolean "featured"
t.string "screenshot_file_name" t.string "screenshot_file_name"
t.string "screenshot_content_type" t.string "screenshot_content_type"
t.integer "screenshot_file_size" t.integer "screenshot_file_size"
t.datetime "screenshot_updated_at" t.datetime "screenshot_updated_at"
end end
create_table "metacode_sets", :force => true do |t| create_table "metacode_sets", :force => true do |t|
t.string "name" t.string "name"
t.text "desc" t.text "desc"
t.integer "user_id" t.integer "user_id"
t.boolean "mapperContributed" t.boolean "mapperContributed"
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
end end
add_index "metacode_sets", ["user_id"], :name => "index_metacode_sets_on_user_id" add_index "metacode_sets", ["user_id"], :name => "index_metacode_sets_on_user_id"
create_table "metacodes", :force => true do |t| create_table "metacodes", :force => true do |t|
t.text "name" t.text "name"
t.string "icon" t.string "icon"
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
t.string "color" t.string "color"
end end
create_table "synapses", :force => true do |t| create_table "synapses", :force => true do |t|
t.text "desc" t.text "desc"
t.text "category" t.text "category"
t.text "weight" t.text "weight"
t.text "permission" t.text "permission"
t.integer "node1_id" t.integer "node1_id"
t.integer "node2_id" t.integer "node2_id"
t.integer "user_id" t.integer "user_id"
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
end end
create_table "topics", :force => true do |t| create_table "topics", :force => true do |t|
t.text "name" t.text "name"
t.text "desc" t.text "desc"
t.text "link" t.text "link"
t.text "permission" t.text "permission"
t.integer "user_id" t.integer "user_id"
t.integer "metacode_id" t.integer "metacode_id"
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
t.string "image_file_name" t.string "image_file_name"
t.string "image_content_type" t.string "image_content_type"
t.integer "image_file_size" t.integer "image_file_size"
t.datetime "image_updated_at" t.datetime "image_updated_at"
t.string "audio_file_name" t.string "audio_file_name"
t.string "audio_content_type" t.string "audio_content_type"
t.integer "audio_file_size" t.integer "audio_file_size"
t.datetime "audio_updated_at" t.datetime "audio_updated_at"
end end
create_table "users", :force => true do |t| create_table "users", :force => true do |t|
t.string "name" t.string "name"
t.string "email" t.string "email"
t.text "settings" t.text "settings"
t.string "code", :limit => 8 t.string "code", :limit => 8
t.string "joinedwithcode", :limit => 8 t.string "joinedwithcode", :limit => 8
t.string "crypted_password" t.string "crypted_password"
t.string "password_salt" t.string "password_salt"
t.string "persistence_token" t.string "persistence_token"
t.string "perishable_token" t.string "perishable_token"
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
t.string "encrypted_password", :limit => 128, :default => "" t.string "encrypted_password", :limit => 128, :default => ""
t.string "remember_token" t.string "remember_token"
t.datetime "remember_created_at" t.datetime "remember_created_at"
t.string "reset_password_token" t.string "reset_password_token"
t.datetime "last_sign_in_at" t.datetime "last_sign_in_at"
t.string "last_sign_in_ip" t.string "last_sign_in_ip"
t.integer "sign_in_count", :default => 0 t.integer "sign_in_count", :default => 0
t.datetime "current_sign_in_at" t.datetime "current_sign_in_at"
t.string "current_sign_in_ip" t.string "current_sign_in_ip"
t.datetime "reset_password_sent_at" t.datetime "reset_password_sent_at"
t.boolean "admin" t.boolean "admin"
t.string "image_file_name" t.string "image_file_name"
t.string "image_content_type" t.string "image_content_type"
t.integer "image_file_size" t.integer "image_file_size"
t.datetime "image_updated_at" t.datetime "image_updated_at"
end end
add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
end end

View file

@ -26,14 +26,14 @@
} }
body { body {
background: #d8d9da url(shattered_@2X.png); background: #d8d9da url(/assets/shattered_@2X.png);
font-family: 'din-regular', helvetica, sans-serif; font-family: 'din-regular', helvetica, sans-serif;
color: #424242; color: #424242;
text-align: justify; text-align: justify;
font-size: 18px; font-size: 18px;
line-height: 18px; line-height: 18px;
} }
.title a { .dialog a {
color:#c04f4f; color:#c04f4f;
} }
.title{ .title{
@ -85,7 +85,7 @@
box-shadow: 0px 1px 1.5px rgba(0,0,0,0.12), 0 1px 1px rgba(0,0,0,0.24); box-shadow: 0px 1px 1.5px rgba(0,0,0,0.12), 0 1px 1px rgba(0,0,0,0.24);
margin: 0 auto; margin: 0 auto;
text-decoration: none; text-decoration: none;
color: #FFFFFF; color: #FFFFFF !important;
cursor: pointer; cursor: pointer;
} }
@ -116,11 +116,13 @@
<div class="dialog"> <div class="dialog">
<h1 class="title">404 - You've Found Nothing</h1> <h1 class="title">404 - You've Found Nothing</h1>
<p>Nothing is here!</p> <p>Nothing is here!</p>
<p>There are nothings that inspire and nothings that motivate, but there are no nothings that cannot stir your experience of nothing.</p> <p>
<p>Therefore there is nothing to see here, nothing to behold here, nothing to be here, maybe there is but definitely not here.</p> It seems the page you are looking for could not be found, doesn't exist anymore, or maybe just moved.
<p>Therefore, move along! Nothing is ending here<a href="http://spacecollective.org/Wildcat/8942/Some-nothings-are-like-elephants-really-big-elephants" target="_blank">...</a></p> </p>
<a href="/explore/featured" class="button exploreFeaturedCTA">EXPLORE FEATURED MAPS</a> <p>
<a href="http://blog.metamaps.cc" class="button blogCTA">GO TO OUR BLOG</a> Try checking the URL for errors, then hit the refresh button on your browser. If that doesn't work, the best thing to do is go back to the home page using the button below.
</p>
<a href="/" class="button exploreFeaturedCTA">GO BACK HOME!</a>
</div> </div>
<div class="picture"> <div class="picture">

View file

@ -5,6 +5,7 @@ user:
email: user@user.com email: user@user.com
encrypted_password: $2a$10$psR68SWYNy5ZKQPs9FrFM.HuRMrTXO/YFzv.HaUmdCsQZsQrG1XAW encrypted_password: $2a$10$psR68SWYNy5ZKQPs9FrFM.HuRMrTXO/YFzv.HaUmdCsQZsQrG1XAW
code: qwertyui code: qwertyui
joinedwithcode: qwertyui
admin: false admin: false
admin: admin:
@ -12,4 +13,5 @@ admin:
email: admin@admin.com email: admin@admin.com
encrypted_password: $2a$10$psR68SWYNy5ZKQPs9FrFM.HuRMrTXO/YFzv.HaUmdCsQZsQrG1XAW encrypted_password: $2a$10$psR68SWYNy5ZKQPs9FrFM.HuRMrTXO/YFzv.HaUmdCsQZsQrG1XAW
code: iuytrewq code: iuytrewq
joinedwithcode: iuytrewq
admin: true admin: true