From 3943bbc8346d4ff58f725db2e5e4de9622d89fab Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 8 Apr 2015 22:56:57 -0400 Subject: adding enum type --- examples/index.js | 2 +- themes/okadmin/public/css/main.css | 6 +++++- themes/okadmin/templates/partials/inputs.liquid | 9 +++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/examples/index.js b/examples/index.js index 8846e3a..56693ce 100644 --- a/examples/index.js +++ b/examples/index.js @@ -14,7 +14,7 @@ var app = okcms.createApp({ type: {type: 'string', id: true}, title: {type: 'string'}, description: {type: 'text'}, - color: {type: 'enum', fields: ["red","blue","green"]} + color: {type: 'enum', options: ["red","blue","green"]} } }, diff --git a/themes/okadmin/public/css/main.css b/themes/okadmin/public/css/main.css index 1c02066..c5694eb 100644 --- a/themes/okadmin/public/css/main.css +++ b/themes/okadmin/public/css/main.css @@ -134,7 +134,8 @@ label { } .main.resource form input, -.main.resource form textarea { +.main.resource form textarea, +.main.resource form select { display: block; float: left; width: 20em; @@ -150,6 +151,9 @@ label { padding: 0.5em; height: 15em; } +.main.resource form select { + margin-top: 0.5em; +} .main.resource form button { float: left; padding: 0.5em; diff --git a/themes/okadmin/templates/partials/inputs.liquid b/themes/okadmin/templates/partials/inputs.liquid index ad5beab..551a66c 100644 --- a/themes/okadmin/templates/partials/inputs.liquid +++ b/themes/okadmin/templates/partials/inputs.liquid @@ -5,26 +5,27 @@
+ {% if type == 'string' %} - {% else if type == 'text' %} + {% elsif type == 'text' %} - {% else if type == 'enum' %} + {% elsif type == 'enum' %} {% else %} -- cgit v1.2.3-70-g09d2