diff --git a/app/assets/javascripts/metamaps/Metamaps.Router.js b/app/assets/javascripts/metamaps/Metamaps.Router.js index 812b9108..7ecb49b3 100644 --- a/app/assets/javascripts/metamaps/Metamaps.Router.js +++ b/app/assets/javascripts/metamaps/Metamaps.Router.js @@ -14,7 +14,7 @@ }); Metamaps.Router = new Router(); Metamaps.Router.init = function () { - Backbone.history.start({ + /*Backbone.history.start({ pushState: true, root: '' }); @@ -30,6 +30,6 @@ evt.preventDefault(); Backbone.history.navigate(href.attr, true); } - }); + });*/ } })(); \ No newline at end of file diff --git a/app/assets/javascripts/metamaps/metamaps.js b/app/assets/javascripts/metamaps/metamaps.js index cc796c14..ea0addf8 100644 --- a/app/assets/javascripts/metamaps/metamaps.js +++ b/app/assets/javascripts/metamaps/metamaps.js @@ -132,13 +132,6 @@ Metamaps.Backbone.init = function () { topic_id: this.isNew() ? this.cid : this.id }); }, - updateMapping: function () { - var mapping = this.getMapping(); - - if (mapping) { - mapping.set('topic_id', this.id); - } - }, createNode: function () { var mapping; var node = { @@ -229,13 +222,6 @@ Metamaps.Backbone.init = function () { synapse_id: this.isNew() ? this.cid : this.id }); }, - updateMapping: function () { - var mapping = this.getMapping(); - - if (mapping) { - mapping.set('synapse_id', this.id); - } - }, createEdge: function () { var mapping, mappingID; var synapseID = this.isNew() ? this.cid : this.id; @@ -2261,8 +2247,8 @@ Metamaps.Topic = { } else { Metamaps.Visualize.mGraph.loadJSON(newnode); nodeOnViz = Metamaps.Visualize.mGraph.graph.getNode(newnode.id); - mapping.set('node', nodeOnViz); - mapping.updateNode(); // links the topic and the mapping to the node + topic.set('node', nodeOnViz); + topic.updateNode(); // links the topic and the mapping to the node nodeOnViz.setData("dim", 1, "start"); nodeOnViz.setData("dim", 25, "end"); @@ -2283,9 +2269,8 @@ Metamaps.Topic = { if (topic.isNew()) { topic.save(null, { success: function (topicModel, response) { - topicModel.updateMapping(); if (Metamaps.Active.Map) { - mapping.save(); + mapping.save({ topic_id: topicModel.id }); } }, error: function (model, response) { @@ -2401,9 +2386,8 @@ Metamaps.Synapse = { if (synapse.isNew()) { synapse.save(null, { success: function (synapseModel, response) { - synapseModel.updateMapping(); if (Metamaps.Active.Map) { - mapping.save(); + mapping.save({ synapse_id: synapseModel.id }); } }, error: function (model, response) { diff --git a/app/views/main/home.html.erb b/app/views/main/home.html.erb index 501a75ff..dc485e1a 100644 --- a/app/views/main/home.html.erb +++ b/app/views/main/home.html.erb @@ -101,11 +101,10 @@ $(document).ready(function() {
Displaying:
- + Yours / Recently Active / Featured / Newest First - / Yours