aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--css/style.css1
-rw-r--r--loggedin.js10
2 files changed, 9 insertions, 2 deletions
diff --git a/css/style.css b/css/style.css
index 09456a3..ebfe7c2 100644
--- a/css/style.css
+++ b/css/style.css
@@ -418,6 +418,7 @@ pre {
.path {
display: flex;
align-items: stretch;
+ flex: 1 0 0;
}
.path > .separator {
diff --git a/loggedin.js b/loggedin.js
index effc880..c7be090 100644
--- a/loggedin.js
+++ b/loggedin.js
@@ -816,11 +816,17 @@ function download_file(in_file, filename) {
// make_window creates an explorer window - the kind that can list directories/open files
-function make_window(pwd) {
+function make_window(pwd, has_close) {
var wnd = make_window_base(pwd, 100, 100, 800, 600);
path = mk(wnd.h2, 'div', 'path');
+ if (has_close) {
+ var x_button = mk(wnd.h2, 'button', 'close_button');
+ x_button.innerText = "X";
+ x_button.onclick = delete_window;
+ }
+
// wnd.foldercontents is where the FileViews will be stored
// it also has a subheader (h3) with 'Upload' and 'New FOlder' buttons
{
@@ -917,7 +923,7 @@ function add_file_visuals(fileview) {
['Open in New Window', () => {
var new_pwd = focus.pwd.slice();
new_pwd.push(fileview.filename);
- var new_wnd = make_window(new_pwd);
+ var new_wnd = make_window(new_pwd, true);
focus_window(new_wnd);
openfile(fileview.is_directory);
}],