From f849c7dc08064eaa1ee1265b2d06a9c527adf66f Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 17 Aug 2016 03:29:17 -0400 Subject: fix weird box ish --- examples/db.json | 4 +++- examples/index.js | 5 +++-- themes/okadmin/public/js/app.js | 9 ++++----- themes/okadmin/templates/partials/inputs.liquid | 16 ++++++++-------- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/examples/db.json b/examples/db.json index 5fee377..5f65c21 100644 --- a/examples/db.json +++ b/examples/db.json @@ -197,7 +197,8 @@ "height": "400", "title": "ee12b137-1c8a-400a-87e3-89cbee7b4da6.mp4", "thumb": "http://okfocus.s3.amazonaws.com/misc/okcms/video.png", - "autoplay": "true" + "autoplay": "true", + "loop": "false" }, { "type": "youtube", @@ -207,6 +208,7 @@ "height": "360", "title": "dëf lëöpär¨d¨¨¨¨<>~!@~#!:I!@", "thumb": "http://i.ytimg.com/vi/y_35kXCQxN4/hqdefault.jpg", + "autoplay": "false", "loop": "true" }, { diff --git a/examples/index.js b/examples/index.js index 341a50b..fa3281e 100644 --- a/examples/index.js +++ b/examples/index.js @@ -1,6 +1,7 @@ var okcms = require('..'); var isProduction = process.env.OK_PRODUCTION === 'true' +var port = process.env.PORT || 1337; var app = okcms.createApp({ @@ -90,6 +91,6 @@ var app = okcms.createApp({ } } -}).listen(1337); +}).listen(port) -console.log('Server listening at port 1337...'); +console.log('Server listening at port %d...', port); diff --git a/themes/okadmin/public/js/app.js b/themes/okadmin/public/js/app.js index 578d99f..d65fcc6 100644 --- a/themes/okadmin/public/js/app.js +++ b/themes/okadmin/public/js/app.js @@ -232,12 +232,11 @@ var OKAdmin = function(){ // Modify flags checkboxes such that unchecked ones return "false" // instead of nothing - $('.property .flag').each(function(i, el) { - var input = el.querySelector('input') - var checked = !!input.checked + $('.property input[type=checkbox]').each(function(i, el) { + var checked = !!el.checked if (!checked) { - $(input).attr('value', 'false') - input.checked = true + el.value = 'false' + el.setAttribute('checked', true) } }) diff --git a/themes/okadmin/templates/partials/inputs.liquid b/themes/okadmin/templates/partials/inputs.liquid index f093a0d..bca397f 100644 --- a/themes/okadmin/templates/partials/inputs.liquid +++ b/themes/okadmin/templates/partials/inputs.liquid @@ -228,9 +228,9 @@ - + - + @@ -254,19 +254,19 @@ {% elsif image.type and image.type == "link" %} {% else %}
  • - + - - + + {{image.caption | strip_html}}
  • -- cgit v1.2.3-70-g09d2