Skip to content
Extraits de code Groupes Projets
Valider f1c63939 rédigé par Raphael Sofaer's avatar Raphael Sofaer
Parcourir les fichiers

Revert "added sliding animation to stream elements, shadow on autocomplete box."

This reverts commit dc760f95.
parent 4997fbdb
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -10,7 +10,7 @@ javascripts:
- public/javascripts/vendor/jquery.tipsy.js
- public/javascripts/vendor/jquery.hotkeys.js
- public/javascripts/vendor/jquery.autoresize.min.js
- public/javascripts/vendor/jquery-ui-1.8.9.custom.min.js
- public/javascripts/vendor/jquery-ui-1.8.6.custom.min.js
- public/javascripts/vendor/jquery.infinitescroll.min.js
- public/javascripts/vendor/facebox.js
- public/javascripts/vendor/timeago.js
......
......@@ -7,10 +7,12 @@
var Publisher = {
close: function(){
Publisher.form().addClass('closed');
Publisher.form().find(".options_and_submit").hide();
Publisher.form().find("textarea").css('min-height', '');
},
open: function(){
Publisher.form().removeClass('closed');
Publisher.form().find(".options_and_submit").show();
Publisher.form().find("textarea").css('min-height', '42px');
},
cachedForm : false,
......
......@@ -73,6 +73,7 @@ var Stream = {
json = $.parseJSON(json);
WebSocketReceiver.addPostToStream(json.post_id, json.html);
//collapse publisher
Publisher.close();
Publisher.clear();
});
......@@ -89,7 +90,7 @@ var Stream = {
});
$(".stream").find(".delete").live('ajax:success', function(data, html, xhr) {
$(this).parents(".stream_element").hide('blind', { direction: 'vertical' }, 300);
$(this).parents(".status_message").fadeOut(150);
});
},
......
Ce diff est replié.
......@@ -121,10 +121,11 @@ var WebSocketReceiver = {
addPostToStream: function(postId, html) {
if( $(".stream_element[data-guid='" + postId + "']").length == 0 ) {
var showMessage = function() {
var streamElement = $(html);
streamElement.addClass('hidden');
$("#main_stream:not('.show')").prepend(streamElement);
streamElement.show('blind', { direction: 'vertical' }, 200);
$("#main_stream:not('.show')").prepend(
$(html).fadeIn("fast", function() {
$("#main_stream").find("label").first().inFieldLabels();
})
);
};
if( $("#no_posts").is(":visible") ) {
......@@ -132,9 +133,9 @@ var WebSocketReceiver = {
} else {
showMessage();
}
Diaspora.widgets.timeago.updateTimeAgo();
$("#main_stream .stream_element:first-child label").inFieldLabels();
}
Diaspora.widgets.timeago.updateTimeAgo();
$("label").inFieldLabels();
},
onPageForClass: function(className) {
......
.ac_results
:border 1px solid #999
:background-color transparent
:background-color white
:overflow hidden
:z-index 99999
:min-width 247px !important
:width 100%
:width 247px !important
:-webkit-border-radius 3px
:-moz-border-radius 3px
:border-radius 3px
:-webkit-box-shadow 0 1px 3px #999
:-moz-box-shadow 0 1px 3px #999
:box-shadow 0 1px 3px #999
.ac_results ul
:width 100%
:list-style-position outside
......@@ -45,11 +40,6 @@
.ac_odd
:background-color #fafafa
:background-color rgba(250,250,250,0.95)
.ac_even
:background-color #fff
:background-color rgba(255,255,255,0.95)
.ac_over
:background-color #3F8FBA
......
......@@ -6,6 +6,13 @@
describe("Publisher", function() {
describe("initialize", function(){
it("calls close when it does not have text", function(){
spec.loadFixture('aspects_index');
spyOn(Publisher, 'close');
Publisher.initialize();
expect(Publisher.close).toHaveBeenCalled();
});
it("does not call close when there is prefilled text", function(){
spec.loadFixture('aspects_index_prefill');
spyOn(Publisher, 'close');
......@@ -23,6 +30,11 @@ describe("Publisher", function() {
Publisher.open();
expect(Publisher.form().hasClass('closed')).toBeFalsy();
});
it("shows the options_and_submit div", function() {
expect(Publisher.form().find(".options_and_submit:visible").length).toBe(0);
Publisher.open();
expect(Publisher.form().find(".options_and_submit:visible").length).toBe(1);
});
});
describe("close", function() {
beforeEach(function() {
......@@ -34,6 +46,11 @@ describe("Publisher", function() {
Publisher.close();
expect(Publisher.form().hasClass('closed')).toBeTruthy();
});
it("hides the options_and_submit div", function() {
expect(Publisher.form().find(".options_and_submit:visible").length).toBe(1);
Publisher.close();
expect(Publisher.form().find(".options_and_submit:visible").length).toBe(0);
});
});
describe("input", function(){
beforeEach(function(){
......
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