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() {
|
function closeFind() {
|
||||||
|
clearFoundData();
|
||||||
|
|
||||||
findOpen = false;
|
findOpen = false;
|
||||||
Mconsole.graph.eachNode( function (n) {
|
|
||||||
n.setData('inCommons', false);
|
|
||||||
n.setData('onCanvas', false);
|
|
||||||
});
|
|
||||||
Mconsole.plot();
|
|
||||||
$('#closeFind, #findWhere').css('display','none');
|
$('#closeFind, #findWhere').css('display','none');
|
||||||
$('#sideOptionFind').css('cursor','pointer');
|
$('#sideOptionFind').css('cursor','pointer');
|
||||||
$('#sideOptionFind').animate({
|
$('#sideOptionFind').animate({
|
||||||
width: '45px',
|
width: '45px',
|
||||||
height: '32px'
|
height: '32px'
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}//closeFind
|
||||||
|
|
|
@ -33,6 +33,10 @@ function nodeDoubleClickHandler(node, e) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (userid == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
node.setData('inCommons', false);
|
node.setData('inCommons', false);
|
||||||
deselectNode(node);
|
deselectNode(node);
|
||||||
if (window.mapid) {
|
if (window.mapid) {
|
||||||
|
|
|
@ -14,10 +14,11 @@ class MappingsController < ApplicationController
|
||||||
|
|
||||||
# POST mappings
|
# POST mappings
|
||||||
def create
|
def create
|
||||||
|
@user = current_user
|
||||||
|
if @user
|
||||||
@mapping = Mapping.new()
|
@mapping = Mapping.new()
|
||||||
|
|
||||||
//TODO authenticate and put a user
|
@mapping.user = @user
|
||||||
|
|
||||||
@mapping.xloc = params[:xloc] if params[:xloc]
|
@mapping.xloc = params[:xloc] if params[:xloc]
|
||||||
@mapping.yloc = params[:yloc] if params[:yloc]
|
@mapping.yloc = params[:yloc] if params[:yloc]
|
||||||
|
|
||||||
|
@ -42,6 +43,7 @@ class MappingsController < ApplicationController
|
||||||
end
|
end
|
||||||
@mapping.save()
|
@mapping.save()
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# GET /mappings/:id
|
# GET /mappings/:id
|
||||||
def show
|
def show
|
||||||
|
|
Loading…
Reference in a new issue