diff --git a/app/assets/javascripts/src/Metamaps.GlobalUI.js b/app/assets/javascripts/src/Metamaps.GlobalUI.js
index b1eb4afa..69b7f190 100644
--- a/app/assets/javascripts/src/Metamaps.GlobalUI.js
+++ b/app/assets/javascripts/src/Metamaps.GlobalUI.js
@@ -621,30 +621,25 @@ Metamaps.GlobalUI.Search = {
}
}
- if (!self.optionsInitialized) {
+ $('.limitToMe').unbind().bind("change", function (e) {
+ // set the value of the search equal to itself to retrigger the autocomplete event
+ self.isOpen = false;
+ $('.sidebarSearchField').typeahead('setQuery', $('.sidebarSearchField').val());
+ setTimeout(function () {
+ self.isOpen = true;
+ }, 2000);
+ });
- $('.limitToMe').bind("change", function (e) {
- // set the value of the search equal to itself to retrigger the autocomplete event
- self.isOpen = false;
- $('.sidebarSearchField').typeahead('setQuery', $('.sidebarSearchField').val());
- setTimeout(function () {
- self.isOpen = true;
- }, 2000);
- });
-
- // when the user clicks minimize section, hide the results for that section
- $('.minimizeMapperResults').click(function (e) {
- toggleResultSet.call(this, 'mappers');
- });
- $('.minimizeTopicResults').click(function (e) {
- toggleResultSet.call(this, 'topics');
- });
- $('.minimizeMapResults').click(function (e) {
- toggleResultSet.call(this, 'maps');
- });
-
- self.optionsInitialized = true;
- }
+ // when the user clicks minimize section, hide the results for that section
+ $('.minimizeMapperResults').unbind().click(function (e) {
+ toggleResultSet.call(this, 'mappers');
+ });
+ $('.minimizeTopicResults').unbind().click(function (e) {
+ toggleResultSet.call(this, 'topics');
+ });
+ $('.minimizeMapResults').unbind().click(function (e) {
+ toggleResultSet.call(this, 'maps');
+ });
},
hideLoader: function () {
$('#searchLoading').hide();
diff --git a/app/assets/javascripts/src/Metamaps.JIT.js b/app/assets/javascripts/src/Metamaps.JIT.js
index 98b8ba7b..686d04cd 100644
--- a/app/assets/javascripts/src/Metamaps.JIT.js
+++ b/app/assets/javascripts/src/Metamaps.JIT.js
@@ -265,7 +265,7 @@ Metamaps.JIT = {
color: Metamaps.Settings.colors.synapses.normal,
type: 'customEdge',
lineWidth: 2,
- alpha: 0.4
+ alpha: 1
},
//Native canvas text styling
Label: {
@@ -574,16 +574,16 @@ Metamaps.JIT = {
//following if statement only executes if the edge being hovered over is not selected
if (edgeIsSelected == -1) {
edge.setData('showDesc', true, 'current');
- edge.setDataset('end', {
- lineWidth: 4,
- alpha: 1
- });
- Metamaps.Visualize.mGraph.fx.animate({
- modes: ['edge-property:lineWidth:color:alpha'],
- duration: 100
- });
- Metamaps.Visualize.mGraph.plot();
}
+
+ edge.setDataset('end', {
+ lineWidth: 4
+ });
+ Metamaps.Visualize.mGraph.fx.animate({
+ modes: ['edge-property:lineWidth'],
+ duration: 100
+ });
+ Metamaps.Visualize.mGraph.plot();
}, // onMouseEnter
onMouseLeave: function (edge) {
if (edge.getData('alpha') === 0) return; // don't do anything if the edge is filtered
@@ -592,15 +592,15 @@ Metamaps.JIT = {
//following if statement only executes if the edge being hovered over is not selected
if (edgeIsSelected == -1) {
edge.setData('showDesc', false, 'current');
- edge.setDataset('end', {
- lineWidth: 2,
- alpha: 0.4
- });
- Metamaps.Visualize.mGraph.fx.animate({
- modes: ['edge-property:lineWidth:color:alpha'],
- duration: 100
- });
}
+
+ edge.setDataset('end', {
+ lineWidth: 2
+ });
+ Metamaps.Visualize.mGraph.fx.animate({
+ modes: ['edge-property:lineWidth'],
+ duration: 100
+ });
Metamaps.Visualize.mGraph.plot();
}, // onMouseLeave
onMouseMoveHandler: function (node, eventInfo, e) {
diff --git a/app/assets/javascripts/src/Metamaps.js b/app/assets/javascripts/src/Metamaps.js
index 1cbb6f06..2c5a7ea1 100644
--- a/app/assets/javascripts/src/Metamaps.js
+++ b/app/assets/javascripts/src/Metamaps.js
@@ -26,7 +26,7 @@ Metamaps.Settings = {
colors: {
background: '#344A58',
synapses: {
- normal: '#222222',
+ normal: '#888888',
hover: '#222222',
selected: '#FFFFFF'
},
@@ -683,8 +683,8 @@ Metamaps.TopicCard = {
link: null
});
$('.embeds').empty();
+ $('#addLinkInput input').val("");
$('.attachments').removeClass('hidden');
- $('.addAttachment').show();
$('.CardOnGraph').removeClass('hasAttachment');
},
bindShowCardListeners: function (topic) {
@@ -700,21 +700,9 @@ Metamaps.TopicCard = {
Metamaps.Mapper.get(topic.get('user_id'), setMapperImage)
// starting embed.ly
- var addLinkFunc = function () {
- var addLinkDiv ='';
- var addLinkDesc ='Enter or paste a link';
- addLinkDiv+='
';
- $('.addAttachment').hide();
- $('.attachments').append(addLinkDiv);
- $('.showcard #addLinkReset').click(resetFunc);
- $('.showcard #addLinkInput input').bind("paste keyup",inputEmbedFunc);
- $('#addLinkInput input').focus();
- };
var resetFunc = function () {
- $('.addLink').remove();
- $('.addAttachment').show();
+ $('#addLinkInput input').val("");
+ $('#addLinkInput input').focus();
};
var inputEmbedFunc = function (event) {
@@ -734,7 +722,6 @@ Metamaps.TopicCard = {
'data-card-description': '0',
href: text
}).html(text);
- $('.addLink').remove();
$('.attachments').addClass('hidden');
$('.embeds').append(embedlyEl);
$('.embeds').append('');
@@ -749,6 +736,8 @@ Metamaps.TopicCard = {
}
}, 100);
};
+ $('#addLinkReset').click(resetFunc);
+ $('#addLinkInput input').bind("paste keyup",inputEmbedFunc);
// initialize the link card, if there is a link
if (topic.get('link') && topic.get('link') !== '') {
@@ -760,7 +749,6 @@ Metamaps.TopicCard = {
loader.show(); // Hidden by default
embedly('card', document.getElementById('embedlyLink'));
}
- $('.showcard #addlink').click(addLinkFunc);
var selectingMetacode = false;
@@ -940,9 +928,9 @@ Metamaps.TopicCard = {
}
if (authorized) {
- nodeValues.attachments = '';
- nodeValues.attachments += '
';
- nodeValues.attachments += '
';
+ nodeValues.attachments = '';
+ nodeValues.attachments += '
';
} else {
nodeValues.attachmentsHidden = 'hidden';
nodeValues.attachments = '';
@@ -2117,17 +2105,11 @@ Metamaps.Control = {
},
selectNode: function (node,e) {
- if (Metamaps.Selected.Nodes.indexOf(node) != -1) return;
+ var filtered = node.getData('alpha') === 0;
+
+ if (filtered || Metamaps.Selected.Nodes.indexOf(node) != -1) return;
node.selected = true;
node.setData('dim', 30, 'current');
- /*
- if(!(e.ctrlKey) && !(e.altKey)){
- node.eachAdjacency(function (adj) {
- Metamaps.Control.selectEdge(adj);
- });
- }
- */
-
Metamaps.Selected.Nodes.push(node);
},
deselectAllNodes: function () {
@@ -2140,11 +2122,6 @@ Metamaps.Control = {
},
deselectNode: function (node) {
delete node.selected;
- /*
- node.eachAdjacency(function (adj) {
- Metamaps.Control.deselectEdge(adj);
- });
- */
node.setData('dim', 25, 'current');
//remove the node
@@ -2223,26 +2200,18 @@ Metamaps.Control = {
Metamaps.Filter.checkMappers();
},
selectEdge: function (edge) {
- if (edge.getData('alpha') === 0) return; // don't do anything if the edge is filtered
- if (Metamaps.Selected.Edges.indexOf(edge) != -1) return;
- edge.setData('showDesc', true, 'current');
- if (!Metamaps.Settings.embed) {
- edge.setDataset('end', {
- lineWidth: 4,
- color: Metamaps.Settings.colors.synapses.selected,
- alpha: 1
- });
- } else if (Metamaps.Settings.embed) {
- edge.setDataset('end', {
- lineWidth: 4,
- color: Metamaps.Settings.colors.synapses.selected,
- alpha: 1
- });
- }
- Metamaps.Visualize.mGraph.fx.animate({
- modes: ['edge-property:lineWidth:color:alpha'],
- duration: 100
+ var filtered = edge.getData('alpha') === 0; // don't select if the edge is filtered
+
+ if (filtered || Metamaps.Selected.Edges.indexOf(edge) != -1) return;
+
+ var width = Metamaps.Mouse.edgeHoveringOver === edge ? 4 : 2;
+ edge.setDataset('current', {
+ showDesc: true,
+ lineWidth: width,
+ color: Metamaps.Settings.colors.synapses.selected
});
+ Metamaps.Visualize.mGraph.plot();
+
Metamaps.Selected.Edges.push(edge);
},
deselectAllEdges: function () {
@@ -2253,28 +2222,23 @@ Metamaps.Control = {
}
Metamaps.Visualize.mGraph.plot();
},
- deselectEdge: function (edge) {
- if (edge.getData('alpha') === 0) return; // don't do anything if the edge is filtered
+ deselectEdge: function (edge, quick) {
edge.setData('showDesc', false, 'current');
- edge.setDataset('end', {
+
+ edge.setDataset('current', {
lineWidth: 2,
- color: Metamaps.Settings.colors.synapses.normal,
- alpha: 0.4
+ color: Metamaps.Settings.colors.synapses.normal
});
if (Metamaps.Mouse.edgeHoveringOver == edge) {
- edge.setData('showDesc', true, 'current');
- edge.setDataset('end', {
+ edge.setDataset('current', {
+ showDesc: true,
lineWidth: 4,
- color: Metamaps.Settings.colors.synapses.hover,
- alpha: 1
+ color: Metamaps.Settings.colors.synapses.hover
});
}
- Metamaps.Visualize.mGraph.fx.animate({
- modes: ['edge-property:lineWidth:color:alpha'],
- duration: 100
- });
+ Metamaps.Visualize.mGraph.plot();
//remove the edge
Metamaps.Selected.Edges.splice(
@@ -2704,8 +2668,11 @@ Metamaps.Filter = {
}
else {
if (n) {
- // TODO quick deselect node
+ Metamaps.Control.deselectNode(n, true);
n.setData('alpha', 0, 'end');
+ n.eachAdjacency(function(e){
+ Metamaps.Control.deselectEdge(e, true);
+ });
}
else console.log(topic);
}
@@ -2724,15 +2691,17 @@ Metamaps.Filter = {
else passesMapper = true;
}
+ var color = Metamaps.Settings.colors.synapses.normal;
if (passesSynapse && passesMapper) {
if (e) {
- e.setData('alpha', 0.4, 'end');
+ e.setData('alpha', 1, 'end');
+ e.setData('color', color, 'end');
}
else console.log(synapse);
}
else {
if (e) {
- // TODO quick deselect edge
+ Metamaps.Control.deselectEdge(e, true);
e.setData('alpha', 0, 'end');
}
else console.log(synapse);
diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index d3b99bd3..f6c41cac 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -1706,11 +1706,11 @@ float: left;
}
.ui-tabs-vertical .ui-tabs-nav li a {
display: block;
- width: 92%;
- padding: 4% !important;
+ width: 100%;
+ padding: 4px 0 !important;
}
.ui-tabs-vertical .ui-tabs-panel {
- padding: 5px !important;
+ padding: 0 !important;
float: right;
width: 388px;
}
@@ -1722,12 +1722,13 @@ float: left;
line-height: 21px;
border: none;
background: none;
-}
-#metacodeSwitchTabs .setTitle {
-
+ padding: 0;
}
#metacodeSwitchTabs .setDesc {
margin-bottom: 5px;
+ font-family: 'din-medium', helvetica, sans-serif;
+ color: #424242;
+ font-size: 14px;
}
#switchMetacodes > p {
margin: 16px 0 16px 0;
@@ -1777,6 +1778,8 @@ float: left;
background: none;
font-size: 14px;
line-height: 14px;
+ font-family: 'din-regular', helvetica, sans-serif;
+ color: #424242;
}
#metacodeSwitchTabs button.button {
width: auto !important;
@@ -2312,7 +2315,7 @@ float: left;
position:fixed;
top:50%;
left:50%;
- z-index: 4;
+ z-index: 1;
}
.collabCompass:hover p {
diff --git a/app/assets/stylesheets/base.css b/app/assets/stylesheets/base.css
index 3725297e..e59634af 100644
--- a/app/assets/stylesheets/base.css
+++ b/app/assets/stylesheets/base.css
@@ -15,7 +15,7 @@
background-color:#F5F5F5;
text-align: left;
overflow: visible;
- z-index:14000;
+ z-index:2;
color: #424242;
border-radius:2px;
box-shadow: 0px 3px 3px rgba(0,0,0,0.23), 0 3px 3px rgba(0,0,0,0.16);
diff --git a/app/assets/stylesheets/clean.css b/app/assets/stylesheets/clean.css
index a586d6ba..db5e1938 100644
--- a/app/assets/stylesheets/clean.css
+++ b/app/assets/stylesheets/clean.css
@@ -267,14 +267,14 @@
left: 156px;
}
.sidebarSearch .tt-dropdown-menu .minimizeResults, .sidebarSearch .tt-dropdown-menu .maximizeResults {
- float: right;
width: 32px;
height: 32px;
background-image: url(arrowpermswhite_sprite.png);
background-repeat: no-repeat;
cursor: pointer;
- margin-top: 5px;
- margin-right: 20px;
+ position: absolute;
+ top: 5px;
+ left: 410px;
}
.sidebarSearch .tt-dropdown-menu .minimizeResults {
background-position-x: 0;
@@ -346,6 +346,10 @@
.sidebarSearch .tt-dataset-mappers .tt-suggestion .icon {
margin: 4px 9px 4px 4px;
}
+.sidebarSearch .tt-dataset-mappers .resultText {
+ width: 150px;
+}
+
.sidebarSearch .resultText {
width: 260px;
display: table-cell;
@@ -381,6 +385,9 @@
.tt-dataset-maps div.autoOptions {
width: 84px;
}
+.sidebarSearch .tt-dataset-mappers .autoOptions {
+ width: 235px;
+}
.sidebarSearch .tt-is-under-cursor .autoOptions,
.sidebarSearch .tt-is-under-mouse-cursor .autoOptions {
display: block;
@@ -514,7 +521,24 @@
.sidebarSearch .tt-dataset-mappers div.mapCount {
top: 8px;
+ left: 170px;
}
+.sidebarSearch .tt-dataset-mappers div.mapperCreated {
+ left: 0px;
+ padding-left: 0px;
+ font-size: 12px;
+ font-family: 'din-medium', helvetica, sans-serif;
+ line-height: 24px;
+}
+.sidebarSearch .tt-dataset-mappers div.mapperGeneration {
+ top: 20px;
+ left: 0px;
+ padding-left: 0px;
+ font-size: 12px;
+ font-family: 'din-medium', helvetica, sans-serif;
+ line-height: 24px;
+}
+
/* end search */
/* end upperLeftUI */
diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb
index bfd80de2..27d6f8e7 100644
--- a/app/helpers/users_helper.rb
+++ b/app/helpers/users_helper.rb
@@ -10,6 +10,7 @@ module UsersHelper
user['value'] = u.name
user['profile'] = u.image.url(:thumb)
user['mapCount'] = u.maps.count
+ user['created_at'] = u.created_at.strftime("%m/%d/%Y")
user['rtype'] = "mapper"
temp.push user
diff --git a/app/views/layouts/_templates.html.erb b/app/views/layouts/_templates.html.erb
index c5bf7fd5..fd02f3e9 100644
--- a/app/views/layouts/_templates.html.erb
+++ b/app/views/layouts/_templates.html.erb
@@ -137,10 +137,10 @@
-
Mapping since: {{created_at}}
+
Mapping since: {{created_at}}
-
Generation {{generation}}
+
Generation: 1
{{mapCount}}
diff --git a/app/views/shared/_switchmetacodes.html.erb b/app/views/shared/_switchmetacodes.html.erb
index 238a83a3..42d1f59f 100644
--- a/app/views/shared/_switchmetacodes.html.erb
+++ b/app/views/shared/_switchmetacodes.html.erb
@@ -30,8 +30,8 @@
<% m.metacodes.sort{|x,y| x.name <=> y.name }.each_with_index do |m, index| %>
<% @list += '

' + m.name.downcase + '
' %>
<% end %>
+
<%= m.desc %>
<% end %>