<commit_before><?php

/**
 * Allows user to pick a Font Awesome Icon
 *
 * @author  <NAME> <<EMAIL>>
 * @package  silverstripe-fontawesome-iconpickerfield
 */
class FontAwesomeIconPickerField extends TextField {

    public function __construct($name, $title = null, $value = '', $maxLength = null, $form = null){
        parent::__construct($name, $title, $value, $maxLength, $form);
    }

    public function Field($properties = array()) {
        $this->addExtraClass('form-control icp icp-auto');
        Requirements::css('//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css');
        Requirements::css('//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css');
        Requirements::css(FONTAWESOMEICONPICKER_DIR . '/code/thirdparty/fontawesome-iconpicker-1.0.0/dist/css/fontawesome-iconpicker.min.css');

//        Requirements::set_force_js_to_bottom(true);
        Requirements::javascript(FONTAWESOMEICONPICKER_DIR . '/code/thirdparty/fontawesome-iconpicker-1.0.0/dist/js/fontawesome-iconpicker.js');

        Requirements::customScript(<<<JS
            jQuery(function() {
                jQuery('.icp-auto').iconpicker();
            });
JS
    );

        return parent::Field($properties);
    }
<commit_msg>force requirements js to bottom<commit_after><?php

/**
 * Allows user to pick a Font Awesome Icon
 *
 * @author  <NAME> <<EMAIL>>
 * @package  silverstripe-fontawesome-iconpickerfield
 */
class FontAwesomeIconPickerField extends TextField {

    public function __construct($name, $title = null, $value = '', $maxLength = null, $form = null){
        parent::__construct($name, $title, $value, $maxLength, $form);
    }

    public function Field($properties = array()) {
        $this->addExtraClass('form-control icp icp-auto');
        Requirements::css('//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css');
        Requirements::css('//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css');
        Requirements::css(FONTAWESOMEICONPICKER_DIR . '/code/thirdparty/fontawesome-iconpicker-1.0.0/dist/css/fontawesome-iconpicker.min.css');

        Requirements::set_force_js_to_bottom(true);
        Requirements::javascript(FONTAWESOMEICONPICKER_DIR . '/code/thirdparty/fontawesome-iconpicker-1.0.0/dist/js/fontawesome-iconpicker.js');

        Requirements::customScript(<<<JS
            jQuery(function() {
                jQuery('.icp-auto').iconpicker();
            });
JS
    );

        return parent::Field($properties);
    }

{'fraction_non_alphanumeric': 0.15396825396825398, 'fraction_numerical': 0.009523809523809525, 'mean_word_length': 3.415061295971979, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 11, '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': '802414', 'n_tokens_mistral': 840, 'n_tokens_neox': 806, 'n_words': 110}