fix up right click menu's metacode editing

This commit is contained in:
Devin Howard 2017-02-18 19:27:09 -08:00
parent e5abeb7eff
commit cf7a8addd4
2 changed files with 11 additions and 12 deletions

View file

@ -1250,7 +1250,7 @@ h3.filterBox {
box-shadow: 0px 3px 3px rgba(0,0,0,0.12), 0 3px 3px rgba(0,0,0,0.24);
}
.rightclickmenu .rc-permission:hover > ul,
.rightclickmenu .rc-metacode:hover > ul,
.rightclickmenu .rc-metacode:hover #metacodeOptions > ul,
.rightclickmenu .rc-siblings:hover > ul {
display: block;
}

View file

@ -1480,11 +1480,16 @@ const JIT = {
ReactDOM.render(
React.createElement(MetacodeSelect, {
onMetacodeSelect: metacodeId => {
if (Selected.Nodes.length > 1) {
// batch update multiple topics
Control.updateSelectedMetacodes(metacodeId)
} else {
const topic = DataModel.Topics.get(node.id)
topic.save({
metacode_id: metacodeId
})
Visulaize.mGraph.plot()
}
$(rightclickmenu).remove()
},
metacodeSets: TopicCard.metacodeSets
}),
@ -1537,12 +1542,6 @@ const JIT = {
Control.updateSelectedPermissions($(this).text())
})
// change the metacode of all the selected nodes that you have edit permission for
$('.rc-metacode li li').click(function() {
$('.rightclickmenu').remove()
Control.updateSelectedMetacodes($(this).attr('data-id'))
})
// fetch relatives
let fetchSent = false
$('.rc-siblings').hover(function() {