From 39a1874ce3c4cfc5f8d41e6c13db307c5c35421e Mon Sep 17 00:00:00 2001 From: danielvincent Date: Tue, 29 Jun 2010 16:28:12 -0700 Subject: [PATCH] DG IZ; all input fields are now textareas on dashboard page --- app/views/comments/_comments.html.haml | 3 ++- app/views/comments/_new_comment.html.haml | 7 +++--- app/views/shared/_publisher.haml | 30 +++++++---------------- public/javascripts/view.js | 3 ++- public/stylesheets/application.css | 14 ++++++++--- public/stylesheets/sass/application.sass | 19 +++++++++++--- 6 files changed, 41 insertions(+), 35 deletions(-) diff --git a/app/views/comments/_comments.html.haml b/app/views/comments/_comments.html.haml index 374f585e5..89237d1d7 100644 --- a/app/views/comments/_comments.html.haml +++ b/app/views/comments/_comments.html.haml @@ -1,6 +1,7 @@ %div.comments - = render "comments/new_comment", :post => post %ul.comment_set - for comment in post.comments = render "comments/comment", :comment => comment + %li.comment + = render "comments/new_comment", :post => post diff --git a/app/views/comments/_new_comment.html.haml b/app/views/comments/_new_comment.html.haml index 230b49ec9..15696ad4b 100644 --- a/app/views/comments/_new_comment.html.haml +++ b/app/views/comments/_new_comment.html.haml @@ -1,5 +1,4 @@ = form_tag("/comments", :remote => true, :class =>"new_comment", :id => "new_comment-#{post.id}") do - %p - = text_field_tag "comment_text", 'leave a comment', :size => 30, :name => 'comment[text]' - = hidden_field_tag "comment_post_id", "#{post.id}", :name => "comment[post_id]" - = submit_tag 'comment', :id => "comment_submit_#{post.id}", :name => "commit" + = text_area_tag "comment_text", 'leave a comment', :size => 30, :name => 'comment[text]' + = hidden_field_tag "comment_post_id", "#{post.id}", :name => "comment[post_id]" + = submit_tag 'comment', :id => "comment_submit_#{post.id}", :name => "commit" diff --git a/app/views/shared/_publisher.haml b/app/views/shared/_publisher.haml index 7746ffe78..8dd81f57d 100644 --- a/app/views/shared/_publisher.haml +++ b/app/views/shared/_publisher.haml @@ -25,15 +25,7 @@ ul#publisher_content_pickers li { display: inline; - padding: 0.6em; - - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - - border: 1px solid #666; - - background-color: rgba( 255,255,255, 1 ); + margin-right: 20px; } :javascript @@ -74,21 +66,17 @@ #publisher_form = form_for StatusMessage.new, :remote => true do |f| = f.error_messages - %p - = f.text_field :message, :value => "Message" - = f.submit "Post" - + = f.text_area :message, :value => "Message" + = f.submit "Post" = form_for Bookmark.new, :remote => true do |f| = f.error_messages - %p - = f.text_field :title, :value => "Title" - = f.text_field :link, :value => "URL" - = f.submit "Post" + = f.text_area :title, :value => "Title" + = f.text_area :link, :value => "URL" + = f.submit "Post" = form_for Blog.new, :remote => true do |f| = f.error_messages - %p - = f.text_field :title, :value => "Title" - = f.text_area :body - = f.submit "Post" + = f.text_field :title, :value => "Title" + = f.text_area :body, :id => "blog_editor" + = f.submit "Post" diff --git a/public/javascripts/view.js b/public/javascripts/view.js index 97bd0f111..ba577c5e5 100644 --- a/public/javascripts/view.js +++ b/public/javascripts/view.js @@ -1,6 +1,7 @@ $(document).ready(function(){ tinyMCE.init({ - mode : "textareas", + mode : "exact", + elements: "blog_editor", theme : "advanced", plugins : "emotions,spellchecker,advhr,insertdatetime,preview", diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 770982fe7..b481429a0 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -197,7 +197,7 @@ ul.comment_set { margin-bottom: 0.5em; background-color: #f2f8fc; padding: 0.6em; - border-radius: 5px; } + border-bottom: 1px solid #cccccc; } ul.comment_set li.comment .from { color: #666666; font-weight: normal; } @@ -205,9 +205,6 @@ ul.comment_set { color: #333333; font-weight: bold; } -.new_comment { - display: none; } - img#profile_picture { width: 100%; } @@ -228,3 +225,12 @@ img#user_picture { #debug_info { margin-top: 20px; } + +textarea { + font-family: "lucida grande", "sans-serif"; + font-size: 14px; + height: 18px; + display: block; + width: 100%; + -moz-box-shadow: 0 2px 0px white; + border-top: 1px solid #999999; } diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 3fd2b4660..ff94dcf1e 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -117,7 +117,6 @@ ul#stream_filters :top 0.8em :bottom 0.4em - #main :width 100% @@ -232,7 +231,8 @@ ul.comment_set :bottom 0.5em :background-color #F2F8FC :padding 0.6em - :border-radius 5px + :border + :bottom 1px solid #ccc .from :color #666 @@ -243,8 +243,6 @@ ul.comment_set :font :weight bold -.new_comment - :display none img#profile_picture @@ -269,3 +267,16 @@ img#user_picture #debug_info :margin-top 20px + + +textarea + :font + :family 'lucida grande', 'sans-serif' + :size 14px + :height 18px + :display block + :width 100% + + :-moz-box-shadow 0 2px 0px #fff + + :border-top 1px solid #999