From 2bb18a66be585384acd5a4068a4311a976e28c57 Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Tue, 8 Sep 2015 22:55:56 -0700 Subject: add banner to opt in to html content change --- public/editor/editor.js | 12 ++++++++++++ public/editor/style.css | 26 ++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) (limited to 'public') diff --git a/public/editor/editor.js b/public/editor/editor.js index 526a444..f0e9519 100644 --- a/public/editor/editor.js +++ b/public/editor/editor.js @@ -89,6 +89,18 @@ $(function() { }); }); + $("#micropub-html-btn").click(function(){ + $.post('/settings/html-content', { + html: 1 + }, function(data){ + }); + }); + + $.getJSON('/settings/html-content', function(data){ + if(data.html == '0') { + $('.micropub-html-warning').show(); + } + }); }); function reset_page() { diff --git a/public/editor/style.css b/public/editor/style.css index 8ae753a..6d02615 100644 --- a/public/editor/style.css +++ b/public/editor/style.css @@ -22,6 +22,32 @@ h1, h2, h3, h4, h5, h6, th, td, caption { font-weight:normal; } img { border: 0; } +.micropub-html-warning { + max-width: 600px; + margin-left: auto; + margin-right: auto; + margin-top: 68px; + margin-bottom: -80px; + font-size: 12px; + font-family: sans-serif; + line-height: 16px; + background: #fcf8e3; + border: 1px #faebcc solid; +} +.micropub-html-warning div { + padding: 10px 20px; +} +.micropub-html-warning button { + display: block; +} +#micropub-html-btn { + border-radius: 6px; + padding: 0 12px; + height: 28px; + background: #e4f8fa; + float: right; +} + /* ************************************** */ /* Toolbar */ -- cgit v1.2.3