ok you can now create mappings only if logged in and it's wonderful and you can double click things and closing the seek... tab destroys your search results
This commit is contained in:
parent
0280b5bb21
commit
e0e505de1d
3 changed files with 38 additions and 35 deletions
|
@ -528,16 +528,13 @@ function openFind() {
|
|||
}
|
||||
|
||||
function closeFind() {
|
||||
clearFoundData();
|
||||
|
||||
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);
|
||||
}
|
||||
$('#closeFind, #findWhere').css('display','none');
|
||||
$('#sideOptionFind').css('cursor','pointer');
|
||||
$('#sideOptionFind').animate({
|
||||
width: '45px',
|
||||
height: '32px'
|
||||
}, 100);
|
||||
}//closeFind
|
||||
|
|
|
@ -33,6 +33,10 @@ function nodeDoubleClickHandler(node, e) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (userid == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
node.setData('inCommons', false);
|
||||
deselectNode(node);
|
||||
if (window.mapid) {
|
||||
|
|
|
@ -14,33 +14,35 @@ class MappingsController < ApplicationController
|
|||
|
||||
# POST mappings
|
||||
def create
|
||||
@mapping = Mapping.new()
|
||||
@user = current_user
|
||||
if @user
|
||||
@mapping = Mapping.new()
|
||||
|
||||
//TODO authenticate and put a user
|
||||
@mapping.user = @user
|
||||
@mapping.xloc = params[:xloc] if params[:xloc]
|
||||
@mapping.yloc = params[:yloc] if params[:yloc]
|
||||
|
||||
@mapping.xloc = params[:xloc] if params[:xloc]
|
||||
@mapping.yloc = params[:yloc] if params[:yloc]
|
||||
|
||||
if params[:map]
|
||||
if params[:map][:id]
|
||||
@map = Map.find(params[:map][:id])
|
||||
@mapping.map = @map
|
||||
if params[:map]
|
||||
if params[:map][:id]
|
||||
@map = Map.find(params[:map][:id])
|
||||
@mapping.map = @map
|
||||
end
|
||||
end
|
||||
if params[:topic]
|
||||
if params[:topic][:id]
|
||||
@topic = Topic.find(params[:topic][:id])
|
||||
@mapping.topic = @topic
|
||||
@mapping.category = "Topic"
|
||||
end
|
||||
elsif params[:synapse]
|
||||
if params[:synapse][:id]
|
||||
@topic = Synapse.find(params[:synapse][:id])
|
||||
@mapping.synapse = @synapse
|
||||
@mapping.category = "Synapse"
|
||||
end
|
||||
end
|
||||
@mapping.save()
|
||||
end
|
||||
if params[:topic]
|
||||
if params[:topic][:id]
|
||||
@topic = Topic.find(params[:topic][:id])
|
||||
@mapping.topic = @topic
|
||||
@mapping.category = "Topic"
|
||||
end
|
||||
elsif params[:synapse]
|
||||
if params[:synapse][:id]
|
||||
@topic = Synapse.find(params[:synapse][:id])
|
||||
@mapping.synapse = @synapse
|
||||
@mapping.category = "Synapse"
|
||||
end
|
||||
end
|
||||
@mapping.save()
|
||||
end
|
||||
|
||||
# GET /mappings/:id
|
||||
|
|
Loading…
Reference in a new issue