added right click keyboard shortcuts and spacer/border
This commit is contained in:
parent
f6fdd72cf8
commit
7cc6fb6c2d
4 changed files with 41 additions and 9 deletions
|
@ -1322,9 +1322,9 @@ Metamaps.JIT = {
|
|||
|
||||
var disabled = authorized ? "" : "disabled";
|
||||
|
||||
if (Metamaps.Active.Map) menustring += '<li class="rc-hide"><div class="rc-icon"></div>Hide until refresh</li>';
|
||||
if (Metamaps.Active.Map && Metamaps.Active.Mapper) menustring += '<li class="rc-remove ' + disabled + '"><div class="rc-icon"></div>Remove from map</li>';
|
||||
if (Metamaps.Active.Map && Metamaps.Active.Mapper) menustring += '<li class="rc-delete ' + disabled + '"><div class="rc-icon"></div>Delete</li>';
|
||||
if (Metamaps.Active.Map) menustring += '<li class="rc-hide"><div class="rc-icon"></div>Hide until refresh<div class="rc-keyboard">Ctrl+H</div></li>';
|
||||
if (Metamaps.Active.Map && Metamaps.Active.Mapper) menustring += '<li class="rc-remove ' + disabled + '"><div class="rc-icon"></div>Remove from map<div class="rc-keyboard">Ctrl+M</div></li>';
|
||||
if (Metamaps.Active.Map && Metamaps.Active.Mapper) menustring += '<li class="rc-delete ' + disabled + '"><div class="rc-icon"></div>Delete<div class="rc-keyboard">Ctrl+D</div></li>';
|
||||
|
||||
|
||||
if (Metamaps.Active.Topic) {
|
||||
|
@ -1337,6 +1337,8 @@ Metamaps.JIT = {
|
|||
<li class="changeP toPrivate"><div class="rc-perm-icon"></div>private</li> \
|
||||
</ul>';
|
||||
|
||||
menustring += '<li class="rc-spacer"></li>';
|
||||
|
||||
menustring += '<li class="rc-permission"><div class="rc-icon"></div>Change permissions' + options + '<div class="expandLi"></div></li>';
|
||||
|
||||
var metacodeOptions = $('#metacodeOptions').html();
|
||||
|
@ -1344,6 +1346,11 @@ Metamaps.JIT = {
|
|||
menustring += '<li class="rc-metacode"><div class="rc-icon"></div>Change metacode' + metacodeOptions + '<div class="expandLi"></div></li>';
|
||||
}
|
||||
if (Metamaps.Active.Topic) {
|
||||
|
||||
if (!Metamaps.Active.Mapper) {
|
||||
menustring += '<li class="rc-spacer"></li>';
|
||||
}
|
||||
|
||||
// set up the get sibling menu as a "lazy load"
|
||||
// only fill in the submenu when they hover over the get siblings list item
|
||||
var siblingMenu = '<ul id="fetchSiblingList"> \
|
||||
|
@ -1575,9 +1582,11 @@ Metamaps.JIT = {
|
|||
|
||||
var disabled = authorized ? "" : "disabled";
|
||||
|
||||
if (Metamaps.Active.Map) menustring += '<li class="rc-hide"><div class="rc-icon"></div>Hide until refresh</li>';
|
||||
if (Metamaps.Active.Map && Metamaps.Active.Mapper) menustring += '<li class="rc-remove ' + disabled + '"><div class="rc-icon"></div>Remove from map</li>';
|
||||
if (Metamaps.Active.Map && Metamaps.Active.Mapper) menustring += '<li class="rc-delete ' + disabled + '"><div class="rc-icon"></div>Delete</li>';
|
||||
if (Metamaps.Active.Map) menustring += '<li class="rc-hide"><div class="rc-icon"></div>Hide until refresh<div class="rc-keyboard">Ctrl+H</div></li>';
|
||||
if (Metamaps.Active.Map && Metamaps.Active.Mapper) menustring += '<li class="rc-remove ' + disabled + '"><div class="rc-icon"></div>Remove from map<div class="rc-keyboard">Ctrl+M</div></li>';
|
||||
if (Metamaps.Active.Map && Metamaps.Active.Mapper) menustring += '<li class="rc-delete ' + disabled + '"><div class="rc-icon"></div>Delete<div class="rc-keyboard">Ctrl+D</div></li>';
|
||||
|
||||
if (Metamaps.Active.Map && Metamaps.Active.Mapper) menustring += '<li class="rc-spacer"></li>';
|
||||
|
||||
if (Metamaps.Active.Mapper) {
|
||||
var permOptions = '<ul><li class="changeP toCommons"><div class="rc-perm-icon"></div>commons</li> \
|
||||
|
|
|
@ -1316,7 +1316,12 @@ Metamaps.SynapseCard = {
|
|||
|
||||
//if edge data is blank or just whitespace, populate it with data_nil
|
||||
if ($('#edit_synapse_desc').html().trim() == '') {
|
||||
$('#edit_synapse_desc').html(data_nil);
|
||||
if (synapse.authorizeToEdit(Metamaps.Active.Mapper)) {
|
||||
$('#edit_synapse_desc').html(data_nil);
|
||||
}
|
||||
else {
|
||||
$('#edit_synapse_desc').html("(no description)");
|
||||
}
|
||||
}
|
||||
|
||||
$('#edit_synapse_desc').bind("ajax:success", function () {
|
||||
|
@ -3537,7 +3542,9 @@ Metamaps.Listeners = {
|
|||
case 69: //if e or E is pressed
|
||||
if (e.ctrlKey){
|
||||
e.preventDefault();
|
||||
Metamaps.JIT.zoomExtents(null, Metamaps.Visualize.mGraph.canvas);
|
||||
if (Metamaps.Active.Map) {
|
||||
Metamaps.JIT.zoomExtents(null, Metamaps.Visualize.mGraph.canvas);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 77: //if m or M is pressed
|
||||
|
|
|
@ -1177,6 +1177,14 @@ h3.realtimeBoxTitle {
|
|||
color: black;
|
||||
box-shadow: 0px 3px 3px rgba(0,0,0,0.12), 0 3px 3px rgba(0,0,0,0.24);
|
||||
}
|
||||
|
||||
.rightclickmenu .rc-spacer {
|
||||
width:100%;
|
||||
height:0;
|
||||
border-top:1px solid #EBEBEB;
|
||||
margin: 6px 0;
|
||||
padding: 0;
|
||||
}
|
||||
.rightclickmenu > ul {
|
||||
|
||||
}
|
||||
|
@ -1199,6 +1207,14 @@ h3.realtimeBoxTitle {
|
|||
background-color: transparent;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.rc-keyboard {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
right: 12px;
|
||||
color: #757575;
|
||||
}
|
||||
|
||||
.rightclickmenu > ul > li .rc-icon {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
|
|
@ -704,7 +704,7 @@
|
|||
/* homepage */
|
||||
|
||||
.homeWrapper.homeText {
|
||||
margin-top: 10%;
|
||||
margin-top: 5%;
|
||||
}
|
||||
|
||||
.fullWidthWrapper {
|
||||
|
|
Loading…
Reference in a new issue