This commit is contained in:
Bashar Jabbour 2014-11-18 14:50:17 -05:00
commit c4de02a958
42 changed files with 122 additions and 132 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

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

View file

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View file

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View file

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -324,7 +324,7 @@ Metamaps.GlobalUI.Account = {
Metamaps.Realtime.close(); Metamaps.Realtime.close();
Metamaps.Filter.close(); Metamaps.Filter.close();
$('.sidebarAccountIcon div').addClass('hide'); $('.sidebarAccountIcon .tooltipsUnder').addClass('hide');
if (!self.isOpen && !self.changing) { if (!self.isOpen && !self.changing) {
@ -339,7 +339,7 @@ Metamaps.GlobalUI.Account = {
close: function () { close: function () {
var self = Metamaps.GlobalUI.Account; var self = Metamaps.GlobalUI.Account;
$('.sidebarAccountIcon div').removeClass('hide'); $('.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

@ -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>'

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;
@ -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;
@ -1359,7 +1359,7 @@ float: left;
#new_topic .tt-suggestion, #new_topic .tt-suggestion,
#new_synapse .tt-suggestion { #new_synapse .tt-suggestion {
background: #F5F5F5; background: #F5F5F5;
width: 256px; width: 270px;
position: relative; position: relative;
} }
#new_topic .autocompleteSection { #new_topic .autocompleteSection {
@ -1380,9 +1380,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 +1394,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 +1412,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 +1433,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,14 +1451,12 @@ 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:hover .tip,
@ -1493,17 +1484,59 @@ float: left;
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: 36px;
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 */
@ -1945,6 +1978,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;
} }
@ -2156,10 +2192,8 @@ and it won't be important on password protected instances */
padding-bottom:12px; padding-bottom:12px;
} }
#about > p, #getInvolved > p, #invite > p, #colophon p { #about > p, #getInvolved > p, #invite > p, #colophon p, #donate > p {
/* color: #000; margin: 0px 0px 10px 0px;
font-size: 16px;*/
margin: 0px 0px 20px 0px;
line-height: 20px; line-height: 20px;
} }
#about ul { #about ul {

View file

@ -746,14 +746,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 {

View file

@ -704,6 +704,10 @@
.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;
@ -792,7 +796,7 @@
} }
.zoomExtents:hover .tooltips, .zoomIn:hover .tooltips, .zoomOut:hover .tooltips, .takeScreenshot:hover .tooltips, .sidebarCollaborateIcon:hover .tooltipsUnder, .zoomExtents:hover .tooltips, .zoomIn:hover .tooltips, .zoomOut:hover .tooltips, .takeScreenshot:hover .tooltips, .sidebarCollaborateIcon:hover .tooltipsUnder,
.sidebarFilterIcon:hover .tooltipsUnder, .sidebarForkIcon:hover .tooltipsUnder, .addMap:hover .tooltipsUnder, .sidebarAccountIcon:hover .tooltipsUnder, .sidebarFilterIcon:hover .tooltipsUnder, .sidebarForkIcon:hover .tooltipsUnder, .addMap:hover .tooltipsUnder, .authenticated .sidebarAccountIcon:hover .tooltipsUnder,
.mapInfoIcon:hover .tooltipsAbove, .openCheatsheet:hover .tooltipsAbove { .mapInfoIcon:hover .tooltipsAbove, .openCheatsheet:hover .tooltipsAbove {
display: block; display: block;
} }
@ -878,7 +882,7 @@
} }
.openCheatsheet .tooltipsAbove { .openCheatsheet .tooltipsAbove {
left: 29px; left: -4px;
} }
.sidebarAccountIcon .tooltipsUnder { .sidebarAccountIcon .tooltipsUnder {
@ -899,11 +903,11 @@
border-bottom: 5px solid transparent; border-bottom: 5px solid transparent;
} }
.sidebarCollaborateIcon div:after, .sidebarFilterIcon div:after, .sidebarAccountIcon div:after { .sidebarCollaborateIcon div:after, .sidebarFilterIcon div:after, .sidebarAccountIcon .tooltipsUnder:after {
left: 38%; left: 38%;
} }
.sidebarCollaborateIcon div:after, .sidebarFilterIcon div:after, .sidebarForkIcon div:after, .addMap div:after, .sidebarAccountIcon div:after { .sidebarCollaborateIcon div:after, .sidebarFilterIcon div:after, .sidebarForkIcon div:after, .addMap div:after, .sidebarAccountIcon .tooltipsUnder:after {
content: ''; content: '';
position: absolute; position: absolute;
top: 128%; top: 128%;

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

@ -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

@ -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

@ -158,6 +158,7 @@
<div class="lightboxContent" id="donate"> <div class="lightboxContent" id="donate">
<h3>Donate!</h3> <h3>Donate!</h3>
<div class="leaveSpace"></div>
<p>The Metamaps.cc project has been bootstrapped through our own pockets, passion, and patrons - including a couple of small grants which have gone to supporting our core contributors. Some of us have used Metamaps.cc as a tool for our own freelance consulting practice, and we are starting to create hosted and customized installations of Metamaps for different clients as one business model.</p> <p>The Metamaps.cc project has been bootstrapped through our own pockets, passion, and patrons - including a couple of small grants which have gone to supporting our core contributors. Some of us have used Metamaps.cc as a tool for our own freelance consulting practice, and we are starting to create hosted and customized installations of Metamaps for different clients as one business model.</p>
@ -166,6 +167,7 @@
<p>Financial contributions in the form of patronage/donations/gifts are greatly appreciated in support of our work. You can donate Bitcoin directly or give us a weekly gift of gratitude for the work we do on Gratipay using the links below.</p> <p>Financial contributions in the form of patronage/donations/gifts are greatly appreciated in support of our work. You can donate Bitcoin directly or give us a weekly gift of gratitude for the work we do on Gratipay using the links below.</p>
<p>If you'd like to know what your money is going towards, we publish our financials transparently - everything is recorded through our value accounting system.</p> <p>If you'd like to know what your money is going towards, we publish our financials transparently - everything is recorded through our value accounting system.</p>
<div class="leaveSpace"></div>
<script data-gratipay-username="Metamaps.cc" src="//gttp.co/v1.js"></script> <script data-gratipay-username="Metamaps.cc" src="//gttp.co/v1.js"></script>
<div style="font-size:16px;margin:0 auto;width:300px" class="blockchain-btn" <div style="font-size:16px;margin:0 auto;width:300px" class="blockchain-btn"
data-address="15z24wj6E9tTsJgEBjnK81CtJ7kZZmxJYN" data-address="15z24wj6E9tTsJgEBjnK81CtJ7kZZmxJYN"

View file

@ -2,7 +2,7 @@
<div class="takeScreenshot mapControl"><div class="tooltips">Capture Screenshot</div></div> <div class="takeScreenshot mapControl"><div class="tooltips">Capture Screenshot</div></div>
<div class="zoomExtents mapControl"><div class="tooltips">Center View</div></div> <div class="zoomExtents mapControl"><div class="tooltips">Center View</div></div>
<div class="zoomIn mapControl"><div class="tooltips">Zoom In</div></div> <div class="zoomIn mapControl"><div class="tooltips">Zoom In</div></div>
<div class="zoomOut mapControl"><div class="tooltips">Zoom In</div></div> <div class="zoomOut mapControl"><div class="tooltips">Zoom Out</div></div>
</div> </div>
<div class="infoAndHelp"> <div class="infoAndHelp">

View file

@ -156,13 +156,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>

View file

@ -52,7 +52,7 @@
<% if authenticated? %> <% if authenticated? %>
<!-- fork map --> <!-- fork map -->
<div class="sidebarFork upperRightEl"> <div class="sidebarFork upperRightEl">
<div class="sidebarForkIcon upperRightIcon"><div class="tooltipsUnder">Save to new map</div></div> <div class="sidebarForkIcon upperRightIcon"><div class="tooltipsUnder">Save To New Map</div></div>
</div> <!-- end sidebarFork --> </div> <!-- end sidebarFork -->
<% end %> <% end %>
@ -61,7 +61,7 @@
<% if authenticated? %> <% if authenticated? %>
<!-- create new map --> <!-- create new map -->
<div class="addMap openLightbox upperRightEl upperRightIcon" data-open="newmap"><div class="tooltipsUnder">Create new map</div> <div class="addMap openLightbox upperRightEl upperRightIcon" data-open="newmap"><div class="tooltipsUnder">Create New Map</div>
</div><!-- end addMap --> </div><!-- end addMap -->
<% end %> <% end %>

View file

@ -147,6 +147,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

@ -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>

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

@ -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,11 +1,6 @@
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 'request', to: 'main#requestinvite', via: :get, as: :request match 'request', to: 'main#requestinvite', via: :get, as: :request

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;
} }