<commit_before>class Members12345 extends AppController
  constructor:(options, data)->
    options = $.extend
      view : mainView = (new MembersMainView cssClass : "content-page members")
    ,options
    super options,data

    @getSingleton('windowController').on "FeederListViewItemCountChanged", (count, itemClass, filterName)=>
      if @_searchValue and itemClass is MembersListItemView and filterName is 'everything'
        @setCurrentViewHeader count

  bringToFront:()->
    @propagateEvent (KDEventType : 'ApplicationWantsToBeShown', globalEvent : yes),
      options :
        name : 'Members'
      data : @getView()

  initAndBringToFront:(options, callback)->
    @bringToFront()
    callback()

  createFeed:(view)->
    appManager.tell 'Feeder', 'createContentFeedController', {
      itemClass          : MembersListItemView
      listControllerClass   : MembersListViewController
      limitPerPage          : 10
      help                  :
        subtitle            : "Learn About Members"
        tooltip             :
          title             : "<p class=\"bigtwipsy\">These people are all members of koding.com. Learn more about them and their interests, activity and coding prowess here.</p>"
          placement         : "above"
      filter                :
        everything          :
          title             : "All Members <span class='member-numbers-all'></span>"
          optional_title    : if @_searchValue then "<span class='optional_title'></span>" else null
          dataSource        : (selector, options, callback)=>
            if @_searchValue
              @setCurrentViewHeader "Searching for <strong>#{@_searchValue}</strong>..."
              KD.remote.api.JAccount.byRelevance @_searchValue, options, callback
            else
              KD.remote.api.JAccount.someWithRelationship selector, options, callback
              #{currentDelegate} = @getSingleton('mainController').getVisitor()
              @setCurrentViewNumber 'all'
        followed            :
          title             : "Followers <span class='member-numbers-followers'></span>"
          dataSource        : (selector, options, callback)=>
            KD.whoami().fetchFollowersWithRelationship selector, options, callback
            @setCurrentViewNumber 'followers'
        followings          :
          title             : "Following <span class='member-numbers-following'></span>"
          dataSource        : (selector, options, callback)=>
            KD.whoami().fetchFollowingWithRelationship selector, options, callback
            @setCurrentViewNumber 'following'
      sort                  :
        'meta.modifiedAt'   :
          title             : "Latest activity"
          direction         : -1
        'counts.followers'  :
          title             : "Most Followers"
          direction         : -1
        'counts.following'  :
          title             : "Most Following"
          direction         : -1
    }, (controller)=>
      view.addSubView @_lastSubview = controller.getView()

  createFeedForContentDisplay:(view, account, followersOrFollowing)->

    appManager.tell 'Feeder', 'createContentFeedController', {
      itemClass          : MembersListItemView
      listControllerClass   : MembersListViewController
      limitPerPage          : 10
      # singleDataSource      : (selector, options, callback)=>
        # filterFunc selector, options, callback
      help                  :
        subtitle            : "Learn About Members"
        tooltip             :
          title             : "<p class=\"bigtwipsy\">These people are all members of koding.com. Learn more about them and their interests, activity and coding prowess here.</p>"
          placement         : "above"
      filter                :
        everything          :
          title             : "All"
          dataSource        : (selector, options, callback)=>
            if followersOrFollowing is "followers"
              account.fetchFollowersWithRelationship selector, options, callback
            else
              account.fetchFollowingWithRelationship selector, options, callback
      sort                  :
        'meta.modifiedAt'   :
          title             : "Latest activity"
          direction         : -1
        'counts.followers'  :
          title             : "Most Followers"
          direction         : -1
        'counts.following'  :
          title             : "Most Following"
          direction         : -1
    }, (controller)=>

      view.addSubView controller.getView()
      contentDisplayController = @getSingleton "contentDisplayController"
      contentDisplayController.emit "ContentDisplayWantsToBeShown", view

  createFolloweeContentDisplay:(account, filter)->
    # log "I need to create followee for", account, filter
    newView = (new MembersContentDisplayView cssClass : "content-display #{filter}")
    newView.createCommons(account, filter)
    @createFeedForContentDisplay newView, account, filter

  createLikedFeedForContentDisplay:(view, account)->

    appManager.tell 'Feeder', 'createContentFeedController', {
      subItemClass          : ActivityListItemView
      listCssClass          : "activity-related"
      limitPerPage          : 8
      help                  :
        subtitle            : "Learn Personal feed"
        tooltip             :
          title             : "<p class=\"bigtwipsy\">This is the liked feed of a single Koding user.</p>"<commit_msg>Use itemClass for new Feeder<commit_after>class Members12345 extends AppController
  constructor:(options, data)->
    options = $.extend
      view : mainView = (new MembersMainView cssClass : "content-page members")
    ,options
    super options,data

    @getSingleton('windowController').on "FeederListViewItemCountChanged", (count, itemClass, filterName)=>
      if @_searchValue and itemClass is MembersListItemView and filterName is 'everything'
        @setCurrentViewHeader count

  bringToFront:()->
    @propagateEvent (KDEventType : 'ApplicationWantsToBeShown', globalEvent : yes),
      options :
        name : 'Members'
      data : @getView()

  initAndBringToFront:(options, callback)->
    @bringToFront()
    callback()

  createFeed:(view)->
    appManager.tell 'Feeder', 'createContentFeedController', {
      itemClass             : MembersListItemView
      listControllerClass   : MembersListViewController
      limitPerPage          : 10
      help                  :
        subtitle            : "Learn About Members"
        tooltip             :
          title             : "<p class=\"bigtwipsy\">These people are all members of koding.com. Learn more about them and their interests, activity and coding prowess here.</p>"
          placement         : "above"
      filter                :
        everything          :
          title             : "All Members <span class='member-numbers-all'></span>"
          optional_title    : if @_searchValue then "<span class='optional_title'></span>" else null
          dataSource        : (selector, options, callback)=>
            if @_searchValue
              @setCurrentViewHeader "Searching for <strong>#{@_searchValue}</strong>..."
              KD.remote.api.JAccount.byRelevance @_searchValue, options, callback
            else
              KD.remote.api.JAccount.someWithRelationship selector, options, callback
              #{currentDelegate} = @getSingleton('mainController').getVisitor()
              @setCurrentViewNumber 'all'
        followed            :
          title             : "Followers <span class='member-numbers-followers'></span>"
          dataSource        : (selector, options, callback)=>
            KD.whoami().fetchFollowersWithRelationship selector, options, callback
            @setCurrentViewNumber 'followers'
        followings          :
          title             : "Following <span class='member-numbers-following'></span>"
          dataSource        : (selector, options, callback)=>
            KD.whoami().fetchFollowingWithRelationship selector, options, callback
            @setCurrentViewNumber 'following'
      sort                  :
        'meta.modifiedAt'   :
          title             : "Latest activity"
          direction         : -1
        'counts.followers'  :
          title             : "Most Followers"
          direction         : -1
        'counts.following'  :
          title             : "Most Following"
          direction         : -1
    }, (controller)=>
      view.addSubView @_lastSubview = controller.getView()

  createFeedForContentDisplay:(view, account, followersOrFollowing)->

    appManager.tell 'Feeder', 'createContentFeedController', {
      itemClass             : MembersListItemView
      listControllerClass   : MembersListViewController
      limitPerPage          : 10
      # singleDataSource      : (selector, options, callback)=>
        # filterFunc selector, options, callback
      help                  :
        subtitle            : "Learn About Members"
        tooltip             :
          title             : "<p class=\"bigtwipsy\">These people are all members of koding.com. Learn more about them and their interests, activity and coding prowess here.</p>"
          placement         : "above"
      filter                :
        everything          :
          title             : "All"
          dataSource        : (selector, options, callback)=>
            if followersOrFollowing is "followers"
              account.fetchFollowersWithRelationship selector, options, callback
            else
              account.fetchFollowingWithRelationship selector, options, callback
      sort                  :
        'meta.modifiedAt'   :
          title             : "Latest activity"
          direction         : -1
        'counts.followers'  :
          title             : "Most Followers"
          direction         : -1
        'counts.following'  :
          title             : "Most Following"
          direction         : -1
    }, (controller)=>

      view.addSubView controller.getView()
      contentDisplayController = @getSingleton "contentDisplayController"
      contentDisplayController.emit "ContentDisplayWantsToBeShown", view

  createFolloweeContentDisplay:(account, filter)->
    # log "I need to create followee for", account, filter
    newView = (new MembersContentDisplayView cssClass : "content-display #{filter}")
    newView.createCommons(account, filter)
    @createFeedForContentDisplay newView, account, filter

  createLikedFeedForContentDisplay:(view, account)->

    appManager.tell 'Feeder', 'createContentFeedController', {
      itemClass             : ActivityListItemView
      listCssClass          : "activity-related"
      limitPerPage          : 8
      help                  :
        subtitle            : "Learn Personal feed"
        tooltip             :
          title             : "<p class=\"bigtwipsy\">This is the liked feed of a single Koding user.</p>"
{'fraction_non_alphanumeric': 0.08690142120032587, 'fraction_numerical': 0.0028967140400108626, 'mean_word_length': 1.919661733615222, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 65, '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': '2769340', 'n_tokens_mistral': 2740, 'n_tokens_neox': 2611, 'n_words': 663}