Browse Source

notes, links, err fix

Paul Liverman III 6 years ago
parent
commit
4bace26750
3 changed files with 8 additions and 4 deletions
  1. 3
    3
      app.moon
  2. 4
    0
      layouts/main.moon
  3. 1
    1
      static/index.js

+ 3
- 3
app.moon View File

@@ -16,12 +16,12 @@ class Simplex extends Application
16 16
   @include locate "api"
17 17
   @include locate "docs"
18 18
 
19
-  -- TODO intentionally cause an error to see if this is working as intended
20 19
   handle_error: (err, trace) =>
21 20
     if @original_request.route_name\find "api_"
22
-      return status: 500, json: { errors: {err}, :trace } -- NOTE trace should be saved and NOT returned to the user
21
+      -- return status: 500, json: { errors: {err}, :trace } -- NOTE trace should be saved and NOT returned to the user
22
+      return status: 500, json: { errors: {err} }
23 23
     else
24
-      super!
24
+      super err --, trace
25 25
 
26 26
   [index: "/"]: =>
27 27
     @title = "Simplex Task Manager"

+ 4
- 0
layouts/main.moon View File

@@ -23,6 +23,10 @@ class extends Widget
23 23
         div class: "container", ->
24 24
           div class: "row", ->
25 25
             div class: "column column-25 btns", ->
26
+              if @user
27
+                a class: "button", href: @url_for("index"), "Tasks"
28
+              else
29
+                a class: "button", href: @url_for("index"), "About"
26 30
               a class: "button", href: @url_for("docs_v1"), "API Docs"
27 31
             div class: "column column-100", ->
28 32
               h1(@title or "Simplex")

+ 1
- 1
static/index.js View File

@@ -67,7 +67,7 @@ function new_api_key() {
67 67
 }
68 68
 
69 69
 function delete_item(e) {
70
-  e = e.parents("li");
70
+  e = $(e).parents("li");
71 71
 
72 72
   checkbox = $("input:checkbox", e);
73 73
   if (checkbox.length) {