Sha256: fd5fecad2074e5835194a609ec9f0ea77496999a9d3176a97104f2e472914e4f

Contents?: true

Size: 1.41 KB

Versions: 35

Compression:

Stored size: 1.41 KB

Contents

 /*Side Chat*/
  $('.toggle-menu').jPushMenu();
  /*Chat*/
    
    $('.side-chat .content .contacts li a').click(function(e){
      var user = $('<span>' + $(this).html() + '</span>');
      user.find('i').remove();
      
      $('#chat-box').fadeIn();
      $('#chat-box .header span').html(user.html());
      $("#chat-box .nano").nanoScroller();
      $("#chat-box .nano").nanoScroller({ scroll: 'top' });
      e.preventDefault();
    });
    
    $('#chat-box .header .close').click(function(r){
      var h = $(this).parents(".header");
      var p = h.parent();
      
      p.fadeOut();
      r.preventDefault();
    });
    
    function addText(input){
      var message = input.val();
      var chat = input.parents('#chat-box').find('.content .conversation');
      
      if(message != ''){
       input.val('');
       chat.append('<li class="text-right"><p>' + message + '</p></li>');
       $("#chat-box .nano .content").animate({ scrollTop: $("#chat-box .nano .content .conversation").height() }, 1000);
      }
    }
    
    
    $('.chat-input .input-group button').click(function(){
      addText( $(this).parents('.input-group').find('input'));
    });
    
    $('.chat-input .input-group input').keypress(function(e){
      if(e.which == 13) {
         addText($(this));
      }
    });
    
    $(document).click(function(){
      $('#chat-box').fadeOut();
    
    });

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
wrgem-0.0.55 lib/generators/wradmin/template/lib/assets/javascripts/side-chats.js
wrgem-0.0.54 lib/generators/wradmin/template/lib/assets/javascripts/side-chats.js
wrgem-0.0.53 lib/generators/wradmin/template/lib/assets/javascripts/side-chats.js
wrgem-0.0.52 lib/generators/wradmin/template/lib/assets/javascripts/side-chats.js
wrgem-0.0.51 lib/generators/wradmin/template/lib/assets/javascripts/side-chats.js
wrgem-0.0.50 lib/generators/wradmin/template/lib/assets/javascripts/side-chats.js
wrgem-0.0.49 lib/generators/wradmin/template/lib/assets/javascripts/side-chats.js
wrgem-0.0.48 lib/generators/wradmin/template/lib/assets/javascripts/side-chats.js
wrgem-0.0.47 lib/generators/wradmin/template/lib/assets/javascripts/side-chats.js
wrgem-0.0.46 lib/generators/wradmin/template/lib/assets/javascripts/side-chats.js
wrgem-0.0.45 lib/generators/wradmin/template/lib/assets/javascripts/side-chats.js
wrgem-0.0.44 lib/generators/wradmin/template/lib/assets/javascripts/side-chats.js
wrgem-0.0.43 lib/generators/wradmin/template/lib/assets/javascripts/side-chats.js
wrgem-0.0.42 lib/generators/wradmin/template/lib/assets/javascripts/side-chats.js
wrgem-0.0.41 lib/generators/wradmin/template/lib/assets/javascripts/side-chats.js
wrgem-0.0.40 lib/generators/wradmin/template/lib/assets/javascripts/side-chats.js
wrgem-0.0.39 lib/generators/wradmin/template/lib/assets/javascripts/side-chats.js
wrgem-0.0.38 lib/generators/wradmin/template/lib/assets/javascripts/side-chats.js
wrgem-0.0.37 lib/generators/wradmin/template/lib/assets/javascripts/side-chats.js
wrgem-0.0.35 lib/generators/wradmin/template/lib/assets/javascripts/side-chats.js