merged develop into thevalueweb

This commit is contained in:
Connor Turland 2014-12-03 08:26:11 -05:00
commit 1b5ac1dafa
48 changed files with 938 additions and 245 deletions

View file

@ -87,7 +87,7 @@ If you'd like to contribute a fix for a bug you've encountered, first read up on
aware of the issue. By filing the issue first, we may be able to provide you aware of the issue. By filing the issue first, we may be able to provide you
with some insight that guides you in the right direction. with some insight that guides you in the right direction.
[metamaps-issues]: https://github.com/Connoropolous/metamaps_gen002/issues [metamaps-issues]: https://github.com/metamaps/metamaps_gen002/issues
[git-branching-model]: http://nvie.com/posts/a-successful-git-branching-model/ [git-branching-model]: http://nvie.com/posts/a-successful-git-branching-model/
[fork-metamaps]: https://github.com/Connoropolous/metamaps_gen002/fork [fork-metamaps]: https://github.com/metamaps/metamaps_gen002/fork
[cla]: http://metamaps.cc/cla [cla]: http://metamaps.cc/cla

View file

@ -1,3 +1,9 @@
make sure that devise key is correct
make sure that AWS bucket is set to the metamaps-production bucket
make sure that root individuals have same 'joinedwithcode' as 'code' make sure that root individuals have same 'joinedwithcode' as 'code'
User.all.each do |u| User.all.each do |u|

View file

@ -47,9 +47,9 @@ Copyright (c) 2014 Connor Turland
[site-blog]: http://blog.metamaps.cc [site-blog]: http://blog.metamaps.cc
[site-beta]: http://metamaps.cc [site-beta]: http://metamaps.cc
[community]: https://plus.google.com/u/0/communities/115060009262157699234 [community]: https://plus.google.com/u/0/communities/115060009262157699234
[license]: https://github.com/Connoropolous/metamaps_gen002/blob/master/LICENSE [license]: https://github.com/metamaps/metamaps_gen002/blob/master/LICENSE
[contributing]: https://github.com/Connoropolous/metamaps_gen002/blob/master/CONTRIBUTING.md [contributing]: https://github.com/metamaps/metamaps_gen002/blob/master/CONTRIBUTING.md
[contributing-issues]: https://github.com/Connoropolous/metamaps_gen002/blob/master/CONTRIBUTING.md#reporting-bugs-and-other-issues [contributing-issues]: https://github.com/metamaps/metamaps_gen002/blob/master/CONTRIBUTING.md#reporting-bugs-and-other-issues
[windows-installation]: https://github.com/Connoropolous/metamaps_gen002/blob/master/WindowsInstallation.md [windows-installation]: https://github.com/metamaps/metamaps_gen002/blob/master/WindowsInstallation.md
[mac-installation]: https://github.com/Connoropolous/metamaps_gen002/blob/master/MacInstallation.md [mac-installation]: https://github.com/metamaps/metamaps_gen002/blob/master/MacInstallation.md
[ubuntu-installation]: https://github.com/Connoropolous/metamaps_gen002/blob/master/UbuntuInstallation.md [ubuntu-installation]: https://github.com/metamaps/metamaps_gen002/blob/master/UbuntuInstallation.md

View file

@ -38,7 +38,7 @@ running this will check your system for requirements as well so you will need to
alright now we can download metamaps from the master using git alright now we can download metamaps from the master using git
git clone https://github.com/Connoropolous/metamaps_gen002.git git clone https://github.com/metamaps/metamaps_gen002.git
now there is a couple other things we are going to need which is phantomjs, nodejs, postgresql, libpq-dev and redis-server now there is a couple other things we are going to need which is phantomjs, nodejs, postgresql, libpq-dev and redis-server

View file

@ -13,7 +13,7 @@ also download node.js, which is also needed http://nodejs.org/download/
Navigate to the folder that you want to download the metamaps files to and run the following: (use your forked git repository address if it's different than this repo. You will also need to go to your Github account settings and add the SSH key that was placed in your clipboard earlier) Navigate to the folder that you want to download the metamaps files to and run the following: (use your forked git repository address if it's different than this repo. You will also need to go to your Github account settings and add the SSH key that was placed in your clipboard earlier)
git clone https://github.com/Connoropolous/metamaps_gen002.git --branch develop git clone https://github.com/metamaps/metamaps_gen002.git --branch develop
cd metamaps_gen002 cd metamaps_gen002
Now you're in the main directory. Now you're in the main directory.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 438 B

BIN
app/assets/images/user.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

View file

@ -89,10 +89,20 @@ Metamaps.Backbone.Map = Backbone.Model.extend({
function capitalize(string) { function capitalize(string) {
return string.charAt(0).toUpperCase() + string.slice(1); return string.charAt(0).toUpperCase() + string.slice(1);
} }
var n = this.get('name');
var d = this.get('desc');
var maxNameLength = 32;
var maxDescLength = 118;
var truncatedName = n ? (n.length > maxNameLength ? n.substring(0, maxNameLength) + "..." : n) : "";
var truncatedDesc = d ? (d.length > maxDescLength ? d.substring(0, maxDescLength) + "..." : d) : "";
var obj = { var obj = {
id: this.id, id: this.id,
name: this.get('name'), name: truncatedName,
desc: this.get('desc'), fullName: n,
desc: truncatedDesc,
permission: this.get("permission") ? capitalize(this.get("permission")) : "Commons", permission: this.get("permission") ? capitalize(this.get("permission")) : "Commons",
editPermission: this.authorizeToEdit(Metamaps.Active.Mapper) ? 'canEdit' : 'cannotEdit', editPermission: this.authorizeToEdit(Metamaps.Active.Mapper) ? 'canEdit' : 'cannotEdit',
contributor_count_number: '<span class="cCountColor">' + this.get('contributor_count') + '</span>', contributor_count_number: '<span class="cCountColor">' + this.get('contributor_count') + '</span>',
@ -131,11 +141,20 @@ Metamaps.Backbone.MapsCollection = Backbone.Collection.extend({
this.id = options.id; this.id = options.id;
this.sortBy = options.sortBy; this.sortBy = options.sortBy;
if (options.mapperId) {
this.mapperId = options.mapperId;
}
// this.page represents the NEXT page to fetch // this.page represents the NEXT page to fetch
this.page = models.length > 0 ? (models.length < 20 ? "loadedAll" : 2) : 1; this.page = models.length > 0 ? (models.length < 20 ? "loadedAll" : 2) : 1;
}, },
url: function() { url: function() {
if (!this.mapperId) {
return '/explore/' + this.id + '.json'; return '/explore/' + this.id + '.json';
}
else {
return '/explore/mapper/' + this.mapperId + '.json';
}
}, },
comparator: function (a, b) { comparator: function (a, b) {
a = a.get(this.sortBy); a = a.get(this.sortBy);

View file

@ -92,10 +92,18 @@ Metamaps.GlobalUI = {
if (Metamaps.Active.Mapper) Metamaps.Active.Mapper = new Metamaps.Backbone.Mapper(Metamaps.Active.Mapper); if (Metamaps.Active.Mapper) Metamaps.Active.Mapper = new Metamaps.Backbone.Mapper(Metamaps.Active.Mapper);
var myCollection = Metamaps.Maps.Mine ? Metamaps.Maps.Mine : []; var myCollection = Metamaps.Maps.Mine ? Metamaps.Maps.Mine : [];
var mapperCollection = [];
var mapperOptionsObj = {id: 'mapper', sortBy: 'updated_at' };
if (Metamaps.Maps.Mapper) {
mapperCollection = Metamaps.Maps.Mapper.models;
mapperOptionsObj.mapperId = Metamaps.Maps.Mapper.id;
}
var featuredCollection = Metamaps.Maps.Featured ? Metamaps.Maps.Featured : []; var featuredCollection = Metamaps.Maps.Featured ? Metamaps.Maps.Featured : [];
var activeCollection = Metamaps.Maps.Active ? Metamaps.Maps.Active : []; var activeCollection = Metamaps.Maps.Active ? Metamaps.Maps.Active : [];
Metamaps.Maps.Mine = new Metamaps.Backbone.MapsCollection(myCollection, {id: 'mine', sortBy: 'name' }); Metamaps.Maps.Mine = new Metamaps.Backbone.MapsCollection(myCollection, {id: 'mine', sortBy: 'updated_at' });
Metamaps.Maps.Featured = new Metamaps.Backbone.MapsCollection(featuredCollection, {id: 'featured', sortBy: 'name' }); // 'Mapper' refers to another mapper
Metamaps.Maps.Mapper = new Metamaps.Backbone.MapsCollection(mapperCollection, mapperOptionsObj);
Metamaps.Maps.Featured = new Metamaps.Backbone.MapsCollection(featuredCollection, {id: 'featured', sortBy: 'updated_at' });
Metamaps.Maps.Active = new Metamaps.Backbone.MapsCollection(activeCollection, {id: 'active', sortBy: 'updated_at' }); Metamaps.Maps.Active = new Metamaps.Backbone.MapsCollection(activeCollection, {id: 'active', sortBy: 'updated_at' });
}, },
openLightbox: function (which) { openLightbox: function (which) {
@ -602,8 +610,7 @@ Metamaps.GlobalUI.Search = {
} else if (dataset == "maps") { } else if (dataset == "maps") {
Metamaps.Router.maps(datum.id); Metamaps.Router.maps(datum.id);
} else if (dataset == "mappers") { } else if (dataset == "mappers") {
win = window.open('/maps/mappers/' + datum.id, '_blank'); Metamaps.Router.explore("mapper", datum.id);
win.focus();
} }
} }
}, },

View file

@ -112,8 +112,10 @@ Metamaps.JIT = {
}); });
if (self.vizData.length == 0) { if (self.vizData.length == 0) {
Metamaps.Famous.viz.showInstructions();
Metamaps.Visualize.loadLater = true; Metamaps.Visualize.loadLater = true;
} }
else Metamaps.Famous.viz.hideInstructions();
Metamaps.Visualize.render(); Metamaps.Visualize.render();
}, // prepareVizData }, // prepareVizData
@ -378,11 +380,21 @@ Metamaps.JIT = {
if(e.ctrlKey){ if(e.ctrlKey){
Metamaps.Visualize.mGraph.busy = false; Metamaps.Visualize.mGraph.busy = false;
Metamaps.Mouse.boxEndCoordinates = eventInfo.getPos(); Metamaps.Mouse.boxEndCoordinates = eventInfo.getPos();
var bS = Metamaps.Mouse.boxStartCoordinates;
var bE = Metamaps.Mouse.boxEndCoordinates;
if (Math.abs(bS.x - bE.x) > 20 && Math.abs(bS.y - bE.y) > 20) {
Metamaps.JIT.zoomToBox(e); Metamaps.JIT.zoomToBox(e);
//console.log('called zoom to box');
return; return;
} }
else if (e.shiftKey) { else {
Metamaps.Mouse.boxStartCoordinates = null;
Metamaps.Mouse.boxEndCoordinates = null;
}
//console.log('called zoom to box');
}
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);
@ -1127,11 +1139,18 @@ Metamaps.JIT = {
sY = -1 * sY; sY = -1 * sY;
eY = -1 * eY eY = -1 * eY
var edgesToToggle = [];
Metamaps.Synapses.each(function(synapse) { Metamaps.Synapses.each(function(synapse) {
var fromNodeX = synapse.get('edge').nodeFrom.pos.x; var e = synapse.get('edge');
var fromNodeY = -1 * synapse.get('edge').nodeFrom.pos.y; if (edgesToToggle.indexOf(e) === -1) {
var toNodeX = synapse.get('edge').nodeTo.pos.x; edgesToToggle.push(e);
var toNodeY = -1 * synapse.get('edge').nodeTo.pos.y; }
});
edgesToToggle.forEach(function(edge) {
var fromNodeX = edge.nodeFrom.pos.x;
var fromNodeY = -1 * edge.nodeFrom.pos.y;
var toNodeX = edge.nodeTo.pos.x;
var toNodeY = -1 * edge.nodeTo.pos.y;
var maxX = fromNodeX; var maxX = fromNodeX;
var maxY = fromNodeY; var maxY = fromNodeY;
@ -1207,21 +1226,18 @@ Metamaps.JIT = {
//The test synapse was selected! //The test synapse was selected!
// make sure the edge hasn't been hidden from the page
var node1id = synapse.get('edge').nodeFrom.id;
var node2id = synapse.get('edge').nodeTo.id;
var edge = Metamaps.Visualize.mGraph.graph.getAdjacence(node1id, node2id);
if(selectTest){ if(selectTest){
// shiftKey = toggleSelect, otherwise
if(e.shiftKey){ if(e.shiftKey){
if(Metamaps.Selected.Edges.indexOf(synapse.get('edge')) != -1 ){ if(Metamaps.Selected.Edges.indexOf(edge) != -1 ){
Metamaps.Control.deselectEdge(synapse.get('edge')); Metamaps.Control.deselectEdge(edge);
} }
else{ else{
if (edge) Metamaps.Control.selectEdge(synapse.get('edge')); Metamaps.Control.selectEdge(edge);
} }
} }
else{ else{
if (edge) Metamaps.Control.selectEdge(synapse.get('edge')); Metamaps.Control.selectEdge(edge);
} }
} }
}); });
@ -1322,9 +1338,9 @@ Metamaps.JIT = {
var disabled = authorized ? "" : "disabled"; var disabled = authorized ? "" : "disabled";
if (Metamaps.Active.Map) menustring += '<li class="rc-hide"><div class="rc-icon"></div>Hide until refresh</li>'; if (Metamaps.Active.Map) menustring += '<li class="rc-hide"><div class="rc-icon"></div>Hide until refresh<div class="rc-keyboard">Ctrl+H</div></li>';
if (Metamaps.Active.Map && Metamaps.Active.Mapper) menustring += '<li class="rc-remove ' + disabled + '"><div class="rc-icon"></div>Remove from map</li>'; if (Metamaps.Active.Map && Metamaps.Active.Mapper) menustring += '<li class="rc-remove ' + disabled + '"><div class="rc-icon"></div>Remove from map<div class="rc-keyboard">Ctrl+M</div></li>';
if (Metamaps.Active.Map && Metamaps.Active.Mapper) menustring += '<li class="rc-delete ' + disabled + '"><div class="rc-icon"></div>Delete</li>'; if (Metamaps.Active.Map && Metamaps.Active.Mapper) menustring += '<li class="rc-delete ' + disabled + '"><div class="rc-icon"></div>Delete<div class="rc-keyboard">Ctrl+D</div></li>';
if (Metamaps.Active.Topic) { if (Metamaps.Active.Topic) {
@ -1337,6 +1353,8 @@ Metamaps.JIT = {
<li class="changeP toPrivate"><div class="rc-perm-icon"></div>private</li> \ <li class="changeP toPrivate"><div class="rc-perm-icon"></div>private</li> \
</ul>'; </ul>';
menustring += '<li class="rc-spacer"></li>';
menustring += '<li class="rc-permission"><div class="rc-icon"></div>Change permissions' + options + '<div class="expandLi"></div></li>'; menustring += '<li class="rc-permission"><div class="rc-icon"></div>Change permissions' + options + '<div class="expandLi"></div></li>';
var metacodeOptions = $('#metacodeOptions').html(); var metacodeOptions = $('#metacodeOptions').html();
@ -1344,6 +1362,11 @@ Metamaps.JIT = {
menustring += '<li class="rc-metacode"><div class="rc-icon"></div>Change metacode' + metacodeOptions + '<div class="expandLi"></div></li>'; menustring += '<li class="rc-metacode"><div class="rc-icon"></div>Change metacode' + metacodeOptions + '<div class="expandLi"></div></li>';
} }
if (Metamaps.Active.Topic) { if (Metamaps.Active.Topic) {
if (!Metamaps.Active.Mapper) {
menustring += '<li class="rc-spacer"></li>';
}
// set up the get sibling menu as a "lazy load" // set up the get sibling menu as a "lazy load"
// only fill in the submenu when they hover over the get siblings list item // only fill in the submenu when they hover over the get siblings list item
var siblingMenu = '<ul id="fetchSiblingList"> \ var siblingMenu = '<ul id="fetchSiblingList"> \
@ -1575,9 +1598,11 @@ Metamaps.JIT = {
var disabled = authorized ? "" : "disabled"; var disabled = authorized ? "" : "disabled";
if (Metamaps.Active.Map) menustring += '<li class="rc-hide"><div class="rc-icon"></div>Hide until refresh</li>'; if (Metamaps.Active.Map) menustring += '<li class="rc-hide"><div class="rc-icon"></div>Hide until refresh<div class="rc-keyboard">Ctrl+H</div></li>';
if (Metamaps.Active.Map && Metamaps.Active.Mapper) menustring += '<li class="rc-remove ' + disabled + '"><div class="rc-icon"></div>Remove from map</li>'; if (Metamaps.Active.Map && Metamaps.Active.Mapper) menustring += '<li class="rc-remove ' + disabled + '"><div class="rc-icon"></div>Remove from map<div class="rc-keyboard">Ctrl+M</div></li>';
if (Metamaps.Active.Map && Metamaps.Active.Mapper) menustring += '<li class="rc-delete ' + disabled + '"><div class="rc-icon"></div>Delete</li>'; if (Metamaps.Active.Map && Metamaps.Active.Mapper) menustring += '<li class="rc-delete ' + disabled + '"><div class="rc-icon"></div>Delete<div class="rc-keyboard">Ctrl+D</div></li>';
if (Metamaps.Active.Map && Metamaps.Active.Mapper) menustring += '<li class="rc-spacer"></li>';
if (Metamaps.Active.Mapper) { if (Metamaps.Active.Mapper) {
var permOptions = '<ul><li class="changeP toCommons"><div class="rc-perm-icon"></div>commons</li> \ var permOptions = '<ul><li class="changeP toCommons"><div class="rc-perm-icon"></div>commons</li> \

View file

@ -6,11 +6,12 @@
routes: { routes: {
"": "home", // #home "": "home", // #home
"explore/:section": "explore", // #explore/active "explore/:section": "explore", // #explore/active
"explore/:section/:id": "explore", // #explore/mapper/1234
"maps/:id": "maps" // #maps/7 "maps/:id": "maps" // #maps/7
}, },
home: function () { home: function () {
if (Metamaps.Active.Mapper) document.title = 'My Maps | Metamaps'; if (Metamaps.Active.Mapper) document.title = 'Explore Active Maps | Metamaps';
else document.title = 'Home | Metamaps'; else document.title = 'Home | Metamaps';
Metamaps.currentSection = ""; Metamaps.currentSection = "";
@ -25,7 +26,7 @@
Metamaps.Famous.yield.hide(); Metamaps.Famous.yield.hide();
Metamaps.Famous.explore.set('mine'); Metamaps.Famous.explore.set('active');
Metamaps.Famous.maps.resetScroll(); // sets the scroll back to the top Metamaps.Famous.maps.resetScroll(); // sets the scroll back to the top
Metamaps.Famous.explore.show(); Metamaps.Famous.explore.show();
@ -34,9 +35,9 @@
Metamaps.GlobalUI.Search.open(); Metamaps.GlobalUI.Search.open();
Metamaps.GlobalUI.Search.lock(); Metamaps.GlobalUI.Search.lock();
Metamaps.Views.exploreMaps.setCollection( Metamaps.Maps.Mine ); Metamaps.Views.exploreMaps.setCollection( Metamaps.Maps.Active );
if (Metamaps.Maps.Mine.length === 0) { if (Metamaps.Maps.Active.length === 0) {
Metamaps.Maps.Mine.getMaps(); // this will trigger an explore maps render Metamaps.Maps.Active.getMaps(); // this will trigger an explore maps render
} }
else { else {
Metamaps.Views.exploreMaps.render(); Metamaps.Views.exploreMaps.render();
@ -64,13 +65,29 @@
Metamaps.Active.Map = null; Metamaps.Active.Map = null;
Metamaps.Active.Topic = null; Metamaps.Active.Topic = null;
}, },
explore: function (section) { explore: function (section, id) {
// just capitalize the variable section // just capitalize the variable section
// either 'mine', 'featured', or 'active' // either 'featured', 'mapper', or 'active'
var capitalize = section.charAt(0).toUpperCase() + section.slice(1); var capitalize = section.charAt(0).toUpperCase() + section.slice(1);
if (section === "featured" || section === "active") {
document.title = 'Explore ' + capitalize + ' Maps | Metamaps'; document.title = 'Explore ' + capitalize + ' Maps | Metamaps';
}
else if (section === "mapper") {
$.ajax({
url: "/users/" + id + ".json",
success: function (response) {
document.title = response.name + ' | Metamaps';
},
error: function () {
}
});
}
else if (section === "mine") {
document.title = 'Explore My Maps | Metamaps';
}
$('.wrapper').removeClass('homePage mapPage topicPage'); $('.wrapper').removeClass('homePage mapPage topicPage');
$('.wrapper').addClass('explorePage'); $('.wrapper').addClass('explorePage');
@ -78,6 +95,17 @@
Metamaps.currentSection = "explore"; Metamaps.currentSection = "explore";
Metamaps.currentPage = section; Metamaps.currentPage = section;
// this will mean it's a mapper page being loaded
if (id) {
if (Metamaps.Maps.Mapper.mapperId !== id) {
// empty the collection if we are trying to load the maps
// collection of a different mapper than we had previously
Metamaps.Maps.Mapper.reset();
Metamaps.Maps.Mapper.page = 1;
}
Metamaps.Maps.Mapper.mapperId = id;
}
Metamaps.Views.exploreMaps.setCollection( Metamaps.Maps[capitalize] ); Metamaps.Views.exploreMaps.setCollection( Metamaps.Maps[capitalize] );
if (Metamaps.Maps[capitalize].length === 0) { if (Metamaps.Maps[capitalize].length === 0) {
Metamaps.Loading.show(); Metamaps.Loading.show();
@ -85,9 +113,14 @@
Metamaps.Maps[capitalize].getMaps(); // this will trigger an explore maps render Metamaps.Maps[capitalize].getMaps(); // this will trigger an explore maps render
}, 300); // wait 300 milliseconds till the other animations are done to do the fetch }, 300); // wait 300 milliseconds till the other animations are done to do the fetch
} }
else {
if (id) {
Metamaps.Views.exploreMaps.fetchUserThenRender();
}
else { else {
Metamaps.Views.exploreMaps.render(); Metamaps.Views.exploreMaps.render();
} }
}
Metamaps.GlobalUI.Search.open(); Metamaps.GlobalUI.Search.open();
Metamaps.GlobalUI.Search.lock(); Metamaps.GlobalUI.Search.lock();
@ -96,7 +129,7 @@
Metamaps.Famous.maps.resetScroll(); // sets the scroll back to the top Metamaps.Famous.maps.resetScroll(); // sets the scroll back to the top
Metamaps.Famous.maps.show(); Metamaps.Famous.maps.show();
Metamaps.Famous.explore.set(section); Metamaps.Famous.explore.set(section, id);
Metamaps.Famous.explore.show(); Metamaps.Famous.explore.show();
Metamaps.Famous.viz.hide(); Metamaps.Famous.viz.hide();
@ -172,13 +205,8 @@
Metamaps.Router = new Router(); Metamaps.Router = new Router();
Metamaps.Router.init = function () {
Backbone.history.start({ Metamaps.Router.intercept = function (evt) {
silent: true,
pushState: true,
root: '/'
});
$(document).on("click", "a:not([data-bypass])", function (evt) {
var segments; var segments;
var href = { var href = {
@ -187,7 +215,7 @@
}; };
var root = location.protocol + "//" + location.host + Backbone.history.options.root; var root = location.protocol + "//" + location.host + Backbone.history.options.root;
if (href.prop && href.prop === root) href.attr = "" if (href.prop && href.prop === root) href.attr = "";
if (href.prop && href.prop.slice(0, root.length) === root) { if (href.prop && href.prop.slice(0, root.length) === root) {
evt.preventDefault(); evt.preventDefault();
@ -197,9 +225,17 @@
if (href.attr === "") Metamaps.Router.home(); if (href.attr === "") Metamaps.Router.home();
else { else {
Metamaps.Router[segments[0]](segments[1]); Metamaps.Router[segments[0]](segments[1], segments[2]);
} }
} }
};
Metamaps.Router.init = function () {
Backbone.history.start({
silent: true,
pushState: true,
root: '/'
}); });
} $(document).on("click", "a:not([data-bypass])", Metamaps.Router.intercept);
};
})(); })();

View file

@ -5,6 +5,20 @@
Metamaps.Views.init = function () { Metamaps.Views.init = function () {
Metamaps.Views.MapperCard = Backbone.View.extend({
template: Hogan.compile( $('#mapperCardTemplate').html() ),
tagNamea: "div",
className: "mapper",
render: function () {
this.$el.html( this.template.render(this.model) );
return this;
}
});
Metamaps.Views.MapCard = Backbone.View.extend({ Metamaps.Views.MapCard = Backbone.View.extend({
template: Hogan.compile( $('#mapCardTemplate').html() ), template: Hogan.compile( $('#mapCardTemplate').html() ),
@ -40,12 +54,20 @@ Metamaps.Views.init = function () {
this.listenTo(this.collection, 'successOnFetch', this.handleSuccess); this.listenTo(this.collection, 'successOnFetch', this.handleSuccess);
this.listenTo(this.collection, 'errorOnFetch', this.handleError); this.listenTo(this.collection, 'errorOnFetch', this.handleError);
}, },
render: function () { render: function (mapperObj) {
var that = this; var that = this;
this.el.innerHTML = ""; this.el.innerHTML = "";
// in case it is a page where we have to display the mapper card
if (mapperObj) {
var view = new Metamaps.Views.MapperCard({ model: mapperObj });
that.el.appendChild( view.render().el );
}
this.collection.each(function (map) { this.collection.each(function (map) {
var view = new Metamaps.Views.MapCard({ model: map }); var view = new Metamaps.Views.MapCard({ model: map });
@ -69,16 +91,44 @@ Metamaps.Views.init = function () {
} }
Metamaps.Loading.hide(); Metamaps.Loading.hide();
setTimeout(function(){
var path = Metamaps.currentSection == "" ? "" : "/explore/" + Metamaps.currentPage; clearTimeout(Metamaps.routerTimeoutFunctionIds);
Metamaps.routerTimeoutId = setTimeout((function(localCurrentPage){ return function(){
var path = (Metamaps.currentSection == "") ? "" : "/explore/" + localCurrentPage;
// alter url if for mapper profile page
if (that.collection && that.collection.mapperId) {
path += "/" + that.collection.mapperId;
}
Metamaps.Router.navigate(path); Metamaps.Router.navigate(path);
}, 500); }})(Metamaps.currentPage), 500);
}, },
handleSuccess: function () { handleSuccess: function () {
var that = this;
if (this.collection && this.collection.id === "mapper") {
this.fetchUserThenRender();
}
else {
this.render(); this.render();
}
}, },
handleError: function () { handleError: function () {
console.log('error loading maps!'); //TODO console.log('error loading maps!'); //TODO
},
fetchUserThenRender: function () {
var that = this;
// first load the mapper object and then call the render function
$.ajax({
url: "/users/" + this.collection.mapperId + "/details.json",
success: function (response) {
that.render(response);
},
error: function () {
}
});
} }
}); });

View file

@ -749,6 +749,10 @@ Metamaps.Create = {
if (datum.id) { // if they clicked on an existing synapse get it if (datum.id) { // if they clicked on an existing synapse get it
Metamaps.Synapse.getSynapseFromAutocomplete(datum.id); Metamaps.Synapse.getSynapseFromAutocomplete(datum.id);
} }
else {
Metamaps.Create.newSynapse.description = datum.value;
Metamaps.Synapse.createSynapseLocally();
}
}); });
}, },
beingCreated: false, beingCreated: false,
@ -1089,6 +1093,36 @@ Metamaps.TopicCard = {
$('.showcard .yourTopic .mapPerm').click(openPermissionSelect); $('.showcard .yourTopic .mapPerm').click(openPermissionSelect);
$('.showcard').click(hidePermissionSelect); $('.showcard').click(hidePermissionSelect);
} }
$('.links .mapCount').unbind().click(function(event){
$('.mapCount .tip').toggle();
$('.showcard .hoverTip').toggleClass('hide');
event.stopPropagation();
});
$('.mapCount .tip').unbind().click(function(event){
event.stopPropagation();
});
$('.showcard').unbind('.hideTip').bind('click.hideTip', function(){
$('.mapCount .tip').hide();
$('.showcard .hoverTip').removeClass('hide');
});
$('.mapCount .tip li a').click(Metamaps.Router.intercept);
var originalText = $('.showMore').html();
$('.mapCount .tip .showMore').unbind().toggle(
function(event){
$('.extraText').toggleClass("hideExtra");
$('.showMore').html('Show less...');
},
function(event){
$('.extraText').toggleClass("hideExtra");
$('.showMore').html(originalText);
});
$('.mapCount .tip showMore').unbind().click(function(event){
event.stopPropagation();
});
}, },
handleInvalidLink: function() { handleInvalidLink: function() {
var self = Metamaps.TopicCard; var self = Metamaps.TopicCard;
@ -1162,6 +1196,27 @@ Metamaps.TopicCard = {
nodeValues.attachments = ''; nodeValues.attachments = '';
} }
var inmapsAr = topic.get("inmaps");
var inmapsLinks = topic.get("inmapsLinks");
nodeValues.inmaps ='';
if (inmapsAr.length < 6) {
for (i = 0; i < inmapsAr.length; i++) {
var url = "/maps/" + inmapsLinks[i];
nodeValues.inmaps += '<li><a href="' + url + '">' + inmapsAr[i]+ '</a></li>';
}
}
else {
for (i = 0; i < 5; i++){
var url = "/maps/" + inmapsLinks[i];
nodeValues.inmaps += '<li><a href="' + url + '">' + inmapsAr[i] + '</a></li>';
}
extra = inmapsAr.length - 5;
nodeValues.inmaps += '<li><span class="showMore">See ' + extra + ' more...</span></li>'
for (i = 5; i < inmapsAr.length; i++){
var url = "/maps/" + inmapsLinks[i];
nodeValues.inmaps += '<li class="hideExtra extraText"><a href="' + url + '">' + inmapsAr[i]+ '</a></li>';
}
}
nodeValues.permission = topic.get("permission"); nodeValues.permission = topic.get("permission");
nodeValues.mk_permission = topic.get("permission").substring(0, 2); nodeValues.mk_permission = topic.get("permission").substring(0, 2);
nodeValues.map_count = topic.get("map_count").toString(); nodeValues.map_count = topic.get("map_count").toString();
@ -1273,8 +1328,13 @@ Metamaps.SynapseCard = {
//if edge data is blank or just whitespace, populate it with data_nil //if edge data is blank or just whitespace, populate it with data_nil
if ($('#edit_synapse_desc').html().trim() == '') { if ($('#edit_synapse_desc').html().trim() == '') {
if (synapse.authorizeToEdit(Metamaps.Active.Mapper)) {
$('#edit_synapse_desc').html(data_nil); $('#edit_synapse_desc').html(data_nil);
} }
else {
$('#edit_synapse_desc').html("(no description)");
}
}
$('#edit_synapse_desc').bind("ajax:success", function () { $('#edit_synapse_desc').bind("ajax:success", function () {
var desc = $(this).html(); var desc = $(this).html();
@ -1334,7 +1394,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 += '<a href="/explore/mapper/' + synapse.get("user_id") + '"> <img src="" width="24" height="24" /></a>'
u += '<div class="tip">' + synapse.get("user_name") + '</div></div>'; u += '<div class="tip">' + synapse.get("user_name") + '</div></div>';
$('#editSynLowerBar').append(u); $('#editSynLowerBar').append(u);
@ -3412,13 +3472,44 @@ Metamaps.Filter = {
else console.log(topic); else console.log(topic);
} }
}); });
// flag all the edges back to 'untouched'
Metamaps.Synapses.each(function(synapse) { Metamaps.Synapses.each(function(synapse) {
var e = synapse.get('edge'); var e = synapse.get('edge');
var desc = synapse.get("desc"); e.setData('touched', false);
});
Metamaps.Synapses.each(function(synapse) {
var e = synapse.get('edge');
var desc;
var user_id = synapse.get("user_id").toString(); var user_id = synapse.get("user_id").toString();
if (visible.synapses.indexOf(desc) == -1) passesSynapse = false; if (e && !e.getData('touched')) {
else passesSynapse = true;
var synapses = e.getData('synapses');
// if any of the synapses represent by the edge are still unfiltered
// leave the edge visible
passesSynapse = false;
for (var i = 0; i < synapses.length; i++) {
desc = synapses[i].get("desc");
if (visible.synapses.indexOf(desc) > -1) passesSynapse = true;
}
// if the synapse description being displayed is now being
// filtered, set the displayIndex to the first unfiltered synapse if there is one
var displayIndex = e.getData("displayIndex") ? e.getData("displayIndex") : 0;
var displayedSynapse = synapses[displayIndex];
desc = displayedSynapse.get("desc");
if (passesSynapse && visible.synapses.indexOf(desc) == -1) {
// iterate and find an unfiltered one
for (var i = 0; i < synapses.length; i++) {
desc = synapses[i].get("desc");
if (visible.synapses.indexOf(desc) > -1) {
e.setData('displayIndex', i);
break;
}
}
}
if (onMap) { if (onMap) {
// when on a map, // when on a map,
@ -3431,19 +3522,17 @@ Metamaps.Filter = {
var color = Metamaps.Settings.colors.synapses.normal; var color = Metamaps.Settings.colors.synapses.normal;
if (passesSynapse && passesMapper) { if (passesSynapse && passesMapper) {
if (e) {
e.setData('alpha', 1, 'end'); e.setData('alpha', 1, 'end');
e.setData('color', color, 'end'); e.setData('color', color, 'end');
} }
else console.log(synapse);
}
else { else {
if (e) {
Metamaps.Control.deselectEdge(e, true); Metamaps.Control.deselectEdge(e, true);
e.setData('alpha', opacityForFilter, 'end'); e.setData('alpha', opacityForFilter, 'end');
} }
else console.log(synapse);
e.setData('touched', true);
} }
else if (!e) console.log(synapse);
}); });
// run the animation // run the animation
@ -3493,8 +3582,10 @@ Metamaps.Listeners = {
case 69: //if e or E is pressed case 69: //if e or E is pressed
if (e.ctrlKey){ if (e.ctrlKey){
e.preventDefault(); e.preventDefault();
if (Metamaps.Active.Map) {
Metamaps.JIT.zoomExtents(null, Metamaps.Visualize.mGraph.canvas); Metamaps.JIT.zoomExtents(null, Metamaps.Visualize.mGraph.canvas);
} }
}
break; break;
case 77: //if m or M is pressed case 77: //if m or M is pressed
if (e.ctrlKey){ if (e.ctrlKey){
@ -3931,6 +4022,9 @@ Metamaps.Topic = {
return; return;
} }
// hide the 'double-click to add a topic' message
Metamaps.Famous.viz.hideInstructions();
$(document).trigger(Metamaps.Map.events.editedByActiveMapper); $(document).trigger(Metamaps.Map.events.editedByActiveMapper);
var metacode = Metamaps.Metacodes.get(Metamaps.Create.newTopic.metacode); var metacode = Metamaps.Metacodes.get(Metamaps.Create.newTopic.metacode);
@ -4479,7 +4573,6 @@ Metamaps.Map = {
encoded_image: canvas.canvas.toDataURL() encoded_image: canvas.canvas.toDataURL()
}; };
console.log(imageData.encoded_image);
var map = Metamaps.Active.Map; var map = Metamaps.Active.Map;
var today = new Date(); var today = new Date();
@ -4538,13 +4631,13 @@ Metamaps.Map.CheatSheet = {
}; };
$('#gettingStarted').click(function() { $('#gettingStarted').click(function() {
switchVideo(this,'88334167'); //switchVideo(this,'88334167');
}); });
$('#upYourSkillz').click(function() { $('#upYourSkillz').click(function() {
switchVideo(this,'100118167'); //switchVideo(this,'100118167');
}); });
$('#advancedMapping').click(function() { $('#advancedMapping').click(function() {
switchVideo(this,'88334167'); //switchVideo(this,'88334167');
}); });
} }
}; // end Metamaps.Map.CheatSheet }; // end Metamaps.Map.CheatSheet
@ -4687,6 +4780,8 @@ Metamaps.Map.InfoBox = {
$('.mapContributors .tip').unbind().click(function(event){ $('.mapContributors .tip').unbind().click(function(event){
event.stopPropagation(); event.stopPropagation();
}); });
$('.mapContributors .tip li a').click(Metamaps.Router.intercept);
$('.mapInfoBox').unbind('.hideTip').bind('click.hideTip', function(){ $('.mapInfoBox').unbind('.hideTip').bind('click.hideTip', function(){
$('.mapContributors .tip').hide(); $('.mapContributors .tip').hide();
}); });
@ -4700,15 +4795,15 @@ Metamaps.Map.InfoBox = {
var self = Metamaps.Map.InfoBox; var self = Metamaps.Map.InfoBox;
var string = ""; var string = "";
console.log("hello!!")
string += "<ul>"; string += "<ul>";
Metamaps.Mappers.each(function(m){ Metamaps.Mappers.each(function(m){
string += '<li><img class="rtUserImage" width="25" height="25" src="' + m.get("image") + '" />' + m.get("name") + '</li>'; string += '<li><a href="/explore/mapper/' + m.get("id") + '">' + '<img class="rtUserImage" width="25" height="25" src="' + m.get("image") + '" />' + m.get("name") + '</a></li>';
}); });
string += "</ul>"; string += "</ul>";
console.log(string);
return string; return string;
}, },
updateNumbers: function () { updateNumbers: function () {

View file

@ -69,9 +69,6 @@ body,
.main, .main,
.wrapper { .wrapper {
height: 100%; height: 100%;
}
.homePage .famousYield {
} }
.wrapper.mapPage { .wrapper.mapPage {
overflow: hidden; overflow: hidden;
@ -84,6 +81,8 @@ body {
background: #d8d9da url(shattered_@2X.png); background: #d8d9da url(shattered_@2X.png);
font-family: 'din-medium', helvetica, sans-serif; font-family: 'din-medium', helvetica, sans-serif;
color: #424242; color: #424242;
-moz-osx-font-smoothing: grayscale;
} }
h1, h1,
h2, h2,
@ -121,6 +120,7 @@ input[type="submit"] {
border-radius: 2px; border-radius: 2px;
-webkit-user-select: none; -webkit-user-select: none;
font-family: 'din-medium', helvetica, sans-serif; font-family: 'din-medium', helvetica, sans-serif;
-webkit-font-smoothing: inherit;
} }
button.button:hover, button.button:hover,
a.button:hover, a.button:hover,
@ -523,7 +523,7 @@ input[type="submit"]:active {
left: 41px; left: 41px;
z-index: 9999; z-index: 9999;
width: 256px; width: 256px;
height: 42px; height: 34px;
} }
.new_topic #topic_name, .new_topic #topic_name,
.new_topic .tt-hint { .new_topic .tt-hint {
@ -531,7 +531,7 @@ input[type="submit"]:active {
background: #FFFFFF; background: #FFFFFF;
height: 14px; height: 14px;
margin: 0; margin: 0;
padding: 14px 6px; padding: 10px 6px;
border: none; border: none;
border-radius: 2px; border-radius: 2px;
outline: none; outline: none;
@ -814,6 +814,7 @@ li.accountInvite span {
} }
.accountImage { .accountImage {
background-image: url(user.png); background-image: url(user.png);
background-size: 84px 84px;
background-repeat: no-repeat; background-repeat: no-repeat;
height:84px; height:84px;
width:84px; width:84px;
@ -1179,6 +1180,14 @@ h3.realtimeBoxTitle {
color: black; color: black;
box-shadow: 0px 3px 3px rgba(0,0,0,0.12), 0 3px 3px rgba(0,0,0,0.24); box-shadow: 0px 3px 3px rgba(0,0,0,0.12), 0 3px 3px rgba(0,0,0,0.24);
} }
.rightclickmenu .rc-spacer {
width:100%;
height:0;
border-top:1px solid #EBEBEB;
margin: 6px 0;
padding: 0;
}
.rightclickmenu > ul { .rightclickmenu > ul {
} }
@ -1201,6 +1210,14 @@ h3.realtimeBoxTitle {
background-color: transparent; background-color: transparent;
cursor: default; cursor: default;
} }
.rc-keyboard {
position: absolute;
top: 6px;
right: 12px;
color: #757575;
}
.rightclickmenu > ul > li .rc-icon { .rightclickmenu > ul > li .rc-icon {
position: absolute; position: absolute;
top: 0; top: 0;
@ -1247,7 +1264,7 @@ h3.realtimeBoxTitle {
background-position: 0 -32px; background-position: 0 -32px;
} }
.rc-metacode li img { .rc-metacode li img {
float: left; display: inline-block;
} }
.rightclickmenu .rc-permission ul, .rightclickmenu .rc-permission ul,
.rightclickmenu .rc-metacode ul, .rightclickmenu .rc-metacode ul,
@ -1294,8 +1311,9 @@ float: left;
} }
.rightclickmenu .rc-metacode > ul > li, .rightclickmenu .rc-metacode > ul > li,
.rightclickmenu .rc-siblings > ul > li { .rightclickmenu .rc-siblings > ul > li {
padding: 6px 10px 6px 8px; padding: 6px 24px 6px 8px;
width: 100px; width: auto;
white-space: nowrap;
} }
.rightclickmenu .rc-metacode ul ul, .rightclickmenu .rc-metacode ul ul,
.rightclickmenu .rc-siblings ul ul { .rightclickmenu .rc-siblings ul ul {
@ -1311,7 +1329,9 @@ float: left;
.rightclickmenu .rc-metacode ul ul li, .rightclickmenu .rc-metacode ul ul li,
.rightclickmenu .rc-siblings ul ul li { .rightclickmenu .rc-siblings ul ul li {
padding: 4px 10px 4px 8px; padding: 4px 10px 4px 8px;
width: 120px; width: auto;
white-space: nowrap;
height: 24px;
} }
.rightclickmenu .expandMetacodeSet { .rightclickmenu .expandMetacodeSet {
position: absolute; position: absolute;
@ -1324,8 +1344,10 @@ float: left;
background-position: 0 -32px; background-position: 0 -32px;
} }
.rightclickmenu .rc-metacode .mSelectName { .rightclickmenu .rc-metacode .mSelectName {
padding: 6px 0 0 32px; padding: 0 16px 0 4px;
display: block; display: inline-block;
position: relative;
top: -7px;
} }
.moveMenusUp .rc-metacode ul, .moveMenusUp .rc-metacode ul,
@ -1599,6 +1621,7 @@ float: left;
.wrapper div.mapInfoDesc span { .wrapper div.mapInfoDesc span {
float: none !important; float: none !important;
padding-bottom: 10px; padding-bottom: 10px;
word-wrap: break-word;
} }
.infoStatIcon { .infoStatIcon {
float: left; float: left;
@ -1688,6 +1711,9 @@ float: left;
color: white; color: white;
} }
.mapContributors .tip li a {
color: white;
}
.mapContributors div:after { .mapContributors div:after {
content: ''; content: '';
position: absolute; position: absolute;
@ -1884,9 +1910,21 @@ and it won't be important on password protected instances */
display: none; display: none;
} }
.mapInfoDelete { .mapInfoDelete {
background-image: url(delete_mapinfo.png); color: #E0E0E0;
}
.mapInfoDelete .deleteMap {
width: 16px;
height: 16px;
margin: 8px auto 0;
background-image: url(remove_mapinfo_sprite.png);
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center 8px; background-position: -16px 0;
}
.mapInfoDelete:hover {
color: #F5F5F5;
}
.mapInfoDelete:hover .deleteMap {
background-position: 0 0;
} }
/* only display delete button if it's a map you created */ /* only display delete button if it's a map you created */
.yourMap .mapInfoDelete { .yourMap .mapInfoDelete {
@ -1959,6 +1997,7 @@ and it won't be important on password protected instances */
height: 434px; height: 434px;
background-color: #e0e0e0; background-color: #e0e0e0;
padding: 64px 124px 64px 124px; padding: 64px 124px 64px 124px;
box-shadow: 0px 6px 3px rgba(0, 0, 0, 0.23), 10px 10px 10px rgba(0, 0, 0, 0.19);
border-radius: 2px; border-radius: 2px;
} }
.lightboxContent h3 { .lightboxContent h3 {
@ -2677,6 +2716,13 @@ and it won't be important on password protected instances */
.tutorialItem.active { .tutorialItem.active {
color: #00bcd4; color: #00bcd4;
} }
.tutorialItem.disable {
color: #999;
cursor: default;
}
.tutorialItem.disable:hover {
color: #999;
}
#upYourSkillz { #upYourSkillz {
margin: 0 68px; margin: 0 68px;
} }

View file

@ -247,10 +247,83 @@
background-image: url(map32_sprite.png); background-image: url(map32_sprite.png);
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: 0 0; background-position: 0 0;
cursor: pointer;
} }
.linkItem.mapCount:hover .mapCountIcon { .linkItem.mapCount:hover .mapCountIcon {
background-position: 0 -32px; background-position: 0 -32px;
} }
.linkItem.mapCount:hover .hoverTip {
display: block;
}
.CardOnGraph .mapCount .tip, .CardonGraph .mapCount .hoverTip {
top: 44px;
left: 0px;
font-size: 12px !important;
}
.hoverTip {
white-space: nowrap;
font-family: 'din-regular';
top: 44px;
left: 0px;
font-size: 12px !important;
display: none;
position: absolute;
background: black;
color: white;
border-radius: 4px;
line-height: 17px;
padding: 3px 5px 2px;
z-index: 100;
}
.CardOnGraph .mapCount .tip:before, .CardOnGraph .mapCount .hoverTip:before {
content: '';
position: absolute;
top: 26px;
left: 10px;
margin-top: -30px;
width: 0;
height: 0;
border-bottom: 4px solid #000000;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
}
.CardOnGraph .mapCount .tip li {
list-style-type: none;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding: 6px 10px;
display: block;
height: 14px;
font-family: 'din-regular', helvetica, sans-serif;
font-size: 14px;
line-height: 14px;
position: relative;
}
.CardOnGraph .mapCount li.hideExtra {
display: none;
}
.showMore {
cursor: pointer;
color: #4FC059;
}
.mapCount .tip a {
color: white;
}
.mapCount .tip a:hover {
color: #757575;
}
.linkItem.synapseCount { .linkItem.synapseCount {
margin-left: 2px; margin-left: 2px;
width: 24px; width: 24px;
@ -269,6 +342,39 @@
.linkItem.synapseCount:hover .synapseCountIcon { .linkItem.synapseCount:hover .synapseCountIcon {
background-position: 0 -32px; background-position: 0 -32px;
} }
.CardOnGraph .synapseCount .tip {
position: absolute;
background: black;
width: auto;
top: 44px;
color: white;
white-space: nowrap;
border-radius: 2px;
font-size: 12px !important;
font-family: 'din-regular';
line-height: 12px;
padding: 4px 4px 4px;
z-index: 100;
}
.CardOnGraph .synapseCount:hover .tip {
display: block;
}
.CardOnGraph .synapseCount .tip:before {
content: '';
position: absolute;
margin-top: -8px;
margin-left: 6px;
width: 0;
height: 0;
border-bottom: 4px solid black;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
}
.mapPerm { .mapPerm {
width: 32px; width: 32px;
height: 32px; height: 32px;
@ -381,11 +487,12 @@ cursor: pointer;
} }
.CardOnGraph .metacodeSelect { .CardOnGraph .metacodeSelect {
display:none; display:none;
width:200px; width:auto;
z-index: 2; z-index: 2;
position: absolute; position: absolute;
background: #EAEAEA; background: #EAEAEA;
left: 300px; left: 300px;
white-space: nowrap;
} }
.CardOnGraph .metacodeSelect ul { .CardOnGraph .metacodeSelect ul {
position: relative; position: relative;
@ -400,10 +507,10 @@ cursor: pointer;
border: 1px solid #BDBDBD; border: 1px solid #BDBDBD;
} }
.CardOnGraph .metacodeSelect ul li { .CardOnGraph .metacodeSelect ul li {
background-color: #F5F5F5; background-color: #F5F5F5;
cursor:pointer; cursor:pointer;
position: relative; position: relative;
padding: 9px 12px; padding: 9px 24px 9px 12px;
} }
.CardOnGraph .metacodeSelect ul li:hover { .CardOnGraph .metacodeSelect ul li:hover {
background-color: #E0E0E0; background-color: #E0E0E0;
@ -414,15 +521,17 @@ background-color: #E0E0E0;
left: 8px; left: 8px;
} }
.CardOnGraph .metacodeSelect ul li .mSelectName { .CardOnGraph .metacodeSelect ul li .mSelectName {
padding-left: 28px; margin-left: 28px;
margin-right: 4px;
} }
.CardOnGraph .metacodeSelect ul ul { .CardOnGraph .metacodeSelect ul ul {
display:none; display:none;
position: absolute; position: absolute;
left: 200px; left: 100%;
top: -1px; top: -1px;
max-height: 270px; max-height: 270px;
overflow-y: auto; overflow-y: auto;
width: auto;
} }
.CardOnGraph .metacodeSelect li:hover ul { .CardOnGraph .metacodeSelect li:hover ul {
display: block; display: block;
@ -446,7 +555,7 @@ background-color: #E0E0E0;
} }
.onRightEdge.metacodeSelect ul ul { .onRightEdge.metacodeSelect ul ul {
left: auto; left: auto;
right: 200px; right: 100%;
} }
/* too close to bottom of screen case */ /* too close to bottom of screen case */
.onBottomEdge.metacodeSelect { .onBottomEdge.metacodeSelect {
@ -565,7 +674,7 @@ padding: 9px 7px 9px 31px;
height: 12px; height: 12px;
width: 198px; width: 198px;
margin: 0 0 0 0; margin: 0 0 0 0;
border: 1px solid #BDBDBD; border: none;
outline: none; outline: none;
font-size: 12px; font-size: 12px;
line-height: 12px; line-height: 12px;
@ -841,6 +950,7 @@ font-family: 'din-regular', helvetica, sans-serif;
background: #424242; background: #424242;
border-radius:2px; border-radius:2px;
margin:16px 16px 16px 19px; margin:16px 16px 16px 19px;
box-shadow: 0px 3px 3px rgba(0,0,0,0.23), 0 3px 3px rgba(0,0,0,0.16);
} }
.mapCard { .mapCard {
@ -864,8 +974,10 @@ font-family: 'din-regular', helvetica, sans-serif;
} }
.mapCard .title { .mapCard .title {
word-wrap: break-word;
font-size:18px; font-size:18px;
line-height:22px; line-height:22px;
height: 44px;
display:block; display:block;
padding: 0 16px; padding: 0 16px;
text-align: center; text-align: center;
@ -895,11 +1007,11 @@ font-family: 'din-regular', helvetica, sans-serif;
-webkit-flex: 1; /* Chrome */ -webkit-flex: 1; /* Chrome */
-ms-flex: 1; /* IE 10 */ -ms-flex: 1; /* IE 10 */
flex: 1; /* NEW, Spec - Opera 12.1, Firefox 20+ */ flex: 1; /* NEW, Spec - Opera 12.1, Firefox 20+ */
overflow-y:auto;
padding:0 16px 8px; padding:0 16px 8px;
font-family: helvetica, sans-serif; font-family: helvetica, sans-serif;
font-style: italic; font-style: italic;
font-size: 12px; font-size: 12px;
word-wrap: break-word;
} }
.mCS_no_scrollbar { .mCS_no_scrollbar {
padding-right: 5px; padding-right: 5px;
@ -938,3 +1050,78 @@ font-family: 'din-regular', helvetica, sans-serif;
font-family: 'din-medium', sans-serif; font-family: 'din-medium', sans-serif;
color: #DAB539; color: #DAB539;
} }
/* mapper card */
.mapper {
float: left;
width:220px;
height:340px;
font-size: 12px;
text-align: left;
overflow: visible;
background: #E0E0E0;
border-radius:2px;
margin:16px 16px 16px 19px;
box-shadow: 0px 3px 3px rgba(0,0,0,0.23), 0 3px 3px rgba(0,0,0,0.16);
}
.mapperCard {
width:100%;
height:308px;
padding: 16px 0;
color:#424242;
}
.mapperImage {
margin: 16px auto 0;
width: 96px;
}
.mapperImage img {
border-radius: 48px;
box-shadow: 0px 3px 3px rgba(0,0,0,0.23);
}
.mapperName {
font-size: 24px;
text-align: center;
margin-top: 24px;
padding: 0 16px;
white-space: nowrap;
text-overflow: ellipsis;
width: 189px;
overflow: hidden;
}
.mapperInfo {
color: #DB5D5D;
text-align:center;
margin-top: 16px;
}
.mapperMetadata {
background: url(profile_card_sprite.png) no-repeat center 0;
height: 64px;
width: 160px;
margin: 16px auto 0;
}
.mapperMetadata .metadataSection {
width: 32%;
display: inline-block;
text-align: center;
}
.mapperMetadata .metadataSection div {
font-size: 16px;
color: #424242;
margin: 14px 0;
}
.mapperMetadata .metadataMaps {
color: #DB5D5D;
}
.mapperMetadata .metadataTopics {
color: #4FC059;
}
.mapperMetadata .metadataSynapses {
color: #DAB539;
}

View file

@ -30,6 +30,7 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
margin:0; margin:0;
z-index: 0;
} }
#yield { #yield {
@ -207,16 +208,16 @@
outline: none; outline: none;
font-size: 14px; font-size: 14px;
line-height: 14px; line-height: 14px;
background: #FFFFFF; background: #F5F5F5;
font-family: 'din-medium', helvetica, sans-serif; font-family: 'din-medium', helvetica, sans-serif;
} }
.sidebarSearch .tt-dropdown-menu { .sidebarSearch .tt-dropdown-menu {
top: 40px !important; top: 40px !important;
background: #F5F5F5; background: #F5F5F5;
width: 472px; width: 472px;
overflow-y: visible; overflow-y: auto;
overflow-x: 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); box-shadow: 0 10px 10px rgba(0,0,0,0.19), 0 6px 3px rgba(0,0,0,0.23);
} }
.autoOptions #mapContribs { .autoOptions #mapContribs {
@ -321,7 +322,7 @@
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;
height: 32px; height: 32px;
padding: 0 8px; padding: 0 18px 0 28px;
} }
.sidebarSearch .tt-suggestion .icon { .sidebarSearch .tt-suggestion .icon {
width: 32px; width: 32px;
@ -332,18 +333,16 @@
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;
padding: 0 0 0 8px; padding: 0 0 0 8px;
max-width: 70px; width: 70px;
} }
.sidebarSearch .tt-dataset-topics .topicIcon { .sidebarSearch .tt-dataset-topics .topicIcon {
width: 32px; width: 32px;
height: 32px; height: 32px;
}
.sidebarSearch .tt-dataset-topics .tt-is-under-cursor .topicIcon,
.sidebarSearch .tt-dataset-topics .tt-is-under-mouse-cursor .topicIcon {
margin: 0 auto; margin: 0 auto;
} }
.sidebarSearch .tt-dataset-topics .metacodeTip { .sidebarSearch .tt-dataset-topics .metacodeTip {
display: none; display: none;
margin: 0 auto;
} }
.sidebarSearch .tt-dataset-topics .tt-is-under-cursor .metacodeTip, .sidebarSearch .tt-dataset-topics .tt-is-under-cursor .metacodeTip,
.sidebarSearch .tt-dataset-topics .tt-is-under-mouse-cursor .metacodeTip { .sidebarSearch .tt-dataset-topics .tt-is-under-mouse-cursor .metacodeTip {
@ -356,7 +355,7 @@
text-align: center; text-align: center;
} }
.sidebarSearch .tt-dataset-mappers .tt-suggestion .icon { .sidebarSearch .tt-dataset-mappers .tt-suggestion .icon {
margin: 4px 9px 4px 4px; margin: 0px 0px 0px 0px;
} }
.sidebarSearch .tt-dataset-mappers .resultText { .sidebarSearch .tt-dataset-mappers .resultText {
width: 150px; width: 150px;
@ -482,8 +481,7 @@
} }
.sidebarSearch .topicOriginatorIcon .tip { .sidebarSearch .topicOriginatorIcon .tip {
left: 30px; right: 30px;
right: auto;
top: 1px; top: 1px;
} }
.sidebarSearch .tip { .sidebarSearch .tip {
@ -506,8 +504,7 @@
} }
.sidebarSearch .mapContributorsIcon .tip { .sidebarSearch .mapContributorsIcon .tip {
left: 40px; right: 40px;
right: auto;
top: -5px; top: -5px;
padding-top: 5px; padding-top: 5px;
padding-bottom: 5px; padding-bottom: 5px;
@ -530,7 +527,7 @@
position: absolute; position: absolute;
width: 0; width: 0;
height: 0; height: 0;
border-right: 4px solid #424242; border-left: 4px solid #424242;
border-top: 5px solid transparent; border-top: 5px solid transparent;
border-bottom: 5px solid transparent; border-bottom: 5px solid transparent;
} }
@ -540,20 +537,16 @@
} }
.sidebarSearch .hoverForTip.addToMap .tip:before { .sidebarSearch .hoverForTip.addToMap .tip:before {
right: -4px; right: -4px;
border-left: 4px solid #424242;
border-right: none;
} }
.sidebarSearch .mapContributorsIcon .tip:before { .sidebarSearch .mapContributorsIcon .tip:before {
top: 65px; top: 12px;
left: -4px; right: -4px;
margin-top: -53px;
} }
.sidebarSearch .topicOriginatorIcon .tip:before { .sidebarSearch .topicOriginatorIcon .tip:before {
top: 58px; top: 5px;
left: -4px; right: -4px;
margin-top: -53px;
} }
.sidebarSearch .mapContributorsIcon .mapContributors { .sidebarSearch .mapContributorsIcon .mapContributors {
@ -639,6 +632,18 @@
box-shadow: 0 3px 3px rgba(0,0,0,0.23), 0 3px 3px rgba(0,0,0,0.16); box-shadow: 0 3px 3px rgba(0,0,0,0.23), 0 3px 3px rgba(0,0,0,0.16);
} }
.supportUs.upperRightEl {
cursor: pointer;
color: #4fc059;
font-size: 14px;
height: 14px;
margin: 9px 8px 9px 0;
display: none;
}
.homePage .supportUs, .explorePage .supportUs {
display: block;
}
.upperRightMapButtons { .upperRightMapButtons {
position: relative; position: relative;
top: -42px; /* puts it just offscreen */ top: -42px; /* puts it just offscreen */
@ -705,6 +710,18 @@
/* homepage */ /* homepage */
.homeWrapper.homeText {
margin-top: 5%;
}
.fullWidthWrapper {
width: 100%;
}
.fullWidthWrapper.withVideo {
height: 315px;
background: #757575;
}
.homeWrapper { .homeWrapper {
position: absolute; position: absolute;
left: 50%; left: 50%;
@ -754,7 +771,6 @@
margin-left:54px; margin-left:54px;
} }
.homeWrapper #new_user { .homeWrapper #new_user {
margin-left: 48px; margin-left: 48px;
margin-top: 160px; margin-top: 160px;
@ -803,6 +819,22 @@
.homeWrapper #new_user .accountForgotPass { .homeWrapper #new_user .accountForgotPass {
margin: 8px 0 0 0; margin: 8px 0 0 0;
} }
.callToAction .learnMoreCTA {
background-color: #4fb5c0;
margin-bottom: 12px;
}
.callToAction .learnMoreCTA:hover {
background-color: #419599;
}
.fullWidthWrapper.withPartners {
background: url(homepage_bg_fade.png) no-repeat center -300px;
}
.homeWrapper.homePartners {
padding: 64px 0 280px;
height: 96px;
background: url(partner_logos.png) no-repeat 0 64px;
}
/* 204x25 , 170x36 */ /* 204x25 , 170x36 */
@ -819,6 +851,10 @@
left: 29px; left: 29px;
} }
.unauthenticated .homePage .infoAndHelp {
display:none;
}
.infoAndHelp { .infoAndHelp {
position: fixed; position: fixed;
bottom: 20px; bottom: 20px;
@ -1109,6 +1145,23 @@
border-bottom: 2px solid #00BCD4; border-bottom: 2px solid #00BCD4;
} }
.exploreMapsButton.mapperButton {
height: 40px;
padding: 0;
}
.mapperButton img.exploreMapperImage {
float: left;
border-radius: 12px;
margin-top: 8px;
margin-right: 8px;
}
.exploreMapperName {
white-space: nowrap;
float: left;
margin-top: 12px;
}
.exploreMapsButton .exploreMapsIcon { .exploreMapsButton .exploreMapsIcon {
background-repeat: no-repeat; background-repeat: no-repeat;
width:32px; width:32px;

View file

@ -1,11 +1,20 @@
/* =USERVOICE ICON DEFINE /* =USERVOICE ICON DEFINE
--------------------------------------------------------*/ --------------------------------------------------------*/
.unauthenticated .uv-icon {
display: none;
}
div.uv-icon.uv-bottom-left { div.uv-icon.uv-bottom-left {
<<<<<<< HEAD
background-image:url(support_tab_sprite.png); background-image:url(support_tab_sprite.png);
=======
background-image:url(feedback_sprite.png);
background-repeat: no-repeat;
>>>>>>> develop
color:#FFFFFF; color:#FFFFFF;
cursor:pointer; cursor:pointer;
height:108px; height:110px;
left:0; left:0;
margin-left:0px; margin-left:0px;
text-indent:-100000px; text-indent:-100000px;
@ -13,7 +22,6 @@ div.uv-icon.uv-bottom-left {
width:25px; width:25px;
z-index:100000; z-index:100000;
opacity: 1; opacity: 1;
} }
div.uv-icon.uv-bottom-left:hover { div.uv-icon.uv-bottom-left:hover {

View file

@ -13,7 +13,7 @@ class MainController < ApplicationController
respond_to do |format| respond_to do |format|
format.html { format.html {
if authenticated? if authenticated?
@maps = Map.where("maps.user_id = ?", @current.id).order("name ASC").page(1).per(20) @maps = Map.where("maps.permission != ?", "private").order("updated_at DESC").page(1).per(20)
respond_with(@maps, @current) respond_with(@maps, @current)
else else
respond_with(@current) respond_with(@current)

View file

@ -4,10 +4,9 @@ class MapsController < ApplicationController
autocomplete :map, :name, :full => true, :extra_data => [:user_id] autocomplete :map, :name, :full => true, :extra_data => [:user_id]
# GET /maps/recent # GET /explore/active
# GET /maps/featured # GET /explore/featured
# GET /maps/new # GET /explore/mapper/:id
# GET /maps/mappers/:id
def index def index
if request.path == "/explore" if request.path == "/explore"
@ -17,6 +16,7 @@ class MapsController < ApplicationController
@current = current_user @current = current_user
@user = nil @user = nil
@maps = [] @maps = []
@mapperId = nil
if !params[:page] if !params[:page]
page = 1 page = 1
@ -29,7 +29,7 @@ class MapsController < ApplicationController
@request = "active" @request = "active"
elsif request.path.index("/explore/featured") != nil elsif request.path.index("/explore/featured") != nil
@maps = Map.where("maps.featured = ? AND maps.permission != ?", true, "private").order("name ASC").page(page).per(20) @maps = Map.where("maps.featured = ? AND maps.permission != ?", true, "private").order("updated_at DESC").page(page).per(20)
@request = "featured" @request = "featured"
elsif request.path.index('/explore/mine') != nil # looking for maps by me elsif request.path.index('/explore/mine') != nil # looking for maps by me
@ -37,30 +37,21 @@ class MapsController < ApplicationController
redirect_to activemaps_url and return redirect_to activemaps_url and return
end end
# don't need to exclude private maps because they all belong to you # don't need to exclude private maps because they all belong to you
@maps = Map.where("maps.user_id = ?", @current.id).order("name ASC").page(page).per(20) @maps = Map.where("maps.user_id = ?", @current.id).order("updated_at DESC").page(page).per(20)
@request = "you" @request = "you"
elsif request.path.index('/explore/mappers/') != nil # looking for maps by a mapper elsif request.path.index('/explore/mapper/') != nil # looking for maps by a mapper
@user = User.find(params[:id]) @user = User.find(params[:id])
@maps = Map.where("maps.user_id = ? AND maps.permission != ?", @user.id, "private").order("name ASC").page(page).per(20) @maps = Map.where("maps.user_id = ? AND maps.permission != ?", @user.id, "private").order("updated_at DESC").page(page).per(20)
@request = "other" @request = "mapper"
elsif request.path.index('/explore/topics/') != nil # looking for maps by a certain topic they include
@topic = Topic.find(params[:id]).authorize_to_show(@current)
if !@topic
redirect_to featuredmaps_url, notice: "Access denied." and return
end
@maps = @topic.maps.delete_if {|m| m.permission == "private" && (!authenticated? || (authenticated? && @current.id != m.user_id)) }
@request = "topic"
end end
respond_to do |format| respond_to do |format|
format.html { format.html {
if @request == "you" if @request == "active" && authenticated?
redirect_to root_url and return redirect_to root_url and return
else
respond_with(@maps, @request, @user)
end end
respond_with(@maps, @request, @user)
} }
format.json { render json: @maps } format.json { render json: @maps }
end end

View file

@ -65,6 +65,23 @@ class UsersController < ApplicationController
end end
end end
# GET /users/:id/details [.json]
def details
@user = User.find(params[:id])
@details = Hash.new
@details['name'] = @user.name
@details['created_at'] = @user.created_at.strftime("%m/%d/%Y")
@details['image'] = @user.image.url(:ninetysix)
@details['generation'] = @user.generation
@details['numSynapses'] = @user.synapses.count
@details['numTopics'] = @user.topics.count
@details['numMaps'] = @user.maps.count
render json: @details
end
# PUT /user/updatemetacodes # PUT /user/updatemetacodes
def updatemetacodes def updatemetacodes
@user = current_user @user = current_user

View file

@ -18,9 +18,9 @@ module MapsHelper
contributorTip = '' contributorTip = ''
firstContributorImage = '/assets/user.png' firstContributorImage = '/assets/user.png'
if m.contributors.count > 0 if m.contributors.count > 0
firstContributorImage = m.contributors[0].image.url(:square) firstContributorImage = m.contributors[0].image.url(:thirtytwo)
m.contributors.each_with_index do |c, index| m.contributors.each_with_index do |c, index|
userImage = c.image.url(:square) userImage = c.image.url(:thirtytwo)
name = c.name name = c.name
contributorTip += '<li> <img class="tipUserImage" width="25" height="25" src=' + userImage + ' />' + '<span>' + name + '</span> </li>' contributorTip += '<li> <img class="tipUserImage" width="25" height="25" src=' + userImage + ' />' + '<span>' + name + '</span> </li>'
end end

View file

@ -25,7 +25,7 @@ module SynapsesHelper
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.url(:square) synapse['originatorImage'] = s.user.image.url(:thirtytwo)
synapse['rtype'] = "synapse" synapse['rtype'] = "synapse"
temp.push synapse temp.push synapse

View file

@ -15,8 +15,10 @@ 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.url(:square) topic['originatorImage'] = t.user.image.url(:thirtytwo)
topic['rtype'] = "topic" topic['rtype'] = "topic"
topic['inmaps'] = t.inmaps
topic['inmapsLinks'] = t.inmapsLinks
temp.push topic temp.push topic
end end

View file

@ -8,7 +8,7 @@ module UsersHelper
user['id'] = u.id user['id'] = u.id
user['label'] = u.name user['label'] = u.name
user['value'] = u.name user['value'] = u.name
user['profile'] = u.image.url(:square) user['profile'] = u.image.url(:sixtyfour)
user['mapCount'] = u.maps.count user['mapCount'] = u.maps.count
user['created_at'] = u.created_at.strftime("%m/%d/%Y") user['created_at'] = u.created_at.strftime("%m/%d/%Y")
user['rtype'] = "mapper" user['rtype'] = "mapper"

View file

@ -54,8 +54,16 @@ class Topic < ActiveRecord::Base
self.synapses.count self.synapses.count
end end
def inmaps
self.maps.map(&:name)
end
def inmapsLinks
self.maps.map(&:id)
end
def as_json(options={}) def as_json(options={})
super(:methods =>[:user_name, :user_image, :map_count, :synapse_count]) super(:methods =>[:user_name, :user_image, :map_count, :synapse_count, :inmaps, :inmapsLinks])
end end
def topic_autocomplete_method def topic_autocomplete_method

View file

@ -32,7 +32,10 @@ class User < ActiveRecord::Base
# 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 => {
:square => ['84x84#', :png] :thirtytwo => ['32x32#', :png],
:sixtyfour => ['64x64#', :png],
:ninetysix => ['96x96#', :png],
:onetwentyeight => ['128x128#', :png]
}, },
:default_url => "/assets/user.png" :default_url => "/assets/user.png"
@ -42,7 +45,7 @@ class User < ActiveRecord::Base
def as_json(options={}) def as_json(options={})
{ :id => self.id, { :id => self.id,
:name => self.name, :name => self.name,
:image => self.image.url(:square) :image => self.image.url(:sixtyfour)
} }
end end

View file

@ -4,7 +4,7 @@
#%> #%>
<% account = current_user %> <% account = current_user %>
<%= image_tag user.image.url(:square), :size => "48x48", :class => "sidebarAccountImage" %> <%= image_tag user.image.url(:sixtyfour), :size => "48x48", :class => "sidebarAccountImage" %>
<h3 class="accountHeader"><%= account.name.split[0...1][0] %></h3> <h3 class="accountHeader"><%= account.name.split[0...1][0] %></h3>
<ul> <ul>
<li class="accountListItem accountSettings"> <li class="accountListItem accountSettings">

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 23, 2014</p> <p>Dec 3, 2014</p>
</div> </div>
<div class="clearfloat"> <div class="clearfloat">
</div> </div>
@ -56,13 +56,13 @@
</a> </a>
</li> </li>
<li> <li>
<a id="lightbox_source" href="https://github.com/Connoropolous/metamaps_gen002" target="_blank"> <a id="lightbox_source" href="https://github.com/metamaps/metamaps_gen002" target="_blank">
<div class="lightboxAboutIcon"></div> <div class="lightboxAboutIcon"></div>
source code source code
</a> </a>
</li> </li>
<li> <li>
<a id="lightbox_term" href="http://metamaps.cc/maps/331" target="_blank"> <a id="lightbox_term" data-bypass="true" href="http://metamaps.cc/maps/331" target="_blank">
<div class="lightboxAboutIcon"></div> <div class="lightboxAboutIcon"></div>
terms terms
</a> </a>

View file

@ -35,6 +35,7 @@
<p class="mapEditedAt"><span>Last edited:</span> {{updated_at}}</p> <p class="mapEditedAt"><span>Last edited:</span> {{updated_at}}</p>
<div class="mapInfoButtonsWrapper"> <div class="mapInfoButtonsWrapper">
<div class="mapInfoDelete"> <div class="mapInfoDelete">
<div class="deleteMap"></div>
<span>Delete</span> <span>Delete</span>
</div> </div>
<div class="mapInfoShare"> <div class="mapInfoShare">
@ -49,7 +50,7 @@
<a href="/maps/{{id}}"> <a href="/maps/{{id}}">
<div class="permission {{editPermission}}"> <!-- must be canEdit or cannotEdit --> <div class="permission {{editPermission}}"> <!-- must be canEdit or cannotEdit -->
<div class="mapCard"> <div class="mapCard">
<span class="title"> <span class="title" title="{{fullName}}">
{{name}} {{name}}
</span> </span>
<div class="mapScreenshot"> <div class="mapScreenshot">
@ -73,11 +74,32 @@
</a> </a>
</script> </script>
<script type="text/template" id="mapperCardTemplate">
<div class="mapperCard">
<div class="mapperImage">
<img src="{{image}}" width="96" height="96" />
</div>
<div class="mapperName" title="{{name}}">
{{name}}
</div>
<div class="mapperInfo">
<div class="mapperCreatedAt">Mapper since: {{created_at}}</div>
<div class="mapperGeneration">Generation: {{generation}}</div>
</div>
<div class="mapperMetadata">
<div class="metadataSection metadataMaps"><div>{{numMaps}}</div>maps</div>
<div class="metadataSection metadataTopics"><div>{{numTopics}}</div>topics</div>
<div class="metadataSection metadataSynapses"><div>{{numSynapses}}</div>synapses</div>
<div class="clearfloat"></div>
</div>
</div>
</script>
<script type="text/template" id="topicSearchTemplate"> <script type="text/template" id="topicSearchTemplate">
<div class="result{{rtype}}"> <div class="result{{rtype}}">
<div class="topicMetacode"> <div class="topicMetacode">
<img src="{{typeImageURL}}" class="topicIcon" /> <img src="{{typeImageURL}}" class="topicIcon" />
<span class="metacodeTip">{{type}}</span> <div class="metacodeTip">{{type}}</div>
</div> </div>
<div class="resultText"> <div class="resultText">
<p class="resultTitle">{{label}}</p> <p class="resultTitle">{{label}}</p>
@ -95,7 +117,7 @@
</div> </div>
<div class="topicOriginatorIcon hoverForTip"> <div class="topicOriginatorIcon hoverForTip">
<img width="18" height="18" src="{{originatorImage}}"> <img width="18" height="18" src="{{originatorImage}}">
<span class="tip topicOriginator">created by {{originator}}</span> <span class="tip topicOriginator">{{originator}}</span>
</div> </div>
<div class="topicPermission {{permission}}"> <div class="topicPermission {{permission}}">
</div> </div>
@ -107,7 +129,7 @@
<script type="text/template" id="mapSearchTemplate"> <script type="text/template" id="mapSearchTemplate">
<div class="result{{rtype}}"> <div class="result{{rtype}}">
<div class="searchResIconWrapper"> <div class="searchResIconWrapper">
<img class="icon" src="/assets/metamap32c.png"> <img class="icon" src="/assets/metamap36c.png">
</div> </div>
<div class="resultText"> <div class="resultText">
<p class="resultTitle">{{label}}</p> <p class="resultTitle">{{label}}</p>
@ -209,16 +231,20 @@
<div class="metacodeSelect">{{{metacode_select}}}</div> <div class="metacodeSelect">{{{metacode_select}}}</div>
</div> </div>
<div class="linkItem contributor"> <div class="linkItem contributor">
<img src="/assets/user.png" class="contributorIcon" width="32" height="32" /> <a href="/explore/mapper/{{userid}}"><img src="/assets/user.png" class="contributorIcon" width="32" height="32" /></a>
<div class="contributorName">{{username}}</div> <div class="contributorName">{{username}}</div>
</div> </div>
<a href="/explore/topics/{{id}}" class="linkItem mapCount" title="Click to see which maps topic appears on"> <div class="linkItem mapCount">
<div class="mapCountIcon"></div> <div class="mapCountIcon"></div>
{{map_count}} {{map_count}}
</a> <div class ="hoverTip">Click to see which maps topic appears on</div>
<a href="/topics/{{id}}" class="linkItem synapseCount" title="Click to see this topics synapses"> <div class="tip"><ul>{{{inmaps}}}</ul></div>
</div>
<a href="/topics/{{id}}" class="linkItem synapseCount">
<div class="synapseCountIcon"></div> <div class="synapseCountIcon"></div>
{{synapse_count}} {{synapse_count}}
<div class="tip">Click to see this topics synapses</div>
</a> </a>
<div class="linkItem mapPerm {{mk_permission}}" title="{{permission}}"></div> <div class="linkItem mapPerm {{mk_permission}}" title="{{permission}}"></div>
<div class="clearfloat"></div> <div class="clearfloat"></div>

View file

@ -18,6 +18,7 @@
</div><!-- end upperLeftUI --> </div><!-- end upperLeftUI -->
<div class="upperRightUI"> <div class="upperRightUI">
<div class="supportUs upperRightEl openLightbox" data-open="donate">SUPPORT US!</div>
<div class="mapElement upperRightEl upperRightMapButtons"> <div class="mapElement upperRightEl upperRightMapButtons">
<!-- Realtime --> <!-- Realtime -->
<div class="sidebarCollaborate upperRightEl"> <div class="sidebarCollaborate upperRightEl">
@ -30,7 +31,7 @@
<div class="realtimeMapperList"> <div class="realtimeMapperList">
<ul> <ul>
<li class="rtMapper littleRtOn rtMapperSelf"> <li class="rtMapper littleRtOn rtMapperSelf">
<%= image_tag user.image.url(:square), :size => "24x24", :class => "rtUserImage" %> <%= image_tag user.image.url(:thirtytwo), :size => "24x24", :class => "rtUserImage" %>
<%= user.name %> (me) <%= user.name %> (me)
<div class="littleJuntoIcon"></div> <div class="littleJuntoIcon"></div>
</li> </li>
@ -63,7 +64,7 @@
<div class="sidebarAccount upperRightEl"> <div class="sidebarAccount upperRightEl">
<div class="sidebarAccountIcon"> <div class="sidebarAccountIcon">
<div class="tooltipsUnder">Account</div> <div class="tooltipsUnder">Account</div>
<%= image_tag user.image.url(:square), :size => "32x32" %> <%= image_tag user.image.url(:thirtytwo), :size => "32x32" %>
</div> </div>
<div class="sidebarAccountBox upperRightBox"> <div class="sidebarAccountBox upperRightBox">
<%= render :partial => 'layouts/account' %> <%= render :partial => 'layouts/account' %>

View file

@ -66,7 +66,7 @@
<![endif]--> <![endif]-->
</head> </head>
<body data-env="<%= Rails.env %>"> <body data-env="<%= Rails.env %>" class="<%= authenticated? ? "authenticated" : "unauthenticated" %>">
<% if devise_error_messages? %> <% if devise_error_messages? %>
<p id="toast"><%= devise_error_messages! %></p> <p id="toast"><%= devise_error_messages! %></p>
@ -74,7 +74,7 @@
<p id="toast"><%= notice %></p> <p id="toast"><%= notice %></p>
<% end %> <% end %>
<%= content_tag :div, class: authenticated? ? "main authenticated" : "main unauthenticated" do %> <%= content_tag :div, class: "main" do %>
<% classes = action_name == "home" ? "homePage" : "" <% classes = action_name == "home" ? "homePage" : ""
classes += action_name == "home" && authenticated? ? " explorePage" : "" classes += action_name == "home" && authenticated? ? " explorePage" : ""

View file

@ -7,6 +7,7 @@
<% if !authenticated? %> <% if !authenticated? %>
<% content_for :title, "Home | Metamaps" %> <% content_for :title, "Home | Metamaps" %>
<div id="yield"> <div id="yield">
<<<<<<< HEAD
<div class="homeWrapper"> <div class="homeWrapper">
<div class="homeTextWrapper"> <div class="homeTextWrapper">
<div class="homeLogo"></div> <div class="homeLogo"></div>
@ -47,14 +48,46 @@
<div class="clearfloat"></div> <div class="clearfloat"></div>
</div> </div>
</div><!-- end yield --> </div><!-- end yield -->
=======
<div class="homeWrapper homeText">
<div class="homeTitle">Make Sense with Metamaps</div>
<div class="homeIntro">
<span class="green din-medium">METAMAPS.CC</span> is a free and open source platform that supports real-time sense-making, distributed collaboration, and the creative intelligence of individuals, organizations and communities. We are currently in an <span class="din-medium">invite-only beta.</span>
</div>
</div>
<div class="fullWidthWrapper withVideo">
<div class="homeWrapper">
<iframe class="homeVideo" src="//player.vimeo.com/video/113154814" width="560" height="315" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<div class="callToAction">
<h3>Who finds it useful?</h3>
<p>Designers, inventors, artists, educators, strategists, consultants, facilitators, entrepreneurs, systems thinkers, changemakers, analysts, students, researchers... maybe you!</p>
<button type="button" class="button learnMoreCTA" onclick="Metamaps.GlobalUI.openLightbox('about');">LEARN MORE</button>
<a href="/explore/featured" class="exploreFeaturedCTA">EXPLORE FEATURED MAPS</a>
<a href="/request" class="requestInviteCTA" data-bypass="true">REQUEST INVITE</a>
</div>
<div class="clearfloat"></div>
</div>
</div>
<div class="fullWidthWrapper withPartners">
<div class="homeWrapper homePartners">
<% # our partners %>
</div>
</div>
</div><!-- end yield -->
<div class="github-fork-ribbon-wrapper right-bottom">
<div class="github-fork-ribbon">
<a href="https://github.com/metamaps/metamaps_gen002" target="_blank">Fork me on GitHub</a>
</div>
</div>
>>>>>>> develop
<script> <script>
Metamaps.currentSection = ""; Metamaps.currentSection = "";
Metamaps.currentPage = ""; Metamaps.currentPage = "";
</script> </script>
<% elsif authenticated? %> <% elsif authenticated? %>
<% content_for :title, "My Maps | Metamaps" %> <% content_for :title, "Explore Active Maps | Metamaps" %>
<script> <script>
Metamaps.Maps.Mine = <%= @maps.to_json.html_safe %>; Metamaps.Maps.Active = <%= @maps.to_json.html_safe %>;
Metamaps.currentSection = ""; Metamaps.currentSection = "";
Metamaps.currentPage = ""; Metamaps.currentPage = "";
Metamaps.GlobalUI.Search.isOpen = true; Metamaps.GlobalUI.Search.isOpen = true;

View file

@ -15,16 +15,16 @@
<% if @map.contributors.count == 0 %> <% if @map.contributors.count == 0 %>
<img id="mapContribs" width="25" height="25" src="/assets/user.png" /> <img id="mapContribs" width="25" height="25" src="/assets/user.png" />
<% elsif @map.contributors.count == 1 %> <% elsif @map.contributors.count == 1 %>
<img id="mapContribs" width="25" height="25" src="<%= @map.contributors[0].image.url(:square) %>" /> <img id="mapContribs" width="25" height="25" src="<%= @map.contributors[0].image.url(:thirtytwo) %>" />
<% elsif @map.contributors.count == 2 %> <% elsif @map.contributors.count == 2 %>
<img id="mapContribs" width="25" height="25" src="<%= @map.contributors[0].image.url(:square) %>" class="multiple mTwo" /> <img id="mapContribs" width="25" height="25" src="<%= @map.contributors[0].image.url(:thirtytwo) %>" class="multiple mTwo" />
<% elsif @map.contributors.count > 2 %> <% elsif @map.contributors.count > 2 %>
<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(:thirtytwo) %>" class="multiple" />
<% end %> <% end %>
<span><%= @map.contributors.count %></span> <span><%= @map.contributors.count %></span>
<div class="tip"> <ul><% @map.contributors.each_with_index do |c, index| %> <div class="tip"> <ul><% @map.contributors.each_with_index do |c, index| %>
<li > <img class="rtUserImage" width="25" height="25" src="<%= c.image.url(:square) %>" /> <li ><a href="/explore/mapper/<%= c.id %>" > <img class="rtUserImage" width="25" height="25" src="<%= c.image.url(:thirtytwo) %>" />
<%= c.name %> <%= c.name %></a>
</li> </li>
<% end %></ul></div> <% end %></ul></div>
</div> </div>
@ -51,6 +51,7 @@
<p class="mapEditedAt"><span>Last edited:</span> <%= @map.updated_at.strftime("%m/%d/%Y") %></p> <p class="mapEditedAt"><span>Last edited:</span> <%= @map.updated_at.strftime("%m/%d/%Y") %></p>
<div class="mapInfoButtonsWrapper"> <div class="mapInfoButtonsWrapper">
<div class="mapInfoDelete"> <div class="mapInfoDelete">
<div class="deleteMap"></div>
<span>Delete</span> <span>Delete</span>
</div> </div>
<div class="mapInfoShare"> <div class="mapInfoShare">

View file

@ -4,15 +4,31 @@
# TODO: What url is this accessible at? # TODO: What url is this accessible at?
#%> #%>
<% content_for :title, "Explore Maps | Metamaps" %>
<script> <script>
<% if @request == "active" %> <% if @request == "you" %>
Metamaps.Maps.Active = <%= @maps.to_json.html_safe %>; Metamaps.Maps.Mine = <%= @maps.to_json.html_safe %>;
Metamaps.currentPage = "active"; Metamaps.currentPage = "mine";
<% content_for :title, "Explore My Maps | Metamaps" %>
<% elsif @request == "featured" %> <% elsif @request == "featured" %>
Metamaps.Maps.Featured = <%= @maps.to_json.html_safe %>; Metamaps.Maps.Featured = <%= @maps.to_json.html_safe %>;
Metamaps.currentPage = "featured"; Metamaps.currentPage = "featured";
<% content_for :title, "Explore Featured Maps | Metamaps" %>
<% elsif @request == "active" %>
Metamaps.Maps.Active = <%= @maps.to_json.html_safe %>;
Metamaps.currentPage = "active";
<% content_for :title, "Explore Active Maps | Metamaps" %>
<% elsif @request == "mapper" %>
Metamaps.Maps.Mapper = {
models: <%= @maps.to_json.html_safe %>,
id: <%= params[:id] %>
};
Metamaps.currentPage = "mapper";
<% content_for :title, @user.name + " | Metamaps" %>
<% end %> <% end %>
Metamaps.currentSection = "explore"; Metamaps.currentSection = "explore";
Metamaps.GlobalUI.Search.isOpen = true; Metamaps.GlobalUI.Search.isOpen = true;

View file

@ -142,10 +142,10 @@
</div> </div>
<div id="tutorials"> <div id="tutorials">
<iframe id="tutorialVideo" src="//player.vimeo.com/video/88334167" width="552" height="326" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <iframe id="tutorialVideo" src="//player.vimeo.com/video/88334167" width="552" height="320" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<div class="tutorialItem active" id="gettingStarted">1. GETTING STARTED</div> <div class="tutorialItem active" id="gettingStarted">1. GETTING STARTED</div>
<div class="tutorialItem" id="upYourSkillz">2. UP YOUR SKILLZ</div> <div class="tutorialItem disable" id="upYourSkillz">2. UP YOUR SKILLZ</div>
<div class="tutorialItem" id="advancedMapping">3. ADVANCED MAPPING</div> <div class="tutorialItem disable" id="advancedMapping">3. ADVANCED MAPPING</div>
</div> </div>
<div id="moreResources"> <div id="moreResources">

View file

@ -81,7 +81,7 @@
end end
@mappers.each_with_index do |mapper, index| @mappers.each_with_index do |mapper, index|
@mapperlist += '<li data-id="' + mapper.id.to_s + '">' @mapperlist += '<li data-id="' + mapper.id.to_s + '">'
@mapperlist += '<img src="' + mapper.image.url(:square) + '" data-id="' + mapper.id.to_s + '" alt="' + mapper.name + '" />' @mapperlist += '<img src="' + mapper.image.url(:sixtyfour) + '" data-id="' + mapper.id.to_s + '" alt="' + mapper.name + '" />'
@mapperlist += '<p>' + mapper.name + '</p></li>' @mapperlist += '<p>' + mapper.name + '</p></li>'
end end
end end

View file

@ -13,7 +13,7 @@
<% set.metacodes.sort { |a, b| a.name <=> b.name }.each do |m| %> <% set.metacodes.sort { |a, b| a.name <=> b.name }.each do |m| %>
<li data-id="<%= m.id.to_s %>"> <li data-id="<%= m.id.to_s %>">
<img width="24" height="24" src="<%= m.icon %>" alt="<%= m.name %>" /> <img width="24" height="24" src="<%= m.icon %>" alt="<%= m.name %>" />
<span class="mSelectName"><%= m.name %></span> <div class="mSelectName"><%= m.name %></div>
<div class="clearfloat"></div> <div class="clearfloat"></div>
</li> </li>
<% end %> <% end %>
@ -27,7 +27,7 @@
<% Metacode.order("name").all.each do |m| %> <% Metacode.order("name").all.each do |m| %>
<li data-id="<%= m.id.to_s %>"> <li data-id="<%= m.id.to_s %>">
<img width="24" height="24" src="<%= m.icon %>" alt="<%= m.name %>" /> <img width="24" height="24" src="<%= m.icon %>" alt="<%= m.name %>" />
<span class="mSelectName"><%= m.name %></span> <div class="mSelectName"><%= m.name %></div>
<div class="clearfloat"></div> <div class="clearfloat"></div>
</li> </li>
<% end %> <% end %>

View file

@ -10,7 +10,7 @@
<h3>Edit Account</h3> <h3>Edit Account</h3>
<div class="userImage"> <div class="userImage">
<div class="userImageDiv" onclick="Metamaps.Account.toggleChangePicture()"> <div class="userImageDiv" onclick="Metamaps.Account.toggleChangePicture()">
<%= image_tag @user.image.url(:square), :size => "84x84" %> <%= image_tag @user.image.url(:ninetysix), :size => "84x84" %>
<div class="editPhoto"></div> <div class="editPhoto"></div>
</div> </div>
<div class="userImageMenu"> <div class="userImageMenu">

View file

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

View file

@ -21,8 +21,7 @@ Metamaps::Application.routes.draw do
match 'explore/active', to: 'maps#index', via: :get, as: :activemaps match 'explore/active', to: 'maps#index', via: :get, as: :activemaps
match 'explore/featured', to: 'maps#index', via: :get, as: :featuredmaps match 'explore/featured', to: 'maps#index', via: :get, as: :featuredmaps
match 'explore/mine', to: 'maps#index', via: :get, as: :mymaps match 'explore/mine', to: 'maps#index', via: :get, as: :mymaps
match 'maps/mappers/:id', to: 'maps#index', via: :get, as: :usermaps match 'explore/mapper/:id', to: 'maps#index', via: :get, as: :usermaps
match 'maps/topics/:id', to: 'maps#index', via: :get, as: :topicmaps
resources :maps, except: [:new, :edit] resources :maps, except: [:new, :edit]
match 'maps/:id/contains', to: 'maps#contains', via: :get, as: :contains match 'maps/:id/contains', to: 'maps#contains', via: :get, as: :contains
match 'maps/:id/upload_screenshot', to: 'maps#screenshot', via: :post, as: :screenshot match 'maps/:id/upload_screenshot', to: 'maps#screenshot', via: :post, as: :screenshot
@ -36,6 +35,7 @@ Metamaps::Application.routes.draw do
get 'join' => 'devise/registrations#new', :as => :new_user_registration get 'join' => 'devise/registrations#new', :as => :new_user_registration
end end
match 'users/:id/details', to: 'users#details', via: :get, as: :details
match 'user/updatemetacodes', to: 'users#updatemetacodes', via: :post, as: :updatemetacodes match 'user/updatemetacodes', to: 'users#updatemetacodes', via: :post, as: :updatemetacodes
resources :users, except: [:index, :destroy] resources :users, except: [:index, :destroy]
end end

View file

@ -27,11 +27,34 @@ Metamaps.Famous.build = function () {
// INFOVIS // INFOVIS
f.viz = {}; f.viz = {};
var instructions = {
addTopic: "Double-click to<br>add a topic!",
tabKey: "Use Tab & Shift+Tab to select a metacode",
enterKey: "Press Enter to add the topic"
};
f.viz.surf = new Surface({ f.viz.surf = new Surface({
size: [undefined, undefined], size: [undefined, undefined],
classes: [], classes: [],
properties: { properties: {
display: 'none' display: "none",
zIndex: "1"
}
});
var instrShowing = false;
f.viz.instrSurf = new Surface({
content: instructions.addTopic,
size: [220, 80],
classes: ["doubleClickSurf"],
properties: {
fontFamily: "'din-regular', helvetica, sans-serif",
fontSize: "32px",
display: "none",
textAlign: "center",
color: "#999999",
zIndex: "0"
} }
}); });
var prepare = function () { var prepare = function () {
@ -62,8 +85,20 @@ Metamaps.Famous.build = function () {
} }
); );
}; };
f.mainContext.add(f.viz.mod).add(f.viz.surf); f.viz.isInstrShowing = function() {
return instrShowing;
}
f.viz.showInstructions = function() {
instrShowing = true;
f.viz.instrSurf.setProperties({ "display":"block" });
};
f.viz.hideInstructions = function() {
instrShowing = false;
f.viz.instrSurf.setProperties({ "display":"none" });
};
var vizMod = f.mainContext.add(f.viz.mod);
vizMod.add(f.viz.surf);
vizMod.add(f.viz.instrSurf);
// CONTENT / OTHER PAGES // CONTENT / OTHER PAGES
f.yield = {}; f.yield = {};
@ -198,19 +233,24 @@ Metamaps.Famous.build = function () {
var capitalize = Metamaps.currentPage.charAt(0).toUpperCase() + Metamaps.currentPage.slice(1); var capitalize = Metamaps.currentPage.charAt(0).toUpperCase() + Metamaps.currentPage.slice(1);
Metamaps.Views.exploreMaps.setCollection( Metamaps.Maps[capitalize] ); Metamaps.Views.exploreMaps.setCollection( Metamaps.Maps[capitalize] );
if (Metamaps.currentPage === "mapper") {
Metamaps.Views.exploreMaps.fetchUserThenRender();
}
else {
Metamaps.Views.exploreMaps.render(); Metamaps.Views.exploreMaps.render();
}
f.maps.show(); f.maps.show();
f.explore.set(Metamaps.currentPage); f.explore.set(Metamaps.currentPage, Metamaps.Maps.Mapper.mapperId);
f.explore.show(); f.explore.show();
} }
else if (Metamaps.currentSection === "") { else if (Metamaps.currentSection === "") {
Metamaps.Loading.hide(); Metamaps.Loading.hide();
if (Metamaps.Active.Mapper) { if (Metamaps.Active.Mapper) {
Metamaps.Views.exploreMaps.setCollection( Metamaps.Maps.Mine ); Metamaps.Views.exploreMaps.setCollection( Metamaps.Maps.Active );
Metamaps.Views.exploreMaps.render(); Metamaps.Views.exploreMaps.render();
f.maps.show(); f.maps.show();
f.explore.set('mine'); f.explore.set('active');
f.explore.show(); f.explore.show();
} }
else f.explore.set('featured'); else f.explore.set('featured');
@ -247,9 +287,33 @@ Metamaps.Famous.build = function () {
{ duration: 300, curve: 'easeIn' } { duration: 300, curve: 'easeIn' }
); );
}; };
f.explore.set = function (section) { f.explore.set = function (section, mapperId) {
var loggedIn = Metamaps.Active.Mapper ? 'Auth' : ''; var loggedIn = Metamaps.Active.Mapper ? 'Auth' : '';
if (section === "mine" || section === "active" || section === "featured") {
f.explore.surf.setContent(templates[section + loggedIn + 'Content']); f.explore.surf.setContent(templates[section + loggedIn + 'Content']);
}
else if (section === "mapper") {
var setMapper = function(mapperObj) {
var mapperContent;
mapperContent = "<div class='exploreMapsButton active mapperButton'><img class='exploreMapperImage' width='24' height='24' src='" + mapperObj.image + "' />";
mapperContent += "<div class='exploreMapperName'>" + mapperObj.name + "'s Maps</div><div class='clearfloat'></div></div>";
f.explore.surf.setContent(mapperContent);
};
$.ajax({
url: "/users/" + mapperId + ".json",
success: function (response) {
setMapper(response);
},
error: function () {
}
});
}
}; };
var exploreMod = f.mainContext.add(f.explore.mod); var exploreMod = f.mainContext.add(f.explore.mod);
exploreMod.add(new Modifier({ exploreMod.add(new Modifier({
@ -300,6 +364,7 @@ Metamaps.Famous.build = function () {
if (message) { if (message) {
Metamaps.GlobalUI.notifyUser(message); Metamaps.GlobalUI.notifyUser(message);
f.toast.surf.deploy(f.toast.surf._currTarget); f.toast.surf.deploy(f.toast.surf._currTarget);
f.toast.surf.removeListener('deploy', initialToast);
} }
}; };
f.toast.surf.on('deploy', initialToast); f.toast.surf.on('deploy', initialToast);

View file

@ -17,16 +17,16 @@ t.logoContent += '</ul>';
t.featuredContent += '<a href="/explore/featured" class="active featuredMaps exploreMapsButton"><div class="exploreMapsIcon"></div>Featured Maps</a>'; t.featuredContent += '<a href="/explore/featured" class="active featuredMaps exploreMapsButton"><div class="exploreMapsIcon"></div>Featured Maps</a>';
/* logged in explore maps bars */ /* logged in explore maps bars */
t.mineAuthContent = '<a href="/" class="active myMaps exploreMapsButton"><div class="exploreMapsIcon"></div>My Maps</a>'; t.mineAuthContent = '<a href="/explore/mine" class="active myMaps exploreMapsButton"><div class="exploreMapsIcon"></div>My Maps</a>';
t.mineAuthContent += '<a href="/explore/active" class="activeMaps exploreMapsButton"><div class="exploreMapsIcon"></div>Recently Active</a>'; t.mineAuthContent += '<a href="/" class="activeMaps exploreMapsButton"><div class="exploreMapsIcon"></div>Recently Active</a>';
t.mineAuthContent += '<a href="/explore/featured" class="featuredMaps exploreMapsButton"><div class="exploreMapsIcon"></div>Featured</a>'; t.mineAuthContent += '<a href="/explore/featured" class="featuredMaps exploreMapsButton"><div class="exploreMapsIcon"></div>Featured</a>';
t.activeAuthContent = '<a href="/" class="myMaps exploreMapsButton"><div class="exploreMapsIcon"></div>My Maps</a>'; t.activeAuthContent = '<a href="/explore/mine" class="myMaps exploreMapsButton"><div class="exploreMapsIcon"></div>My Maps</a>';
t.activeAuthContent += '<a href="/explore/active" class="active activeMaps exploreMapsButton"><div class="exploreMapsIcon"></div>Recently Active</a>'; t.activeAuthContent += '<a href="/" class="active activeMaps exploreMapsButton"><div class="exploreMapsIcon"></div>Recently Active</a>';
t.activeAuthContent += '<a href="/explore/featured" class="featuredMaps exploreMapsButton"><div class="exploreMapsIcon"></div>Featured</a>'; t.activeAuthContent += '<a href="/explore/featured" class="featuredMaps exploreMapsButton"><div class="exploreMapsIcon"></div>Featured</a>';
t.featuredAuthContent = '<a href="/" class="myMaps exploreMapsButton"><div class="exploreMapsIcon"></div>My Maps</a>'; t.featuredAuthContent = '<a href="/explore/mine" class="myMaps exploreMapsButton"><div class="exploreMapsIcon"></div>My Maps</a>';
t.featuredAuthContent += '<a href="/explore/active" class="activeMaps exploreMapsButton"><div class="exploreMapsIcon"></div>Recently Active</a>'; t.featuredAuthContent += '<a href="/" class="activeMaps exploreMapsButton"><div class="exploreMapsIcon"></div>Recently Active</a>';
t.featuredAuthContent += '<a href="/explore/featured" class="active featuredMaps exploreMapsButton"><div class="exploreMapsIcon"></div>Featured</a>'; t.featuredAuthContent += '<a href="/explore/featured" class="active featuredMaps exploreMapsButton"><div class="exploreMapsIcon"></div>Featured</a>';
module.exports = t; module.exports = t;