summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2016-09-02 11:29:01 -0400
committerJules Laplace <jules@okfoc.us>2016-09-02 11:29:01 -0400
commitef64682b40be479ecff91c19d406fff10f9cc688 (patch)
tree43160ffde04f375d8022fba5e5f96283a0cd745a
parent233188e7d36dea5f5e5102322be4df81b9d4114e (diff)
rename captioned-image-list to gallery, closes #3
-rw-r--r--app/node_modules/okschema/index.js13
-rw-r--r--examples/index.js4
-rw-r--r--themes/okadmin/templates/partials/inputs.liquid4
3 files changed, 17 insertions, 4 deletions
diff --git a/app/node_modules/okschema/index.js b/app/node_modules/okschema/index.js
index b3d4cc2..0048fc5 100644
--- a/app/node_modules/okschema/index.js
+++ b/app/node_modules/okschema/index.js
@@ -48,6 +48,14 @@ var types = {
}],
assertValid: function(spec, value) {}
},
+ 'gallery': {
+ isArray: true,
+ parent: [{
+ uri: { type: 'string' }, // TODO Implement URI type
+ caption: { type: 'string' }
+ }],
+ assertValid: function(spec, value) {}
+ },
// Special type for resource meta information
'meta': {
parent: 'string',
@@ -78,6 +86,11 @@ var types = {
parent: [],
assertValid: function(spec, value) {}
},
+ 'media': {
+ isArray: true,
+ parent: [],
+ assertValid: function(spec, value) {}
+ },
'double-captioned-image-list': {
isArray: true,
parent: [],
diff --git a/examples/index.js b/examples/index.js
index fa3281e..711246a 100644
--- a/examples/index.js
+++ b/examples/index.js
@@ -23,13 +23,13 @@ var app = okcms.createApp({
description: {type: 'text'},
color: {type: 'enum', options: ["red","blue","green"]},
video: {type: 'video'},
- images: {type: 'captioned-image-list'}
+ images: {type: 'gallery'}
},
test: {
id: {type: 'string', hidden: true},
title: {type: 'string'},
flagged: {type: 'flag'},
- media: {type: 'media-list'},
+ media: {type: 'media'},
},
flour: {
id: {type: 'string', hidden: true},
diff --git a/themes/okadmin/templates/partials/inputs.liquid b/themes/okadmin/templates/partials/inputs.liquid
index bca397f..0fee61e 100644
--- a/themes/okadmin/templates/partials/inputs.liquid
+++ b/themes/okadmin/templates/partials/inputs.liquid
@@ -140,7 +140,7 @@
</div>
- {% elsif type == 'media-list' %}
+ {% elsif type == 'media-list' or type == 'media' %}
<div class="media-list group loaded">
<div class="fields">
<div class="add-image-button">
@@ -274,7 +274,7 @@
{% endfor %}
</ol>
</div>
- {% elsif type == 'captioned-image-list' %}
+ {% elsif type == 'captioned-image-list' or type == 'gallery' %}
<div class="image-list group loaded">
<div class="fields">
<div class="add-image-button">