<commit_before><div class="page">
  <%= render :partial => "/helpers/build_table_text_description", :locals => {:settings => settings} %>
</div>
<% if settings[:display_method]=="print_by_checkboxes" %>
    <div class="print-window-buttons" style="float:right">
      <a class="print_page_functionality print-window-print-dialog-button" href="" onclick="window.print()">
        <i class="icon-print"></i><%= t('itl-gem.print') %></a>
      <a class="print_page_functionality print-window-close-button" href="" onclick="window.close();">
        <i class="icon-remove"></i><%= t('itl-gem.close') %></a>
    </div>
    <div style="clear:both"></div>

<% end %>

<% if settings[:display_method].blank? %>
    <div class="tabs">
      <%= yield :table_form_tabs %>

      <div class="info">


        <% if settings[:checkboxes] %>
    <span><%= t('itl-gem.picked') %><strong>
      <span title="<%= t('itl-gem.number_checked_rows_on_all_pages') %>" id="<%= settings[:form_id]+ "_active_checkboxes_count" %>">
                                         <%= !settings[:params][:checkbox_pool].blank? ? settings[:params][:checkbox_pool].split(",").count : 0 %>
                                       </span>
    </strong>
    </span>
        <% end %>

        <% if settings[:display_method].blank? %>
            <% if settings[:checkboxes] %>
                <script type="text/javascript">
                    function submit_in_new_window(form_id, spec_attr_name, spec_attr_value) {
                        var form_original = $("#" + form_id);

                          // setting selected options right to the code, otherwise it wont be cloned
                        form_original.find("select option:not(:selected)").each( function (){
                              $(this).removeAttr("selected");
                        });

                        form_original.find("select option:selected").each( function (){
                           $(this).attr("selected", "selected");
                        });

                        // create new form by cloning without events
                        var form = form_original.clone(false)

                        // disabling ajax
                        form.removeAttr("data-remote");

                        form.attr("target", "_blank");
                        form.attr("action", form_original.attr("action"));
                        form.attr("style", "display: none;");
                        form.attr("id", "");

                        // need to append it to browser html, otherwise it wont send in many browsers (with clone it works only with chrome)
                        form_original.after(form);

                        //Create an input type dynamically.
                        var element = document.createElement("input");

                        //Assign different attributes to the element.
                        element.setAttribute("type", "hidden");
                        element.setAttribute("value", spec_attr_value);
                        element.setAttribute("name", spec_attr_name);

                        //Append the element in form
                        form.append(element);

                        form.submit();
                        form.remove();
                    }

                </script>
                <a href="#" class="btn print print_by_checkboxes" onclick="submit_in_new_window('<%= settings[:form_id] %>', '___display_method___', 'print_by_checkboxes'); return false;"><i class="icon-print"></i>&nbsp;
                  <%= t('itl-gem.print_picked') %></a>

                <a href="#" class="btn print print_by_filter" onclick="if (confirm('<%= t('itl-gem.print_filtered_this_operation_could_take_a_while') %>')){submit_in_new_window('<%= settings[:form_id] %>', '___display_method___', 'print');} return false;"><i class="icon-print"></i>&nbsp;
                  <%= t('itl-gem.print_filtered') %></a>
            <% end %>
        <% end %>
      </div>
    </div>
<% end %>
<%= form_tag settings[:filter_path], :html => {:'data-type' => 'html'}, :method => 'POST', :class => 'well dataGrid', :remote => true, :id => settings[:form_id] do |f| %>
    <% if settings[:display_method].blank? %>
        <% if content_for?(:table_form) %>
            <%= yield :table_form %>
        <% end %>
    <% end %>

    <fieldset>
      <%= render :partial => "/helpers/build_table_filter", :locals => {:settings => settings} %>

      <% if settings[:display_method].blank? %>
          <% unless settings[:per_page].blank? %>
          <span class="select_for_per_page" style="float: right"><%= t('itl-gem.show_on_page_num') %><%= select_tag("per_page_chosen", options_for_select(settings[:per_page], settings[:params]['per_page'].to_i),
                                                                                                     :onchange => "form_submit_watcher('#{settings[:form_id]}')",
                                                                                                     :class => "") %></span>
          <% end %>



          <div class="<%= settings[:form_id] + '_ajax_pager' %>">
            <%= render :partial => 'helpers/build_table_pager', :locals => {:settings => settings, :placement => "placement-up"} %>
          </div>
      <% end %>

      <%= render :partial => "/helpers/build_table_wrapper", :locals => {:settings => settings} %>

      <% if settings[:display_method].blank? %>
          <div class="<%= settings[:form_id] + '_ajax_pager' %> parent-filter-paging placement-down">
            <%= render :partial => 'helpers/build_table_pager', :locals => {:settings => settings, :placement => "placement-down"} %>
          </div>
      <% end %>
    </fieldset>
<% end %><commit_msg>fix of jscode for table added modal<commit_after><div class="page">
  <%= render :partial => "/helpers/build_table_text_description", :locals => {:settings => settings} %>
</div>
<% if settings[:display_method]=="print_by_checkboxes" %>
    <div class="print-window-buttons" style="float:right">
      <a class="print_page_functionality print-window-print-dialog-button" href="" onclick="window.print()">
        <i class="icon-print"></i><%= t('itl-gem.print') %></a>
      <a class="print_page_functionality print-window-close-button" href="" onclick="window.close();">
        <i class="icon-remove"></i><%= t('itl-gem.close') %></a>
    </div>
    <div style="clear:both"></div>

<% end %>

<% if settings[:display_method].blank? %>
    <div class="tabs">
      <%= yield :table_form_tabs %>

      <div class="info">


        <% if settings[:checkboxes] %>
    <span><%= t('itl-gem.picked') %><strong>
      <span title="<%= t('itl-gem.number_checked_rows_on_all_pages') %>" id="<%= settings[:form_id]+ "_active_checkboxes_count" %>">
                                         <%= !settings[:params][:checkbox_pool].blank? ? settings[:params][:checkbox_pool].split(",").count : 0 %>
                                       </span>
    </strong>
    </span>
        <% end %>

        <% if settings[:display_method].blank? %>
            <% if settings[:checkboxes] %>
                <script type="text/javascript">
                    function submit_in_new_window(form_id, spec_attr_name, spec_attr_value) {
                        var form_original = $("#" + form_id);

                          // setting selected options right to the code, otherwise it wont be cloned
                        form_original.find("select option:not(:selected)").each( function (){
                              $(this).removeAttr("selected");
                        });

                        form_original.find("select option:selected").each( function (){
                           $(this).attr("selected", "selected");
                        });

                        // create new form by cloning without events
                        var form = form_original.clone(false)

                        // disabling ajax
                        form.removeAttr("data-remote");

                        form.attr("target", "_blank");
                        form.attr("action", form_original.attr("action"));
                        form.attr("style", "display: none;");
                        form.attr("id", "");

                        // need to append it to browser html, otherwise it wont send in many browsers (with clone it works only with chrome)
                        form_original.after(form);

                        //Create an input type dynamically.
                        var element = document.createElement("input");

                        //Assign different attributes to the element.
                        element.setAttribute("type", "hidden");
                        element.setAttribute("value", spec_attr_value);
                        element.setAttribute("name", spec_attr_name);

                        //Append the element in form
                        form.append(element);

                        form.submit();
                        form.remove();
                    }

                </script>
                <a href="#" class="btn print print_by_checkboxes" onclick="submit_in_new_window('<%= settings[:form_id] %>', '___display_method___', 'print_by_checkboxes'); return false;"><i class="icon-print"></i>&nbsp;
                  <%= t('itl-gem.print_picked') %></a>

                <a href="#" class="btn print print_by_filter" onclick="if (confirm('<%= t('itl-gem.print_filtered_this_operation_could_take_a_while') %>')){submit_in_new_window('<%= settings[:form_id] %>', '___display_method___', 'print');} return false;"><i class="icon-print"></i>&nbsp;
                  <%= t('itl-gem.print_filtered') %></a>
            <% end %>
        <% end %>
      </div>
    </div>
<% end %>
<%= form_tag settings[:filter_path], :html => {:'data-type' => 'html'}, :method => 'POST', :class => 'well dataGrid', :remote => true, :id => settings[:form_id] do |f| %>
    <% if settings[:display_method].blank? %>
        <% if content_for?(:table_form) %>
            <%= yield :table_form %>
        <% end %>
    <% end %>

    <fieldset>
      <%= render :partial => "/helpers/build_table_filter", :locals => {:settings => settings} %>

      <% if settings[:display_method].blank? %>
          <% unless settings[:per_page].blank? %>
          <span class="select_for_per_page" style="float: right"><%= t('itl-gem.show_on_page_num') %><%= select_tag("per_page_chosen", options_for_select(settings[:per_page], settings[:params]['per_page'].to_i),
                                                                                                     :onchange => "form_submit_watcher('#{settings[:form_id]}')",
                                                                                                     :class => "") %></span>
          <% end %>



          <div class="<%= settings[:form_id] + '_ajax_pager' %>">
            <%= render :partial => 'helpers/build_table_pager', :locals => {:settings => settings, :placement => "placement-up"} %>
          </div>
      <% end %>

      <%= render :partial => "/helpers/build_table_wrapper", :locals => {:settings => settings} %>

      <% if settings[:display_method].blank? %>
          <div class="<%= settings[:form_id] + '_ajax_pager' %> parent-filter-paging placement-down">
            <%= render :partial => 'helpers/build_table_pager', :locals => {:settings => settings, :placement => "placement-down"} %>
          </div>
      <% end %>
    </fieldset>
<% end %>


<div id="modal_cell_editing" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <!--<div class="modal-header">-->
  <!--<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>-->
  <!--<h3 id="myModalLabel">Modal header</h3>-->
  <!--</div>-->
  <!--<div class="modal-body">-->
  <!--<p>One fine body…</p>-->
  <!--</div>-->
  <!--<div class="modal-footer">-->
  <!--<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>-->
  <!--<button class="btn btn-primary">Save changes</button>-->
  <!--</div>-->
</div>
<script type="text/javascript">
    EditableTableModalDialog.init('modal_cell_editing')
</script>
{'fraction_non_alphanumeric': 0.17400179635829183, 'fraction_numerical': 0.0004082632481424022, 'mean_word_length': 2.0041697326465537, 'pattern_counts': {'":': 0, '<': 206, '<?xml version=': 0, '>': 256, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 22, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1545314', 'n_tokens_mistral': 3508, 'n_tokens_neox': 3212, 'n_words': 631}