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

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

parent 4105f90a
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.6.custom.min.js
- public/javascripts/vendor/jquery-ui-1.8.9.custom.min.js
- public/javascripts/vendor/jquery.infinitescroll.min.js
- public/javascripts/vendor/facebox.js
- public/javascripts/vendor/timeago.js
......
......@@ -7,12 +7,10 @@
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,7 +73,6 @@ var Stream = {
json = $.parseJSON(json);
WebSocketReceiver.addPostToStream(json.post_id, json.html);
//collapse publisher
Publisher.close();
Publisher.clear();
});
......@@ -90,7 +89,7 @@ var Stream = {
});
$(".stream").find(".delete").live('ajax:success', function(data, html, xhr) {
$(this).parents(".status_message").fadeOut(150);
$(this).parents(".stream_element").hide('blind', { direction: 'vertical' }, 300);
});
},
......
Ce diff est replié.
......@@ -121,11 +121,10 @@ var WebSocketReceiver = {
addPostToStream: function(postId, html) {
if( $(".stream_element[data-guid='" + postId + "']").length == 0 ) {
var showMessage = function() {
$("#main_stream:not('.show')").prepend(
$(html).fadeIn("fast", function() {
$("#main_stream").find("label").first().inFieldLabels();
})
);
var streamElement = $(html);
streamElement.addClass('hidden');
$("#main_stream:not('.show')").prepend(streamElement);
streamElement.show('blind', { direction: 'vertical' }, 200);
};
if( $("#no_posts").is(":visible") ) {
......@@ -133,9 +132,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 white
:background-color transparent
:overflow hidden
:z-index 99999
:width 247px !important
:min-width 247px !important
:width 100%
:-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
......@@ -40,6 +45,11 @@
.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,13 +6,6 @@
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');
......@@ -30,11 +23,6 @@ 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() {
......@@ -46,11 +34,6 @@ 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