From f76ec56f3d70da6359905e9b9666f581599edd4f Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 21 Apr 2016 18:02:31 -0400 Subject: fix issue with single input fields, store image width/height --- examples/db.json | 24 +++++++++++++++++++++++- examples/index.js | 6 ++++++ 2 files changed, 29 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/db.json b/examples/db.json index 8805342..401bf26 100644 --- a/examples/db.json +++ b/examples/db.json @@ -153,6 +153,13 @@ "id": "red", "title": "Red", "media": [ + { + "uri": "https://ltho.s3.amazonaws.com/okcms-example/a91c4210-080c-11e6-8a7d-f30231d4ec26.png", + "width": "800", + "height": "800", + "caption": "", + "type": "image" + }, { "uri": "http://asdf.us/", "caption": "ASDF", @@ -160,7 +167,8 @@ } ], "__index": 0, - "dateCreated": "Mon, 28 Mar 2016 23:02:45 GMT" + "dateCreated": "Mon, 28 Mar 2016 23:02:45 GMT", + "flagged": false }, { "id": "blue", @@ -210,5 +218,19 @@ ], "flagged": true } + ], + "flour": [ + { + "id": "test", + "title": "TEST", + "image": { + "uri": "https://ltho.s3.amazonaws.com/okcms-example/7be163d0-080b-11e6-8a7d-f30231d4ec26.png", + "caption": "", + "width": "800", + "height": "800" + }, + "__index": 0, + "dateCreated": "Thu, 21 Apr 2016 21:52:44 GMT" + } ] } \ No newline at end of file diff --git a/examples/index.js b/examples/index.js index efbfc38..341a50b 100644 --- a/examples/index.js +++ b/examples/index.js @@ -29,6 +29,11 @@ var app = okcms.createApp({ title: {type: 'string'}, flagged: {type: 'flag'}, media: {type: 'media-list'}, + }, + flour: { + id: {type: 'string', hidden: true}, + title: {type: 'string'}, + image: {type: 'image'}, } }, @@ -37,6 +42,7 @@ var app = okcms.createApp({ { type: 'page', static: {id: 'contact'}}, { type: 'bread' }, { type: 'test' }, + { type: 'flour' }, ], services: { -- cgit v1.2.3-70-g09d2