Merge pull request #1874 from vcuculo/1785-fix-bookmarklet
Fixed bookmarklet
This commit is contained in:
commit
e278b39421
3 changed files with 5 additions and 1 deletions
|
|
@ -13,6 +13,7 @@
|
||||||
$(document).ready(function()
|
$(document).ready(function()
|
||||||
{
|
{
|
||||||
Publisher.open();
|
Publisher.open();
|
||||||
|
Publisher.bookmarklet = true;
|
||||||
$("#publisher").bind('ajax:success', function(){
|
$("#publisher").bind('ajax:success', function(){
|
||||||
$('h4').text("#{t('bookmarklet.post_success')}");
|
$('h4').text("#{t('bookmarklet.post_success')}");
|
||||||
Publisher.close();
|
Publisher.close();
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
//TODO: make this a widget
|
//TODO: make this a widget
|
||||||
var Publisher = {
|
var Publisher = {
|
||||||
|
bookmarklet = false,
|
||||||
close: function(){
|
close: function(){
|
||||||
Publisher.form().addClass('closed');
|
Publisher.form().addClass('closed');
|
||||||
Publisher.form().find("#publisher_textarea_wrapper").removeClass('active');
|
Publisher.form().find("#publisher_textarea_wrapper").removeClass('active');
|
||||||
|
|
@ -374,6 +375,7 @@ var Publisher = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onSuccess: function(data, json, xhr){
|
onSuccess: function(data, json, xhr){
|
||||||
|
if(Publisher.bookmarklet == false){
|
||||||
var isPostVisible = AspectFilters.selectedGUIDS.length == 0;
|
var isPostVisible = AspectFilters.selectedGUIDS.length == 0;
|
||||||
var postedTo = Publisher.selectedAspectIds();
|
var postedTo = Publisher.selectedAspectIds();
|
||||||
$.each(AspectFilters.selectedGUIDS, function(index, value){
|
$.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')
|
message: Diaspora.I18n.t('successfully_posted_message_to_an_aspects_that_is_not_visible')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//collapse publisher
|
//collapse publisher
|
||||||
Publisher.close();
|
Publisher.close();
|
||||||
Publisher.clear();
|
Publisher.clear();
|
||||||
|
|
|
||||||
|
|
@ -1035,6 +1035,7 @@ label
|
||||||
textarea
|
textarea
|
||||||
:z-index 2
|
:z-index 2
|
||||||
:border none
|
:border none
|
||||||
|
:height 50px
|
||||||
|
|
||||||
&:focus
|
&:focus
|
||||||
:outline 0
|
:outline 0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue