Skip to content

Commit

Permalink
ui looks for '=' instead of ':' for custom attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
aviaviavi committed Oct 24, 2018
1 parent 617f356 commit 41ccee7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

{-# LANGUAGE TypeOperators #-}

-- TODO(avi|p=3|#cleanup|key=val|k3y=asdf) - break this into modules
-- TODO (avi|p=3|#cleanup|key=val|k3y=asdf|key=1) - break this into modules
module Main where

import qualified Control.Exception as E
Expand Down
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: toodles
version: 0.1.0.10
version: 0.1.0.11
github: "aviaviavi/toodles"
license: MIT
author: "Avi Press"
Expand Down
4 changes: 2 additions & 2 deletions web/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<label class="label">Add Custom Attributes (comma separated)</label>
<div class="input-error key-val-parse-error" v-show="addKeyValParseError">Parse error, check your formatting and try again</div>
<div class="control">
<input class="input" type="text" placeholder="key1:val1,key2:val2,..." v-model="addKeyVals" @keyup.enter="submitTodoEdits">
<input class="input" type="text" placeholder="key1=val1,key2=val2,..." v-model="addKeyVals" @keyup.enter="submitTodoEdits">
</div>
</div>

Expand Down Expand Up @@ -142,7 +142,7 @@
<td class="todo-item-customAttributes">
<div v-show="Object.keys(todo.customAttributes).length" class="attribute-block">
<span v-for="entry in Object.entries(todo.customAttributes)" class="attribute-item" @change="updateTodo('here')">
<span >{{entry[0]}}</span>: <span >{{entry[1]}}</span>
<span >{{entry[0]}}</span>=<span >{{entry[1]}}</span>
</span>
</div>
<div class="tag-block" v-show="Object.keys(todo.tags).length">
Expand Down
3 changes: 1 addition & 2 deletions web/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ $(document).ready(function() {
type: "GET",
dataType: "json",
success: function(data) {
console.log("here", data)
this.todos = data.todos.map(t => {
return {
id: t.id,
Expand Down Expand Up @@ -180,7 +179,7 @@ $(document).ready(function() {
const keyVals =
this.addKeyVals.trim() === "" ?
[] :
this.addKeyVals.split(",").map(p => p.split(":").map(t => t.trim()))
this.addKeyVals.split(",").map(p => p.split("=").map(t => t.trim()))
const keyValError = keyVals.some(p => p && p.length !== 2)
if (keyValError) {
this.addKeyValParseError = true
Expand Down

0 comments on commit 41ccee7

Please sign in to comment.