From e1dac308cfd76041973b2719d8b9e993ce8d2c68 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sat, 30 Jul 2016 18:48:45 -0400 Subject: relax lang constraint and wire posts list to site editor --- data/assets/js/admin/tabs/posts.js | 2 +- data/init.yaml | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/data/assets/js/admin/tabs/posts.js b/data/assets/js/admin/tabs/posts.js index 38fd094..eb861d5 100644 --- a/data/assets/js/admin/tabs/posts.js +++ b/data/assets/js/admin/tabs/posts.js @@ -200,7 +200,7 @@ jQuery(function($) { if (data.edit == 'user') { $('#user-edit-dialog').data(data).modal('show'); } else if (data.edit == 'site') { - alert('TODO: edit site'); + $('#site-edit-dialog').data(data).modal('show'); } // stop event diff --git a/data/init.yaml b/data/init.yaml index de78d23..e851dab 100644 --- a/data/init.yaml +++ b/data/init.yaml @@ -207,11 +207,13 @@ init_sql: -- site description body TEXT NOT NULL DEFAULT '', - -- site description + -- site language + -- FIXME: should i use the IANA registry to tighten this up? + -- src: http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry lang TEXT NOT NULL DEFAULT 'en-US' CHECK ( -- e.g. 'en' or 'en-US' - (LENGTH(lang) = 2 OR LENGTH(lang) = 5) AND - (lang LIKE '__' OR lang LIKE '__-__') + (LENGTH(lang) > 2 OR LENGTH(lang) < 20) AND + lang NOT LIKE '% %' ), -- date that site was created -- cgit v1.2.3