From 57e2c5d85160d39b13f8135e184623d4a994678b Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 26 Feb 2023 17:41:57 -0500 Subject: [PATCH] Update jot-header.tpl another test of the switch --- view/tpl/jot-header.tpl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index dffd970a3..9a6cb30cd 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -768,12 +768,16 @@ let postSaveTimer = null; function getFileMimeType(result) { - alert(`getFileMimeType: ${result.filetype}`); + //alert(`getFileMimeType: ${result.filetype}`); switch(result.filetype) { case "image/jpeg": - alert(`Image: ${result.filetype}`); - return true; + "image/png": + "image/gif": + + alert(`Image: ${result.filetype}`); + let mType = `
  • `; + return mType; case y: // code block break; @@ -830,9 +834,10 @@ if (results[i].is_dir === "1" && results[(i-1)].is_dir === "1") { } else if (results[i].is_dir !== '1' && results[(i-1)].is_dir !== '1') { // file preceded by another file = just the line item - content += `
  • `; + //content += `
  • `; let result = results[i]; getFileMimeType(result); + content += mType; continue; }