Merge branch 'master' of github.com:Connoropolous/metamaps_gen002

This commit is contained in:
Connor Turland 2013-03-17 05:20:12 -04:00
commit 41333c1991
3 changed files with 17 additions and 4 deletions

View file

@ -61,6 +61,9 @@ function nodeDoubleClickHandler(node, e) {
}//doubleClickNodeHandler
/*
* Returns a boolean saying if the node was double clicked in our understanding of the word
*/
function nodeWasDoubleClicked() {
//grab the timestamp of the click
var storedTime = MetamapsModel.lastNodeClick;

View file

@ -5,7 +5,17 @@ class SynapsesController < ApplicationController
respond_to :html, :js, :json
autocomplete :synapse, :desc, :full => true
def autocomplete_synapse_desc
term = params[:term]
if term && !term.empty?
items = Synapse.select('DISTINCT "desc"').
where('LOWER("desc") like ?', term.downcase + '%').
limit(10).order('"desc"')
else
items = {}
end
render :json => json_for_autocomplete(items, :desc)
end
# GET synapses
# or GET users/:user_id/synapses

View file

@ -72,7 +72,7 @@ if (!$.isEmptyObject(Mconsole.graph.nodes)) {
modes: ['node-property:dim'],
duration: 500,
onComplete: function() {
selectNodeOnClickHandler(temp);
selectNode(temp);
}
});
@ -101,7 +101,7 @@ if (!$.isEmptyObject(Mconsole.graph.nodes)) {
modes: ['node-property:dim'],
duration: 500,
onComplete: function() {
selectNodeOnClickHandler(temp);
selectNode(temp);
}
});
}