diff --git a/.buildpacks b/.buildpacks
index 47d4c0e8..b68505fc 100644
--- a/.buildpacks
+++ b/.buildpacks
@@ -1,2 +1 @@
-https://github.com/heroku/heroku-buildpack-ruby.git
-https://github.com/stomita/heroku-buildpack-phantomjs.git
\ No newline at end of file
+https://github.com/heroku/heroku-buildpack-ruby.git
\ No newline at end of file
diff --git a/Gemfile b/Gemfile
index 35c39e14..e21cca7e 100644
--- a/Gemfile
+++ b/Gemfile
@@ -6,8 +6,6 @@ gem 'rails', '3.2.17'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
-gem 'phantomjs'
-
gem 'devise'
gem 'redis'
gem 'pg'
@@ -19,9 +17,6 @@ gem 'rails3-jquery-autocomplete'
gem 'best_in_place' #in-place editing
gem 'kaminari' # pagination
gem 'uservoice-ruby'
-gem 'sidekiq' # worker processes
-gem 'sinatra', require: false
-gem 'slim'
gem 'paperclip'
gem 'aws-sdk'
diff --git a/Gemfile.lock b/Gemfile.lock
index d89e5183..e46dfc6b 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -41,8 +41,6 @@ GEM
rails (~> 3.1)
builder (3.0.4)
cancan (1.6.10)
- celluloid (0.15.2)
- timers (~> 1.1.0)
climate_control (0.0.3)
activesupport (>= 3.0)
cocaine (0.5.4)
@@ -54,7 +52,6 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.8.0)
- connection_pool (2.0.0)
devise (3.4.0)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
@@ -100,13 +97,10 @@ GEM
mime-types
pg (0.17.1)
pg (0.17.1-x86-mingw32)
- phantomjs (1.9.7.1)
polyglot (0.3.5)
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
- rack-protection (1.5.3)
- rack
rack-ssl (1.3.4)
rack
rack-test (0.6.2)
@@ -132,8 +126,6 @@ GEM
rdoc (3.12.2)
json (~> 1.4)
redis (3.1.0)
- redis-namespace (1.5.1)
- redis (~> 3.0, >= 3.0.4)
responders (1.1.1)
railties (>= 3.2, < 4.2)
sass (3.4.5)
@@ -141,29 +133,14 @@ GEM
railties (~> 3.2.0)
sass (>= 3.1.10)
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)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- temple (0.6.8)
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
- timers (1.1.0)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
@@ -196,13 +173,9 @@ DEPENDENCIES
kaminari
paperclip
pg
- phantomjs
rails (= 3.2.17)
rails3-jquery-autocomplete
redis
sass-rails
- sidekiq
- sinatra
- slim
uglifier (>= 1.0.3)
uservoice-ruby
diff --git a/LiveSiteUpdatesNotes.txt b/LiveSiteUpdatesNotes.txt
new file mode 100644
index 00000000..ad2ae9dd
--- /dev/null
+++ b/LiveSiteUpdatesNotes.txt
@@ -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
\ No newline at end of file
diff --git a/Procfile b/Procfile
index 3a5d09e8..c6cfa4cd 100644
--- a/Procfile
+++ b/Procfile
@@ -1,2 +1 @@
-web: bundle exec rails server -p $PORT
-worker: bundle exec sidekiq -c 5 -v
\ No newline at end of file
+web: bundle exec rails server -p $PORT
\ No newline at end of file
diff --git a/app/assets/images/.DS_Store b/app/assets/images/.DS_Store
index 5008ddfc..dc778d51 100644
Binary files a/app/assets/images/.DS_Store and b/app/assets/images/.DS_Store differ
diff --git a/app/assets/javascripts/src/JIT.js b/app/assets/javascripts/src/JIT.js
index 498183ef..e1a461ec 100644
--- a/app/assets/javascripts/src/JIT.js
+++ b/app/assets/javascripts/src/JIT.js
@@ -2495,7 +2495,7 @@ Extras.Classes.Navigation = new Class({
//START METAMAPS CODE
var rightClick = e.button == 2 || (navigator.platform.indexOf("Mac") != -1 && e.ctrlKey);
// 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();
//console.log('mouse down');
}
@@ -2525,13 +2525,13 @@ Extras.Classes.Navigation = new Class({
// START METAMAPS CODE
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.boxStartCoordinates = eventInfo.getPos();
//console.log('mouse move');
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.JIT.drawSelectBox(eventInfo,e);
//console.log('mouse move');
@@ -7493,7 +7493,7 @@ Graph.Label.Native = new Class({
// START METAMAPS CODE
var 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
},
diff --git a/app/assets/javascripts/src/Metamaps.GlobalUI.js b/app/assets/javascripts/src/Metamaps.GlobalUI.js
index 0fcc6971..f2129224 100644
--- a/app/assets/javascripts/src/Metamaps.GlobalUI.js
+++ b/app/assets/javascripts/src/Metamaps.GlobalUI.js
@@ -167,6 +167,9 @@ Metamaps.GlobalUI = {
clearTimeout(self.notifyTimeOut);
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.Filter.close();
+ $('.sidebarAccountIcon .tooltipsUnder').addClass('hide');
+
if (!self.isOpen && !self.changing) {
self.changing = true;
@@ -339,6 +344,7 @@ Metamaps.GlobalUI.Account = {
close: function () {
var self = Metamaps.GlobalUI.Account;
+ $('.sidebarAccountIcon .tooltipsUnder').removeClass('hide');
if (!self.changing) {
self.changing = true;
$('.sidebarAccountBox #user_email').blur();
diff --git a/app/assets/javascripts/src/Metamaps.JIT.js b/app/assets/javascripts/src/Metamaps.JIT.js
index 88436a80..dff655ce 100644
--- a/app/assets/javascripts/src/Metamaps.JIT.js
+++ b/app/assets/javascripts/src/Metamaps.JIT.js
@@ -175,7 +175,8 @@ Metamaps.JIT = {
context.fillStyle = '#424242';
context.textAlign = 'center';
context.font = '14px din-medium';
- context.fillText(count, x, y - 6);
+
+ context.fillText(count, x, y + 5);
};
if (!canvas.denySelected && desc != "" && showDesc) {
@@ -186,7 +187,7 @@ Metamaps.JIT = {
var ctx = canvas.getCtx();
ctx.font = 'bold 14px arial';
ctx.fillStyle = '#FFF';
- ctx.textBaseline = 'hanging';
+ ctx.textBaseline = 'alphabetic';
var arrayOfLabelLines = Metamaps.Util.splitLine(desc, 30).split('\n');
var index, lineWidths = [];
@@ -222,7 +223,7 @@ Metamaps.JIT = {
ctx.fillStyle = '#424242';
ctx.textAlign = 'center';
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) {
@@ -306,7 +307,7 @@ Metamaps.JIT = {
type: 'Native', //Native or HTML
size: 20,
family: 'arial',
- textBaseline: 'hanging',
+ textBaseline: 'alphabetic',
color: Metamaps.Settings.colors.labels.text
},
//Add Tips
@@ -374,14 +375,14 @@ Metamaps.JIT = {
$('.rightclickmenu').remove();
if (Metamaps.Mouse.boxStartCoordinates) {
- if(e.ctrlKey && e.shiftKey){
+ if(e.ctrlKey){
Metamaps.Visualize.mGraph.busy = false;
Metamaps.Mouse.boxEndCoordinates = eventInfo.getPos();
Metamaps.JIT.zoomToBox(e);
//console.log('called zoom to box');
return;
}
- else if (e.ctrlKey || e.shiftKey) {
+ else if (e.shiftKey) {
Metamaps.Visualize.mGraph.busy = false;
Metamaps.Mouse.boxEndCoordinates = eventInfo.getPos();
Metamaps.JIT.selectWithBox(e);
@@ -410,10 +411,10 @@ Metamaps.JIT = {
// remove the rightclickmenu
$('.rightclickmenu').remove();
- if (Metamaps.Mouse.boxStartCoordinates && e.ctrlKey) {
+ if (Metamaps.Mouse.boxStartCoordinates) {
Metamaps.Visualize.mGraph.busy = false;
Metamaps.Mouse.boxEndCoordinates = eventInfo.getPos();
- Metamaps.JIT.zoomToBox(e);
+ Metamaps.JIT.selectWithBox(e);
return;
}
@@ -1097,7 +1098,7 @@ Metamaps.JIT = {
eX = Metamaps.Mouse.boxEndCoordinates.x,
eY = Metamaps.Mouse.boxEndCoordinates.y;
- if(!(e.shiftKey) && !(e.ctrlKey)){
+ if(!e.shiftKey){
Metamaps.Control.deselectAllNodes();
Metamaps.Control.deselectAllEdges();
}
@@ -1108,7 +1109,7 @@ Metamaps.JIT = {
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(e.ctrlKey){
+ if(e.shiftKey){
if(n.selected){
Metamaps.Control.deselectNode(n);
}
@@ -1211,7 +1212,7 @@ Metamaps.JIT = {
var node2id = synapse.get('edge').nodeTo.id;
var edge = Metamaps.Visualize.mGraph.graph.getAdjacence(node1id, node2id);
if(selectTest){
- if(e.ctrlKey){
+ if(e.shiftKey){
if(Metamaps.Selected.Edges.indexOf(synapse.get('edge')) != -1 ){
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
setTimeout(function () {
if (!Metamaps.JIT.nodeWasDoubleClicked()) {
- if (!e.shiftKey && !e.ctrlKey) {
+
+ var nodeAlreadySelected = node.selected;
+
+ if (!e.shiftKey) {
Metamaps.Control.deselectAllNodes();
Metamaps.Control.deselectAllEdges();
+ }
+
+ if (nodeAlreadySelected) {
+ Metamaps.Control.deselectNode(node);
+ } else {
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
Metamaps.Visualize.mGraph.fx.animate({
@@ -1531,22 +1528,17 @@ Metamaps.JIT = {
// wait a certain length of time, then check again, then run this code
setTimeout(function () {
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.deselectAllEdges();
- Metamaps.Control.selectEdge(adj);
}
- else if (e.shiftKey && e.ctrlKey){
- //no result
- }
- else if (e.ctrlKey){
- if (Metamaps.Selected.Edges.indexOf(adj) !== -1) {
- Metamaps.Control.deselectEdge(adj);
- } else {
- Metamaps.Control.selectEdge(adj);
- }
- }
- else if (e.shiftKey){
+
+ if (edgeAlreadySelected) {
+ Metamaps.Control.deselectEdge(adj);
+ } else {
Metamaps.Control.selectEdge(adj);
}
@@ -1861,7 +1853,7 @@ Metamaps.JIT = {
var x = n.pos.x,
y = n.pos.y;
- if (counter == 0){
+ if (counter == 0 && n.getData('alpha') == 1){
maxX = x;
minX = x;
maxY = y;
@@ -1880,12 +1872,15 @@ Metamaps.JIT = {
}
var width = Math.max.apply(null, lineWidths) + 8;
- maxX = Math.max(x + width /2,maxX);
- maxY = Math.max(y + n.getData("height") + 5 + height,maxY);
- minX = Math.min(x - width /2,minX);
- minY = Math.min(y - dim,minY);
+ // only adjust these values if the node is not filtered
+ if (n.getData('alpha') == 1) {
+ maxX = Math.max(x + width /2,maxX);
+ 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;
diff --git a/app/assets/javascripts/src/Metamaps.js b/app/assets/javascripts/src/Metamaps.js
index 4e00cd5f..2e2a98f7 100644
--- a/app/assets/javascripts/src/Metamaps.js
+++ b/app/assets/javascripts/src/Metamaps.js
@@ -741,7 +741,7 @@ Metamaps.Create = {
}
},
engine: Hogan,
- header: "
Existing Synapses
"
+ header: "Existing synapses
"
}
]);
@@ -1043,8 +1043,8 @@ Metamaps.TopicCard = {
});
$(showCard).find('.best_in_place_desc').bind("ajax:success", function () {
- this.innerHTML = this.innerHTML.replace(/\r/g, '')
- var desc = $(this).html();
+ this.innerHTML = this.innerHTML.replace(/\r/g, '');
+ var desc = $(this).html() === $(this).data('nil') ? "" : $(this).html();
topic.set("desc", desc);
topic.trigger('saved');
});
@@ -1289,7 +1289,7 @@ Metamaps.SynapseCard = {
});
},
add_drop_down: function (edge, synapse) {
- var list, i, synapses, l;
+ var list, i, synapses, l, desc;
synapses = edge.getData("synapses");
l = synapses.length;
@@ -1311,7 +1311,9 @@ Metamaps.SynapseCard = {
list = '';
for (i = 0; i < l; i++) {
if (synapses[i] !== synapse) { // don't add the current one to the list
- list += '- ' + synapses[i].get('desc') + '
';
+ desc = synapses[i].get('desc');
+ desc = desc === "" || desc === null ? "(no description)" : desc;
+ list += '- ' + desc + '
';
}
}
list += '
'
@@ -1333,7 +1335,7 @@ Metamaps.SynapseCard = {
add_user_info: function (synapse) {
var u = '';
u += '
'
- u += '
Created by ' + synapse.get("user_name") + '
';
+ u += '' + synapse.get("user_name") + '
';
$('#editSynLowerBar').append(u);
// get mapper image
@@ -1826,6 +1828,7 @@ Metamaps.Realtime = {
Metamaps.GlobalUI.Account.close();
Metamaps.Filter.close();
+ $('.sidebarCollaborateIcon div').addClass('hide');
if (!self.isOpen && !self.changing) {
self.changing = true;
@@ -1837,7 +1840,7 @@ Metamaps.Realtime = {
},
close: function () {
var self = Metamaps.Realtime;
-
+ $(".sidebarCollaborateIcon div").removeClass('hide');
if (!self.changing) {
self.changing = true;
$('.sidebarCollaborateBox').fadeOut(200, function () {
@@ -1884,13 +1887,13 @@ Metamaps.Realtime = {
turnOn: function (notify) {
var self = Metamaps.Realtime;
- if (!self.status) {
- if (notify) self.sendRealtimeOn();
- $(".rtMapperSelf").removeClass('littleRtOff').addClass('littleRtOn');
- self.status = true;
- $(".sidebarCollaborateIcon").addClass("blue");
- $(".collabCompass").show();
- }
+ if (notify) self.sendRealtimeOn();
+ $(".rtMapperSelf").removeClass('littleRtOff').addClass('littleRtOn');
+ $('.rtOn').addClass('active');
+ $('.rtOff').removeClass('active');
+ self.status = true;
+ $(".sidebarCollaborateIcon").addClass("blue");
+ $(".collabCompass").show();
},
turnOff: function (silent) {
var self = Metamaps.Realtime;
@@ -1898,6 +1901,8 @@ Metamaps.Realtime = {
if (self.status) {
if (!silent) self.sendRealtimeOff();
$(".rtMapperSelf").removeClass('littleRtOn').addClass('littleRtOff');
+ $('.rtOn').removeClass('active');
+ $('.rtOff').addClass('active');
self.status = false;
$(".sidebarCollaborateIcon").removeClass("blue");
$(".collabCompass").hide();
@@ -3067,6 +3072,8 @@ Metamaps.Filter = {
Metamaps.GlobalUI.Account.close();
Metamaps.Realtime.close();
+ $('.sidebarFilterIcon div').addClass('hide');
+
if (!self.isOpen && !self.changing) {
self.changing = true;
@@ -3080,6 +3087,8 @@ Metamaps.Filter = {
},
close: function () {
var self = Metamaps.Filter;
+ $('.sidebarFilterIcon div').removeClass('hide');
+
if (!self.changing) {
self.changing = true;
@@ -3103,6 +3112,8 @@ Metamaps.Filter = {
$('#filter_by_metacode ul').empty();
$('#filter_by_mapper 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
@@ -3231,36 +3242,48 @@ Metamaps.Filter = {
filterAllMetacodes: function (e) {
var self = Metamaps.Filter;
$('#filter_by_metacode ul li').addClass('toggledOff');
+ $('.showAllMetacodes').removeClass('active');
+ $('.hideAllMetacodes').addClass('active');
self.visible.metacodes = [];
self.passFilters();
},
filterNoMetacodes: function (e) {
var self = Metamaps.Filter;
$('#filter_by_metacode ul li').removeClass('toggledOff');
+ $('.showAllMetacodes').addClass('active');
+ $('.hideAllMetacodes').removeClass('active');
self.visible.metacodes = self.filters.metacodes.slice();
self.passFilters();
},
filterAllMappers: function (e) {
var self = Metamaps.Filter;
$('#filter_by_mapper ul li').addClass('toggledOff');
+ $('.showAllMappers').removeClass('active');
+ $('.hideAllMappers').addClass('active');
self.visible.mappers = [];
self.passFilters();
},
filterNoMappers: function (e) {
var self = Metamaps.Filter;
$('#filter_by_mapper ul li').removeClass('toggledOff');
+ $('.showAllMappers').addClass('active');
+ $('.hideAllMappers').removeClass('active');
self.visible.mappers = self.filters.mappers.slice();
self.passFilters();
},
filterAllSynapses: function (e) {
var self = Metamaps.Filter;
$('#filter_by_synapse ul li').addClass('toggledOff');
+ $('.showAllSynapses').removeClass('active');
+ $('.hideAllSynapses').addClass('active');
self.visible.synapses = [];
self.passFilters();
},
filterNoSynapses: function (e) {
var self = Metamaps.Filter;
$('#filter_by_synapse ul li').removeClass('toggledOff');
+ $('.showAllSynapses').addClass('active');
+ $('.hideAllSynapses').removeClass('active');
self.visible.synapses = self.filters.synapses.slice();
self.passFilters();
},
@@ -3284,14 +3307,53 @@ Metamaps.Filter = {
toggleMetacode: function () {
var self = Metamaps.Filter;
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 () {
var self = Metamaps.Filter;
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 () {
var self = Metamaps.Filter;
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 () {
var self = Metamaps.Filter;
@@ -4196,6 +4258,7 @@ Metamaps.Map = {
Metamaps.Create.newTopic.hide();
Metamaps.Create.newSynapse.hide();
Metamaps.Filter.close();
+ Metamaps.Map.InfoBox.close();
Metamaps.Realtime.endActiveMap();
}
},
@@ -4242,6 +4305,7 @@ Metamaps.Map = {
Metamaps.GlobalUI.CreateMap.topicsToMap = nodes_data;
Metamaps.GlobalUI.CreateMap.synapsesToMap = synapses_data;
+
},
leavePrivateMap: function(){
var map = Metamaps.Active.Map;
@@ -4495,7 +4559,7 @@ Metamaps.Map.InfoBox = {
isOpen: false,
changing: false,
selectingPermission: false,
- changePermissionText: "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.
",
+ changePermissionText: "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.
",
nameHTML: '{{name}}',
descHTML: '{{desc}}',
init: function () {
@@ -4521,7 +4585,7 @@ Metamaps.Map.InfoBox = {
},
open: function () {
var self = Metamaps.Map.InfoBox;
-
+ $('.mapInfoIcon div').addClass('hide');
if (!self.isOpen && !self.changing) {
self.changing = true;
$('.mapInfoBox').fadeIn(200, function () {
@@ -4533,12 +4597,14 @@ Metamaps.Map.InfoBox = {
close: function () {
var self = Metamaps.Map.InfoBox;
+ $('.mapInfoIcon div').removeClass('hide');
if (!self.changing) {
self.changing = true;
$('.mapInfoBox').fadeOut(200, function () {
self.changing = false;
self.isOpen = false;
self.hidePermissionSelect();
+ $('.mapContributors .tip').hide();
});
}
},
@@ -4613,6 +4679,17 @@ Metamaps.Map.InfoBox = {
$('.mapInfoBox.yourMap').unbind('.yourMap').bind('click.yourMap', self.hidePermissionSelect);
$('.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) {
$('.mapInfoName .best_in_place_name').html(name);
@@ -4622,9 +4699,17 @@ Metamaps.Map.InfoBox = {
createContributorList: function () {
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 += "";
+
+ Metamaps.Mappers.each(function(m){
+ string += '- ' + m.get("name") + '
';
+ });
+
+ string += "
";
+
+ return string;
},
updateNumbers: function () {
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 span').text(Metamaps.Mappers.length)
- $('.mapContributors .tip').text(self.createContributorList());
+ $('.mapContributors .tip').html(self.createContributorList());
$('.mapTopics').text(Metamaps.Topics.length);
$('.mapSynapses').text(Metamaps.Synapses.length);
diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index 20f2bb89..b49842de 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -141,7 +141,7 @@ input[type="submit"]:active {
}
.leaveSpace {
display: block;
- height: 50px;
+ height: 25px;
}
.hidden {
display: none;
@@ -531,7 +531,7 @@ input[type="submit"]:active {
background: #FFFFFF;
height: 14px;
margin: 0;
- padding: 10px 6px;
+ padding: 14px 6px;
border: none;
border-radius: 2px;
outline: none;
@@ -581,7 +581,7 @@ input[type="submit"]:active {
}
.new_synapse #synapse_desc,
.new_synapse .tt-hint {
- width: 244px;
+ width: 258px;
background: #FFFFFF;
height: 14px;
margin: 0;
@@ -1007,7 +1007,7 @@ h3.filterBox {
cursor: pointer;
font-size:12px;
}
-.sidebarFilterBox span:hover {
+.sidebarFilterBox span:hover, .sidebarFilterBox span.active {
color: #00BCD4;
}
.sidebarFilterBox ul {
@@ -1104,7 +1104,7 @@ h3.realtimeBoxTitle {
text-align: center;
font-size:12px;
}
-.sidebarCollaborateBox .realtimeOnOff:hover {
+.sidebarCollaborateBox .realtimeOnOff:hover, .sidebarCollaborateBox .realtimeOnOff.active {
color: #00bcd4;
}
.sidebarCollaborateBox .rtOff {
@@ -1137,6 +1137,7 @@ h3.realtimeBoxTitle {
left: 0;
border-radius: 14px;
}
+
.littleJuntoIcon {
width: 24px;
height:24px;
@@ -1359,9 +1360,14 @@ float: left;
#new_topic .tt-suggestion,
#new_synapse .tt-suggestion {
background: #F5F5F5;
- width: 256px;
position: relative;
}
+#new_topic .tt-suggestion {
+ width: 256px;
+}
+#new_synapse .tt-suggestion {
+ width: 270px;
+}
#new_topic .autocompleteSection {
float: left;
}
@@ -1380,9 +1386,9 @@ float: left;
line-height: 14px;
font-size: 14px;
padding: 9px 0 9px 8px;
+ display: inline-block;
}
-#new_topic .expandTopicMetadata,
-#new_synapse .expandSynapseMetadata {
+#new_topic .expandTopicMetadata {
display:none;
width: 16px;
height: 16px;
@@ -1394,19 +1400,14 @@ float: left;
background-position: 0 -32px;
}
#new_topic .tt-suggestion.tt-is-under-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 {
+#new_topic .tt-suggestion.tt-is-under-mouse-cursor .expandTopicMetadata {
display: block;
}
#new_topic .tt-suggestion.tt-is-under-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 {
+#new_topic .tt-suggestion.tt-is-under-mouse-cursor .topicMetadata {
display: block;
}
-#new_topic .topicMetadata,
-#new_synapse .synapseMetadata {
+#new_topic .topicMetadata {
position: absolute;
display: none;
top: -18px;
@@ -1417,8 +1418,7 @@ float: left;
font-family: 'din-regular', helvetica, sans-serif;
font-size: 14px;
}
-#new_topic .topicPermission,
-#new_synapse .synapsePermission {
+#new_topic .topicPermission {
width: 32px;
height: 32px;
background-repeat: no-repeat;
@@ -1439,8 +1439,7 @@ float: left;
#new_synapse .synapsePermission.private {
background-position: -32px 0;
}
-#new_topic .topicNumMaps,
-#new_synapse .synapseNumMaps {
+#new_topic .topicNumMaps {
height: 14px;
padding: 1px 0 1px 32px;
background-image: url(metamap16.png);
@@ -1458,52 +1457,92 @@ float: left;
position: absolute;
bottom: 10px;
}
-#new_topic .topicOriginatorIcon,
-#new_synapse .synapseOriginatorIcon {
+#new_topic .topicOriginatorIcon {
position: absolute;
top: 8px;
right: 8px;
}
-#new_topic .topicOriginatorIcon img,
-#new_synapse .synapseOriginatorIcon img {
+#new_topic .topicOriginatorIcon img {
border-radius: 12px;
}
-#new_topic .topicOriginatorIcon:hover .tip,
-#new_synapse .synapseOriginatorIcon:hover .tip {
- display: block;
+#new_topic .topicOriginatorIcon .tooltips {
+ left: 32px;
+ top: -2px;
+ right: auto;
}
-#new_topic .tip,
-#new_synapse .tip {
- display: none;
+#new_topic .topicOriginatorIcon .tooltips:after {
+ content: '';
position: absolute;
- background: white;
- width: auto;
- top: 0;
- left: 23px;
- color: black;
- white-space: nowrap;
- border-radius: 4px;
- font-size: 15px !important;
- line-height: 15px;
- padding: 2px 5px 2px;
- z-index: 100;
+ top: 57%;
+ left: -4px;
+ margin-top: -6px;
+ width: 0;
+ height: 0;
+ border-right: 4px solid #000000;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+}
+#new_topic .topicOriginatorIcon:hover .tooltips {
+ display:block;
}
#new_synapse .tt-dropdown-menu {
background: #F5F5F5;
}
#new_synapse .tt-dropdown-menu h3 {
- font-family: 'vinyl', helvetica, sans-serif;
- text-transform: uppercase;
- font-style: italic;
- font-size: 14pxpx;
+ font-size: 14px;
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 .synapseOriginatorIcon {
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 */
@@ -1575,7 +1614,6 @@ float: left;
margin: 9px 0px 9px 56px;
padding: 0;
width: 64px;
- cursor: pointer;
}
#mapContribs {
float: left;
@@ -1584,6 +1622,7 @@ float: left;
width: 25px;
height: 25px;
border-radius: 15px;
+ cursor: pointer;
}
#mapContribs.multiple.mTwo {
box-shadow: 1px 1px 0 0 #B5B5B5,3px 2px 0 0 #424242;
@@ -1596,12 +1635,22 @@ float: left;
padding-top: 5px;
padding-left: 8px;
float: left;
+ cursor: pointer;
+}
+
+
+#mapContribsTip {
+ border: 2px solid #424242;
+ background-color: #fff;
+ width: 25px;
+ height: 25px;
+ border-radius: 15px;
}
.infoStatIcon .tip {
display: none;
position: absolute;
- background: white;
+ background: #202020;
min-width: 180px;
max-width: 250px;
text-align: center;
@@ -1609,20 +1658,78 @@ float: left;
border-radius: 4px;
font-size: 15px !important;
line-height: 17px;
- padding: 3px 5px 2px;
+ padding: 6px 8px 6px 8px;
z-index: 100;
}
+
.mapContributors .tip {
- top: 38px;
- left: 6px;
+ top: 45px;
+ left: -10px;
}
-.mapInfoBox .mapPermission .tip {
- top: 0;
- right: 32px;
+
+.mapContributors .tip ul {
+ 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 {
background-image: url(topic32.png);
background-position: 13px center;
@@ -1902,6 +2009,9 @@ and it won't be important on password protected instances */
color: #424242;
text-align: left;
}
+.lightboxContent li {
+ list-style: none;
+}
.openLightbox {
cursor: pointer;
}
@@ -2101,10 +2211,20 @@ and it won't be important on password protected instances */
float: left;
}
-#about > p, #getInvolved > p, #invite > p, #colophon p {
-/* color: #000;
- font-size: 16px;*/
- margin: 0px 0px 20px 0px;
+#colophon {
+ overflow-y: scroll;
+ height:434px;
+}
+#colophonLinks {
+ padding-left:20px;
+}
+
+#colophoneHeader {
+ padding-bottom:12px;
+}
+
+#about > p, #colophon p {
+ margin: 0px 0px 10px 0px;
line-height: 20px;
}
#about ul {
@@ -2232,6 +2352,9 @@ and it won't be important on password protected instances */
#joinCodesBox {
margin-top: 30px;
}
+#joinCodesBox button {
+ margin: 16px 198px 0;
+}
/* new map */
.new_map {
diff --git a/app/assets/stylesheets/base.css b/app/assets/stylesheets/base.css
index b894b317..5837e16d 100644
--- a/app/assets/stylesheets/base.css
+++ b/app/assets/stylesheets/base.css
@@ -19,11 +19,12 @@
#center-container {
- position:relative;
+ position:relative;
height:100%;
width:100%;
- /* background-color:#031924; */
- color:#444;
+
+ /* background-color:#031924; */
+ color:#444;
}
.showcard {
@@ -121,18 +122,18 @@
.CardOnGraph .best_in_place_desc textarea {
font-size: 13px;
- line-height:15px;
- font-family: helvetica, sans-serif;
- color: #424242;
-padding: 0;
-width: 100%;
-margin: 0;
-border: 0;
-outline: none;
-font-size: 12px;
-line-height: 15px;
-background: none;
-resize: none;
+ line-height:15px;
+ font-family: helvetica, sans-serif;
+ color: #424242;
+ padding: 0;
+ width: 100%;
+ margin: 0;
+ border: 0;
+ outline: none;
+ font-size: 12px;
+ line-height: 15px;
+ background: none;
+ resize: none;
}
.CardOnGraph .desc h3 {
@@ -198,9 +199,40 @@ resize: none;
left: 0;
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 {
margin-left: 12px;
width: 24px;
@@ -425,7 +457,21 @@ background-color: #E0E0E0;
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;
}
.CardOnGraph .tip, .mapCard .tip {
@@ -626,6 +672,7 @@ font-family: 'din-regular', helvetica, sans-serif;
#editSynUpperBar {
background: #FFFFFF url(synapse32.png) no-repeat 8px center;
min-height: 48px;
+ height: 48px;
border-bottom: 1px solid #222222;
display: table;
width: 100%;
@@ -701,14 +748,14 @@ font-family: 'din-regular', helvetica, sans-serif;
border-bottom: 1px solid #BBBBBB;
}
#switchSynapseList li {
- padding: 8px;
+ padding: 8px 8px 8px 68px;
cursor: pointer;
font-family: 'din-regular';
font-size: 14px;
line-height: 16px;
}
#switchSynapseList li:hover {
- background: #E0E0E0;
+ background: #DAB539;
}
#edgeUser {
@@ -723,18 +770,32 @@ font-family: 'din-regular', helvetica, sans-serif;
display:block;
}
#edgeUser .tip {
- background: none repeat scroll 0 0 #000000;
- border-radius: 4px;
- color: #FFFFFF;
- display: none;
- font-size: 15px !important;
- line-height: 17px;
- padding: 3px 5px 2px;
- position: absolute;
- left: 0;
- text-align: center;
- top: 23px;
- z-index: 100;
+ 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: 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 {
diff --git a/app/assets/stylesheets/clean.css b/app/assets/stylesheets/clean.css
index 739dd8d8..be8c7f2c 100644
--- a/app/assets/stylesheets/clean.css
+++ b/app/assets/stylesheets/clean.css
@@ -214,10 +214,28 @@
top: 40px !important;
background: #F5F5F5;
width: 472px;
- overflow-y: auto;
- overflow-x: hidden;
+ overflow-y: visible;
+ overflow-x: visible;
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 {
height: 42px;
width: 100%;
@@ -462,6 +480,12 @@
.sidebarSearch .topicOriginatorIcon img {
border-radius: 9px;
}
+
+.sidebarSearch .topicOriginatorIcon .tip {
+ left: 30px;
+ right: auto;
+ top: 1px;
+}
.sidebarSearch .tip {
position: absolute;
background: #424242;
@@ -480,6 +504,58 @@
.sidebarSearch .hoverForTip:hover .tip {
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 {
top: auto;
right: 0;
@@ -736,9 +812,13 @@
/* infoAndHelp */
-.mapPage .infoAndHelp, .topicPage .infoAndHelp{
+.mapPage .infoAndHelp, .topicPage .infoAndHelp {
right: 70px;
}
+.mapPage .openCheatsheet .tooltipsAbove, .topicPage .openCheatsheet .tooltipsAbove {
+ left: 29px;
+}
+
.infoAndHelp {
position: fixed;
bottom: 20px;
@@ -790,6 +870,10 @@
right: 24px;
}
+.topicPage .zoomExtents {
+ display: none;
+}
+
.mapControl {
width:32px;
height:32px;
@@ -798,6 +882,11 @@
background-position: 0 0;
cursor:pointer;
}
+
+.mapControls:hover, .infoAndHelp:hover {
+ z-index: 4;
+}
+
.takeScreenshot {
margin-bottom: 5px;
border-radius: 2px;
@@ -810,17 +899,157 @@
.canEditMap .takeScreenshot {
display: block;
}
+
.zoomExtents {
margin-bottom:5px;
border-radius: 2px;
background-image: url(extents_sprite.png);
}
+
.zoomExtents:hover {
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 {
background-image: url(zoom_sprite.png);
- background-position: 0 0;
+ background-position: 0 /…0;
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb
index f9c7240f..177c7f13 100644
--- a/app/controllers/main_controller.rb
+++ b/app/controllers/main_controller.rb
@@ -194,9 +194,24 @@ class MainController < ApplicationController
topic2id = params[:topic2id]
if term && !term.empty?
- @synapses = Synapse.select('DISTINCT "desc"').
- where('LOWER("desc") like ?', '%' + term.downcase + '%').limit(5).order('"desc"')
-
+ @synapses = Synapse.select('DISTINCT "desc"').where('LOWER("desc") like ?', '%' + term.downcase + '%').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)
elsif topic1id && !topic1id.empty?
diff --git a/app/helpers/maps_helper.rb b/app/helpers/maps_helper.rb
index 2163c51e..de514252 100644
--- a/app/helpers/maps_helper.rb
+++ b/app/helpers/maps_helper.rb
@@ -15,19 +15,19 @@ module MapsHelper
map['contributorCount'] = m.contributors.count
map['rtype'] = "map"
- contributorList = m.user.name + ' created this map. '
+ contributorTip = ''
+ firstContributorImage = '/assets/user.png'
if m.contributors.count > 0
- m.contributors.each_with_index do |c, index|
- comma = (index+1) == m.contributors.count ? '' : ', '
- contributorList += c.name + comma
- end
- contributorList += ' has edited it.' if m.contributors.count == 1
- contributorList += ' have edited it.' if m.contributors.count > 1
- else
- contributorList += 'No one has added anything yet.'
+ firstContributorImage = m.contributors[0].image.url(:square)
+ m.contributors.each_with_index do |c, index|
+ userImage = c.image.url(:square)
+ name = c.name
+ contributorTip += ' ' + '' + name + ' '
+ end
end
- map['contributorList'] = contributorList
-
+ map['contributorTip'] = contributorTip
+ map['mapContributorImage'] = firstContributorImage
+
temp.push map
end
return temp
diff --git a/app/helpers/synapses_helper.rb b/app/helpers/synapses_helper.rb
index 350cb0fc..a13a1be2 100644
--- a/app/helpers/synapses_helper.rb
+++ b/app/helpers/synapses_helper.rb
@@ -20,12 +20,12 @@ module SynapsesHelper
synapses.each do |s|
synapse = {}
synapse['id'] = s.id
- synapse['label'] = s.desc
+ synapse['label'] = s.desc == nil || s.desc == "" ? "(no description)" : s.desc
synapse['value'] = s.desc
synapse['permission'] = s.permission
synapse['mapCount'] = s.maps.count
synapse['originator'] = s.user.name
- synapse['originatorImage'] = s.user.image
+ synapse['originatorImage'] = s.user.image.url(:square)
synapse['rtype'] = "synapse"
temp.push synapse
diff --git a/app/helpers/topics_helper.rb b/app/helpers/topics_helper.rb
index 05cbc974..6732f17e 100644
--- a/app/helpers/topics_helper.rb
+++ b/app/helpers/topics_helper.rb
@@ -15,7 +15,7 @@ module TopicsHelper
topic['mapCount'] = t.maps.count
topic['synapseCount'] = t.synapses.count
topic['originator'] = t.user.name
- topic['originatorImage'] = t.user.image
+ topic['originatorImage'] = t.user.image.url(:square)
topic['rtype'] = "topic"
temp.push topic
diff --git a/app/models/map.rb b/app/models/map.rb
index 91bc0a11..b5a6de09 100644
--- a/app/models/map.rb
+++ b/app/models/map.rb
@@ -8,8 +8,6 @@ class Map < ActiveRecord::Base
has_many :topics, :through => :topicmappings
has_many :synapses, :through => :synapsemappings
- #after_touch :save_screenshot
-
# This method associates the attribute ":image" with a file attachment
has_attached_file :screenshot, :styles => {
:thumb => ['188x126#', :png]
@@ -121,17 +119,6 @@ class Map < ActiveRecord::Base
return true
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)
decoded_data = Base64.decode64(imgBase64)
diff --git a/app/models/user.rb b/app/models/user.rb
index f0c1345f..5d318dff 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -28,12 +28,7 @@ class User < ActiveRecord::Base
validates_uniqueness_of :name # done by devise
validates_uniqueness_of :email # done by devise
- if ActiveRecord::Base.connection.table_exists? 'users'
- 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
+ validates :joinedwithcode, :presence => true, :inclusion => { :in => $codes, :message => "%{value} is not valid" }, :on => :create
# This method associates the attribute ":image" with a file attachment
has_attached_file :image, :styles => {
@@ -54,6 +49,8 @@ class User < ActiveRecord::Base
def generate_code
#generate a random 8 letter/digit code that they can use to invite people
self.code = rand(36**8).to_s(36)
+
+ $codes.push(self.code)
end
def settings
diff --git a/app/views/layouts/_lightboxes.html.erb b/app/views/layouts/_lightboxes.html.erb
index b66ef45c..1252034e 100644
--- a/app/views/layouts/_lightboxes.html.erb
+++ b/app/views/layouts/_lightboxes.html.erb
@@ -19,7 +19,7 @@
PRIVATE BETA
2.6 (Catalpa)
-
Nov 11, 2014
+
Nov 23, 2014
diff --git a/app/views/layouts/_lowermapelements.html.erb b/app/views/layouts/_lowermapelements.html.erb
index 42b1820a..50e4296e 100644
--- a/app/views/layouts/_lowermapelements.html.erb
+++ b/app/views/layouts/_lowermapelements.html.erb
@@ -1,13 +1,13 @@
<%= render :partial => 'maps/mapinfobox' %>
-
-
+
+
\ No newline at end of file
diff --git a/app/views/layouts/_templates.html.erb b/app/views/layouts/_templates.html.erb
index cf48949b..24c7db6d 100644
--- a/app/views/layouts/_templates.html.erb
+++ b/app/views/layouts/_templates.html.erb
@@ -13,7 +13,7 @@
{{contributor_count}}
- {{contributor_list}}
+ {{{contributor_list}}}
{{topic_count}}
@@ -121,8 +121,13 @@
{{synapseCount}}
-
{{contributorList}}
- {{contributorCount}}
+
+
+
{{contributorCount}}
@@ -143,9 +148,6 @@
Mapping since: {{created_at}}
-
{{mapCount}}
@@ -156,13 +158,11 @@
+<% if !authenticated? %>
+
+<% end %>
+
<%= render :partial => 'layouts/googleanalytics' if Rails.env.production? %>