mirror of
https://github.com/inexorabletash/jsbasic.git
synced 2025-01-30 15:30:43 +00:00
Allow two-column layout on smaller screens. Update codemirror. Disable "load program" button if nothing in storage.
This commit is contained in:
parent
783b85a8db
commit
d7b3a08957
@ -36,7 +36,7 @@ By <a href="mailto:inexorabletash@hotmail.com">Joshua Bell</a>
|
||||
<br clear=left>
|
||||
|
||||
<!-- Screen -->
|
||||
<div id="frame" class="frame" style="float: left; margin: 10px;">
|
||||
<div id="frame" class="frame" style="float: left; margin: 5px;">
|
||||
<div id="screen-wrapper" class="wrapper">
|
||||
<div id="lores" class="lores"></div>
|
||||
<canvas id="hires" width="560" height="384" class="hires"></canvas>
|
||||
@ -49,9 +49,8 @@ By <a href="mailto:inexorabletash@hotmail.com">Joshua Bell</a>
|
||||
<input id="keyboard" class="keyboard" type="text" title="Hidden Keyboard Input Device">
|
||||
|
||||
<!-- Source -->
|
||||
<div style="float: left; margin: 10px;">
|
||||
Enter code below
|
||||
|
||||
<div style="float: left; margin: 5px;">
|
||||
Enter code:
|
||||
<input type="button" value="Run" id="btn_run">
|
||||
<input type="button" value="Stop" id="btn_stop" disabled="disabled">
|
||||
|
||||
@ -168,7 +167,6 @@ By <a href="mailto:inexorabletash@hotmail.com">Joshua Bell</a>
|
||||
|
||||
<script src="cm2/lib/codemirror.js"></script>
|
||||
<link rel="stylesheet" href="cm2/lib/codemirror.css">
|
||||
<link rel="stylesheet" href="cm2/theme/default.css">
|
||||
<script src="cm2/mode/basic/basic.js"></script>
|
||||
<link rel="stylesheet" href="cm2/mode/basic/basic.css">
|
||||
<style type="text/css">
|
||||
|
2
index.js
2
index.js
@ -129,10 +129,12 @@ window.onload = function () {
|
||||
|
||||
addEvent($('#btn_save'), 'click', function () {
|
||||
window.localStorage.setItem("save_program", getSource());
|
||||
$('#btn_load').disabled = false;
|
||||
});
|
||||
addEvent($('#btn_load'), 'click', function () {
|
||||
setSource(window.localStorage.getItem("save_program"));
|
||||
});
|
||||
$('#btn_load').disabled = (window.localStorage.getItem("save_program") === null);
|
||||
|
||||
// Add a "printer" on demand
|
||||
addEvent($('#btn_capture'), 'click', function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user