Clicking middle mouse on tab closes it

Show shortcut on help screen too
This commit is contained in:
Matt Pass
2013-06-21 21:31:55 +01:00
parent bc8903d3c8
commit 6ff8dcffc1
2 changed files with 5 additions and 2 deletions

View File

@@ -155,7 +155,7 @@ if (file_exists(dirname(__FILE__)."/plugins/jshint/jshint.js")) {
<a nohref onClick="top.ICEcoder.alphaTabs()"><img src="images/nav-alpha.png" class="alphaTabs" title="Alphabetize tabs"></a>
<?php
for ($i=1;$i<=100;$i++) {
echo '<div id="tab'.$i.'" class="tab" onMouseDown="ICEcoder.canSwitchTabs ? ICEcoder.switchTab(parseInt(this.id.slice(3),10)) : ICEcoder.canSwitchTabs=true; thisColor=top.ICEcoder.tabFGselected; if (!top.ICEcoder.overCloseLink) {ICEcoder.tabDragStart(parseInt(this.id.slice(3),10))}" onMouseOver="thisColor=this.style.color;this.style.color=top.ICEcoder.tabFGselected" onMouseOut="this.style.color=thisColor"></div>';
echo '<div id="tab'.$i.'" class="tab" onMouseDown="ICEcoder.canSwitchTabs ? ICEcoder.switchTab(parseInt(this.id.slice(3),10)) : ICEcoder.canSwitchTabs=true; thisColor=top.ICEcoder.tabFGselected; if (!top.ICEcoder.overCloseLink) {ICEcoder.tabDragStart(parseInt(this.id.slice(3),10))}; if (event.button==1) {ICEcoder.closeTab(parseInt(this.id.slice(3),10)); return false};" onMouseOver="thisColor=this.style.color;this.style.color=top.ICEcoder.tabFGselected" onMouseOut="this.style.color=thisColor"></div>';
}
?><div class="newTab" onClick="ICEcoder.newTab()" id="newTab">+</div>
</div>

View File

@@ -62,7 +62,10 @@
<span class="key">Ctrl <span class="plus">+</span> Shift <span class="plus">+</span> s</span> <span class="shortcut">Save as...</span><br>
<span class="key">Ctrl <span class="plus">+</span> Enter</span> <span class="shortcut">View webpage</span><br>
<span class="key">Space</span> <span class="shortcut">Refocus on document</span><br>
<span class="key">Esc</span> <span class="shortcut">Cancel tasks</span><br>
<span class="key">Esc</span> <span class="shortcut">Cancel tasks</span><br><br>
<h2>On Tabs</h2>
<span class="key">Middle click</span> <span class="shortcut">Close tab</span><br>
</div>