Add files via upload

This commit is contained in:
Innovation Inc 2019-12-19 00:03:06 -06:00 committed by GitHub
parent bffdd43e04
commit 1ca7c592ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,114 +80,154 @@
} }
.cent { .cent {
position: relative; position: relative;
top: 4px; top: 4px;
} }
.taskbar { .taskbar {
background-color: black; background-color: black;
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
width: 100%; width: 100%;
height: 42px; }
} .taskbarTime {
height: 42px;
float: left;
}
.taskbarApps {
text-align: center;
float: left;
margin-left: 5px;
margin-top: 2px;
}
</style> </style>
</head> </head>
<body onload="initAgendaWM()"> <body onload="initAgendaWM()">
<p class="cwhite br3">DremJS Version 0.1.2b</p> <p class="cwhite br2">DremJS Version 0.1.4b</p>
<p class="cwhite br2">Build 31</p>
<p class="cwhite br1">&copy; Innovation Inc.</p> <p class="cwhite br1">&copy; Innovation Inc.</p>
<div class="start startgray"> <div class="start startgray">
<ul class="astart"> <ul class="astart">
<dt><a onclick="openApplication('About', 800, 500)"><p><img src="apps/About/about.png" align="top"> About DremJS</p></a></dt> <dt><a onclick="openApplication('About', 800, 500, 'about.png')"><p><img src="apps/About/about.png" align="top"> About DremJS</p></a></dt>
<dt><a onclick="openApplication('HowTo', 800, 500)"><p><img src="apps/HowTo/howto.png" align="top"> How to Install Applications</p></a></dt> <dt><a onclick="openApplication('HowTo', 800, 500, 'howto.png')"><p><img src="apps/HowTo/howto.png" align="top"> How to Install Applications</p></a></dt>
<dt><a onclick="openApplication('Market', 'max', 'max')"><p><img src="apps/Market/market.png" align="top"> DremJS Market</p></a></dt> <dt><a onclick="openApplication('Market', 'max', 'max', 'market.png')"><p><img src="apps/Market/market.png" align="top"> DremJS Market</p></a></dt>
<dt><a onclick="openApplication('debug')"><p><img src="apps/debug/debug.png" align="top"> Report a Bug</p></a></dt> <dt><a onclick="openApplication('debug', -1, -1, 'debug.png')"><p><img src="apps/debug/debug.png" align="top"> Report a Bug</p></a></dt>
<!--Below is where remotely installed apps will start --> <!--Below is where remotely installed apps will start -->
<hr /> <hr />
<dt><a target="_top" href="shuttingdown.html"><p><img src="shutdown.png" align="top" style="width:16px;height:16px;"> Shutdown DremJS</p></dt> <dt><a target="_top" href="shuttingdown.html"><p><img src="shutdown.png" align="top" style="width:16px;height:16px;"> Shutdown DremJS</p></dt>
</ul> </ul>
<a href="#"><p class="start" style="left:12px;">Start</p></a> <a href="#"><p class="start" style="left:12px;">Start</p></a>
</div> </div>
<div id="appContainer"> <div id="appContainer">
<!-- This is the taskbar -->
<div id="taskbar" class="taskbar">
<div id="taskbarTime" class="taskbarTime">
<!-- Add apps here -->
<div class="cwhite" style="text-align:left" id="txt"></div> <a onclick="openApplication('About', 800, 500, 'about.png')"><img src="apps/About/about.png"> |</a>
</div>
<div id="taskbarApps" class="taskbarApps">
</div>
</div>
</div>
</div> <script>
<div class="taskbar"> function initAgendaWM() {
<div class="cwhite" style="text-align:left" id="txt"></div> <a onclick="openApplication('About')"><img class="cent" src="apps/About/about.png"> |</a> startTime();
</div> makeDraggable();
} // Initialize Agenda
<script>
function initAgendaWM() { function startTime() {
startTime(); var today = new Date();
makeDraggable(); var h = today.getHours();
} var m = today.getMinutes();
function startTime() { var s = today.getSeconds();
var today = new Date(); m = checkTime(m);
var h = today.getHours(); s = checkTime(s);
var m = today.getMinutes(); document.getElementById('txt').innerHTML =
var s = today.getSeconds(); h + ":" + m + ":" + s;
m = checkTime(m); var t = setTimeout(startTime, 500);
s = checkTime(s); } // Tick tock, Mr. Wick...
document.getElementById('txt').innerHTML =
h + ":" + m + ":" + s; function checkTime(i) {
var t = setTimeout(startTime, 500); if (i < 10) {i = "0" + i}; // add zero in front of numbers < 10
} return i;
function checkTime(i) { }
if (i < 10) {i = "0" + i}; // add zero in front of numbers < 10
return i; function makeDraggable() {
} $(".framewrap")
function makeDraggable() { .draggable()
$(".framewrap") .resizable();
.draggable() } // Makes all applications with the framewrap class draggable. Has to be ran every time applications are launched or things get sticky.
.resizable();
} // Makes all applications with the framewrap class draggable. Has to be ran every time applications are launched or things get sticky.
function moveToFront(app) { function moveToFront(app) {
$('.framewrap').css('z-index', 1); $('.framewrap').css('z-index', 1);
$('#' + app).css('z-index', 9999); $('#' + app).css('z-index', 9999);
} // Move a clicked application to the front } // Move a clicked application to the front
function openApplication(app, width, height) { function openApplication(app, width, height, appIcon) {
// Set width and height as default if one is <=-1 // Set width and height as default if one is <=-1
if (width <= -1 || height <= -1 || width == undefined || height == undefined) { if (width <= -1 || height <= -1 || width == undefined || height == undefined) {
width="500"; width="500";
height="300"; height="300";
} }
var i = 0; var i = 0;
// Get the first available application ID. // Get the first available application ID.
while ($('#' + i).length) while ($('#' + i).length)
i++; i++;
/* /*
This is just the following as a string: This is just the following as a string:
<div onclick=moveToFront('[windowID]') id='[windowID]' class='framewrap' style='width:[width]px; height=[height]px'> <div onclick=moveToFront('[windowID]') id='[windowID]' class='framewrap' style='width:[width]px; height=[height]px'>
<input type='button' onclick="closeApplication('[windowID]')" value='X" /> <input type='button' onclick="closeApplication('[windowID]')" value='X' />
<iframe class='appFrame' src='apps/[application name]'></iframe> <input type='button' onclick="maximizeApplication('[windowID]')" value='\u25A1' />
</div> <input type='button' onclick="minimizeApplication('[windowID]')" value='_' />
[windowID] is replaced with i (defined above) <iframe class='appFrame' src='apps/[application name]'></iframe>
[application name] is replaced with parameter "app" (used to determine the application name to open). </div>
[windowID] is replaced with i (defined above)
[application name] is replaced with parameter "app" (used to determine the application name to open).
The app parameter points to a subdirectory called apps. This means if you were to run openApplication(foo), it will attempt to The app parameter points to a subdirectory called apps. This means if you were to run openApplication(foo), it will attempt to open an
open an application stored at apps/foo/ Application stored at apps/foo/
Quite frustrating to work with, but it works. I'll make it fancier later, but right now it is good enough. Quite frustrating to work with, but it works. I'll make it fancier later, but right now it is good enough.
*/ */
var newElement="<div onclick=\"moveToFront('" + i + "')\" id='" + i + "' class='framewrap' style='width:" + width + "px; height:" + height + "px'><input type='button' onclick=\"closeApplication('" + i + "')\" value='X' /><input type='button' onclick=\"maximizeApplication('" + i + "')\" value='\u25A1' /><iframe class='appFrame' src='apps/" + app + "/'></iframe></div>"; var application="<div onclick=\"moveToFront('" + i + "')\" name='" + app + "' id='" + i + "' class='framewrap' style='width:" + width + "px; height:" + height + "px'><input type='button' onclick=\"closeApplication('" + i + "')\" value='X' /><input type='button' onclick=\"maximizeApplication('" + i + "')\" value='\u25A1' /><input type='button' onclick=\"minimizeApplication('" + i + "')\" value='_' /><iframe class='appFrame' src='apps/" + app + "/'></iframe></div>";
var parent=document.getElementById('appContainer'); var taskbarApp="<div id='task" + i + "' onclick=\"minimizeApplication('" + i + "')\" class='taskbarApps'><img src='apps/" + app + "/" + appIcon + "' style='width:32px;height:32px' align='middle' /></div>";
parent.innerHTML+=newElement; var parent=document.getElementById('appContainer');
if (width == "max" || height == "max") parent.insertAdjacentHTML('beforeend', application);
maximizeApplication(i); var parent=document.getElementById('taskbarApps');
moveToFront(i); parent.insertAdjacentHTML('beforeend', taskbarApp);
makeDraggable(); if (width == "max" || height == "max")
} // Opens an application. maximizeApplication(i);
moveToFront(i);
makeDraggable();
} // Opens an application.
function closeApplication(id) { function closeApplication(id) {
var application = document.getElementById(id); var application = document.getElementById(id);
application.parentNode.removeChild(application); var taskbarApp = document.getElementById('task' + id);
} // Closes an application. application.parentNode.removeChild(application);
taskbarApp.parentNode.removeChild(taskbarApp);
} // Closes an application.
function maximizeApplication(id) { function maximizeApplication(id) {
document.getElementById(id).setAttribute('style', "height: 93%; width: 99%; top: 40px; left: 0px"); document.getElementById(id).setAttribute('style', "height: 92%; width: 99%; top: 42px; left: 0px");
} } // Maximize application
</script>
function minimizeApplication(id) {
var application = document.getElementById(id);
if (application.style.display === "none") {
application.style.display = "block";
} else {
application.style.display = "none";
}
} // Minimize application
function idExists(id) {
if ($('#' + id).length)
return $('#' + id).attr('name');
else
return false;
} // Check if an ID exists
</script>
</body> </body>
</html> </html>