Skip to content
This repository has been archived by the owner on Oct 2, 2018. It is now read-only.

Commit

Permalink
Fix #183
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Smith committed Aug 21, 2014
1 parent 7cbd3c2 commit f91219d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 20 deletions.
2 changes: 1 addition & 1 deletion editor/scripts/editorProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var mainClosure = function() {
doc = document.createElement('DIV');
doc.setAttribute('contentEditable', 'true');
doc.id = 'tempEditDiv';
doc.setAttribute('style','border: none; padding: 10px; font-size: 20px; outline: none; min-height: calc(100% - 20px); word-wrap: break-word;');
doc.setAttribute('style','border: none; padding: 10px 10px 55px; font-size: 20px; outline: none; min-height: calc(100% - 20px); word-wrap: break-word;');
document.body.appendChild(doc);
//doc = document.getElementById('tempEditDiv');
document.execCommand('enableObjectResizing', false, 'true');
Expand Down
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ <h1><span id="currentFileLocation" style="display:none;"></span><span id="curren
<a href="#" data-click="tab" data-click-name="design" data-l10n-id="design">Design</a>
<div role="tabpanel">
<iframe class="editor" id="editor" sandbox="allow-scripts" data-focus="hideToolbar" data-blur="showToolbar" src=""></iframe>
<button class="icon-more" id="hide-keyboard-button"></button>
<div role="toolbar" id="edit-bar">
<ul id="edit-zone">
<li><button class="sticky icon-bold" id="bold" data-click="formatDoc" data-click-action="bold"></button></li>
Expand Down Expand Up @@ -611,8 +612,8 @@ <h2 data-l10n-id="visual">Visual</h2>
<aside class="pack-end">
<label>
<select id="nightmode-select">
<option value="1" data-l10n-id="always-on">Always On</option>
<option value="0" data-l10n-id="always-off">Always Off</option>
<option value="1" data-l10n-id="always-on">Always On</option>
<option selected value="2" data-l10n-id="auto">Auto</option>
</select>
</label>
Expand Down
2 changes: 2 additions & 0 deletions scripts/firetext.js
Original file line number Diff line number Diff line change
Expand Up @@ -1091,11 +1091,13 @@ function processActions(eventAttribute, target) {
} else if (calledFunction == 'hideToolbar') {
if (document.getElementById('currentFileType').textContent != '.txt') {
document.getElementById('edit-bar').style.display = 'none';
document.getElementById('hide-keyboard-button').classList.add('shown');
editor.classList.add('no-toolbar');
}
} else if (calledFunction == 'showToolbar') {
if (document.getElementById('currentFileType').textContent != '.txt') {
document.getElementById('edit-bar').style.display = 'block';
document.getElementById('hide-keyboard-button').classList.remove('shown');
editor.classList.remove('no-toolbar');
}
} else if (calledFunction == 'hyperlink') {
Expand Down
38 changes: 20 additions & 18 deletions style/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,26 @@ html, body {
margin: 1rem;
}

#hide-keyboard-button {
position: fixed;
bottom: 0;
right: 1rem;
width: 5rem;
font-size: 2.5rem;
-moz-transform: rotate(0.5turn);
-webkit-transform: rotate(0.5turn);
-o-transform: rotate(0.5turn);
-ms-transform: rotate(0.5turn);
transform: rotate(0.5turn);
opacity: 0.4;
background: transparent;
display: none;
}

#hide-keyboard-button.shown {
display: inline-block;
}


/* Fonts */
@font-face {
Expand Down Expand Up @@ -311,24 +331,6 @@ aside select.dummy {
}


/* Browser */
.top-button {
border-radius: 0;
border: none;
outline: none;
margin: 0;
}

#browserFrame {
width: 100%;
border: none;
outline: none;
height: -moz-calc(100% - 3.9rem);
height: -webkit-calc(100% - 3.9rem);
height: calc(100% - 3.9rem);
}


/* Spinner (Throbber) */
.spinner {
border-radius: 100%;
Expand Down

0 comments on commit f91219d

Please sign in to comment.