<commit_before>{% load staticfiles %}
{% block content %}

<input type="{{ type }}" name="{{ name }}"{% if value %} value="{{ value }}"{% endif %}{% if required %} required{% endif %}{% include "floppyforms/attrs.html" %} data-rangeslider><output class="btn-default" id="js-output-{{ attrs.id }}"></output>

<script type="text/javascript">
(function(){
    leonardo.utils.loadResource({
        src: "{% static 'js/lib/rangeslider.min.js' %}",
        callback: function(){
            $(function () {
                var $document = $(document);
                 var selector = '[data-rangeslider]';
                 var $inputRange = $(selector); /** * Example functionality to demonstrate a value feedback * and change the output's value. */


                 function valueOutput(element) {
                     var value = element.value;
                     var output = element.parentNode.getElementsByTagName('output')[0];
                     output.innerHTML = value;
                 } /** * Initial value output */
                 for (var i = $inputRange.length - 1; i >= 0; i--) {
                     valueOutput($inputRange[i]);
                 } /** * Update value output */
                 $document.on('input', selector, function (e) {
                     valueOutput(e.target);
                 }); /** * Initialize the elements */
                 $inputRange.rangeslider({
                     polyfill: false
                 }); /** * Example functionality to demonstrate programmatic value changes */
                 $document.on('click', '#js-example-change-value button', function (e) {
                     var $inputRange = $('[data-rangeslider]', e.target.parentNode);
                     var value = $('input[type="number"]', e.target.parentNode)[0].value;
                     $inputRange.val(value).change();
                 }); /** * Example functionality to demonstrate programmatic attribute changes */
                 $document.on('click', '#js-example-change-attributes button', function (e) {
                     var $inputRange = $('[data-rangeslider]', e.target.parentNode);
                     var attributes = {
                         min: $('input[name="min"]', e.target.parentNode)[0].value,
                         max: $('input[name="max"]', e.target.parentNode)[0].value,
                         step: $('input[name="step"]', e.target.parentNode)[0].value
                     };
                     $inputRange.attr(attributes).rangeslider('update', true);
                 }); /** * Example functionality to demonstrate destroy functionality */
                 $document.on('click', '#js-example-destroy button[data-behaviour="destroy"]', function (e) {
                     $('input[type="range"]', e.target.parentNode).rangeslider('destroy');<commit_msg>fix slider value output<commit_after>{% load staticfiles %}
{% block content %}

<input type="{{ type }}" name="{{ name }}"{% if value %} value="{{ value }}"{% endif %}{% if required %} required{% endif %}{% include "floppyforms/attrs.html" %} data-rangeslider><output class="btn-default" id="js-output-{{ attrs.id }}"></output>

<script type="text/javascript">
(function(){
    leonardo.utils.loadResource({
        src: "{% static 'js/lib/rangeslider.min.js' %}",
        callback: function(){
            $(function () {
                var $document = $(document);
                 var selector = '[data-rangeslider]';
                 var $inputRange = $(selector); /** * Example functionality to demonstrate a value feedback * and change the output's value. */


                 function valueOutput(element) {
                     var value = element.value;
                     var output = element.parentNode.getElementsByTagName('output')[0];
                     output.innerHTML = value;
                 } /** * Initial value output */
                 for (var i = $inputRange.length - 1; i >= 0; i--) {
                     valueOutput($inputRange[i]);
                 } /** * Update value output */
                 $document.on('input', selector, function (e) {
                     valueOutput(e.target);
                 }); /** * Example functionality to demonstrate programmatic value changes */
                 $document.on('click', '#js-example-change-value button', function (e) {
                     var $inputRange = $('[data-rangeslider]', e.target.parentNode);
                     var value = $('input[type="number"]', e.target.parentNode)[0].value;
                     $inputRange.val(value).change();
                 }); /** * Example functionality to demonstrate programmatic attribute changes */
                 $document.on('click', '#js-example-change-attributes button', function (e) {
                     var $inputRange = $('[data-rangeslider]', e.target.parentNode);
                     var attributes = {
                         min: $('input[name="min"]', e.target.parentNode)[0].value,
                         max: $('input[name="max"]', e.target.parentNode)[0].value,
                         step: $('input[name="step"]', e.target.parentNode)[0].value
                     };
                     $inputRange.attr(attributes).rangeslider('update', true);
                 }); /** * Example functionality to demonstrate destroy functionality */
                 $document.on('click', '#js-example-destroy button[data-behaviour="destroy"]', function (e) {
                     $('input[type="range"]', e.target.parentNode).rangeslider('destroy');
{'fraction_non_alphanumeric': 0.15827598696124592, 'fraction_numerical': 0.0025353132922854038, 'mean_word_length': 1.9315286624203822, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '1875360', 'n_tokens_mistral': 1398, 'n_tokens_neox': 1333, 'n_words': 308}