Merge remote branch 'lfortin/js-formatting'
Conflicts: public/javascripts/web-socket-receiver.js
This commit is contained in:
commit
c1844c9be2
5 changed files with 16 additions and 13 deletions
|
|
@ -72,8 +72,8 @@ $(document).ready(function() {
|
|||
$("#no_contacts").fadeOut(200);
|
||||
}
|
||||
|
||||
$(".badges").prepend(json['badge_html']);
|
||||
$(this).parent().html(json['button_html']);
|
||||
$(".badges").prepend(json.badge_html);
|
||||
$(this).parent().html(json.button_html);
|
||||
$(this).fadeTo(200,1);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ $(document).ready(function() {
|
|||
$("#edit_photo_toggle").bind('click', function(evt) {
|
||||
evt.preventDefault();
|
||||
$("#photo_edit_options").toggle();
|
||||
$(".edit_photo input[type='text']").first().focus();
|
||||
$(".edit_photo input:text").first().focus();
|
||||
});
|
||||
|
||||
$('.edit_photo').bind('ajax:loading', function(data, json, xhr) {
|
||||
|
|
@ -26,7 +26,7 @@ $(document).ready(function() {
|
|||
|
||||
$('.edit_photo').bind('ajax:success', function(data, json, xhr) {
|
||||
json = $.parseJSON(json);
|
||||
$(".edit_photo input[type='text']").val(json.photo.caption);
|
||||
$(".edit_photo input:text").val(json.photo.caption);
|
||||
$("#caption").html(json.photo.caption);
|
||||
$("#show_photo").find("img").fadeTo(200,1);
|
||||
$("#photo_spinner").hide();
|
||||
|
|
|
|||
|
|
@ -56,8 +56,8 @@ var Stream = {
|
|||
// reshare button action
|
||||
$stream.delegate(".reshare_button", "click", function(evt) {
|
||||
evt.preventDefault();
|
||||
button = $(this)
|
||||
box = button.siblings(".reshare_box");
|
||||
var button = $(this);
|
||||
var box = button.siblings(".reshare_box");
|
||||
if (box.length > 0) {
|
||||
button.toggleClass("active");
|
||||
box.toggle();
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
var View = {
|
||||
initialize: function() {
|
||||
/* Buttons */
|
||||
$("input[type='submit']").addClass("button");
|
||||
$("input:submit").addClass("button");
|
||||
|
||||
/* Tooltips */
|
||||
this.tooltips.bindAll();
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
var WebSocketReceiver = {
|
||||
initialize: function(url) {
|
||||
ws = new WebSocket(url);
|
||||
var ws = new WebSocket(url);
|
||||
WSR.socket = ws;
|
||||
|
||||
//Attach onmessage to websocket
|
||||
ws.onmessage = WSR.onMessage;
|
||||
ws.onclose = function() { WSR.debug("socket closed"); };
|
||||
ws.onclose = function() {
|
||||
WSR.debug("socket closed");
|
||||
};
|
||||
ws.onopen = function() {
|
||||
ws.send(location.pathname);
|
||||
WSR.debug("connected...");
|
||||
|
|
@ -39,9 +42,9 @@ var WebSocketReceiver = {
|
|||
},
|
||||
|
||||
processPerson: function(response) {
|
||||
form = $('.webfinger_form');
|
||||
var form = $('.webfinger_form');
|
||||
form.siblings('#loader').hide();
|
||||
result_ul = form.siblings('#request_result');
|
||||
var result_ul = form.siblings('#request_result');
|
||||
if(response.status == 'fail') {
|
||||
result_ul.siblings('.error').show();
|
||||
result_ul.find('.error').text(response.response).show();
|
||||
|
|
@ -88,11 +91,11 @@ var WebSocketReceiver = {
|
|||
|
||||
if( $(".comment[data-guid='"+commentId+"']").length == 0 ) {
|
||||
|
||||
post = $("*[data-guid='"+postId+"']'");
|
||||
var post = $("*[data-guid='"+postId+"']'");
|
||||
$('.comments li:last', post ).before(
|
||||
$(html).fadeIn("fast", function(){})
|
||||
);
|
||||
toggler = $('.show_post_comments', post);
|
||||
var toggler = $('.show_post_comments', post);
|
||||
|
||||
if(toggler.length > 0){
|
||||
toggler.html(
|
||||
|
|
|
|||
Loading…
Reference in a new issue