Skip to content
Extraits de code Groupes Projets
Valider e6ae5e13 rédigé par danielvincent's avatar danielvincent
Parcourir les fichiers

publisher works through ajax filters

parent f02c13ee
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
-# Copyright (c) 2010, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
= render 'shared/publisher', :aspect => aspect, :aspect_ids => aspect_ids
#main_stream.stream
= render 'shared/stream', :posts => post_hashes
= will_paginate @posts
......@@ -15,13 +15,14 @@
= info_text(t('.handle_explanation'))
.span-15.append-1
= render 'shared/publisher', :aspect => @aspect, :aspect_ids => @aspect_ids
/= render 'aspects/no_contacts_message', :aspect => @aspect, :contact_count => @contacts.count
/= render 'aspects/no_posts_message', :post_count => @post_hashes.length, :contact_count => @contacts.count
#main_stream.stream
= render 'shared/stream', :posts => @post_hashes
= will_paginate @posts
#aspect_stream_container
= render 'aspect_stream',
:aspect => @aspect,
:aspect_ids => @aspect_ids,
:post_hashes => @post_hashes
.span-6.last
= render 'aspects/all_aspects_contacts'
......
$('#main_stream').html("<%= escape_javascript(render('shared/stream', :posts => @post_hashes)) %>");
$('#aspect_stream_container').html("<%= escape_javascript(render('aspects/aspect_stream', :aspect => @aspect, :aspect_ids => @aspect_ids, :post_hashes => @post_hashes)) %>");
......@@ -52,4 +52,4 @@
});
}
window.onload = createUploader;
createUploader();
......@@ -3,32 +3,6 @@
-# the COPYRIGHT file.
- content_for :head do
:javascript
$(document).ready(function(){
$("div.public_toggle input").bind("click", function(evt){
$("#publisher_service_icons").toggleClass("dim");
if($(this).attr('checked') == true){
$(".question_mark").click();
};
});
if($("textarea#status_message_message").val() != ""){
$("#publisher").removeClass("closed");
$("#publisher").find("textarea").focus();
$("#publisher .options_and_submit").show();
}
$("#publisher textarea, #publisher input").bind("focus", function(evt){
$("#publisher .options_and_submit").show();
});
$("#click_to_share").find("a").bind("click", function(evt){
$("#publisher").removeClass("closed");
$("#publisher").find("textarea").focus();
});
});
#publisher{:class=>"closed"}
#click_to_share
......@@ -61,9 +35,9 @@
#fileInfo
= image_tag 'ajax-loader.gif', :class => 'hidden', :id => "publisher_spinner"
- if aspect == :all
= status.submit t('.share'), :title => t('.share_with_all'), :disable_with => t('.posting')
= status.submit t('.share'), :title => t('.share_with_all'), :disable_with => t('.posting'), :class => 'button'
- else
= status.submit t('.share'), :title => t('.share_with', :aspect => aspect), :disable_with => t('.posting')
= status.submit t('.share'), :title => t('.share_with', :aspect => aspect), :disable_with => t('.posting'), :class => 'button'
- if aspect == :all
.public_toggle
......
......@@ -31,6 +31,7 @@ javascripts:
- public/javascripts/aspect-edit.js
- public/javascripts/contact-list.js
home:
- public/javascripts/publisher.js
- public/javascripts/aspect-filters.js
people:
- public/javascripts/contact-list.js
......
......@@ -3,7 +3,7 @@
* the COPYRIGHT file.
*/
$(function(){
$(document).ready(function(){
var selectedGUIDS = [];
$("#aspect_nav li").each(function(){
......@@ -20,7 +20,7 @@ $(function(){
e.preventDefault();
// loading animation
$("#main_stream").fadeTo(100, 0.4);
$("#aspect_stream_container").fadeTo(100, 0.4);
// filtering //////////////////////
......@@ -53,6 +53,7 @@ $(function(){
}
// generate new url
baseURL = baseURL.replace('#','');
baseURL += '?';
for(i=0; i < selectedGUIDS.length; i++){
baseURL += 'a_ids[]='+ selectedGUIDS[i] +'&';
......@@ -66,7 +67,7 @@ $(function(){
url : baseURL,
dataType : 'script',
success : function(data){
$("#main_stream").fadeTo(100, 1);
$("#aspect_stream_container").fadeTo(100, 1);
}
});
......
/* Copyright (c) 2010, Diaspora Inc. This file is
* licensed under the Affero General Public License version 3 or later. See
* the COPYRIGHT file.
*/
$(document).ready(function(){
$("div.public_toggle input").live("click", function(evt){
$("#publisher_service_icons").toggleClass("dim");
if($(this).attr('checked') == true){
$(".question_mark").click();
};
});
if($("textarea#status_message_message").val() != ""){
$("#publisher").removeClass("closed");
$("#publisher").find("textarea").focus();
$("#publisher .options_and_submit").show();
}
$("#publisher textarea, #publisher input").live("focus", function(evt){
$("#publisher .options_and_submit").show();
});
$("#click_to_share").find("a").live("click", function(evt){
$("#publisher").removeClass("closed");
$("#publisher").find("textarea").focus();
});
});
......@@ -106,12 +106,12 @@ var Stream = {
});
});
$(".new_status_message").bind('ajax:loading', function(data, json, xhr) {
$(".new_status_message").live('ajax:loading', function(data, json, xhr) {
$("#photodropzone").find('li').remove();
$("#publisher textarea").removeClass("with_attachments");
});
$(".new_status_message").bind('ajax:success', function(data, json, xhr) {
$(".new_status_message").live('ajax:success', function(data, json, xhr) {
json = $.parseJSON(json);
WebSocketReceiver.addPostToStream(json.post_id, json.html);
//collapse publisher
......
......@@ -937,6 +937,7 @@ label
> li
:display inline
:margin 0
:right 2px
:padding 4px 0
a
:-webkit-border-radius 2px
......@@ -945,9 +946,9 @@ label
:text-shadow 0 1px 0 #444
:padding 1px 7px
:padding 1px 5px
:color #CCC
:color #999
:max-width 120px
:overflow hidden
:text-overflow ellipsis
......@@ -958,7 +959,7 @@ label
:color #eee
&.selected a
:text-shadow 0 1px 0 #eee
:text-shadow 0 1px 0 #fff
:font
:weight bold
:background
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter