Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added TAB to bottom toolbar; changed fullwindow display slightly for …

…mobile screens, to allow bottom toolbar to be visible
  • Loading branch information...
commit 49cdaa72f73d20564f5ff4ea827a44e0f1ecec05 1 parent f0e88f2
@mitotic authored
View
6 graphterm/www/graphterm.css
@@ -206,7 +206,7 @@ img.gterm-img {
}
.pagelet.gterm-fullwindow {
- position: absolute;
+ position: fixed;
top: 0;
left: 0;
background: white;
@@ -216,6 +216,10 @@ img.gterm-img {
height: 100%;
}
+body.mobilescreen .pagelet.gterm-fullwindow {
+ height: 95%;
+}
+
/* Widget */
#session-widgetcontainer {
opacity: 1.0;
View
32 graphterm/www/graphterm.js
@@ -17,6 +17,8 @@ var gSafariBrowser = !gChromeBrowser && navigator.userAgent.toLowerCase().indexO
var gSafariIPad = gSafariBrowser && navigator.userAgent.toLowerCase().indexOf('ipad') > -1;
+var gMobileDisplay = gSafariIPad;
+
var MAX_LINE_BUFFER = 500;
var MAX_COMMAND_BUFFER = 100;
@@ -1422,6 +1424,9 @@ function gtermMenuClickHandler(event) {
if (HandleArrowKeys(39))
text = "\x1b[C";
break;
+ case "tab":
+ text = "\x09";
+ break;
case "command":
GetFinder("command");
break;
@@ -1573,8 +1578,6 @@ function gtermBottomSelectHandler(event) {
if (selectedOption == "space")
text = String.fromCharCode(32);
- else if (selectedOption == "tab")
- text = String.fromCharCode(9);
else if (selectedOption == "escape")
text = String.fromCharCode(27);
else if (selectedOption == "controla")
@@ -2259,11 +2262,20 @@ function RunPrefixMethod(obj, method) {
var gFullpageDisplay = null;
function StartFullpage(display, split) {
gFullpageDisplay = display;
- $("#session-bufscreen").addClass("fullpage");
- if (split) {
- $("#session-bufellipsis").show();
- if (gAlwaysSplitScreen && !gSplitScreen)
- SplitScreen("fullpage");
+ if (display == "fullpage") {
+ $("#session-bufscreen").addClass("fullpage");
+ if (split) {
+ $("#session-bufellipsis").show();
+ if (gAlwaysSplitScreen && !gSplitScreen)
+ SplitScreen("fullpage");
+ }
+ }
+
+ if (display == "fullwindow" || display == "fullscreen") {
+ if (gMobileDisplay) {
+ $("#session-term").addClass("display-footer");
+ }
+ setTimeout(function() {ScrollTop(null)}, 250); // Scroll background to bottom of screen
}
if (display == "fullscreen") {
@@ -2290,6 +2302,8 @@ function EndFullpage() {
$("#session-bufscreen").removeClass("fullpage");
if (gSplitScreen)
MergeScreen("fullpage");
+
+ $("#session-bufscreen .pagelet.gterm-fullwindow").removeClass("gterm-fullwindow");
}
function ExitFullpage() {
@@ -2540,6 +2554,8 @@ $(document).ready(function() {
console.log("Ready");
$(document).attr("title", window.location.pathname.substr(1));
+ if (gMobileDisplay)
+ $("body").addClass("mobilescreen");
if (gSafariIPad)
$("body").addClass("ipadscreen");
@@ -2550,7 +2566,7 @@ $(document).ready(function() {
$("#session-findercontainer").hide();
$("#session-widgetcontainer").hide(); // IMPORTANT (else top menu will be invisibly blocked)
$(".menubar-select").change(gtermSelectHandler);
- $(".session-footermenu select").change(gtermBottomSelectHandler);
+ $("#session-footermenu select").change(gtermBottomSelectHandler);
$("#session-headermenu .headfoot").bindclick(gtermMenuClickHandler);
$("#session-footermenu .headfoot").bindclick(gtermMenuClickHandler);
$("#session-feedback-button").bindclick(gtermFeedbackHandler);
View
8 graphterm/www/index.html
@@ -88,7 +88,7 @@
<!--
<img src="/static/images/graphic.jpg" class="lateral"></img>
-->
- <div id="session-bufellipsis" class="gterm-link" onclick="ExitFullscreen()"><h3>...</h3></div>
+ <div id="session-bufellipsis" class="gterm-link" onclick="ExitFullpage()"><h3>...</h3></div>
<div id="session-feedback" class="session-feedback">
<input id="session-feedback-button" type="button" value="feedback"/>
</div>
@@ -139,11 +139,12 @@
<span id="headfoot-down" class="headfoot">&#x25BC;</span>&nbsp;&nbsp;
<span id="headfoot-delete" class="headfoot">&#x232B;</span>&nbsp;&nbsp;
<span id="headfoot-left" class="headfoot">&lt;</span>&nbsp;&nbsp;
- <span id="headfoot-right" class="headfoot">&gt;</span>&nbsp;&nbsp;
+ <span id="headfoot-right" class="headfoot">&gt;</span>&nbsp;
+ <span id="headfoot-tab" class="headfoot">TAB</span>
+ <span id="headfoot-enter" class="headfoot">Enter</span>
<select id="headfoot-key" class="headfootselect" size=1>
<option value="key" selected>Key</option>
<option value="space">Space</option>
- <option value="tab">Tab</option>
<option value="escape">Escape</option>
<option value="controla">Ctrl-A</option>
<option value="controlc">Ctrl-C</option>
@@ -155,7 +156,6 @@
<span id="headfoot-command" class="headfoot toggle gterm-not-implemented">Cmd</span>
<span id="headfoot-options" class="headfoot toggle gterm-not-implemented">Opt</span>
<span id="headfoot-file" class="headfoot toggle gterm-not-implemented">File</span>
- <span id="headfoot-enter" class="headfoot">Enter</span>
<!--
<input id="headfoot-input" class="headfoot" size=3 placeholder="Insert">
-->
Please sign in to comment.
Something went wrong with that request. Please try again.