<commit_before>/* global $, alert, ejs */

'use strict';

var apiResponse = require('./../apiResponse');

module.exports =  {
    el: null,
    $el: null,

    $list: null,
    $title: null,

    options: {
        eventDispatcher: null,
        itemTemplate : ''
    },
    init: function(options, element) {
        this.options = $.extend({},this.options,options);

        this.el  = element;
        this.$el = $(element);

        this.$listWrapper = this.$el.find('*[data-pinlist-list]').first();
        this.$title = this.$el.find('*[data-pinlist-title]').first();
        this._init();
        return this;
    },

    _init: function() {
        this._eventSubscribe();
    },

    _eventSubscribe: function() {
        var me = this;
        this.options.eventDispatcher.subscribe('init', function() {
            me.uiEmptyList();
            // me.load();
            var data = require('../mockup/pins.js');
            me.uiFillList(data);
        });
    },
    load: function(filters) {
        var url = '/api/pins/list',
            type = 'GET',
            filters = filters || {};
        $.ajax({
            url: url,
            type: type,
            data: filters
        })
        .done(function(data) {
            var response = new apiResponse();
            response.init(data);
            switch(response.status) {
                case response.STATUS_ERROR :

                    break;    <commit_msg>Fix path forgotten in previous commit<commit_after>/* global $, alert, ejs */

'use strict';

var apiResponse = require('./../apiResponse');

module.exports =  {
    el: null,
    $el: null,

    $list: null,
    $title: null,

    options: {
        eventDispatcher: null,
        itemTemplate : ''
    },
    init: function(options, element) {
        this.options = $.extend({},this.options,options);

        this.el  = element;
        this.$el = $(element);

        this.$listWrapper = this.$el.find('*[data-pinlist-list]').first();
        this.$title = this.$el.find('*[data-pinlist-title]').first();
        this._init();
        return this;
    },

    _init: function() {
        this._eventSubscribe();
    },

    _eventSubscribe: function() {
        var me = this;
        this.options.eventDispatcher.subscribe('init', function() {
            me.uiEmptyList();
            // me.load();
            var data = require('../../mockup/pins.js');
            me.uiFillList(data);
        });
    },
    load: function(filters) {
        var url = '/api/pins/list',
            type = 'GET',
            filters = filters || {};
        $.ajax({
            url: url,
            type: type,
            data: filters
        })
        .done(function(data) {
            var response = new apiResponse();
            response.init(data);
            switch(response.status) {
                case response.STATUS_ERROR :

                    break;    
{'fraction_non_alphanumeric': 0.15720674234606122, 'fraction_numerical': 0.0, 'mean_word_length': 1.6364460562103353, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3728889', 'n_tokens_mistral': 844, 'n_tokens_neox': 813, 'n_words': 165}