fixed bookmarklet
This commit is contained in:
parent
af569204b8
commit
9072de5096
2 changed files with 19 additions and 16 deletions
|
|
@ -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,24 +375,25 @@ var Publisher = {
|
|||
}
|
||||
},
|
||||
onSuccess: function(data, json, xhr){
|
||||
var isPostVisible = AspectFilters.selectedGUIDS.length == 0;
|
||||
var postedTo = Publisher.selectedAspectIds();
|
||||
$.each(AspectFilters.selectedGUIDS, function(index, value){
|
||||
if(postedTo.indexOf(parseInt(value))>-1)
|
||||
isPostVisible = true;
|
||||
});
|
||||
|
||||
if(isPostVisible) {
|
||||
ContentUpdater.addPostToStream(json.html);
|
||||
Diaspora.page.stream.addPost($("#" + json.post_id));
|
||||
}
|
||||
else {
|
||||
Diaspora.widgets.flashMessages.render({
|
||||
success: true,
|
||||
message: Diaspora.I18n.t('successfully_posted_message_to_an_aspects_that_is_not_visible')
|
||||
if(Publisher.bookmarklet == false){
|
||||
var isPostVisible = AspectFilters.selectedGUIDS.length == 0;
|
||||
var postedTo = Publisher.selectedAspectIds();
|
||||
$.each(AspectFilters.selectedGUIDS, function(index, value){
|
||||
if(postedTo.indexOf(parseInt(value))>-1)
|
||||
isPostVisible = true;
|
||||
});
|
||||
}
|
||||
|
||||
if(isPostVisible) {
|
||||
ContentUpdater.addPostToStream(json.html);
|
||||
Diaspora.page.stream.addPost($("#" + json.post_id));
|
||||
}
|
||||
else {
|
||||
Diaspora.widgets.flashMessages.render({
|
||||
success: true,
|
||||
message: Diaspora.I18n.t('successfully_posted_message_to_an_aspects_that_is_not_visible')
|
||||
});
|
||||
}
|
||||
}
|
||||
//collapse publisher
|
||||
Publisher.close();
|
||||
Publisher.clear();
|
||||
|
|
|
|||
|
|
@ -899,6 +899,7 @@ label
|
|||
textarea
|
||||
:resize none
|
||||
:width 455px
|
||||
:height 50px
|
||||
:margin 0
|
||||
|
||||
&.mention_popup
|
||||
|
|
|
|||
Loading…
Reference in a new issue