closes #352 size of cheatsheet window, closes #351 remove topic and synapse create from cheatsheet on topic pages, closes #348 enter key creating undesirable line break
This commit is contained in:
parent
0982916e10
commit
9027cd6d2e
3 changed files with 32 additions and 4 deletions
|
@ -531,6 +531,9 @@ BestInPlaceEditor.forms = {
|
|||
this.element.find("input[type='button']").bind('click', {editor: this}, BestInPlaceEditor.forms.textarea.cancelButtonHandler);
|
||||
}
|
||||
this.element.find("textarea").bind('blur', {editor: this}, BestInPlaceEditor.forms.textarea.blurHandler);
|
||||
// START METAMAPS CODE
|
||||
this.element.find("textarea").bind('keydown', {editor: this}, BestInPlaceEditor.forms.textarea.keydownHandler);
|
||||
// END METAMAPS CODE
|
||||
this.element.find("textarea").bind('keyup', {editor: this}, BestInPlaceEditor.forms.textarea.keyupHandler);
|
||||
this.blurTimer = null;
|
||||
this.userClicked = false;
|
||||
|
@ -573,14 +576,26 @@ BestInPlaceEditor.forms = {
|
|||
event.data.editor.abortIfConfirm();
|
||||
event.stopPropagation(); // Without this, click isn't handled
|
||||
},
|
||||
|
||||
|
||||
// START METAMAPS CODE
|
||||
keydownHandler : function(event) {
|
||||
if (event.keyCode == 13 && !event.shiftKey) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
return false;
|
||||
}
|
||||
},
|
||||
// END METAMAPS CODE
|
||||
|
||||
keyupHandler : function(event) {
|
||||
if (event.keyCode == 27) {
|
||||
event.data.editor.abortIfConfirm();
|
||||
}
|
||||
// START METAMAPS CODE
|
||||
else if (event.keyCode == 13 && !event.shiftKey) {
|
||||
event.data.editor.update();
|
||||
}
|
||||
// END METAMAPS CODE
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -2034,6 +2034,7 @@ div.mapInfoStat {
|
|||
/* Cheatsheet */
|
||||
#cheatSheet {
|
||||
width: 100%;
|
||||
height: 350px;
|
||||
font-family: LatoLight, Arial, Sans-Serif;
|
||||
font-size: 17px;
|
||||
line-height: 21px;
|
||||
|
|
|
@ -10,10 +10,16 @@
|
|||
<% if controller_name == "topics" && action_name == "show" %>
|
||||
<li><a href="#csTopicView">Topic View</a></li>
|
||||
<% end %>
|
||||
<% if authenticated? && (controller_name == "maps" || controller_name == "topics" ) && action_name == "show" %>
|
||||
<% if authenticated? && controller_name == "maps" && action_name == "show" %>
|
||||
<li><a href="#csCreatingTopics">Creating Topics</a></li>
|
||||
<% end %>
|
||||
<% if authenticated? && (controller_name == "maps" || controller_name == "topics" ) && action_name == "show" %>
|
||||
<li><a href="#csEditingTopics">Editing Topics</a></li>
|
||||
<% end %>
|
||||
<% if authenticated? && controller_name == "maps" && action_name == "show" %>
|
||||
<li><a href="#csCreatingSynapses">Creating Synapses</a></li>
|
||||
<% end %>
|
||||
<% if authenticated? && (controller_name == "maps" || controller_name == "topics" ) && action_name == "show" %>
|
||||
<li><a href="#csEditingSynapses">Editing Synapses</a></li>
|
||||
<% end %>
|
||||
<% if (controller_name == "maps" || controller_name == "topics" ) && action_name == "show" %>
|
||||
|
@ -32,7 +38,7 @@
|
|||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if authenticated? && (controller_name == "maps" || controller_name == "topics" ) && action_name == "show" %>
|
||||
<% if authenticated? && controller_name == "maps" && action_name == "show" %>
|
||||
<div id="csCreatingTopics">
|
||||
<p class="sectionTitle">Creating Topics</p>
|
||||
<div class="csItem"><span class="csTitle">Double-click on canvas:</span> Bring up the metacode spinner on the canvas.</div>
|
||||
|
@ -43,7 +49,9 @@
|
|||
<div class="csItem indented"><span class="csTitle">Enter:</span> create a new topic</div>
|
||||
<div class="csItem indented"><span class="csTitle">Gear Icon:</span> open up metacode settings</div>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
<% if authenticated? && (controller_name == "maps" || controller_name == "topics" ) && action_name == "show" %>
|
||||
<div id="csEditingTopics">
|
||||
<p class="sectionTitle">Editing Topics</p>
|
||||
<div class="csItem">
|
||||
|
@ -75,7 +83,9 @@
|
|||
</div>
|
||||
<div class="csItem indented">*Hide/Remove/Delete topic within context menu</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if authenticated? && controller_name == "maps" && action_name == "show" %>
|
||||
<div id="csCreatingSynapses">
|
||||
<p class="sectionTitle">Creating Synapses</p>
|
||||
<div class="csItem"><span class="csTitle">Right-click & drag from one topic to another:</span> open create synapse prompt</div>
|
||||
|
@ -85,7 +95,9 @@
|
|||
<div class="csItem indented"><span class="csTitle">Enter:</span> Create topic</div>
|
||||
<div class="csItem indented"><span class="csTitle">Enter:</span> Create synapse</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if authenticated? && (controller_name == "maps" || controller_name == "topics" ) && action_name == "show" %>
|
||||
<div id="csEditingSynapses">
|
||||
<p class="sectionTitle">Editing Synapses</p>
|
||||
<div class="csItem"><span class="csTitle">Double-click on synapse:</span> open synapse card</div>
|
||||
|
|
Loading…
Reference in a new issue