<commit_before>% Nitrogen Web Framework for Erlang
% Copyright (c) 2008-2010 <NAME>
% See MIT-LICENSE for licensing information.

-module (element_spinner).
-include_lib ("wf.hrl").
-compile(export_all).

reflect() -> record_info(fields, spinner).

render_element(Record) -> 
    wf:wire(spinner, #hide{}),
    Terms = #panel {
        html_id=Record#spinner.html_id,
        id=Record#spinner.id,
        anchor=Record#spinner.anchor,
        class=[spinner, Record#spinner.class],
        style=Record#spinner.style,
        body=#image { image=Record#spinner.image }
    },

    wf:render(Terms).

<commit_msg>fix runtime spinner error, make it work<commit_after>% Nitrogen Web Framework for Erlang
% Copyright (c) 2008-2010 <NAME>
% See MIT-LICENSE for licensing information.

-module (element_spinner).
-include_lib ("wf.hrl").
-compile(export_all).

reflect() -> record_info(fields, spinner).

render_element(Record) ->
    wf:wire(Record#spinner.html_id,
            #script{script=["objs('me').hide()",
                            ".ajaxStart(function(){$(this).show();})",
                            ".ajaxStop(function(){$(this).hide();});" ]} ),
    #panel {
        html_id=Record#spinner.html_id,
        id=Record#spinner.id,
        anchor=Record#spinner.anchor,
        class=[spinner, Record#spinner.class],
        style=Record#spinner.style,
        body=#image { image=Record#spinner.image }
    }.

{'fraction_non_alphanumeric': 0.15422535211267605, 'fraction_numerical': 0.011267605633802818, 'mean_word_length': 3.0951008645533142, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '6945475', 'n_tokens_mistral': 480, 'n_tokens_neox': 452, 'n_words': 80}