added ability to limit search results to just your own, and to minimize the different sections of search results
BIN
app/assets/images/MMCCicon_go.png
Normal file
After Width: | Height: | Size: 464 B |
BIN
app/assets/images/MMCCicon_link.png
Normal file
After Width: | Height: | Size: 739 B |
BIN
app/assets/images/MMCCicon_maximize_arrow.png
Normal file
After Width: | Height: | Size: 462 B |
BIN
app/assets/images/MMCCicon_metacode_set.png
Normal file
After Width: | Height: | Size: 452 B |
BIN
app/assets/images/MMCCicon_minimize_arrow.png
Normal file
After Width: | Height: | Size: 425 B |
|
@ -78,7 +78,7 @@ function escKeyHandler() {
|
||||||
* Make a node "in the commons" (with a green circle) lose its
|
* Make a node "in the commons" (with a green circle) lose its
|
||||||
* green circle so it stays on the console/map/...
|
* green circle so it stays on the console/map/...
|
||||||
*/
|
*/
|
||||||
function keepFromCommons(id) {
|
function keepFromCommons(event, id) {
|
||||||
if (userid == null) {
|
if (userid == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -88,6 +88,10 @@ function keepFromCommons(id) {
|
||||||
$('#topic_y').val(0);
|
$('#topic_y').val(0);
|
||||||
$('#topic_grabTopic').val(id);
|
$('#topic_grabTopic').val(id);
|
||||||
$('.new_topic').submit();
|
$('.new_topic').submit();
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
return false;
|
||||||
}//doubleClickNodeHandler
|
}//doubleClickNodeHandler
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -155,30 +155,151 @@ var labelType, useGradients, nativeTextSupport, animate, json, Mconsole = null,
|
||||||
name: 'topics',
|
name: 'topics',
|
||||||
template: $('.topicTemplate').html(),
|
template: $('.topicTemplate').html(),
|
||||||
remote: {
|
remote: {
|
||||||
url: '/search/topics?term=%QUERY'
|
url: '/search/topics?term=%QUERY',
|
||||||
|
replace: function () {
|
||||||
|
var q = '/search/topics?term=' + $('.sidebarSearchField').val();
|
||||||
|
if ($("#limitTopicsToMe").is(':checked')) {
|
||||||
|
q += "&user=" + userid.toString();
|
||||||
|
}
|
||||||
|
return q;
|
||||||
|
},
|
||||||
|
filter: function(dataset) {
|
||||||
|
if (dataset.length == 0) {
|
||||||
|
dataset.push({
|
||||||
|
value: "No results",
|
||||||
|
typeImageURL: "/assets/wildcard.png",
|
||||||
|
rtype: "noresult"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return dataset;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
engine: Hogan,
|
engine: Hogan,
|
||||||
header: '<h3 class="search-header">Topics</h3>'
|
header: '<h3 class="search-header">Topics</h3><input type="checkbox" class="limitToMe" id="limitTopicsToMe"></input><label for="limitTopicsToMe" class="limitToMeLabel">added by me</label><div class="minimizeResults minimizeTopicResults"></div><div class="clearfloat"></div>'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'maps',
|
name: 'maps',
|
||||||
template: $('.mapTemplate').html(),
|
template: $('.mapTemplate').html(),
|
||||||
remote: {
|
remote: {
|
||||||
url: '/search/maps?term=%QUERY'
|
url: '/search/maps?term=%QUERY',
|
||||||
|
replace: function () {
|
||||||
|
var q = '/search/maps?term=' + $('.sidebarSearchField').val();
|
||||||
|
if ($("#limitMapsToMe").is(':checked')) {
|
||||||
|
q += "&user=" + userid.toString();
|
||||||
|
}
|
||||||
|
return q;
|
||||||
|
},
|
||||||
|
filter: function(dataset) {
|
||||||
|
if (dataset.length == 0) {
|
||||||
|
dataset.push({
|
||||||
|
value: "No results",
|
||||||
|
rtype: "noresult"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return dataset;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
engine: Hogan,
|
engine: Hogan,
|
||||||
header: '<h3 class="search-header">Maps</h3>'
|
header: '<h3 class="search-header">Maps</h3><input type="checkbox" class="limitToMe" id="limitMapsToMe"></input><label for="limitMapsToMe" class="limitToMeLabel">added by me</label><div class="minimizeResults minimizeMapResults"></div><div class="clearfloat"></div>'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'mappers',
|
name: 'mappers',
|
||||||
template: $('.mapperTemplate').html(),
|
template: $('.mapperTemplate').html(),
|
||||||
remote: {
|
remote: {
|
||||||
url: '/search/mappers?term=%QUERY'
|
url: '/search/mappers?term=%QUERY',
|
||||||
|
filter: function(dataset) {
|
||||||
|
if (dataset.length == 0) {
|
||||||
|
dataset.push({
|
||||||
|
value: "No results",
|
||||||
|
rtype: "noresult"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return dataset;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
engine: Hogan,
|
engine: Hogan,
|
||||||
header: '<h3 class="search-header">Mappers</h3>'
|
header: '<h3 class="search-header">Mappers</h3><div class="minimizeResults minimizeMapperResults"></div><div class="clearfloat"></div>'
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
// tell the autocomplete to launch a new tab with the topic, map, or mapper you clicked on
|
||||||
|
$('.sidebarSearchField').bind('typeahead:selected', function (event, datum, dataset) {
|
||||||
|
console.log(event);
|
||||||
|
if (datum.rtype != "noresult") {
|
||||||
|
var win;
|
||||||
|
if (dataset == "topics") {
|
||||||
|
win=window.open('/topics/' + datum.id, '_blank');
|
||||||
|
}
|
||||||
|
else if (dataset == "maps") {
|
||||||
|
win=window.open('/maps/' + datum.id, '_blank');
|
||||||
|
}
|
||||||
|
else if (dataset == "mappers") {
|
||||||
|
win=window.open('/maps/mappers/' + datum.id, '_blank');
|
||||||
|
}
|
||||||
|
win.focus();
|
||||||
|
closeSearch(0);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
var checkboxChangeInit = false, minimizeInit = false;
|
||||||
|
|
||||||
|
$('.sidebarSearchField').bind('keyup', function () {
|
||||||
|
|
||||||
|
// when the user selects 'added by me' resend the query with their userid attached
|
||||||
|
if (!checkboxChangeInit) {
|
||||||
|
$('.limitToMe').bind("change", function(e) {
|
||||||
|
// set the value of the search equal to itself to retrigger the autocomplete event
|
||||||
|
searchIsOpen = false;
|
||||||
|
$('.sidebarSearchField').typeahead('setQuery',$('.sidebarSearchField').val());
|
||||||
|
setTimeout(function() { searchIsOpen = true; }, 2000);
|
||||||
|
});
|
||||||
|
checkboxChangeInit = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// when the user clicks minimize section, hide the results for that section
|
||||||
|
if (!minimizeInit) {
|
||||||
|
$('.minimizeMapperResults').click(function(e) {
|
||||||
|
var s = $('.tt-dataset-mappers .tt-suggestions');
|
||||||
|
console.log(s.css('height'));
|
||||||
|
if (s.css('height') == '0px') {
|
||||||
|
$('.tt-dataset-mappers .tt-suggestions').css('height','auto');
|
||||||
|
$(this).removeClass('maximizeResults').addClass('minimizeResults');
|
||||||
|
} else {
|
||||||
|
$('.tt-dataset-mappers .tt-suggestions').css('height','0');
|
||||||
|
$(this).removeClass('minimizeResults').addClass('maximizeResults');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$('.minimizeTopicResults').click(function(e) {
|
||||||
|
var s = $('.tt-dataset-topics .tt-suggestions');
|
||||||
|
console.log(s.css('height'));
|
||||||
|
if (s.css('height') == '0px') {
|
||||||
|
s.css({'height':'auto','border-top':'none'});
|
||||||
|
$(this).removeClass('maximizeResults').addClass('minimizeResults');
|
||||||
|
} else {
|
||||||
|
s.css({'height':'0','border-top':'1px solid #222'});
|
||||||
|
$(this).removeClass('minimizeResults').addClass('maximizeResults');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$('.minimizeMapResults').click(function(e) {
|
||||||
|
var s = $('.tt-dataset-maps .tt-suggestions');
|
||||||
|
console.log(s.css('height'));
|
||||||
|
if (s.css('height') == '0px') {
|
||||||
|
s.css({'height':'auto','border-top':'none'});
|
||||||
|
$(this).removeClass('maximizeResults').addClass('minimizeResults');
|
||||||
|
} else {
|
||||||
|
s.css({'height':'0','border-top':'1px solid #222'});
|
||||||
|
$(this).removeClass('minimizeResults').addClass('maximizeResults');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
minimizeInit = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
|
$('.sidebarSearch button.addToMap').click(function(event){
|
||||||
|
event.stopPropagation();
|
||||||
|
});
|
||||||
} // end bindSearchHover
|
} // end bindSearchHover
|
||||||
|
|
||||||
function bindAccountHover() {
|
function bindAccountHover() {
|
||||||
|
|
|
@ -835,12 +835,43 @@ border: 1px solid black;
|
||||||
font-size:20px;
|
font-size:20px;
|
||||||
line-height:20px;
|
line-height:20px;
|
||||||
margin: 10px 0 3px 10px;
|
margin: 10px 0 3px 10px;
|
||||||
|
float:left;
|
||||||
}
|
}
|
||||||
|
.sidebarSearch .tt-dropdown-menu .limitToMe {
|
||||||
|
float:left;
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
margin-top: 11px;
|
||||||
|
margin-left: 15px;
|
||||||
|
}
|
||||||
|
.sidebarSearch .tt-dropdown-menu .limitToMeLabel {
|
||||||
|
float:left;
|
||||||
|
margin-top: 11px;
|
||||||
|
}
|
||||||
|
.sidebarSearch .tt-dropdown-menu .minimizeResults {
|
||||||
|
float:right;
|
||||||
|
width:35px;
|
||||||
|
height:35px;
|
||||||
|
background: url('/assets/MMCCicon_minimize_arrow.png') no-repeat center center;
|
||||||
|
background-size: 25px 25px;
|
||||||
|
cursor:pointer;
|
||||||
|
}
|
||||||
|
.sidebarSearch .tt-dropdown-menu .maximizeResults {
|
||||||
|
float:right;
|
||||||
|
width:35px;
|
||||||
|
height:35px;
|
||||||
|
background: url('/assets/MMCCicon_maximize_arrow.png') no-repeat center center;
|
||||||
|
background-size: 25px 25px;
|
||||||
|
cursor:pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.sidebarSearch .tt-suggestions {
|
.sidebarSearch .tt-suggestions {
|
||||||
font-family:'LatoLight', helvetica, sans-serif;
|
font-family:'LatoLight', helvetica, sans-serif;
|
||||||
|
overflow:hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.sidebarSearch .tt-suggestion {
|
.sidebarSearch .tt-suggestion {
|
||||||
background: rgba(0,0,0,0.5);
|
background: rgba(0,0,0,0.5);
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
|
@ -850,6 +881,10 @@ border: 1px solid black;
|
||||||
background:black;
|
background:black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sidebarSearch .tt-dataset-maps .tt-is-under-cursor .resultmap, .sidebarSearch .tt-dataset-topics .tt-is-under-cursor .resulttopic {
|
||||||
|
min-height: 57px;
|
||||||
|
}
|
||||||
|
|
||||||
.sidebarSearch .tt-suggestion .icon {
|
.sidebarSearch .tt-suggestion .icon {
|
||||||
float:left;
|
float:left;
|
||||||
width:36px;
|
width:36px;
|
||||||
|
@ -863,7 +898,7 @@ border: 1px solid black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebarSearch .resultText {
|
.sidebarSearch .resultText {
|
||||||
width: 280px;
|
width: 275px;
|
||||||
display: block;
|
display: block;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
@ -888,7 +923,7 @@ border: 1px solid black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebarSearch div.autoOptions {
|
.sidebarSearch div.autoOptions {
|
||||||
width: 117px;
|
width: 122px;
|
||||||
float: left;
|
float: left;
|
||||||
position:relative;
|
position:relative;
|
||||||
display:none;
|
display:none;
|
||||||
|
@ -896,6 +931,9 @@ border: 1px solid black;
|
||||||
.sidebarSearch .tt-is-under-cursor .autoOptions {
|
.sidebarSearch .tt-is-under-cursor .autoOptions {
|
||||||
display:block;
|
display:block;
|
||||||
}
|
}
|
||||||
|
.sidebarSearch .tt-suggestion .resultnoresult .autoOptions {
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
|
||||||
.sidebarSearch .autoOptions button, .sidebarSearch .autoOptions a, .sidebarSearch .autoOptions div {
|
.sidebarSearch .autoOptions button, .sidebarSearch .autoOptions a, .sidebarSearch .autoOptions div {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -906,21 +944,22 @@ border: 1px solid black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebarSearch button.addToMap {
|
.sidebarSearch button.addToMap {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
background: url(/assets/MMCCicon_add.png) no-repeat center center;
|
background: url(/assets/MMCCicon_add.png) no-repeat center center;
|
||||||
background-size: 15px 15px;
|
background-size: 18px 18px;
|
||||||
top: 10px;
|
top: 30px;
|
||||||
left: 0px;
|
left: 84px;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebarSearch a.goTo {
|
.sidebarSearch a.goTo {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
background: url(/assets/MMCCicon_pop-out.png) no-repeat center center;
|
background: url(/assets/MMCCicon_pop-out.png) no-repeat center center;
|
||||||
background-size: 15px 15px;
|
background-size: 18px 18px;
|
||||||
top: 11px;
|
top: 7px;
|
||||||
left: 22px;
|
left: 84px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebarSearch div.mapCount {
|
.sidebarSearch div.mapCount {
|
||||||
|
@ -928,8 +967,8 @@ width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
background: url(/assets/MMCCicon_map.png) no-repeat 0px center;
|
background: url(/assets/MMCCicon_map.png) no-repeat 0px center;
|
||||||
background-size: 14px 14px;
|
background-size: 14px 14px;
|
||||||
top: 0px;
|
top: 7px;
|
||||||
left: 50px;
|
left: 39px;
|
||||||
padding-left: 18px;
|
padding-left: 18px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
|
@ -940,8 +979,8 @@ width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
background: url(/assets/MMCCicon_topic.png) no-repeat 0px center;
|
background: url(/assets/MMCCicon_topic.png) no-repeat 0px center;
|
||||||
background-size: 14px 14px;
|
background-size: 14px 14px;
|
||||||
top: 0px;
|
top: 7px;
|
||||||
left: 50px;
|
left: 39px;
|
||||||
padding-left: 18px;
|
padding-left: 18px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
|
@ -951,10 +990,10 @@ line-height: 20px;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
background: url(/assets/MMCCicon_synapse.png) no-repeat 0px center;
|
background: url(/assets/MMCCicon_synapse.png) no-repeat 0px center;
|
||||||
background-size: 14px 14px;
|
background-size: 15px 15px;
|
||||||
top: 0px;
|
top: 30px;
|
||||||
left: 83px;
|
left: 38px;
|
||||||
padding-left: 15px;
|
padding-left: 19px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
|
@ -963,29 +1002,29 @@ line-height: 20px;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
background: url(/assets/MMCCicon_mapper.png) no-repeat center center;
|
background: url(/assets/MMCCicon_mapper.png) no-repeat center center;
|
||||||
background-size: 16px 16px;
|
background-size: 17px 17px;
|
||||||
top: 21px;
|
top: 7px;
|
||||||
left: 52px;
|
left: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebarSearch div.mapContributorsIcon {
|
.sidebarSearch div.mapContributorsIcon {
|
||||||
width: 20px;
|
height: 20px;
|
||||||
height: 20px;
|
background: url(/assets/MMCCicon_mapper.png) no-repeat 0px center;
|
||||||
background: url(/assets/MMCCicon_mapper.png) no-repeat 0px center;
|
background-size: 17px 17px;
|
||||||
background-size: 16px 16px;
|
top: 7px;
|
||||||
top: 21px;
|
right: 85px;
|
||||||
left: 50px;
|
padding-left: 19px;
|
||||||
padding-left: 18px;
|
font-size: 12px;
|
||||||
font-size: 12px;
|
line-height: 20px;
|
||||||
line-height: 20px;
|
padding-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebarSearch div.topicPermission, .sidebarSearch div.mapPermission {
|
.sidebarSearch div.topicPermission, .sidebarSearch div.mapPermission {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
background-size: 20px 20px !important;
|
background-size: 19px 19px !important;
|
||||||
top: 20px;
|
top: 30px;
|
||||||
left: 84px;
|
left: 13px;
|
||||||
}
|
}
|
||||||
.sidebarSearch div.topicPermission.commons, .sidebarSearch div.mapPermission.commons {
|
.sidebarSearch div.topicPermission.commons, .sidebarSearch div.mapPermission.commons {
|
||||||
background: url(/assets/MMCCicon_commons.png) no-repeat center center;
|
background: url(/assets/MMCCicon_commons.png) no-repeat center center;
|
||||||
|
|
|
@ -36,6 +36,7 @@ class MainController < ApplicationController
|
||||||
@current = current_user
|
@current = current_user
|
||||||
|
|
||||||
term = params[:term]
|
term = params[:term]
|
||||||
|
user = params[:user] ? params[:user] : false
|
||||||
|
|
||||||
if term && !term.empty? && term.downcase[0..3] != "map:" && term.downcase[0..6] != "mapper:" && term.downcase != "topic:"
|
if term && !term.empty? && term.downcase[0..3] != "map:" && term.downcase[0..6] != "mapper:" && term.downcase != "topic:"
|
||||||
|
|
||||||
|
@ -59,13 +60,20 @@ class MainController < ApplicationController
|
||||||
@topics = []
|
@topics = []
|
||||||
else
|
else
|
||||||
search = '%' + term.downcase + '%'
|
search = '%' + term.downcase + '%'
|
||||||
@topics = Topic.where('LOWER("name") like ? OR LOWER("desc") like ? OR LOWER("link") like ?', search, search, search).
|
|
||||||
where('metacode_id = ?', filterByMetacode.id).limit(10).order('"name"').visibleToUser(@current,nil)
|
if !user
|
||||||
|
@topics = Topic.where('LOWER("name") like ? OR LOWER("desc") like ? OR LOWER("link") like ?', search, search, search).where('metacode_id = ?', filterByMetacode.id).order('"name"')
|
||||||
|
elsif user
|
||||||
|
@topics = Topic.where('LOWER("name") like ? OR LOWER("desc") like ? OR LOWER("link") like ?', search, search, search).where('metacode_id = ?', filterByMetacode.id).where('user_id = ?', user).order('"name"')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
search = '%' + term.downcase + '%'
|
search = '%' + term.downcase + '%'
|
||||||
@topics = Topic.where('LOWER("name") like ? OR LOWER("desc") like ? OR LOWER("link") like ?', search, search, search).
|
if !user
|
||||||
limit(10).order('"name"').visibleToUser(@current,nil)
|
@topics = Topic.where('LOWER("name") like ? OR LOWER("desc") like ? OR LOWER("link") like ?', search, search, search).order('"name"')
|
||||||
|
elsif
|
||||||
|
@topics = Topic.where('LOWER("name") like ? OR LOWER("desc") like ? OR LOWER("link") like ?', search, search, search).where('user_id = ?', user).order('"name"')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@topics = []
|
@topics = []
|
||||||
|
@ -87,14 +95,19 @@ class MainController < ApplicationController
|
||||||
@current = current_user
|
@current = current_user
|
||||||
|
|
||||||
term = params[:term]
|
term = params[:term]
|
||||||
|
user = params[:user] ? params[:user] : nil
|
||||||
|
|
||||||
if term && !term.empty? && term.downcase[0..5] != "topic:" && term.downcase[0..6] != "mapper:" && term.downcase != "map:"
|
if term && !term.empty? && term.downcase[0..5] != "topic:" && term.downcase[0..6] != "mapper:" && term.downcase != "map:"
|
||||||
|
|
||||||
#remove "map:" if appended at beginning
|
#remove "map:" if appended at beginning
|
||||||
term = term[4..-1] if term.downcase[0..3] == "map:"
|
term = term[4..-1] if term.downcase[0..3] == "map:"
|
||||||
|
|
||||||
search = '%' + term.downcase + '%'
|
search = '%' + term.downcase + '%'
|
||||||
@maps = Map.where('LOWER("name") like ? OR LOWER("desc") like ?', search, search).
|
if !user
|
||||||
limit(10).order('"name"').visibleToUser(@current,nil)
|
@maps = Map.where('LOWER("name") like ? OR LOWER("desc") like ?', search, search).order('"name"')
|
||||||
|
elsif user
|
||||||
|
@maps = Map.where('LOWER("name") like ? OR LOWER("desc") like ?', search, search).where('user_id = ?', user).order('"name"')
|
||||||
|
end
|
||||||
else
|
else
|
||||||
@maps = []
|
@maps = []
|
||||||
end
|
end
|
||||||
|
|
|
@ -13,6 +13,7 @@ module MapsHelper
|
||||||
map['topicCount'] = m.topics.count
|
map['topicCount'] = m.topics.count
|
||||||
map['synapseCount'] = m.synapses.count
|
map['synapseCount'] = m.synapses.count
|
||||||
map['contributorCount'] = m.contributors.count
|
map['contributorCount'] = m.contributors.count
|
||||||
|
map['rtype'] = "map"
|
||||||
|
|
||||||
contributorList = ''
|
contributorList = ''
|
||||||
if m.contributors.count > 0
|
if m.contributors.count > 0
|
||||||
|
|
|
@ -15,6 +15,7 @@ module TopicsHelper
|
||||||
topic['mapCount'] = t.maps.count
|
topic['mapCount'] = t.maps.count
|
||||||
topic['synapseCount'] = t.synapses.count
|
topic['synapseCount'] = t.synapses.count
|
||||||
topic['originator'] = t.user.name
|
topic['originator'] = t.user.name
|
||||||
|
topic['rtype'] = "topic"
|
||||||
|
|
||||||
temp.push topic
|
temp.push topic
|
||||||
end
|
end
|
||||||
|
|
|
@ -9,6 +9,7 @@ module UsersHelper
|
||||||
user['label'] = u.name
|
user['label'] = u.name
|
||||||
user['value'] = u.name
|
user['value'] = u.name
|
||||||
user['mapCount'] = u.maps.count
|
user['mapCount'] = u.maps.count
|
||||||
|
user['rtype'] = "mapper"
|
||||||
|
|
||||||
temp.push user
|
temp.push user
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
<div class="templates">
|
<div class="templates">
|
||||||
|
|
||||||
<div class="topicTemplate">
|
<div class="topicTemplate">
|
||||||
|
<div class="result{{rtype}}">
|
||||||
<img class="icon" src="{{typeImageURL}}">
|
<img class="icon" src="{{typeImageURL}}">
|
||||||
<span class="tip metacodeTip">{{type}}</span>
|
<span class="tip metacodeTip">{{type}}</span>
|
||||||
<div class="resultText">
|
<div class="resultText">
|
||||||
|
@ -15,7 +16,7 @@
|
||||||
<div class="autoOptions">
|
<div class="autoOptions">
|
||||||
|
|
||||||
<% if controller_name == 'maps' && action_name == 'show' && authenticated? && @map.authorize_to_edit(@current) %>
|
<% if controller_name == 'maps' && action_name == 'show' && authenticated? && @map.authorize_to_edit(@current) %>
|
||||||
<button class="addToMap" onclick="keepFromCommons({{id}})"></button>
|
<button class="addToMap" onclick="return keepFromCommons(event, {{id}})"></button>
|
||||||
<span class="tip">add to map</span>
|
<span class="tip">add to map</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<a href="/topics/{{id}}" target="_blank" class="goTo">
|
<a href="/topics/{{id}}" target="_blank" class="goTo">
|
||||||
|
@ -38,8 +39,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfloat"></div>
|
<div class="clearfloat"></div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="mapTemplate">
|
<div class="mapTemplate">
|
||||||
|
<div class="result{{rtype}}">
|
||||||
<img class="icon" src="/assets/map.png">
|
<img class="icon" src="/assets/map.png">
|
||||||
<div class="resultText">
|
<div class="resultText">
|
||||||
<p class="resultTitle">{{value}}</p>
|
<p class="resultTitle">{{value}}</p>
|
||||||
|
@ -67,8 +70,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfloat"></div>
|
<div class="clearfloat"></div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="mapperTemplate">
|
<div class="mapperTemplate">
|
||||||
|
<div class="result{{rtype}}">
|
||||||
<img class="icon" width="28" height="28" src="/assets/MMCCicon_mapper.png">
|
<img class="icon" width="28" height="28" src="/assets/MMCCicon_mapper.png">
|
||||||
<div class="resultText">
|
<div class="resultText">
|
||||||
<p class="resultTitle">{{value}}</p>
|
<p class="resultTitle">{{value}}</p>
|
||||||
|
@ -84,5 +89,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfloat"></div>
|
<div class="clearfloat"></div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
BIN
public/assets/MMCCicon_go-aae580938b3ea29afbe3de759feee359.png
Normal file
After Width: | Height: | Size: 464 B |
BIN
public/assets/MMCCicon_go.png
Normal file
After Width: | Height: | Size: 464 B |
BIN
public/assets/MMCCicon_link-32bc019e1ba44c73c8898de7ca0de1fa.png
Normal file
After Width: | Height: | Size: 739 B |
BIN
public/assets/MMCCicon_link.png
Normal file
After Width: | Height: | Size: 739 B |
After Width: | Height: | Size: 462 B |
BIN
public/assets/MMCCicon_maximize_arrow.png
Normal file
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 452 B |
BIN
public/assets/MMCCicon_metacode_set.png
Normal file
After Width: | Height: | Size: 452 B |
After Width: | Height: | Size: 425 B |
BIN
public/assets/MMCCicon_minimize_arrow.png
Normal file
After Width: | Height: | Size: 425 B |
BIN
public/assets/application-bd7e83f7b33a139f170decf7e9714bc0.js.gz
Normal file
|
@ -11,6 +11,8 @@ MMCCicon_delete_grey.png: MMCCicon_delete_grey-139563eb178ac12911430f31c487eff6.
|
||||||
MMCCicon_delete_grey/index.png: MMCCicon_delete_grey-139563eb178ac12911430f31c487eff6.png
|
MMCCicon_delete_grey/index.png: MMCCicon_delete_grey-139563eb178ac12911430f31c487eff6.png
|
||||||
MMCCicon_filter.png: MMCCicon_filter-8dd344476ca9fb88261938acb66d2c79.png
|
MMCCicon_filter.png: MMCCicon_filter-8dd344476ca9fb88261938acb66d2c79.png
|
||||||
MMCCicon_filter/index.png: MMCCicon_filter-8dd344476ca9fb88261938acb66d2c79.png
|
MMCCicon_filter/index.png: MMCCicon_filter-8dd344476ca9fb88261938acb66d2c79.png
|
||||||
|
MMCCicon_go.png: MMCCicon_go-aae580938b3ea29afbe3de759feee359.png
|
||||||
|
MMCCicon_go/index.png: MMCCicon_go-aae580938b3ea29afbe3de759feee359.png
|
||||||
MMCCicon_help.png: MMCCicon_help-dfde3a342abc809a6508695a75ea9b87.png
|
MMCCicon_help.png: MMCCicon_help-dfde3a342abc809a6508695a75ea9b87.png
|
||||||
MMCCicon_help/index.png: MMCCicon_help-dfde3a342abc809a6508695a75ea9b87.png
|
MMCCicon_help/index.png: MMCCicon_help-dfde3a342abc809a6508695a75ea9b87.png
|
||||||
MMCCicon_hide.png: MMCCicon_hide-e2fcfe3fcaeef87d07322aeea2b2af37.png
|
MMCCicon_hide.png: MMCCicon_hide-e2fcfe3fcaeef87d07322aeea2b2af37.png
|
||||||
|
@ -19,6 +21,8 @@ MMCCicon_info.png: MMCCicon_info-76fbf35e20e1bb6facb3e14254543c9c.png
|
||||||
MMCCicon_info/index.png: MMCCicon_info-76fbf35e20e1bb6facb3e14254543c9c.png
|
MMCCicon_info/index.png: MMCCicon_info-76fbf35e20e1bb6facb3e14254543c9c.png
|
||||||
MMCCicon_invite.png: MMCCicon_invite-33ce02d3a0500b602c15e9192c3c4f66.png
|
MMCCicon_invite.png: MMCCicon_invite-33ce02d3a0500b602c15e9192c3c4f66.png
|
||||||
MMCCicon_invite/index.png: MMCCicon_invite-33ce02d3a0500b602c15e9192c3c4f66.png
|
MMCCicon_invite/index.png: MMCCicon_invite-33ce02d3a0500b602c15e9192c3c4f66.png
|
||||||
|
MMCCicon_link.png: MMCCicon_link-32bc019e1ba44c73c8898de7ca0de1fa.png
|
||||||
|
MMCCicon_link/index.png: MMCCicon_link-32bc019e1ba44c73c8898de7ca0de1fa.png
|
||||||
MMCCicon_logout.png: MMCCicon_logout-2b7d4dfff8cdc4d38089c082ac0c6929.png
|
MMCCicon_logout.png: MMCCicon_logout-2b7d4dfff8cdc4d38089c082ac0c6929.png
|
||||||
MMCCicon_logout/index.png: MMCCicon_logout-2b7d4dfff8cdc4d38089c082ac0c6929.png
|
MMCCicon_logout/index.png: MMCCicon_logout-2b7d4dfff8cdc4d38089c082ac0c6929.png
|
||||||
MMCCicon_map.png: MMCCicon_map-77c3768601370ee04d15f7da448fee91.png
|
MMCCicon_map.png: MMCCicon_map-77c3768601370ee04d15f7da448fee91.png
|
||||||
|
@ -29,6 +33,12 @@ MMCCicon_mapper.png: MMCCicon_mapper-3d7a6f42563271141b72483efa7701d2.png
|
||||||
MMCCicon_mapper/index.png: MMCCicon_mapper-3d7a6f42563271141b72483efa7701d2.png
|
MMCCicon_mapper/index.png: MMCCicon_mapper-3d7a6f42563271141b72483efa7701d2.png
|
||||||
MMCCicon_mapper_black.png: MMCCicon_mapper_black-8e5daace6edd134213588252f1426e10.png
|
MMCCicon_mapper_black.png: MMCCicon_mapper_black-8e5daace6edd134213588252f1426e10.png
|
||||||
MMCCicon_mapper_black/index.png: MMCCicon_mapper_black-8e5daace6edd134213588252f1426e10.png
|
MMCCicon_mapper_black/index.png: MMCCicon_mapper_black-8e5daace6edd134213588252f1426e10.png
|
||||||
|
MMCCicon_maximize_arrow.png: MMCCicon_maximize_arrow-d529ebb50a2254187a1d42e7ec496eaa.png
|
||||||
|
MMCCicon_maximize_arrow/index.png: MMCCicon_maximize_arrow-d529ebb50a2254187a1d42e7ec496eaa.png
|
||||||
|
MMCCicon_metacode_set.png: MMCCicon_metacode_set-f4e1e0a7c9e66f8d61ded339704f9ef6.png
|
||||||
|
MMCCicon_metacode_set/index.png: MMCCicon_metacode_set-f4e1e0a7c9e66f8d61ded339704f9ef6.png
|
||||||
|
MMCCicon_minimize_arrow.png: MMCCicon_minimize_arrow-8923745a55d45e84fcd5ce8c0b90d042.png
|
||||||
|
MMCCicon_minimize_arrow/index.png: MMCCicon_minimize_arrow-8923745a55d45e84fcd5ce8c0b90d042.png
|
||||||
MMCCicon_pop-out.png: MMCCicon_pop-out-f929f9f904f0dde84210a68980110e9b.png
|
MMCCicon_pop-out.png: MMCCicon_pop-out-f929f9f904f0dde84210a68980110e9b.png
|
||||||
MMCCicon_pop-out/index.png: MMCCicon_pop-out-f929f9f904f0dde84210a68980110e9b.png
|
MMCCicon_pop-out/index.png: MMCCicon_pop-out-f929f9f904f0dde84210a68980110e9b.png
|
||||||
MMCCicon_pop-out_black.png: MMCCicon_pop-out_black-a0fe60f38328f60a42e4e59472c669a2.png
|
MMCCicon_pop-out_black.png: MMCCicon_pop-out_black-a0fe60f38328f60a42e4e59472c669a2.png
|
||||||
|
@ -199,8 +209,8 @@ WebSocketMain.swf: WebSocketMain-0de980edb45e36785bf9d862baa032bb.swf
|
||||||
WebSocketMain/index.swf: WebSocketMain-0de980edb45e36785bf9d862baa032bb.swf
|
WebSocketMain/index.swf: WebSocketMain-0de980edb45e36785bf9d862baa032bb.swf
|
||||||
WebSocketMainInsecure.swf: WebSocketMainInsecure-c4377647e57e58cacc692c8a51afc9f8.swf
|
WebSocketMainInsecure.swf: WebSocketMainInsecure-c4377647e57e58cacc692c8a51afc9f8.swf
|
||||||
WebSocketMainInsecure/index.swf: WebSocketMainInsecure-c4377647e57e58cacc692c8a51afc9f8.swf
|
WebSocketMainInsecure/index.swf: WebSocketMainInsecure-c4377647e57e58cacc692c8a51afc9f8.swf
|
||||||
application.js: application-32fff722d967b095a46a0f9aef58d2ac.js
|
application.js: application-bd7e83f7b33a139f170decf7e9714bc0.js
|
||||||
application/index.js: application-32fff722d967b095a46a0f9aef58d2ac.js
|
application/index.js: application-bd7e83f7b33a139f170decf7e9714bc0.js
|
||||||
scroll/mCSB_buttons.png: scroll/mCSB_buttons-0642ce29bb568932e832d150141614e6.png
|
scroll/mCSB_buttons.png: scroll/mCSB_buttons-0642ce29bb568932e832d150141614e6.png
|
||||||
scroll/mCSB_buttons/index.png: scroll/mCSB_buttons-0642ce29bb568932e832d150141614e6.png
|
scroll/mCSB_buttons/index.png: scroll/mCSB_buttons-0642ce29bb568932e832d150141614e6.png
|
||||||
Fonts/Lato-Lig-webfont.eot: Fonts/Lato-Lig-webfont-1435188a694a7d5e29cf4a3288ff3e36.eot
|
Fonts/Lato-Lig-webfont.eot: Fonts/Lato-Lig-webfont-1435188a694a7d5e29cf4a3288ff3e36.eot
|
||||||
|
@ -211,5 +221,5 @@ Fonts/Lato-Lig-webfont.ttf: Fonts/Lato-Lig-webfont-4b8f0d5ac83e783eb84848ff32546
|
||||||
Fonts/Lato-Lig-webfont/index.ttf: Fonts/Lato-Lig-webfont-4b8f0d5ac83e783eb84848ff3254685c.ttf
|
Fonts/Lato-Lig-webfont/index.ttf: Fonts/Lato-Lig-webfont-4b8f0d5ac83e783eb84848ff3254685c.ttf
|
||||||
Fonts/Lato-Lig-webfont.woff: Fonts/Lato-Lig-webfont-47c2912f319ae759c3b1cd558b080c33.woff
|
Fonts/Lato-Lig-webfont.woff: Fonts/Lato-Lig-webfont-47c2912f319ae759c3b1cd558b080c33.woff
|
||||||
Fonts/Lato-Lig-webfont/index.woff: Fonts/Lato-Lig-webfont-47c2912f319ae759c3b1cd558b080c33.woff
|
Fonts/Lato-Lig-webfont/index.woff: Fonts/Lato-Lig-webfont-47c2912f319ae759c3b1cd558b080c33.woff
|
||||||
application.css: application-7d15b1e4985733b33978307af5dce062.css
|
application.css: application-ec07fd82dedb30e38622a81e0cfcfc95.css
|
||||||
application/index.css: application-7d15b1e4985733b33978307af5dce062.css
|
application/index.css: application-ec07fd82dedb30e38622a81e0cfcfc95.css
|
||||||
|
|