From 6518a89302f9631d07cc6cd202d2efaa2b809440 Mon Sep 17 00:00:00 2001 From: vcuculo Date: Fri, 2 Sep 2011 00:44:22 +0200 Subject: [PATCH 1/2] fixed bookmarlet --- app/views/status_messages/bookmarklet.html.haml | 1 + public/javascripts/publisher.js | 4 +++- public/stylesheets/blueprint/screen.css | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/views/status_messages/bookmarklet.html.haml b/app/views/status_messages/bookmarklet.html.haml index adb24271c..bbb2133c4 100644 --- a/app/views/status_messages/bookmarklet.html.haml +++ b/app/views/status_messages/bookmarklet.html.haml @@ -13,6 +13,7 @@ $(document).ready(function() { Publisher.open(); + Publisher.bookmarklet = true; $("#publisher").bind('ajax:success', function(){ $('h4').text("#{t('bookmarklet.post_success')}"); Publisher.close(); diff --git a/public/javascripts/publisher.js b/public/javascripts/publisher.js index e17751999..db58a22fd 100644 --- a/public/javascripts/publisher.js +++ b/public/javascripts/publisher.js @@ -5,6 +5,7 @@ //TODO: make this a widget var Publisher = { + bookmarklet = false, close: function(){ Publisher.form().addClass('closed'); Publisher.form().find("#publisher_textarea_wrapper").removeClass('active'); @@ -374,6 +375,7 @@ var Publisher = { } }, onSuccess: function(data, json, xhr){ + if(Publisher.bookmarklet == false){ var isPostVisible = AspectFilters.selectedGUIDS.length == 0; var postedTo = Publisher.selectedAspectIds(); $.each(AspectFilters.selectedGUIDS, function(index, value){ @@ -391,7 +393,7 @@ var Publisher = { message: Diaspora.I18n.t('successfully_posted_message_to_an_aspects_that_is_not_visible') }); } - + } //collapse publisher Publisher.close(); Publisher.clear(); diff --git a/public/stylesheets/blueprint/screen.css b/public/stylesheets/blueprint/screen.css index 0c3b45f6f..91fe2a315 100644 --- a/public/stylesheets/blueprint/screen.css +++ b/public/stylesheets/blueprint/screen.css @@ -84,7 +84,7 @@ input[type=text]:focus, input[type=password]:focus, input.text:focus, input.titl input[type=text], input[type=password], input.text, input.title, textarea, select {margin:0.5em 0;} input.text, input.title {width:300px;padding:5px;} input.title {font-size:1.5em;} -textarea {width:390px;height:250px;padding:5px;} +textarea {width:390px;height:50px;padding:5px;} input[type=checkbox], input[type=radio], input.checkbox, input.radio {position:relative;top:.25em;} form.inline {line-height:3;} form.inline p {margin-bottom:0;} From b30a25713ef14f8079ad46eb6bf572d2b5759b0b Mon Sep 17 00:00:00 2001 From: vcuculo Date: Fri, 2 Sep 2011 01:11:25 +0200 Subject: [PATCH 2/2] fixed bookmarklet --- public/stylesheets/blueprint/screen.css | 2 +- public/stylesheets/sass/application.sass | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/public/stylesheets/blueprint/screen.css b/public/stylesheets/blueprint/screen.css index 91fe2a315..0c3b45f6f 100644 --- a/public/stylesheets/blueprint/screen.css +++ b/public/stylesheets/blueprint/screen.css @@ -84,7 +84,7 @@ input[type=text]:focus, input[type=password]:focus, input.text:focus, input.titl input[type=text], input[type=password], input.text, input.title, textarea, select {margin:0.5em 0;} input.text, input.title {width:300px;padding:5px;} input.title {font-size:1.5em;} -textarea {width:390px;height:50px;padding:5px;} +textarea {width:390px;height:250px;padding:5px;} input[type=checkbox], input[type=radio], input.checkbox, input.radio {position:relative;top:.25em;} form.inline {line-height:3;} form.inline p {margin-bottom:0;} diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index c0cf96f70..a67d94e12 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -1027,6 +1027,7 @@ label textarea :z-index 2 :border none + :height 50px &:focus :outline 0