From 7db10b2a6cd6cbea246ccd6c77fe6518be76da20 Mon Sep 17 00:00:00 2001
From: Jules Laplace
Date: Wed, 8 Apr 2015 22:46:46 -0400
Subject: install.sh
---
examples/index.js | 3 ++-
install.sh | 5 +++++
themes/okadmin/templates/partials/inputs.liquid | 12 +++++++++++-
themes/okadmin/templates/resource.liquid | 2 +-
4 files changed, 19 insertions(+), 3 deletions(-)
create mode 100755 install.sh
diff --git a/examples/index.js b/examples/index.js
index 669715d..8846e3a 100644
--- a/examples/index.js
+++ b/examples/index.js
@@ -13,7 +13,8 @@ var app = okcms.createApp({
bread: {
type: {type: 'string', id: true},
title: {type: 'string'},
- description: {type: 'text'}
+ description: {type: 'text'},
+ color: {type: 'enum', fields: ["red","blue","green"]}
}
},
diff --git a/install.sh b/install.sh
new file mode 100755
index 0000000..e0a43c4
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,5 @@
+cd app/node_modules ; for i in * ; do cd $i ; npm install; cd .. ; done ; cd ../..
+npm install
+cd examples
+node index
+
diff --git a/themes/okadmin/templates/partials/inputs.liquid b/themes/okadmin/templates/partials/inputs.liquid
index 2726473..ad5beab 100644
--- a/themes/okadmin/templates/partials/inputs.liquid
+++ b/themes/okadmin/templates/partials/inputs.liquid
@@ -16,7 +16,17 @@
{% if spec.disabled %}
disabled="true"
{% endif %}
- name="{{name}}" rows="40" cols="80">{{spec.value}}
+ name="{{name}}">{{spec.value}}
+ {% else if type == 'enum' %}
+
{% else %}
Admin template doesn't support '{{type}}' properties!
{% endif %}
diff --git a/themes/okadmin/templates/resource.liquid b/themes/okadmin/templates/resource.liquid
index 2a6d2ce..26d62f2 100644
--- a/themes/okadmin/templates/resource.liquid
+++ b/themes/okadmin/templates/resource.liquid
@@ -5,7 +5,7 @@
- EDIT {{ resource.type }} {{ resource.spec.title.id }}
+ EDIT {{ resource.type }} '{{ resource.spec.title.id }}'