fixed a bunch of strange behaviours, and made synapse and topic creation work on all major browsers except haven't tested it out fully with opera yet, Devin will do that. added, but hid the framework for using analyze and organize functions on the left hand side.
This commit is contained in:
parent
3226808470
commit
7497688724
26 changed files with 407 additions and 308 deletions
42
app/assets/javascripts/Jit/analyze.js
Normal file
42
app/assets/javascripts/Jit/analyze.js
Normal file
|
@ -0,0 +1,42 @@
|
|||
////
|
||||
////
|
||||
////
|
||||
//// Define all the dynamic interactions for the Analyze using Jquery
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
// this sets up the initial opening of the organize box
|
||||
$('#sideOptionAnalyze').bind('click',function(){
|
||||
if (!analyzeOpen) openAnalyze();
|
||||
});
|
||||
|
||||
// this sets up the closing of the organize box, and the toggling between open and closed.
|
||||
$('#closeAnalyze').bind('click',function(){
|
||||
if (analyzeOpen) closeAnalyze();
|
||||
});
|
||||
});
|
||||
|
||||
function openAnalyze() {
|
||||
analyzeOpen = true;
|
||||
if (findOpen) closeFind();
|
||||
if (organizeOpen) closeOrganize();
|
||||
$('#sideOptionFind').css('z-index','8');
|
||||
$('#sideOptionAnalyze, #closeAnalyze').css('z-index','10');
|
||||
$('#sideOptionOrganize').css('z-index','8');
|
||||
$('#sideOptionAnalyze').animate({
|
||||
width: '100px',
|
||||
height: '76px'
|
||||
}, 100);
|
||||
$('#closeAnalyze').css('display','block');
|
||||
$('#sideOptionAnalyze').css('cursor','default');
|
||||
}
|
||||
|
||||
function closeAnalyze() {
|
||||
analyzeOpen = false;
|
||||
$('#closeAnalyze').css('display','none');
|
||||
$('#sideOptionAnalyze').css('cursor','pointer');
|
||||
$('#sideOptionAnalyze').animate({
|
||||
width: '64px',
|
||||
height: '32px'
|
||||
}, 100);
|
||||
}
|
|
@ -189,71 +189,13 @@ function clearFoundData() {
|
|||
$(document).ready(function() {
|
||||
|
||||
// this sets up the initial opening of the find box
|
||||
$('.sideOption').bind('click',function(){
|
||||
$('.sideOption').animate({
|
||||
width: '305px',
|
||||
height: '76px'
|
||||
}, 300, function() {
|
||||
$('#topic_by_name_input').focus();
|
||||
});
|
||||
$('#closeFind, #findWhere').css('display','block');
|
||||
$('.sideOption').unbind('click');
|
||||
$('.sideOption').css('cursor','default');
|
||||
$('#sideOptionFind').bind('click',function(){
|
||||
if (!findOpen) openFind();
|
||||
});
|
||||
|
||||
// this sets up the closing of the find box, and the toggling between open and closed.
|
||||
$('#closeFind').click(function(){
|
||||
Mconsole.graph.eachNode( function (n) {
|
||||
n.setData('inCommons', false);
|
||||
n.setData('onCanvas', false);
|
||||
//$('.name.topic_' + n.id).css('display','block');
|
||||
});
|
||||
Mconsole.plot();
|
||||
$('#closeFind, #findWhere').css('display','none');
|
||||
$('.sideOption').css('cursor','pointer');
|
||||
$('.sideOption').animate({
|
||||
width: '45px',
|
||||
height: '32px'
|
||||
}, 300, function() {
|
||||
$('.sideOption').bind('click',function(){
|
||||
firstVal = $('.sideOption option[value="name"]').attr('selected');
|
||||
secondVal = $('.sideOption option[value="metacode"]').attr('selected');
|
||||
thirdVal = $('.sideOption option[value="map (by name)"]').attr('selected');
|
||||
fourthVal = $('.sideOption option[value="mapper (by name)"]').attr('selected');
|
||||
if ( firstVal === 'selected' || thirdVal === 'selected' || fourthVal === 'selected' ) {
|
||||
$('.sideOption').animate({
|
||||
width: '305px',
|
||||
height: '76px'
|
||||
}, 300, function() {
|
||||
$('#topic_by_name_input').focus();
|
||||
});
|
||||
} else if ( secondVal === 'selected') {
|
||||
$('.sideOption').animate({
|
||||
width: '380px',
|
||||
height: '463px'
|
||||
}, 300, function() {
|
||||
// Animation complete.
|
||||
});
|
||||
} else if ( thirdVal === 'selected' ) {
|
||||
$('.sideOption').animate({
|
||||
width: '305px',
|
||||
height: '76px'
|
||||
}, 300, function() {
|
||||
$('#map_by_name_input').focus();
|
||||
});
|
||||
} else if ( fourthVal === 'selected' ) {
|
||||
$('.sideOption').animate({
|
||||
width: '305px',
|
||||
height: '76px'
|
||||
}, 300, function() {
|
||||
$('#mapper_by_name_input').focus();
|
||||
});
|
||||
}
|
||||
$('#closeFind, #findWhere').css('display','block');
|
||||
$('.sideOption').unbind('click');
|
||||
$('.sideOption').css('cursor','default');
|
||||
});
|
||||
});
|
||||
$('#closeFind').bind('click',function(){
|
||||
if (findOpen) closeFind();
|
||||
});
|
||||
|
||||
// this is where interactions within the find box begin
|
||||
|
@ -265,6 +207,7 @@ $(document).ready(function() {
|
|||
// grab the checkboxes to see if the search is on the canvas, in the commons, or both
|
||||
firstVal = $("#onCanvas").attr('checked');
|
||||
secondVal = $("#inCommons").attr('checked');
|
||||
clearFoundData();
|
||||
|
||||
// only have the autocomplete enabled if they are searching in the commons
|
||||
if (firstVal == "checked" && secondVal == "checked"){
|
||||
|
@ -316,48 +259,48 @@ $(document).ready(function() {
|
|||
delay: 2000
|
||||
});
|
||||
|
||||
$('.sideOption .select_content').change(function() {
|
||||
$('#sideOptionFind .select_content').change(function() {
|
||||
firstVal = $(this).children("option[value='topics']").attr('selected');
|
||||
secondVal = $(this).children("option[value='maps']").attr('selected');
|
||||
thirdVal = $(this).children("option[value='mappers']").attr('selected');
|
||||
if ( firstVal == 'selected') {
|
||||
$('.sideOption .select_type').children("option[value='metacode']").removeAttr('disabled');
|
||||
$('.sideOption .select_type').children("option[value='map (by name)']").removeAttr('disabled');
|
||||
$('.sideOption .select_type').children("option[value='mapper (by name)']").removeAttr('disabled');
|
||||
$('#sideOptionFind .select_type').children("option[value='metacode']").removeAttr('disabled');
|
||||
$('#sideOptionFind .select_type').children("option[value='map (by name)']").removeAttr('disabled');
|
||||
$('#sideOptionFind .select_type').children("option[value='mapper (by name)']").removeAttr('disabled');
|
||||
$('.find').css('display','none');
|
||||
$('.find_topic_by_name').css('display','block');
|
||||
$('#topic_by_name_input').focus();
|
||||
|
||||
}
|
||||
else if ( secondVal == 'selected' ) {
|
||||
if ( $(".sideOption .select_type").val() != "name") {
|
||||
$(".sideOption .select_type").val('name');
|
||||
$('.sideOption').animate({
|
||||
if ( $("#sideOptionFind .select_type").val() != "name") {
|
||||
$("#sideOptionFind .select_type").val('name');
|
||||
$('#sideOptionFind').animate({
|
||||
width: '305px',
|
||||
height: '76px'
|
||||
}, 300, function() {
|
||||
// Animation complete.
|
||||
});
|
||||
}
|
||||
$('.sideOption .select_type').children("option[value='metacode']").attr('disabled','disabled');
|
||||
$('.sideOption .select_type').children("option[value='map (by name)']").attr('disabled','disabled');
|
||||
$('.sideOption .select_type').children("option[value='mapper (by name)']").attr('disabled','disabled');
|
||||
$('#sideOptionFind .select_type').children("option[value='metacode']").attr('disabled','disabled');
|
||||
$('#sideOptionFind .select_type').children("option[value='map (by name)']").attr('disabled','disabled');
|
||||
$('#sideOptionFind .select_type').children("option[value='mapper (by name)']").attr('disabled','disabled');
|
||||
$('.find').css('display','none');
|
||||
$('.find_map_by_name').css('display','block');
|
||||
$('#map_by_name_input').focus();
|
||||
}
|
||||
else if ( thirdVal == 'selected' ) {
|
||||
$(".sideOption .select_type").val('name');
|
||||
$('.sideOption .select_type').children("option[value='metacode']").attr('disabled','disabled');
|
||||
$('.sideOption .select_type').children("option[value='map (by name)']").attr('disabled','disabled');
|
||||
$('.sideOption .select_type').children("option[value='mapper (by name)']").attr('disabled','disabled');
|
||||
$("#sideOptionFind .select_type").val('name');
|
||||
$('#sideOptionFind .select_type').children("option[value='metacode']").attr('disabled','disabled');
|
||||
$('#sideOptionFind .select_type').children("option[value='map (by name)']").attr('disabled','disabled');
|
||||
$('#sideOptionFind .select_type').children("option[value='mapper (by name)']").attr('disabled','disabled');
|
||||
$('.find').css('display','none');
|
||||
$('.find_mapper_by_name').css('display','block');
|
||||
$('#mapper_by_name_input').focus();
|
||||
}
|
||||
});
|
||||
|
||||
$('.sideOption .select_type').change(function() {
|
||||
$('#sideOptionFind .select_type').change(function() {
|
||||
firstVal = $(this).children("option[value='name']").attr('selected');
|
||||
secondVal = $(this).children("option[value='metacode']").attr('selected');
|
||||
thirdVal = $(this).children("option[value='map (by name)']").attr('selected');
|
||||
|
@ -369,7 +312,7 @@ $(document).ready(function() {
|
|||
for (var catVis in categoryVisible) {
|
||||
categoryVisible[catVis] = true;
|
||||
}
|
||||
$('.sideOption').animate({
|
||||
$('#sideOptionFind').animate({
|
||||
width: '305px',
|
||||
height: '76px'
|
||||
}, 300, function() {
|
||||
|
@ -380,7 +323,7 @@ $(document).ready(function() {
|
|||
}
|
||||
else if ( secondVal === 'selected' ) {
|
||||
$('.find').fadeOut('fast', function() {
|
||||
$('.sideOption').animate({
|
||||
$('#sideOptionFind').animate({
|
||||
width: '380px',
|
||||
height: '463px'
|
||||
}, 300, function() {
|
||||
|
@ -390,7 +333,7 @@ $(document).ready(function() {
|
|||
}
|
||||
else if ( thirdVal === 'selected' ) {
|
||||
$('.find').fadeOut('fast', function() {
|
||||
$('.sideOption').animate({
|
||||
$('#sideOptionFind').animate({
|
||||
width: '305px',
|
||||
height: '76px'
|
||||
}, 300, function() {
|
||||
|
@ -401,7 +344,7 @@ $(document).ready(function() {
|
|||
}
|
||||
else if ( fourthVal === 'selected' ) {
|
||||
$('.find').fadeOut('fast', function() {
|
||||
$('.sideOption').animate({
|
||||
$('#sideOptionFind').animate({
|
||||
width: '305px',
|
||||
height: '76px'
|
||||
}, 300, function() {
|
||||
|
@ -425,9 +368,9 @@ $(document).ready(function() {
|
|||
});
|
||||
|
||||
$('.find_map_by_name #map_by_name_input').bind('railsAutocomplete.select', function(event, data){
|
||||
firstVal = $('.sideOption .select_content').children("option[value='topics']").attr('selected');
|
||||
secondVal = $('.sideOption .select_content').children("option[value='maps']").attr('selected');
|
||||
thirdVal = $('.sideOption .select_content').children("option[value='mappers']").attr('selected');
|
||||
firstVal = $('#sideOptionFind .select_content').children("option[value='topics']").attr('selected');
|
||||
secondVal = $('#sideOptionFind .select_content').children("option[value='maps']").attr('selected');
|
||||
thirdVal = $('#sideOptionFind .select_content').children("option[value='mappers']").attr('selected');
|
||||
if ( firstVal == 'selected') {
|
||||
// grab the checkboxes to see if the search is on the canvas, in the commons, or both
|
||||
firstNewVal = $("#onCanvas").attr('checked');
|
||||
|
@ -472,9 +415,9 @@ $(document).ready(function() {
|
|||
});
|
||||
|
||||
$('.find_mapper_by_name #mapper_by_name_input').bind('railsAutocomplete.select', function(event, data){
|
||||
firstVal = $('.sideOption .select_content').children("option[value='topics']").attr('selected');
|
||||
secondVal = $('.sideOption .select_content').children("option[value='maps']").attr('selected');
|
||||
thirdVal = $('.sideOption .select_content').children("option[value='mappers']").attr('selected');
|
||||
firstVal = $('#sideOptionFind .select_content').children("option[value='topics']").attr('selected');
|
||||
secondVal = $('#sideOptionFind .select_content').children("option[value='maps']").attr('selected');
|
||||
thirdVal = $('#sideOptionFind .select_content').children("option[value='mappers']").attr('selected');
|
||||
if ( firstVal == 'selected') {
|
||||
// grab the checkboxes to see if the search is on the canvas, in the commons, or both
|
||||
firstNewVal = $("#onCanvas").attr('checked');
|
||||
|
@ -526,28 +469,14 @@ $(document).ready(function() {
|
|||
|
||||
if ( switchAll === "showAll" || switchAll === "hideAll") {
|
||||
if (switchAll == "showAll") {
|
||||
// this means that we are on a map view
|
||||
if (obj != null) {
|
||||
showAll();
|
||||
}
|
||||
// this means that we are on a card view
|
||||
else {
|
||||
$('.topic').fadeIn('slow');
|
||||
}
|
||||
showAll();
|
||||
$('.find_topic_by_metacode ul li').not('#hideAll, #showAll').removeClass('toggledOff');
|
||||
for (var catVis in categoryVisible) {
|
||||
categoryVisible[catVis] = true;
|
||||
}
|
||||
}
|
||||
else if (switchAll == "hideAll") {
|
||||
// this means that we are on a map view
|
||||
if (obj != null) {
|
||||
hideAll();
|
||||
}
|
||||
// this means that we are on a card view
|
||||
else {
|
||||
$('.topic').fadeOut('slow');
|
||||
}
|
||||
hideAll();
|
||||
$('.find_topic_by_metacode ul li').not('#hideAll, #showAll').addClass('toggledOff');
|
||||
for (var catVis in categoryVisible) {
|
||||
categoryVisible[catVis] = false;
|
||||
|
@ -556,30 +485,8 @@ $(document).ready(function() {
|
|||
}
|
||||
else {
|
||||
var category = $(this).children('img').attr('alt');
|
||||
|
||||
// this means that we are on a map view
|
||||
if (obj != null) {
|
||||
switchVisible(category);
|
||||
}
|
||||
// this means that we are on a card view
|
||||
//else {
|
||||
// if (categoryVisible[category] == true) {
|
||||
// if (category.split(' ').length == 1) {
|
||||
// $('#cards .' + category).fadeOut('slow');
|
||||
// }
|
||||
// else {
|
||||
// $('#cards .' + category.split(' ')[0]).fadeOut('slow');
|
||||
// }
|
||||
// }
|
||||
// else if (categoryVisible[category] == false) {
|
||||
// if (category.split(' ').length == 1) {
|
||||
// $('#cards .' + category).fadeIn('slow');
|
||||
// }
|
||||
// else {
|
||||
// $('#cards .' + category.split(' ')[0]).fadeIn('slow');
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
switchVisible(category);
|
||||
|
||||
// toggle the image and the boolean array value
|
||||
if (categoryVisible[category] == true) {
|
||||
$(this).addClass('toggledOff');
|
||||
|
@ -591,4 +498,63 @@ $(document).ready(function() {
|
|||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function openFind() {
|
||||
findOpen = true;
|
||||
if (analyzeOpen) closeAnalyze();
|
||||
if (organizeOpen) closeOrganize();
|
||||
$('#sideOptionFind, #closeFind').css('z-index','10');
|
||||
$('#sideOptionAnalyze').css('z-index','9');
|
||||
$('#sideOptionOrganize').css('z-index','8');
|
||||
firstVal = $('#sideOptionFind option[value="name"]').attr('selected');
|
||||
secondVal = $('#sideOptionFind option[value="metacode"]').attr('selected');
|
||||
thirdVal = $('#sideOptionFind option[value="map (by name)"]').attr('selected');
|
||||
fourthVal = $('#sideOptionFind option[value="mapper (by name)"]').attr('selected');
|
||||
if ( firstVal === 'selected' || thirdVal === 'selected' || fourthVal === 'selected' ) {
|
||||
$('#sideOptionFind').animate({
|
||||
width: '305px',
|
||||
height: '76px'
|
||||
}, 100, function() {
|
||||
$('#topic_by_name_input').focus();
|
||||
});
|
||||
} else if ( secondVal === 'selected') {
|
||||
$('#sideOptionFind').animate({
|
||||
width: '380px',
|
||||
height: '463px'
|
||||
}, 100, function() {
|
||||
// Animation complete.
|
||||
});
|
||||
} else if ( thirdVal === 'selected' ) {
|
||||
$('#sideOptionFind').animate({
|
||||
width: '305px',
|
||||
height: '76px'
|
||||
}, 100, function() {
|
||||
$('#map_by_name_input').focus();
|
||||
});
|
||||
} else if ( fourthVal === 'selected' ) {
|
||||
$('#sideOptionFind').animate({
|
||||
width: '305px',
|
||||
height: '76px'
|
||||
}, 100, function() {
|
||||
$('#mapper_by_name_input').focus();
|
||||
});
|
||||
}
|
||||
$('#closeFind, #findWhere').css('display','block');
|
||||
$('#sideOptionFind').css('cursor','default');
|
||||
}
|
||||
|
||||
function closeFind() {
|
||||
findOpen = false;
|
||||
Mconsole.graph.eachNode( function (n) {
|
||||
n.setData('inCommons', false);
|
||||
n.setData('onCanvas', false);
|
||||
});
|
||||
Mconsole.plot();
|
||||
$('#closeFind, #findWhere').css('display','none');
|
||||
$('#sideOptionFind').css('cursor','pointer');
|
||||
$('#sideOptionFind').animate({
|
||||
width: '45px',
|
||||
height: '32px'
|
||||
}, 100);
|
||||
}
|
|
@ -57,7 +57,7 @@ function graphSettings(type) {
|
|||
},
|
||||
//Update node positions when dragged
|
||||
onDragMove: function (node, eventInfo, e) {
|
||||
clickDragOnTopic(node, eventInfo, e);
|
||||
clickDragOnTopic(node, eventInfo, e);
|
||||
},
|
||||
onDragEnd: function() {
|
||||
if (tempInit && tempNode2 == null) {
|
||||
|
@ -69,7 +69,7 @@ function graphSettings(type) {
|
|||
else if (tempInit && tempNode2 != null) {
|
||||
$('#topic_addSynapse').val("false");
|
||||
$('#synapse_topic1id').val(tempNode.id);
|
||||
$('#synapse_topic2id').val(tempNode2.id);
|
||||
$('#synapse_topic2id').val(tempNode2.id);
|
||||
$('#new_synapse').fadeIn('fast');
|
||||
$('#synapse_desc').focus();
|
||||
tempNode = null;
|
||||
|
@ -451,10 +451,10 @@ function canvasDoubleClickHandler(canvasLoc,e) {
|
|||
|
||||
if (now - storedTime < TOLERANCE) {
|
||||
//pop up node creation :)
|
||||
$('#topic_grabTopic').val("null");
|
||||
$('#topic_addSynapse').val("false");
|
||||
document.getElementById('new_topic').style.left = e.x + "px";
|
||||
document.getElementById('new_topic').style.top = e.y + "px";
|
||||
$('#topic_grabTopic').val("null");
|
||||
$('#topic_addSynapse').val("false");
|
||||
$('#new_topic').css('left',e.clientX + "px");
|
||||
$('#new_topic').css('top',e.clientY + "px");
|
||||
$('#topic_x').val(canvasLoc.x);
|
||||
$('#topic_y').val(canvasLoc.y);
|
||||
$('#new_topic').fadeIn('fast');
|
||||
|
@ -478,12 +478,12 @@ function clickDragOnTopic(node, eventInfo, e) {
|
|||
$('#new_topic').fadeOut('fast');
|
||||
var pos = eventInfo.getPos();
|
||||
// if it's a left click, move the node
|
||||
if (e.button == 0 && !e.altKey ) {
|
||||
if (e.button == 0 && !e.altKey && (e.buttons == 0 || e.buttons == 1 || e.buttons == undefined)) {
|
||||
node.pos.setc(pos.x, pos.y);
|
||||
Mconsole.plot();
|
||||
}
|
||||
// if it's a right click, start synapse creation
|
||||
else if (e.button == 2 || (e.button == 0 && e.altKey)) {
|
||||
// if it's a right click or holding down alt, start synapse creation ->third option is for firefox
|
||||
else if (e.button == 2 || (e.button == 0 && e.altKey) || e.buttons == 2) {
|
||||
if (tempInit == false) {
|
||||
tempNode = node;
|
||||
tempInit = true;
|
||||
|
@ -508,12 +508,12 @@ function clickDragOnTopic(node, eventInfo, e) {
|
|||
});
|
||||
//pop up node creation :)
|
||||
$('#topic_grabTopic').val("null");
|
||||
var myX = e.x - 110;
|
||||
var myY = e.y - 30;
|
||||
document.getElementById('new_topic').style.left = myX + "px";
|
||||
document.getElementById('new_topic').style.top = myY + "px";
|
||||
document.getElementById('new_synapse').style.left = myX + "px";
|
||||
document.getElementById('new_synapse').style.top = myY + "px";
|
||||
var myX = e.clientX - 110;
|
||||
var myY = e.clientY - 30;
|
||||
$('#new_topic').css('left',myX + "px");
|
||||
$('#new_topic').css('top',myY + "px");
|
||||
$('#new_synapse').css('left',myX + "px");
|
||||
$('#new_synapse').css('top',myY + "px");
|
||||
$('#topic_x').val(eventInfo.getPos().x);
|
||||
$('#topic_y').val(eventInfo.getPos().y);
|
||||
Mconsole.plot();
|
||||
|
@ -644,6 +644,8 @@ function onCreateLabelHandler(domElement, node) {
|
|||
Mconsole.plot();
|
||||
});
|
||||
});
|
||||
|
||||
//$(showCard).find('.scroll').mCustomScrollbar();
|
||||
|
||||
// Create a 'name' button and add it to the main node label
|
||||
var nameContainer = document.createElement('span'),
|
||||
|
|
51
app/assets/javascripts/Jit/organize.js
Normal file
51
app/assets/javascripts/Jit/organize.js
Normal file
|
@ -0,0 +1,51 @@
|
|||
function organize() {
|
||||
Mconsole.compute();
|
||||
Mconsole.fx.animate({
|
||||
modes: ['linear'],
|
||||
hideLabels: true
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
////
|
||||
////
|
||||
////
|
||||
//// Define all the dynamic interactions for the Organize using Jquery
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
// this sets up the initial opening of the organize box
|
||||
$('#sideOptionOrganize').bind('click',function(){
|
||||
if (!organizeOpen) openOrganize();
|
||||
});
|
||||
|
||||
// this sets up the closing of the organize box, and the toggling between open and closed.
|
||||
$('#closeOrganize').bind('click',function(){
|
||||
if (organizeOpen) closeOrganize();
|
||||
});
|
||||
});
|
||||
|
||||
function openOrganize() {
|
||||
organizeOpen = true;
|
||||
if (findOpen) closeFind();
|
||||
if (analyzeOpen) closeAnalyze();
|
||||
$('#sideOptionFind').css('z-index','8');
|
||||
$('#sideOptionAnalyze').css('z-index','9');
|
||||
$('#sideOptionOrganize, #closeOrganize').css('z-index','10');
|
||||
$('#sideOptionOrganize').animate({
|
||||
width: '100px',
|
||||
height: '76px'
|
||||
}, 100);
|
||||
$('#closeOrganize').css('display','block');
|
||||
$('#sideOptionOrganize').css('cursor','default');
|
||||
}
|
||||
|
||||
function closeOrganize() {
|
||||
organizeOpen = false;
|
||||
$('#closeOrganize').css('display','none');
|
||||
$('#sideOptionOrganize').css('cursor','pointer');
|
||||
$('#sideOptionOrganize').animate({
|
||||
width: '75px',
|
||||
height: '32px'
|
||||
}, 100);
|
||||
}
|
|
@ -21,7 +21,7 @@
|
|||
// other options are 'graph'
|
||||
var viewMode = "list";
|
||||
|
||||
var labelType, useGradients, nativeTextSupport, animate, json, Mconsole = null, gType, tempNode = null, tempInit = false, tempNode2 = null, metacodeIMGinit = false;
|
||||
var labelType, useGradients, nativeTextSupport, animate, json, Mconsole = null, gType, tempNode = null, tempInit = false, tempNode2 = null, metacodeIMGinit = false, findOpen = false, analyzeOpen = false, organizeOpen = false;
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
|
@ -54,6 +54,7 @@ var labelType, useGradients, nativeTextSupport, animate, json, Mconsole = null,
|
|||
if (! sliding1) {
|
||||
sliding1 = true;
|
||||
if (userid != null) {
|
||||
$('.footer .menu').css('border','1px solid #000');
|
||||
$('.footer .menu').animate({
|
||||
height: '252px'
|
||||
}, 300, function() {
|
||||
|
@ -77,6 +78,7 @@ var labelType, useGradients, nativeTextSupport, animate, json, Mconsole = null,
|
|||
height: '0px'
|
||||
}, 300, function() {
|
||||
sliding1 = false;
|
||||
$('.footer .menu').css('border','none');
|
||||
});
|
||||
}
|
||||
},800);
|
||||
|
@ -114,18 +116,14 @@ function saveToMap() {
|
|||
|
||||
function addMetacode() {
|
||||
// code from http://www.professorcloud.com/mainsite/carousel-integration.htm
|
||||
//mouseWheel:true,
|
||||
if (!metacodeIMGinit) {
|
||||
$("#metacodeImg").CloudCarousel( {
|
||||
//reflHeight: 10,
|
||||
//reflGap: 2,
|
||||
$("#metacodeImg").CloudCarousel( {
|
||||
titleBox: $('#metacodeImgTitle'),
|
||||
//buttonLeft: $('#left-but'),
|
||||
//buttonRight: $('#right-but'),
|
||||
yRadius:40,
|
||||
xPos: 150,
|
||||
yPos: 40,
|
||||
speed:0.15,
|
||||
mouseWheel:true,
|
||||
speed:0.15,
|
||||
bringToFront: true
|
||||
});
|
||||
metacodeIMGinit = true;
|
||||
|
|
|
@ -146,9 +146,10 @@
|
|||
|
||||
clearTimeout(event.data.showFrontTextTimer);
|
||||
$(options.altBox).html( ($(event.target).attr('alt') ));
|
||||
$(options.titleBox).html( ($(event.target).attr('title') ));
|
||||
//$(options.titleBox).html( ($(event.target).attr('title') ));
|
||||
if ( options.bringToFront && event.type == 'click' )
|
||||
{
|
||||
$(options.titleBox).html( ($(event.target).attr('title') ));
|
||||
// METAMAPS CODE
|
||||
$('#topic_metacode').val($(event.target).attr('title'));
|
||||
// NOT METAMAPS CODE
|
||||
|
@ -187,6 +188,9 @@
|
|||
this.showFrontText = function()
|
||||
{
|
||||
if ( items[this.frontIndex] === undefined ) { return; } // Images might not have loaded yet.
|
||||
// METAMAPS CODE
|
||||
$('#topic_metacode').val($(items[this.frontIndex].image).attr('title'));
|
||||
// NOT METAMAPS CODE
|
||||
$(options.titleBox).html( $(items[this.frontIndex].image).attr('title'));
|
||||
$(options.altBox).html( $(items[this.frontIndex].image).attr('alt'));
|
||||
};
|
||||
|
|
|
@ -166,16 +166,6 @@ a {
|
|||
margin-left:90px;
|
||||
}
|
||||
|
||||
#left-but {
|
||||
position:absolute;
|
||||
left:50px;
|
||||
}
|
||||
|
||||
#right-but {
|
||||
position:absolute;
|
||||
right:50px;
|
||||
}
|
||||
|
||||
label, select, input, textarea {
|
||||
display:block;
|
||||
}
|
||||
|
@ -363,13 +353,11 @@ input[type="submit"] {
|
|||
margin-left:50px;
|
||||
}
|
||||
|
||||
/* --- styling the FIND section ---*/
|
||||
/* --- styling the sideOptions section ---*/
|
||||
.sideOption {
|
||||
position:fixed;
|
||||
top:25%;
|
||||
left:0px;
|
||||
display:block;
|
||||
width:45px;
|
||||
height:32px;
|
||||
background: url('bg.png') repeat 0 0;
|
||||
padding:0 0 0 15px;
|
||||
|
@ -381,13 +369,43 @@ input[type="submit"] {
|
|||
cursor:pointer;
|
||||
}
|
||||
|
||||
#closeFind {
|
||||
position:fixed;
|
||||
#sideOptionFind {
|
||||
top:25%;
|
||||
width:45px;
|
||||
}
|
||||
|
||||
#sideOptionAnalyze {
|
||||
top:35%;
|
||||
width:64px;
|
||||
display:none;
|
||||
}
|
||||
|
||||
#sideOptionOrganize {
|
||||
top:45%;
|
||||
width:75px;
|
||||
display:none;
|
||||
}
|
||||
|
||||
.closeSideOption {
|
||||
position:fixed;
|
||||
left:4px;
|
||||
display:none;
|
||||
margin-top:-20px;
|
||||
cursor:pointer;
|
||||
margin-top: -22px;
|
||||
cursor: pointer;
|
||||
background: #000;
|
||||
padding: 0 4px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
#closeFind {
|
||||
top:25%;
|
||||
}
|
||||
|
||||
#closeAnalyze {
|
||||
top:35%;
|
||||
}
|
||||
|
||||
#closeOrganize {
|
||||
top:45%;
|
||||
}
|
||||
|
||||
#findWhere {
|
||||
|
@ -504,6 +522,9 @@ input[type="submit"] {
|
|||
|
||||
#mainTitle {
|
||||
float: left;
|
||||
background: #000;
|
||||
padding: 0 5px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
#mainTitle a {
|
||||
|
@ -516,12 +537,13 @@ input[type="submit"] {
|
|||
|
||||
#beta {
|
||||
float:left;
|
||||
margin-left: 7px;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.footer .menu {
|
||||
display:block;
|
||||
position:absolute;
|
||||
border:none;
|
||||
bottom:40px;
|
||||
left:0;
|
||||
height:0px;
|
||||
|
|
2
app/assets/stylesheets/jquery-ui.css
vendored
2
app/assets/stylesheets/jquery-ui.css
vendored
|
@ -243,7 +243,7 @@ body .ui-tooltip { border-width: 2px; }
|
|||
.ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; }
|
||||
.ui-widget .ui-widget { font-size: 1em; }
|
||||
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; }
|
||||
.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; }
|
||||
.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; }
|
||||
.ui-widget-content a { color: #222222/*{fcContent}*/; }
|
||||
.ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; }
|
||||
.ui-widget-header a { color: #222222/*{fcHeader}*/; }
|
||||
|
|
|
@ -32,6 +32,8 @@ class MainController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
@topics.sort! { |a,b| a.name.downcase <=> b.name.downcase }
|
||||
|
||||
respond_to do |format|
|
||||
format.js { respond_with(@topics,@synapses) }
|
||||
end
|
||||
|
|
4
app/views/main/_analyze.html.erb
Normal file
4
app/views/main/_analyze.html.erb
Normal file
|
@ -0,0 +1,4 @@
|
|||
<span id="closeAnalyze" class="closeSideOption">close</span>
|
||||
<div class="sideOption" id="sideOptionAnalyze">
|
||||
<span class="find_key">Analyze...</span>
|
||||
</div>
|
76
app/views/main/_find.html.erb
Normal file
76
app/views/main/_find.html.erb
Normal file
|
@ -0,0 +1,76 @@
|
|||
<span id="closeFind" class="closeSideOption">close</span>
|
||||
<form id="findWhere">
|
||||
<span class="findWhereField onCanvas"><input type="checkbox" id="onCanvas"><p>On my Canvas</p></span>
|
||||
<span class="findWhereField inCommons"><input type="checkbox" id="inCommons" checked="checked"><p>In the Commons</p></span>
|
||||
</form>
|
||||
<div class="sideOption" id="sideOptionFind">
|
||||
<span class="find_key">Find...</span>
|
||||
<select class="select_content">
|
||||
<option value="topics" selected="selected">Topics</option>
|
||||
<!-- <option value="synapses">Synapses</option> -->
|
||||
<option value="maps">Maps</option>
|
||||
<option value="mappers">Mappers</option>
|
||||
</select>
|
||||
<span class="spacer">by</span>
|
||||
<select class="select_type">
|
||||
<option value="name" selected="selected">name</option>
|
||||
<option value="metacode">metacode</option>
|
||||
<option value="map (by name)">map (by name)</option>
|
||||
<option value="mapper (by name)">mapper (by name)</option>
|
||||
</select>
|
||||
<div class="clearfloat"></div>
|
||||
<%= form_for Topic.new, :html => { :class => "find_topic_by_name find find_topic", :id => "find_topic_by_name" } do |f| %>
|
||||
<%= f.autocomplete_field :name, autocomplete_topic_name_topics_path, :id => "topic_by_name_input", :placeholder => "Search for topics..." %>
|
||||
<% end %>
|
||||
<%= form_for Map.new, :html => { :class => "find_map_by_name find", :id => "find_map_by_name" } do |f| %>
|
||||
<%= f.autocomplete_field :name, autocomplete_map_name_maps_path, :id => "map_by_name_input", :placeholder => "Search for maps..." %>
|
||||
<% end %>
|
||||
<%= form_for User.new, :html => { :class => "find_mapper_by_name find", :id => "find_mapper_by_name" } do |f| %>
|
||||
<%= f.autocomplete_field :name, autocomplete_user_name_users_path, :id => "mapper_by_name_input", :placeholder => "Search for mappers..." %>
|
||||
<% end %>
|
||||
<div class="find_topic_by_metacode find find_topic" id="find_topic_by_metacode">
|
||||
<ul id="filters-one">
|
||||
<li id="showAll">Show All</li>
|
||||
<li><img src="/assets/action.png" alt="Action" /><p>action</p></li>
|
||||
<li><img src="/assets/activity.png" alt="Activity" /><p>activity</p></li>
|
||||
<li><img src="/assets/bizarre.png" alt="Bizarre" /><p>bizarre</p></li>
|
||||
<li><img src="/assets/catalyst.png" alt="Catalyst" /><p>catalyst</p></li>
|
||||
<li><img src="/assets/closed.png" alt="Closed" /><p>closed</p></li>
|
||||
<li><img src="/assets/experience.png" alt="Experience" /><p>experience</p></li>
|
||||
<li><img src="/assets/futuredev.png" alt="Future Dev" /><p>future dev</p></li>
|
||||
<li><img src="/assets/group.png" alt="Group" /><p>group</p></li>
|
||||
<li><img src="/assets/idea.png" alt="Idea" /><p>idea</p></li>
|
||||
</ul>
|
||||
<ul id="filters-two">
|
||||
<li id="hideAll">Hide All</li>
|
||||
<li><img src="/assets/implication.png" alt="Implication" /><p>implication</p></li>
|
||||
<li><img src="/assets/insight.png" alt="Insight" /><p>insight</p></li>
|
||||
<li><img src="/assets/intention.png" alt="Intention" /><p>intention</p></li>
|
||||
<li><img src="/assets/knowledge.png" alt="Knowledge" /><p>knowledge</p></li>
|
||||
<li><img src="/assets/location.png" alt="Location" /><p>location</p></li>
|
||||
<li><img src="/assets/openissue.png" alt="Open Issue" /><p>open issue</p></li>
|
||||
<li><img src="/assets/opinion.png" alt="Opinion" /><p>opinion</p></li>
|
||||
<li><img src="/assets/opportunity.png" alt="Opportunity" /><p>opportunity</p></li>
|
||||
<li><img src="/assets/person.png" alt="Person" /><p>person</p></li>
|
||||
</ul>
|
||||
<ul id="filters-three">
|
||||
<li><img src="/assets/platform.png" alt="Platform" /><p>platform</p></li>
|
||||
<li><img src="/assets/problem.png" alt="Problem" /><p>problem</p></li>
|
||||
<li><img src="/assets/question.png" alt="Question" /><p>question</p></li>
|
||||
<li><img src="/assets/reference.png" alt="Reference" /><p>reference</p></li>
|
||||
<li><img src="/assets/requirement.png" alt="Requirement" /><p>requirement</p></li>
|
||||
<li><img src="/assets/resource.png" alt="Resource" /><p>resource</p></li>
|
||||
<li><img src="/assets/role.png" alt="Role" /><p>role</p></li>
|
||||
<li><img src="/assets/task.png" alt="Task" /><p>task</p></li>
|
||||
<li><img src="/assets/tool.png" alt="Tool" /><p>tool</p></li>
|
||||
<li><img src="/assets/trajectory.png" alt="Trajectory" /><p>trajectory</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
<%= form_tag("/search", :method => "get", :id => 'get_topics_form', :class => 'get_topics_form', :remote => true) do %>
|
||||
<%= text_field_tag(:topics_by_name, "", :id => "topicsByName", :class => "getTopicsInput") %>
|
||||
<%= text_field_tag(:topics_by_user_id, "", :id => "topicsByUser", :class => "getTopicsInput") %>
|
||||
<%= text_field_tag(:topics_by_map_id, "", :id => "topicsByMap", :class => "getTopicsInput") %>
|
||||
<%= text_field_tag(:synapses_by_user_id, "", :id => "synapsesByUser", :class => "getTopicsInput") %>
|
||||
<%= text_field_tag(:synapses_by_map_id, "", :id => "synapsesByMap", :class => "getTopicsInput") %>
|
||||
<% end %>
|
||||
</div>
|
5
app/views/main/_organize.html.erb
Normal file
5
app/views/main/_organize.html.erb
Normal file
|
@ -0,0 +1,5 @@
|
|||
<span id="closeOrganize" class="closeSideOption">close</span>
|
||||
<div class="sideOption" id="sideOptionOrganize">
|
||||
<!-- <span class="find_key" onclick="setTimeout(function(){organize();},0)">Organize...</span> -->
|
||||
<span class="find_key">Organize...</span>
|
||||
</div>
|
|
@ -22,79 +22,6 @@
|
|||
//}
|
||||
</script>
|
||||
|
||||
<span id="closeFind">close</span>
|
||||
<form id="findWhere">
|
||||
<span class="findWhereField onCanvas"><input type="checkbox" id="onCanvas"><p>On my Canvas</p></span>
|
||||
<span class="findWhereField inCommons"><input type="checkbox" id="inCommons" checked="checked"><p>In the Commons</p></span>
|
||||
</form>
|
||||
<div class="sideOption" id="sideOptionFind">
|
||||
<span class="find_key">Find...</span>
|
||||
<select class="select_content">
|
||||
<option value="topics" selected="selected">Topics</option>
|
||||
<!-- <option value="synapses">Synapses</option> -->
|
||||
<option value="maps">Maps</option>
|
||||
<option value="mappers">Mappers</option>
|
||||
</select>
|
||||
<span class="spacer">by</span>
|
||||
<select class="select_type">
|
||||
<option value="name" selected="selected">name</option>
|
||||
<option value="metacode">metacode</option>
|
||||
<option value="map (by name)">map (by name)</option>
|
||||
<option value="mapper (by name)">mapper (by name)</option>
|
||||
</select>
|
||||
<div class="clearfloat"></div>
|
||||
<%= form_for Topic.new, :html => { :class => "find_topic_by_name find find_topic", :id => "find_topic_by_name" } do |f| %>
|
||||
<%= f.autocomplete_field :name, autocomplete_topic_name_topics_path, :id => "topic_by_name_input", :placeholder => "Search for topics..." %>
|
||||
<% end %>
|
||||
<%= form_for Map.new, :html => { :class => "find_map_by_name find", :id => "find_map_by_name" } do |f| %>
|
||||
<%= f.autocomplete_field :name, autocomplete_map_name_maps_path, :id => "map_by_name_input", :placeholder => "Search for maps..." %>
|
||||
<% end %>
|
||||
<%= form_for User.new, :html => { :class => "find_mapper_by_name find", :id => "find_mapper_by_name" } do |f| %>
|
||||
<%= f.autocomplete_field :name, autocomplete_user_name_users_path, :id => "mapper_by_name_input", :placeholder => "Search for mappers..." %>
|
||||
<% end %>
|
||||
<div class="find_topic_by_metacode find find_topic" id="find_topic_by_metacode">
|
||||
<ul id="filters-one">
|
||||
<li id="showAll">Show All</li>
|
||||
<li><img src="/assets/action.png" alt="Action" /><p>action</p></li>
|
||||
<li><img src="/assets/activity.png" alt="Activity" /><p>activity</p></li>
|
||||
<li><img src="/assets/bizarre.png" alt="Bizarre" /><p>bizarre</p></li>
|
||||
<li><img src="/assets/catalyst.png" alt="Catalyst" /><p>catalyst</p></li>
|
||||
<li><img src="/assets/closed.png" alt="Closed" /><p>closed</p></li>
|
||||
<li><img src="/assets/experience.png" alt="Experience" /><p>experience</p></li>
|
||||
<li><img src="/assets/futuredev.png" alt="Future Dev" /><p>future dev</p></li>
|
||||
<li><img src="/assets/group.png" alt="Group" /><p>group</p></li>
|
||||
<li><img src="/assets/idea.png" alt="Idea" /><p>idea</p></li>
|
||||
</ul>
|
||||
<ul id="filters-two">
|
||||
<li id="hideAll">Hide All</li>
|
||||
<li><img src="/assets/implication.png" alt="Implication" /><p>implication</p></li>
|
||||
<li><img src="/assets/insight.png" alt="Insight" /><p>insight</p></li>
|
||||
<li><img src="/assets/intention.png" alt="Intention" /><p>intention</p></li>
|
||||
<li><img src="/assets/knowledge.png" alt="Knowledge" /><p>knowledge</p></li>
|
||||
<li><img src="/assets/location.png" alt="Location" /><p>location</p></li>
|
||||
<li><img src="/assets/openissue.png" alt="Open Issue" /><p>open issue</p></li>
|
||||
<li><img src="/assets/opinion.png" alt="Opinion" /><p>opinion</p></li>
|
||||
<li><img src="/assets/opportunity.png" alt="Opportunity" /><p>opportunity</p></li>
|
||||
<li><img src="/assets/person.png" alt="Person" /><p>person</p></li>
|
||||
</ul>
|
||||
<ul id="filters-three">
|
||||
<li><img src="/assets/platform.png" alt="Platform" /><p>platform</p></li>
|
||||
<li><img src="/assets/problem.png" alt="Problem" /><p>problem</p></li>
|
||||
<li><img src="/assets/question.png" alt="Question" /><p>question</p></li>
|
||||
<li><img src="/assets/reference.png" alt="Reference" /><p>reference</p></li>
|
||||
<li><img src="/assets/requirement.png" alt="Requirement" /><p>requirement</p></li>
|
||||
<li><img src="/assets/resource.png" alt="Resource" /><p>resource</p></li>
|
||||
<li><img src="/assets/role.png" alt="Role" /><p>role</p></li>
|
||||
<li><img src="/assets/task.png" alt="Task" /><p>task</p></li>
|
||||
<li><img src="/assets/tool.png" alt="Tool" /><p>tool</p></li>
|
||||
<li><img src="/assets/trajectory.png" alt="Trajectory" /><p>trajectory</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
<%= form_tag("/search", :method => "get", :id => 'get_topics_form', :class => 'get_topics_form', :remote => true) do %>
|
||||
<%= text_field_tag(:topics_by_name, "", :id => "topicsByName", :class => "getTopicsInput") %>
|
||||
<%= text_field_tag(:topics_by_user_id, "", :id => "topicsByUser", :class => "getTopicsInput") %>
|
||||
<%= text_field_tag(:topics_by_map_id, "", :id => "topicsByMap", :class => "getTopicsInput") %>
|
||||
<%= text_field_tag(:synapses_by_user_id, "", :id => "synapsesByUser", :class => "getTopicsInput") %>
|
||||
<%= text_field_tag(:synapses_by_map_id, "", :id => "synapsesByMap", :class => "getTopicsInput") %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= render :partial => 'find' %>
|
||||
<%= render :partial => 'analyze' %>
|
||||
<%= render :partial => 'organize' %>
|
File diff suppressed because one or more lines are too long
BIN
public/assets/application-3e80071896c78216a0cc83e1e6eaa16e.js.gz
Normal file
BIN
public/assets/application-3e80071896c78216a0cc83e1e6eaa16e.js.gz
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -50,6 +50,6 @@ topbg2.png: topbg2-f9640f6cb183bb610d0954c7759ecc23.png
|
|||
trajectory.png: trajectory-a7c520e746d4c1ffe401805b3d0cb6cd.png
|
||||
ui-bg_flat_75_ffffff_40x100.png: ui-bg_flat_75_ffffff_40x100-841636c8f8d33987bb8d2f31e8ef92ca.png
|
||||
wildcard.png: wildcard-22dead854b0b5f4ec0aba7a05425839e.png
|
||||
application.js: application-727943ef0ab1fc3354175dc813ca2a24.js
|
||||
application.js: application-3e80071896c78216a0cc83e1e6eaa16e.js
|
||||
scroll/mCSB_buttons.png: scroll/mCSB_buttons-6eb1e766df3b6b28f5cb2a218697658f.png
|
||||
application.css: application-806f5b2e0a29558d6594da7a9da5a288.css
|
||||
application.css: application-a0860fc2dda825869cb971e7d6e60acf.css
|
||||
|
|
Loading…
Reference in a new issue