Merge remote-tracking branch 'origin/develop' into new
This commit is contained in:
commit
a939e7ef23
2 changed files with 3 additions and 20 deletions
|
@ -132,13 +132,6 @@ Metamaps.Backbone.init = function () {
|
||||||
topic_id: this.isNew() ? this.cid : this.id
|
topic_id: this.isNew() ? this.cid : this.id
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
updateMapping: function () {
|
|
||||||
var mapping = this.getMapping();
|
|
||||||
|
|
||||||
if (mapping) {
|
|
||||||
mapping.set('topic_id', this.id);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
createNode: function () {
|
createNode: function () {
|
||||||
var mapping;
|
var mapping;
|
||||||
var node = {
|
var node = {
|
||||||
|
@ -229,13 +222,6 @@ Metamaps.Backbone.init = function () {
|
||||||
synapse_id: this.isNew() ? this.cid : this.id
|
synapse_id: this.isNew() ? this.cid : this.id
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
updateMapping: function () {
|
|
||||||
var mapping = this.getMapping();
|
|
||||||
|
|
||||||
if (mapping) {
|
|
||||||
mapping.set('synapse_id', this.id);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
createEdge: function () {
|
createEdge: function () {
|
||||||
var mapping, mappingID;
|
var mapping, mappingID;
|
||||||
var synapseID = this.isNew() ? this.cid : this.id;
|
var synapseID = this.isNew() ? this.cid : this.id;
|
||||||
|
@ -2283,9 +2269,8 @@ Metamaps.Topic = {
|
||||||
if (topic.isNew()) {
|
if (topic.isNew()) {
|
||||||
topic.save(null, {
|
topic.save(null, {
|
||||||
success: function (topicModel, response) {
|
success: function (topicModel, response) {
|
||||||
topicModel.updateMapping();
|
|
||||||
if (Metamaps.Active.Map) {
|
if (Metamaps.Active.Map) {
|
||||||
mapping.save();
|
mapping.save({ topic_id: topicModel.id });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function (model, response) {
|
error: function (model, response) {
|
||||||
|
@ -2401,9 +2386,8 @@ Metamaps.Synapse = {
|
||||||
if (synapse.isNew()) {
|
if (synapse.isNew()) {
|
||||||
synapse.save(null, {
|
synapse.save(null, {
|
||||||
success: function (synapseModel, response) {
|
success: function (synapseModel, response) {
|
||||||
synapseModel.updateMapping();
|
|
||||||
if (Metamaps.Active.Map) {
|
if (Metamaps.Active.Map) {
|
||||||
mapping.save();
|
mapping.save({ synapse_id: synapseModel.id });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function (model, response) {
|
error: function (model, response) {
|
||||||
|
|
|
@ -101,11 +101,10 @@ $(document).ready(function() {
|
||||||
<div class="mapOrder">
|
<div class="mapOrder">
|
||||||
<span class="displaying">Displaying:</span>
|
<span class="displaying">Displaying:</span>
|
||||||
<div class="whichMaps">
|
<div class="whichMaps">
|
||||||
|
<a href="/maps/mappers/<%= @current.id %>" class="active">Yours</a> /
|
||||||
<a href="/explore/active">Recently Active</a> /
|
<a href="/explore/active">Recently Active</a> /
|
||||||
<a href="/explore/featured">Featured</a> /
|
<a href="/explore/featured">Featured</a> /
|
||||||
<a href="/explore/new">Newest First</a>
|
<a href="/explore/new">Newest First</a>
|
||||||
/ <a href="/maps/mappers/<%= @current.id %>" class="active">Yours</a>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfloat"></div>
|
<div class="clearfloat"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue