diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-07-30 18:48:45 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-07-30 18:48:45 -0400 |
commit | e1dac308cfd76041973b2719d8b9e993ce8d2c68 (patch) | |
tree | b850ba54e5512dbb5f4f0fe2acb40282af91ceb5 | |
parent | bb2a315df93c173db84d2d6fc0cf1b2bdbd931a7 (diff) | |
download | guff-e1dac308cfd76041973b2719d8b9e993ce8d2c68.tar.bz2 guff-e1dac308cfd76041973b2719d8b9e993ce8d2c68.zip |
relax lang constraint and wire posts list to site editor
-rw-r--r-- | data/assets/js/admin/tabs/posts.js | 2 | ||||
-rw-r--r-- | 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 |