summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2016-10-24 15:48:10 -0400
committerJules Laplace <jules@okfoc.us>2016-10-24 15:48:10 -0400
commitbc38a56567c20f3205b89dae710d131655b0220d (patch)
treeec74e77b24e65b7371ef364454c083a32189cc71
parent3593fb22cb19366fb1bf30c4ecfbf4428b8aad82 (diff)
customize link-list placeholder textv0.2.3
-rw-r--r--examples/index.js2
-rw-r--r--package.json2
-rw-r--r--themes/okadmin/templates/partials/inputs.liquid10
3 files changed, 6 insertions, 8 deletions
diff --git a/examples/index.js b/examples/index.js
index 998aa1d..e72a9ce 100644
--- a/examples/index.js
+++ b/examples/index.js
@@ -28,7 +28,7 @@ var app = okcms.createApp({
id: {type: 'string'},
title: {type: 'string'},
body: {type: 'text'},
- links: {type: 'link-list'},
+ links: {type: 'link-list', textLabel: "A", linkLabel: "B"},
},
bread: {
type: {type: 'string', id: true},
diff --git a/package.json b/package.json
index 7d0647a..74cf612 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "okcms",
- "version": "0.2.2",
+ "version": "0.2.3",
"description": "The dopest CMS on the planet.",
"main": "app/index.js",
"scripts": {
diff --git a/themes/okadmin/templates/partials/inputs.liquid b/themes/okadmin/templates/partials/inputs.liquid
index 063f9b7..60466de 100644
--- a/themes/okadmin/templates/partials/inputs.liquid
+++ b/themes/okadmin/templates/partials/inputs.liquid
@@ -98,13 +98,11 @@
name="{{name}}[{{forloop.index0}}][text]"
value="{{link.text | escape}}"
type="text"
- placeholder="Link text"
class="link-input link-text">
<input
name="{{name}}[{{forloop.index0}}][uri]"
value="{{link.uri | escape}}"
type="text"
- placeholder="URL"
class="link-input link-uri">
<button class="remove-link-btn btn">
-
@@ -116,10 +114,10 @@
<div class="handle"></div>
<input type="text"
class="link-input-new link-text"
- placeholder="Link text">
+ placeholder="{% if spec.textLabel %}{{ spec.textLabel }}{% else %}Link text{% endif %}">
<input type="text"
class="link-input-new link-uri"
- placeholder="http://www.example.com">
+ placeholder="{% if spec.linkLabel %}{{ spec.linkLabel }}{% else %}http://www.example.com{% endif %}">
<button class="add-link-btn btn">+</button>
<script type="text/html" class="link-template">
@@ -129,13 +127,13 @@
name="{{name}}[][text]"
value=""
type="text"
- placeholder="Link text"
+ placeholder="{% if spec.textLabel %}{{ spec.textLabel }}{% else %}Link text{% endif %}"
class="link-input link-text">
<input
name="{{name}}[][uri]"
value=""
type="text"
- placeholder="URL"
+ placeholder="{% if spec.linkLabel %}{{ spec.linkLabel }}{% else %}http://www.example.com{% endif %}"
class="link-input link-uri">
<button class="remove-link-btn btn">
-