diff --git a/app/views/comments/partials/new/_form.html.erb b/app/views/comments/partials/new/_form.html.erb index 8a1188a24..57924c432 100644 --- a/app/views/comments/partials/new/_form.html.erb +++ b/app/views/comments/partials/new/_form.html.erb @@ -1,4 +1,4 @@ -
+
<%= form_tag(comments_path) do %> diff --git a/app/views/wiki_pages/edit.html.erb b/app/views/wiki_pages/edit.html.erb index e3532f840..0bb6d5f98 100644 --- a/app/views/wiki_pages/edit.html.erb +++ b/app/views/wiki_pages/edit.html.erb @@ -5,7 +5,7 @@

<%= @wiki_page.pretty_title %> (Editing)

-
+
<%= simple_form_for(@wiki_page) do |f| %> diff --git a/app/views/wiki_pages/new.html.erb b/app/views/wiki_pages/new.html.erb index 321ef69c3..610c54f81 100644 --- a/app/views/wiki_pages/new.html.erb +++ b/app/views/wiki_pages/new.html.erb @@ -5,7 +5,7 @@

New Wiki Page

-
+
<%= simple_form_for(@wiki_page) do |f| %> diff --git a/app/views/wiki_pages/show.html.erb b/app/views/wiki_pages/show.html.erb index 1088def9a..514c5721a 100644 --- a/app/views/wiki_pages/show.html.erb +++ b/app/views/wiki_pages/show.html.erb @@ -5,7 +5,7 @@

<%= @wiki_page.pretty_title %>

-
+
<%= format_text(@wiki_page.body) %>
diff --git a/public/javascripts/compiled/default.js b/public/javascripts/compiled/default.js index 6a1ccad8d..46068b65c 100644 --- a/public/javascripts/compiled/default.js +++ b/public/javascripts/compiled/default.js @@ -1025,6 +1025,7 @@ $(document).ready(function() { Danbooru.Comment = {}; Danbooru.Comment.initialize_all = function() { + $("#c-comments div.dtext-preview").hide(); this.initialize_response_link(); this.initialize_preview_button(); } diff --git a/public/javascripts/src/app/comments.js b/public/javascripts/src/app/comments.js index 7050f2dcd..c0de9e749 100644 --- a/public/javascripts/src/app/comments.js +++ b/public/javascripts/src/app/comments.js @@ -2,6 +2,7 @@ Danbooru.Comment = {}; Danbooru.Comment.initialize_all = function() { + $("#c-comments div.dtext-preview").hide(); this.initialize_response_link(); this.initialize_preview_button(); } diff --git a/public/stylesheets/compiled/default.css b/public/stylesheets/compiled/default.css index 6f62001b7..1da000fac 100644 --- a/public/stylesheets/compiled/default.css +++ b/public/stylesheets/compiled/default.css @@ -221,6 +221,8 @@ form.simple_form { /*** DText Preview ***/ div.dtext p { margin-bottom: 1em; } +div.dtext ul { + margin-left: 1em; } /*** Pools Posts ***/ div#c-pools-posts div#a-new form { @@ -267,9 +269,14 @@ div.comments-for-post div.list-of-comments article { width: 40em; float: left; } div.comments-for-post div.comment-preview { - width: 40em; margin-bottom: 2em; } +div.dtext-preview { + border: 2px dashed #AAA; + padding: 1em; + margin: 1em; + width: 40em; } + div#c-comments div#a-index div.header span.info { margin-right: 1.5em; } div#c-comments div#a-index div.header strong, div#c-comments div#a-index div.header time { @@ -389,21 +396,12 @@ div#artists div#show { font-style: italic; } /*** Wiki Pages ***/ -div#c-wiki-pages div.wiki-page-body ul { - margin-left: 1em; } -div#c-wiki-pages div.wiki-page-body p { - margin-bottom: 1em; } div#c-wiki-pages div#a-edit textarea, div#c-wiki-pages div#a-new textarea { width: 500px; height: 40em; } -div#c-wiki-pages div#a-edit div#preview, div#c-wiki-pages div#a-new div#preview { - border: 2px dashed #AAA; - padding: 1em; - margin: 1em; - width: 40em; } - div#c-wiki-pages div#a-edit div#preview h1:first-child, div#c-wiki-pages div#a-new div#preview h1:first-child { - color: #333; - margin-bottom: 0.5em; } +div#c-wiki-pages div#a-edit div#preview h1:first-child, div#c-wiki-pages div#a-new div#preview h1:first-child { + color: #333; + margin-bottom: 0.5em; } /*** Users ***/ div.users div.new { diff --git a/public/stylesheets/src/default.scss b/public/stylesheets/src/default.scss index e1e7be55d..5a64127ac 100644 --- a/public/stylesheets/src/default.scss +++ b/public/stylesheets/src/default.scss @@ -319,6 +319,10 @@ div.dtext { p { margin-bottom: 1em; } + + ul { + margin-left: 1em; + } } @@ -408,11 +412,17 @@ div.comments-for-post { } div.comment-preview { - width: 40em; margin-bottom: 2em; } } +div.dtext-preview { + border: 2px dashed #AAA; + padding: 1em; + margin: 1em; + width: 40em; +} + div#c-comments { div#a-index { div.header { @@ -655,16 +665,6 @@ div#artists { /*** Wiki Pages ***/ div#c-wiki-pages { - div.wiki-page-body { - ul { - margin-left: 1em; - } - - p { - margin-bottom: 1em; - } - } - div#a-edit, div#a-new { textarea { width: 500px; @@ -672,11 +672,6 @@ div#c-wiki-pages { } div#preview { - border: 2px dashed #AAA; - padding: 1em; - margin: 1em; - width: 40em; - h1:first-child { color: #333; margin-bottom: 0.5em;