<commit_before>class Cloudsdale.Views.CloudsUserDialog extends Backbone.View
  
  template: JST['clouds/user_dialog']
  
  model: 'user'
  tagName: 'div'
  className: 'container-inner container-inner-secondary'

  events:
    'click a.close[data-dismiss="dialog"]' : "close"
    'click a[data-action="ban"]' : 'toggleUserBan'
  
  initialize: (args) ->
    
    @render()
    @bindEvents()
    
    this
  
  render: ->
    $(@el).html(@template(model: @model))
    
    resizeBottomWrapper(@.$('.cloud-sidebar-bottom'))
    
    this
  
  bindEvents: ->
    @model.on 'change', (event,user) =>
      @render()
          
  close: ->
    $(@el).parent().removeClass('show-secondary')
    setTimeout =>
      $(@el).remove()
    , 400
    false
  
  toggleUserBan: ->
    
    @.$('a[data-action="ban"]').attr('disabled','disabled')
    
    if @model.get('is_banned')
      @model.unban
        success: (user) =>
          @model.set(user)
          
    else
      @model.ban
        success: (user) =>
          @model.set(user)<commit_msg>Added alternate way to invoke the Skype call and Add<commit_after>class Cloudsdale.Views.CloudsUserDialog extends Backbone.View
  
  template: JST['clouds/user_dialog']
  
  model: 'user'
  tagName: 'div'
  className: 'container-inner container-inner-secondary'

  events:
    'click a.close[data-dismiss="dialog"]' : "close"
    'click a[data-action="ban"]' : 'toggleUserBan'
    'click a[data-action="skype:add"]' : 'skypeAdd'
    'click a[data-action="skype:call"]' : 'skypeCall'
  
  initialize: (args) ->
    
    @render()
    @bindEvents()
    
    this
  
  render: ->
    $(@el).html(@template(model: @model))
    
    resizeBottomWrapper(@.$('.cloud-sidebar-bottom'))
    
    this
  
  bindEvents: ->
    @model.on 'change', (event,user) =>
      @render()
          
  close: ->
    $(@el).parent().removeClass('show-secondary')
    setTimeout =>
      $(@el).remove()
    , 400
    false
  
  toggleUserBan: ->
    
    @.$('a[data-action="ban"]').attr('disabled','disabled')
    
    if @model.get('is_banned')
      @model.unban
        success: (user) =>
          @model.set(user)
          
    else
      @model.ban
        success: (user) =>
          @model.set(user)  skypeAdd: ->
    window.open("skype:#{@model.get('skype_name')}?add")
    false
  
  skypeCall: ->
    window.open("skype:#{@model.get('skype_name')}?call")
    false
{'fraction_non_alphanumeric': 0.17590662776156732, 'fraction_numerical': 0.0025010421008753647, 'mean_word_length': 2.4782608695652173, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2557341', 'n_tokens_mistral': 840, 'n_tokens_neox': 825, 'n_words': 128}