From f0a10a321316475fd05e2ee3a40e35c57b66b0a7 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sat, 31 Dec 2016 06:08:08 +0100 Subject: display certain types as lists of images --- examples/db.json | 42 +++++++++++++++++++++++++++++++++++++++++- examples/index.js | 3 ++- 2 files changed, 43 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/db.json b/examples/db.json index ed60f22..8c32037 100644 --- a/examples/db.json +++ b/examples/db.json @@ -284,5 +284,45 @@ "dateCreated": "Fri, 02 Sep 2016 16:41:10 GMT" } ], - "flour": [] + "flour": [ + { + "id": "test", + "title": "Test", + "image": { + "uri": "https://ltho.s3.amazonaws.com/okcms-example/1d4e4e00-cf16-11e6-bf3b-17f7318de7f4.png", + "caption": "", + "width": "397", + "height": "285" + }, + "__index": 0, + "dateCreated": "Sat, 31 Dec 2016 05:00:59 GMT", + "images": [] + }, + { + "id": "test-2", + "title": "Test #2", + "image": { + "uri": "https://ltho.s3.amazonaws.com/okcms-example/2bb54930-cf16-11e6-bf3b-17f7318de7f4.jpg", + "caption": "", + "width": "500", + "height": "500" + }, + "__index": 1, + "dateCreated": "Sat, 31 Dec 2016 05:01:23 GMT", + "images": [] + }, + { + "id": "circles", + "title": "Circles", + "image": { + "uri": "https://ltho.s3.amazonaws.com/okcms-example/f99042b0-cf16-11e6-914f-214dd525ee03.gif", + "caption": "", + "width": "400", + "height": "400" + }, + "__index": 2, + "dateCreated": "Sat, 31 Dec 2016 05:07:09 GMT", + "images": [] + } + ] } \ No newline at end of file diff --git a/examples/index.js b/examples/index.js index 8918043..c03550a 100644 --- a/examples/index.js +++ b/examples/index.js @@ -25,7 +25,6 @@ var app = okcms.createApp({ resources: { flour: { display: 'image', - field: 'image', } } } @@ -103,6 +102,7 @@ var app = okcms.createApp({ lib: require("./lib/okdumpfm"), }, +/* push: { lib: require("./lib/okpush"), mongodbUrl: "mongodb://localhost/okpush_example", @@ -127,6 +127,7 @@ var app = okcms.createApp({ }, } }, +*/ }, views: { -- cgit v1.2.3-70-g09d2