diff --git a/DremJS-Background.png b/DremJS-Background.png
index 5e2c770..70316b5 100644
Binary files a/DremJS-Background.png and b/DremJS-Background.png differ
diff --git a/DremJS-Background_Classic.png b/DremJS-Background_Classic.png
new file mode 100644
index 0000000..5e2c770
Binary files /dev/null and b/DremJS-Background_Classic.png differ
diff --git a/agenda-wm.js b/agenda-wm.js
index 0141f71..0ddabc5 100644
--- a/agenda-wm.js
+++ b/agenda-wm.js
@@ -11,24 +11,45 @@
* "So, what's on the agenda?"
* (C) Innovation Inc. 2020
*/
+var detector = new MobileDetect(window.navigator.userAgent)
+var highestId = 0;
+var CurrentTaskbarApp = "";
function initAgendaWM() {
- console.log("Initializing Agenda WM");
- startTime();
- console.log("Starting widgets");
- startWidgets();
- makeDraggable();
- console.log("Agenda WM Initialized");
+ //var detector = new MobileDetect(window.navigator.userAgent)
+ if(!(detector.mobile())) {
+ console.log("Initializing Agenda WM");
+ startTime();
+ console.log("Starting widgets");
+ startWidgets();
+ makeDraggable();
+ console.log("Agenda WM Initialized");
+ } else {
+ initAgendaMobile();
+ }
} // Initialize Agenda
+// Desktop version of Agenda
+
function makeDraggable() {
$(".framewrap")
.draggable()
.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) {
+ var application = document.getElementById(app);
+ if(openflag==true)
+ application.style.display = "block";
+ openflag = true;
+ $('.framewrap').css('z-index', 1);
+ $('#' + app).css('z-index', 9999);
+ console.log("Move to front");
+} // Move a clicked application to the front*/
+
function moveToFront(app) {
- $('.framewrap').css('z-index', 1);
+ $('.framewrap').css('z-index', 1);
+ $('.framewrapMobile').css('z-index', 1);
$('#' + app).css('z-index', 9999);
} // Move a clicked application to the front
@@ -63,16 +84,30 @@ function openApplication(app, width, height, appIcon, filename) {
Quite frustrating to work with, but it works. I'll make it fancier later, but right now it is good enough.
*/
- var application="
";
- var taskbarApp="
";
- var parent=document.getElementById('appContainer');
+ //var application="
Application Name
";
+ //var taskbarApp="
";
+ if (!(detector.mobile())) {
+ var application="";
+ var taskbarApp="
";
+ } else {
+ var application="";
+ var taskbarApp="
";
+ // touchstart='SetCurrentTaskbarApp(" + i + ")' touchend='SetCurrentTaskbarApp(\"\")'
+ // onmouseup='SetCurrentTaskbarApp(\"\")'
+ }
+ var parent=document.getElementById('appContainer');
parent.insertAdjacentHTML('beforeend', application);
var parent=document.getElementById('taskbarApps');
- parent.insertAdjacentHTML('beforeend', taskbarApp);
- if (width == "max" || height == "max")
+ parent.insertAdjacentHTML('beforeend', taskbarApp);
+ if (width == "max" || height == "max")
maximizeApplication(i);
moveToFront(i);
- makeDraggable();
+ makeDraggable();
+ if (detector.mobile()) {
+ maximizeApplication(i);
+ }
+ if (i>highestId)
+ highestId=i;
} // Opens an application.
function openWidget(widget, filename) {
if (filename == undefined) {
@@ -84,7 +119,7 @@ function openApplication(app, width, height, appIcon, filename) {
// Get the first available application ID.
while ($('#' + i).length)
i++;
- var newWidget = "";
+ var newWidget = "
";
var parent=document.getElementById('appContainer');
parent.insertAdjacentHTML('beforeend', newWidget);
makeDraggable();
@@ -105,38 +140,58 @@ function openApplication(app, width, height, appIcon, filename) {
} // Start all enabled widgets
function closeApplication(id) {
- if(idExists(id)) {
- var application = document.getElementById(id);
- var taskbarApp = document.getElementById('task' + id);
- application.parentNode.removeChild(application);
- if(taskbarApp != null)
- taskbarApp.parentNode.removeChild(taskbarApp);
- } else {
- console.log("Application with ID " + id + " does not exist. Ignoring.");
- }
- } // Closes an application.
-
- function maximizeApplication(id) {
- document.getElementById(id).setAttribute('style', "height: 92%; width: 99%; top: 42px; left: 0px");
- } // Maximize application
-
- function minimizeApplication(id) {
+ if(idExists(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
+ var taskbarApp = document.getElementById('task' + id);
+ application.parentNode.removeChild(application);
+ if(taskbarApp != null)
+ taskbarApp.parentNode.removeChild(taskbarApp);
+ } else {
+ console.log("Application with ID " + id + " does not exist. Ignoring.");
+ }
+ } // Closes an application.
-function startTime() {
+ function maximizeApplication(id, DoNotMoveToFront) {
+ if($("#" + id).length) {
+ if(document.getElementById(id).style.display == "none")
+ application.style.display = "block";
+ windowheight = window.innerHeight-42;
+ //document.getElementById(id).setAttribute('style', "height: 92%; width: 99%; top: 42px; left: 0px");
+ document.getElementById(id).setAttribute('style', "height: " + windowheight + "px; width: 100%; top: 42px; left: 0px");
+ if(!DoNotMoveToFront)
+ moveToFront(id);
+ }
+ //document.getElementById(id).setAttribute('style', "height: " + (window.innerHeight-42) + "px; width: " + window.innerHeight + "; top: 42px; left: 0px");
+ } // Maximize application
+
+ /*function minimizeApplication(id) {
+ var application = document.getElementById(id);
+ if (application.style.display === "none") {
+ application.style.display = "block";
+ } else {
+ application.style.display = "none";
+ }
+ openflag=false;
+ console.log("Minimize");
+ } // Minimize application*/
+
+ function minimizeApplication(id, DisallowUnminimize) {
+ var application = document.getElementById(id);
+ if (application.style.display === "none" && !DisallowUnminimize) {
+ 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
+
+ function startTime() {
var today = new Date();
var h = today.getHours();
var m = today.getMinutes();
@@ -146,12 +201,12 @@ function startTime() {
document.getElementById('txt').innerHTML =
h + ":" + m + ":" + s;
var t = setTimeout(startTime, 500);
-} // Tick tock, Mr. Wick...
+ } // Tick tock, Mr. Wick...
-function checkTime(i) {
- 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 returnStatus(req, status) {
//console.log(req);
@@ -174,3 +229,46 @@ function fetchStatus(address) {
client.open("HEAD", address);
client.send();
}
+
+// Below are helper functions for making the "Close Application" function in DremJS possible. They may come in handy for other reasons, too.
+function SetCurrentTaskbarApp(id, AutoDisable) {
+ //console.log("SET: " + id);
+ CurrentTaskbarApp = "" + id;
+} // Sets or mutates CurrentTaskbarApp
+
+function GetCurrentTaskbarApp() {
+ //console.log("GET: " + CurrentTaskbarApp);
+ return CurrentTaskbarApp;
+} // Accessor for CurrentTaskbarApp
+
+// Mobile version of Agenda
+
+function initAgendaMobile() {
+ console.log("Initializing Agenda Mobile");
+ startTime();
+ console.log("Starting widgets");
+ startWidgets();
+ makeDraggable();
+ console.log("Agenda Mobile Initialized");
+}
+
+function maximizeAllApplications() {
+ for(i=0; i<=highestId; i++)
+ maximizeApplication(i, true);
+}
+
+function minimizeAllApplications() {
+ for(i=0; i<=highestId; i++)
+ minimizeApplication(i, true);
+}
+
+$(window).resize(function() {
+ if(detector.mobile())
+ maximizeAllApplications();
+});
+
+/*function showContextMenu() {
+ try {
+ parent.showContextMenu();
+ } catch(e) { }
+}*/
\ No newline at end of file
diff --git a/apps/Cinema/assets/images/Default.png b/apps/Cinema/assets/images/Default.png
new file mode 100644
index 0000000..ca7129e
Binary files /dev/null and b/apps/Cinema/assets/images/Default.png differ
diff --git a/apps/Cinema/assets/images/lightbulb-off-black.png b/apps/Cinema/assets/images/lightbulb-off-black.png
new file mode 100644
index 0000000..5a24fed
Binary files /dev/null and b/apps/Cinema/assets/images/lightbulb-off-black.png differ
diff --git a/apps/Cinema/assets/images/lightbulb-off-white.png b/apps/Cinema/assets/images/lightbulb-off-white.png
new file mode 100644
index 0000000..3c64e30
Binary files /dev/null and b/apps/Cinema/assets/images/lightbulb-off-white.png differ
diff --git a/apps/Cinema/assets/images/lightbulb-on-black.png b/apps/Cinema/assets/images/lightbulb-on-black.png
new file mode 100644
index 0000000..019265d
Binary files /dev/null and b/apps/Cinema/assets/images/lightbulb-on-black.png differ
diff --git a/apps/Cinema/assets/images/lightbulb-on-white.png b/apps/Cinema/assets/images/lightbulb-on-white.png
new file mode 100644
index 0000000..7c0f808
Binary files /dev/null and b/apps/Cinema/assets/images/lightbulb-on-white.png differ
diff --git a/apps/Cinema/cinema.png b/apps/Cinema/cinema.png
new file mode 100644
index 0000000..fd75268
Binary files /dev/null and b/apps/Cinema/cinema.png differ
diff --git a/apps/Cinema/index.php b/apps/Cinema/index.php
new file mode 100644
index 0000000..eb3b8d7
--- /dev/null
+++ b/apps/Cinema/index.php
@@ -0,0 +1,238 @@
+\
+ \
+ ";
+ // This basically depends on the video tag to support the video and is dumb.
+ }else if(strstr($mime, "image/")){
+ return "";
+ }else if(strstr($mime, "audio/")){
+ return "";
+ }
+ } else {
+ return "";
+ }
+ } else {
+ return "";
+ }
+ }
+
+ function ShuffleMusic() {
+ // Build array of all music in the user's Music directory
+ $files = scandir("/home/user/Music/");
+ $music = array();
+ $temp = "";
+
+ // Find all files that have .mp3, .wav, or .ogg (not case sensitive) and put them into the $music array
+ for ($i = 0; $i < count($files); $i++) {
+ if (count($temp) >= 5) {
+ $temp = substr($files[$i], count($files[$i]-4));
+ } else {
+ $temp = "StringTooSmallSkipping";
+ }
+ if($temp == ".mp3" || $temp == ".wav" || $temp == ".ogg") {
+ $music[] = $files[$i];
+ }
+ }
+ }
+
+ /*if($_REQUEST["action"] == "shuffle") {
+ ShufleMusic();
+ }*/
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Input the path to the media file you would like to open. You can use the File Manager to find the path.
+
+
+
+
+
+
+
+
+
+
+
+
+
About DremJS Cinema
+
Version: 0.1.0b
+
+
+ Open: Opens a media file.
+ Toggle Light: Toggles the background to be white or black (easier on the eyes)
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/Cinema/meta b/apps/Cinema/meta
new file mode 100644
index 0000000..3faef8f
--- /dev/null
+++ b/apps/Cinema/meta
@@ -0,0 +1,6 @@
+Name: Cinema
+Author: Innovation Inc.
+Width: 700
+Height: 450
+Icon: cinema.png
+Category: /Media
\ No newline at end of file
diff --git a/apps/Cinema/php_errors.log b/apps/Cinema/php_errors.log
new file mode 100644
index 0000000..850286e
--- /dev/null
+++ b/apps/Cinema/php_errors.log
@@ -0,0 +1,2 @@
+[27-Oct-2020 09:43:56 America/Chicago] PHP Parse error: syntax error, unexpected '}' in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/cinema/index.php on line 46
+[27-Oct-2020 09:45:05 America/Chicago] PHP Notice: Undefined index: action in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/cinema/index.php on line 53
diff --git a/apps/FileManager/filemanager.png b/apps/FileManager/filemanager.png
new file mode 100644
index 0000000..679de9b
Binary files /dev/null and b/apps/FileManager/filemanager.png differ
diff --git a/apps/FileManager/index.html b/apps/FileManager/index.html
new file mode 100644
index 0000000..ad89a92
--- /dev/null
+++ b/apps/FileManager/index.html
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/FileManager/meta b/apps/FileManager/meta
new file mode 100644
index 0000000..e5bde71
--- /dev/null
+++ b/apps/FileManager/meta
@@ -0,0 +1,6 @@
+Name: File Manager
+Author: Innovation Science
+Width: 700
+Height: 450
+Icon: filemanager.png
+Category: /
\ No newline at end of file
diff --git a/apps/Notepad/index.php b/apps/Notepad/index.php
new file mode 100644
index 0000000..f831fa7
--- /dev/null
+++ b/apps/Notepad/index.php
@@ -0,0 +1,211 @@
+
+
+
+
+
+
+
+
+
+
+
+
Input the path to the document you would like to open. You can use the File Manager to find the path.
+
+
+
+
+
+
+
+
+
+
+
+
About DremJS Notepad
+
Version: 0.1.0b
+
+
+ Open: Opens or creates a new document.
+ Save: Saves the current document.
+ Copy: Copies selected text to the clipboard.
+ Paste: Pastes the text in the clipboard to where the cursor is (requires clipboard access).
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/Notepad/meta b/apps/Notepad/meta
new file mode 100644
index 0000000..f5ebb26
--- /dev/null
+++ b/apps/Notepad/meta
@@ -0,0 +1,6 @@
+Name: Notepad
+Author: Innovation Inc.
+Width: 700
+Height: 450
+Icon: notepad.png
+Categpry: /Tools
\ No newline at end of file
diff --git a/apps/Notepad/notepad.png b/apps/Notepad/notepad.png
new file mode 100644
index 0000000..9d4864c
Binary files /dev/null and b/apps/Notepad/notepad.png differ
diff --git a/apps/Notepad/php_errors.log b/apps/Notepad/php_errors.log
new file mode 100644
index 0000000..1c7eae8
--- /dev/null
+++ b/apps/Notepad/php_errors.log
@@ -0,0 +1,27 @@
+[25-Aug-2020 21:42:10 America/Chicago] PHP Notice: Undefined variable: file in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 76
+[25-Aug-2020 21:42:10 America/Chicago] PHP Notice: Undefined variable: file in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 80
+[25-Aug-2020 21:42:18 America/Chicago] PHP Notice: Undefined variable: file in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 76
+[25-Aug-2020 21:42:18 America/Chicago] PHP Notice: Undefined variable: file in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 80
+[25-Aug-2020 21:44:42 America/Chicago] PHP Parse error: syntax error, unexpected 'return' (T_RETURN), expecting ';' in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 10
+[25-Aug-2020 21:50:40 America/Chicago] PHP Notice: Undefined index: open in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 211
+[25-Aug-2020 21:51:12 America/Chicago] PHP Notice: Undefined index: open in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 211
+[25-Aug-2020 21:51:22 America/Chicago] PHP Notice: Undefined index: open in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 211
+[25-Aug-2020 21:51:24 America/Chicago] PHP Notice: Undefined index: open in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 211
+[25-Aug-2020 21:51:32 America/Chicago] PHP Notice: Undefined index: open in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 211
+[25-Aug-2020 21:51:41 America/Chicago] PHP Notice: Undefined index: open in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 211
+[25-Aug-2020 21:51:48 America/Chicago] PHP Notice: Undefined index: open in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 211
+[25-Aug-2020 21:52:43 America/Chicago] PHP Notice: Undefined index: openfile in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 211
+[25-Aug-2020 21:52:46 America/Chicago] PHP Notice: Undefined index: openfile in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 211
+[25-Aug-2020 21:52:47 America/Chicago] PHP Notice: Undefined index: openfile in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 211
+[25-Aug-2020 21:53:04 America/Chicago] PHP Notice: Undefined index: openfile in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 211
+[25-Aug-2020 21:53:06 America/Chicago] PHP Notice: Undefined index: openfile in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 211
+[25-Aug-2020 21:53:45 America/Chicago] PHP Parse error: syntax error, unexpected '<', expecting end of file in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 213
+[25-Aug-2020 21:53:47 America/Chicago] PHP Parse error: syntax error, unexpected '<', expecting end of file in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 213
+[25-Aug-2020 21:53:54 America/Chicago] PHP Notice: Undefined index: openfile in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 211
+[25-Aug-2020 21:53:54 America/Chicago] PHP Notice: Undefined index: action in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 212
+[25-Aug-2020 21:55:30 America/Chicago] PHP Notice: Undefined index: openfile in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 211
+[25-Aug-2020 21:55:33 America/Chicago] PHP Notice: Undefined index: openfile in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 211
+[25-Aug-2020 21:59:29 America/Chicago] PHP Notice: Undefined index: openfile in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 211
+[25-Aug-2020 21:59:29 America/Chicago] PHP Notice: Undefined index: action in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 212
+[26-Aug-2020 08:55:57 America/Chicago] PHP Warning: file_get_contents(/mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/home/user/Documents/NewFile.txt): failed to open stream: No such file or directory in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 11
+[27-Oct-2020 09:13:28 America/Chicago] PHP Warning: file_get_contents(/mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/home/user/Documents/NewFile.txt): failed to open stream: No such file or directory in /mnt/c/Users/Sam/Documents/dremjs/DremJS-0.1.6b/apps/notepad/index.php on line 11
diff --git a/apps/about/index.html b/apps/about/index.html
index e787a89..6efbaab 100644
--- a/apps/about/index.html
+++ b/apps/about/index.html
@@ -20,17 +20,35 @@
+
+
About DremJS
-
Version: 0.1.6b
-
Agenda WM 0.1.1b
+
Version: 0.1.7b
+
Agenda WM 0.1.2b
Changelog:
+ Version 0.1.7b
+ +File Manager
+ +Notepad
+ +A right-click context menu
+ -Removed ambient music on most applications
+ ~General system stability improvements to enhance the user's experience.
Version 0.1.6b
+Widget support (see wiki for more information)
+Made clicking apps in the taskbar move applications to the front instead of minimizing.
diff --git a/apps/about/meta b/apps/about/meta
new file mode 100644
index 0000000..5076e03
--- /dev/null
+++ b/apps/about/meta
@@ -0,0 +1,6 @@
+Name: About
+Author: Innovation Inc.
+Width: 800
+Height: 500
+Icon: about.png
+Category: /
\ No newline at end of file
diff --git a/apps/about/name b/apps/about/name
deleted file mode 100644
index 0c23b01..0000000
--- a/apps/about/name
+++ /dev/null
@@ -1 +0,0 @@
-About
diff --git a/apps/debug/index.html b/apps/debug/index.html
index 3edf79b..2d0c463 100644
--- a/apps/debug/index.html
+++ b/apps/debug/index.html
@@ -13,6 +13,9 @@
+
Notice
diff --git a/apps/debug/meta b/apps/debug/meta
new file mode 100644
index 0000000..247f8c4
--- /dev/null
+++ b/apps/debug/meta
@@ -0,0 +1,6 @@
+Name: Debug
+Author: Innovation Inc.
+Width: 700
+Height: 450
+Icon: debug.png
+Category: /Tools
\ No newline at end of file
diff --git a/apps/debug/name b/apps/debug/name
deleted file mode 100644
index 329d484..0000000
--- a/apps/debug/name
+++ /dev/null
@@ -1 +0,0 @@
-Debug
diff --git a/apps/howto/index.html b/apps/howto/index.html
index 9903d69..55aba41 100644
--- a/apps/howto/index.html
+++ b/apps/howto/index.html
@@ -15,7 +15,10 @@
}
-