aboutsummaryrefslogtreecommitdiffstats
path: root/front
diff options
context:
space:
mode:
Diffstat (limited to 'front')
-rw-r--r--front/main.ts (renamed from front/loggedin.ts)33
-rw-r--r--front/window.ts25
2 files changed, 32 insertions, 26 deletions
diff --git a/front/loggedin.ts b/front/main.ts
index db237ac..1761597 100644
--- a/front/loggedin.ts
+++ b/front/main.ts
@@ -3,6 +3,10 @@
// and you will be able to see PHP's echo output in the browser
var FORM_ASYNC = true;
+import { OurWindow } from './window';
+
+declare var actions: any;
+
// A FileView is an entry inside the explorer window
class FileView {
filename: string;
@@ -28,30 +32,6 @@ class FileView {
// An array of all fileviews currently open
-class OurWindow {
- pwd: string[];
- visuals: HTMLElement;
- h2: HTMLElement; // The titlebar of the window
- fileview: any; // TODO what is this
- files: any[];
- txt_editor: HTMLElement; // For editable text files, this is the DOM element the user can edit
-
- // TODO move these to a subclass
- foldercontents: any;
- filecontents: any;
- filecontentsroot: any;
- filegrid: any;
- save_btn_container: any;
-
- constructor(pwd) {
- this.pwd = pwd; // pwd = [ "Folder1", "Folder2" ] means the current directory of that window is /Folder1/Folder2
- this.visuals = null; // The DOM object
- this.h2 = null; // The titlebar of the window
- this.fileview = null;
- this.files = [];
- this.txt_editor = null; // For editable text files, this is the DOM element the user can edit
- }
-}
// An array with all the windows on the screen
var windows: OurWindow[] = [];
@@ -1188,8 +1168,9 @@ document.body.oncontextmenu = (e) => {
the_file.onchange = (e) => { on_file_added(e); };
function set_iframe_enabled(en) {
- for (const iframe of document.getElementsByTagName('iframe'))
- iframe.hidden = !en;
+ const frames = document.getElementsByTagName('iframe');
+ for (var i = 0; i < frames.length; i++)
+ frames.item(i).hidden = !en;
}
main();
diff --git a/front/window.ts b/front/window.ts
new file mode 100644
index 0000000..79d053b
--- /dev/null
+++ b/front/window.ts
@@ -0,0 +1,25 @@
+
+export class OurWindow {
+ pwd: string[];
+ visuals: HTMLElement;
+ h2: HTMLElement; // The titlebar of the window
+ fileview: any; // TODO what is this
+ files: any[];
+ txt_editor: HTMLElement; // For editable text files, this is the DOM element the user can edit
+
+ // TODO move these to a subclass
+ foldercontents: any;
+ filecontents: any;
+ filecontentsroot: any;
+ filegrid: any;
+ save_btn_container: any;
+
+ constructor(pwd) {
+ this.pwd = pwd; // pwd = [ "Folder1", "Folder2" ] means the current directory of that window is /Folder1/Folder2
+ this.visuals = null; // The DOM object
+ this.h2 = null; // The titlebar of the window
+ this.fileview = null;
+ this.files = [];
+ this.txt_editor = null; // For editable text files, this is the DOM element the user can edit
+ }
+} \ No newline at end of file