diff --git a/app/assets/javascripts/Jit/graphsettings-event-handlers.js b/app/assets/javascripts/Jit/graphsettings-event-handlers.js index 4f7f7824..9a618fd0 100644 --- a/app/assets/javascripts/Jit/graphsettings-event-handlers.js +++ b/app/assets/javascripts/Jit/graphsettings-event-handlers.js @@ -29,15 +29,14 @@ function selectEdgeOnClickHandler(adj, e) { }//selectEdgeOnClickHandler function nodeDoubleClickHandler(node, e) { - node.setData('onCanvas', true); node.setData('inCommons', false); + deselectNode(node); console.log("Here's the node you clicked:"); console.log(node); - //if ($('.maps.onMap').length > 0 && node.getData('mappingid')) { - // //TODO - // var mappingId = createAMapping(alert('unimp')); - // node.setData('mappingid', mappingId); - //} + if ($('.maps.onMap').length > 0) { + //TODO var mappingId = createAMapping(alert('unimp')); + //node.setData('mappingid', mappingId); + } }//doubleClickNodeHandler function nodeWasDoubleClicked() { diff --git a/app/assets/javascripts/mapping.js.coffee b/app/assets/javascripts/mapping.js.coffee new file mode 100644 index 00000000..76156794 --- /dev/null +++ b/app/assets/javascripts/mapping.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/stylesheets/mapping.css.scss b/app/assets/stylesheets/mapping.css.scss new file mode 100644 index 00000000..afacf549 --- /dev/null +++ b/app/assets/stylesheets/mapping.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the mapping controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/helpers/mapping_helper.rb b/app/helpers/mapping_helper.rb new file mode 100644 index 00000000..7055739f --- /dev/null +++ b/app/helpers/mapping_helper.rb @@ -0,0 +1,2 @@ +module MappingHelper +end diff --git a/app/views/mapping/new.html.erb b/app/views/mapping/new.html.erb new file mode 100644 index 00000000..6fba56ad --- /dev/null +++ b/app/views/mapping/new.html.erb @@ -0,0 +1,2 @@ +
Find me in app/views/mapping/new.html.erb
diff --git a/test/functional/mapping_controller_test.rb b/test/functional/mapping_controller_test.rb new file mode 100644 index 00000000..59fc534a --- /dev/null +++ b/test/functional/mapping_controller_test.rb @@ -0,0 +1,9 @@ +require 'test_helper' + +class MappingControllerTest < ActionController::TestCase + test "should get new" do + get :new + assert_response :success + end + +end diff --git a/test/unit/helpers/mapping_helper_test.rb b/test/unit/helpers/mapping_helper_test.rb new file mode 100644 index 00000000..5768ae1b --- /dev/null +++ b/test/unit/helpers/mapping_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class MappingHelperTest < ActionView::TestCase +end