<commit_before>(function($) {
  
$.widget('ui.dmWidget', {

  _init : function()
  {
    this.initialize();

    this.element.data('loaded', true);
  },

  openEditDialog: function()
  {
    var widget = this, restoreState = {}, dialogClass = widget.element.attr('id')+'_edit_dialog';

    $.dm.removeTipsy();

    if ($('body > div.'+dialogClass).length)
    {
      $('body > div.'+dialogClass).find('div.ui-dialog-content').dialog('moveToTop');
      return;
    }
    
    var $dialog = $.dm.ctrl.ajaxDialog({
      url:          $.dm.ctrl.getHref('+/dmWidget/edit'),
      data:         {widget_id: widget.getId()},
      title:        $('a.dm_widget_edit', widget.element).tipsyTitle(),
      width:        600,
      'class':      'dm_widget_edit_dialog_wrap '+dialogClass,
      resizable:    true,
      resize:       function(event, ui)
      {
        $dialog.maximizeContent('textarea.markItUpEditor');
      },
      beforeClose:  function()
      {
        if (!widget.deleted)
        {
          widget.reload(500);
        }
      }
    });
    
    $dialog.listenToFocusedInputs = function()
    {
      var $form = $('div.dm_widget_edit', $dialog);
      
      $form.find('.dm_form_elements :input').focus(function() {
        restoreState.activeElementName = $(this).attr('name');
      });
    }
    
    $dialog.saveState = function()
    {<commit_msg>change width of widget edit dialog in frontend to '70%'<commit_after>(function($) {
  
$.widget('ui.dmWidget', {

  _init : function()
  {
    this.initialize();

    this.element.data('loaded', true);
  },

  openEditDialog: function()
  {
    var widget = this, restoreState = {}, dialogClass = widget.element.attr('id')+'_edit_dialog';

    $.dm.removeTipsy();

    if ($('body > div.'+dialogClass).length)
    {
      $('body > div.'+dialogClass).find('div.ui-dialog-content').dialog('moveToTop');
      return;
    }
    
    var $dialog = $.dm.ctrl.ajaxDialog({
      url:          $.dm.ctrl.getHref('+/dmWidget/edit'),
      data:         {widget_id: widget.getId()},
      title:        $('a.dm_widget_edit', widget.element).tipsyTitle(),
      width:        '70%',
      'class':      'dm_widget_edit_dialog_wrap '+dialogClass,
      resizable:    true,
      resize:       function(event, ui)
      {
        $dialog.maximizeContent('textarea.markItUpEditor');
      },
      beforeClose:  function()
      {
        if (!widget.deleted)
        {
          widget.reload(500);
        }
      }
    });
    
    $dialog.listenToFocusedInputs = function()
    {
      var $form = $('div.dm_widget_edit', $dialog);
      
      $form.find('.dm_form_elements :input').focus(function() {
        restoreState.activeElementName = $(this).attr('name');
      });
    }
    
    $dialog.saveState = function()
    {
{'fraction_non_alphanumeric': 0.16964924838940587, 'fraction_numerical': 0.0046528274874731565, 'mean_word_length': 2.24245939675174, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '113624', 'n_tokens_mistral': 914, 'n_tokens_neox': 891, 'n_words': 131}