<commit_before><?php

/**
 * @package sfModalBoxPlugin
 *
 * @author <NAME> <<EMAIL>>
 * @since  22 Apr 2007
 * @version 1.0.0
 *
 */

/**
 * Enable to use Modalbox script : http://okonet.ru/projects/modalbox/
 *
 * *
 * @author <NAME> <<EMAIL>>
 * @since  15 Apr 2007
 *
 */
function m_link_to($name, $url, $html_options, $modal_options = array())
{
    use_helper('Javascript');
    
    if(array_key_exists('title', $html_options))
    {
        $modal_options = array_merge($modal_options, array('title' => 'this.title'));
    }
    
    $js_options = _options_for_javascript($modal_options);

    $html_options['onclick'] = "Modalbox.show(this.href, " . $js_options . "); return false;";

    return link_to($name, $url, $html_options);
}


function loadRessources()
{
    // Prototype & scriptaculous
    $response = sfContext::getInstance()->getResponse();
    $response->addJavascript(sfConfig::get('sf_prototype_web_dir'). '/js/prototype');
    $response->addJavascript(sfConfig::get('sf_prototype_web_dir'). '/js/scriptaculous');
    
    // FIXME: these 4 files are not loaded automatically 
    // when ModalBox is used in conjonction with sfCombineFilterPlugin, so that we must add them here:
    $response->addJavascript(sfConfig::get('sf_prototype_web_dir'). '/js/builder');
    $response->addJavascript(sfConfig::get('sf_prototype_web_dir'). '/js/effects');
    $response->addJavascript(sfConfig::get('sf_prototype_web_dir'). '/js/dragdrop'); // needed for sorting lists in modalboxes
    $response->addJavascript(sfConfig::get('sf_prototype_web_dir'). '/js/controls'); // needed for autocomplete in modalboxes
    
    $response->addJavascript('/sfModalBoxPlugin/js/modalbox', 'last');
    $response->addStylesheet('/sfModalBoxPlugin/css/modalbox');
}

loadRessources();<commit_msg>added missing "submit.js" in loaded js files<commit_after><?php

/**
 * @package sfModalBoxPlugin
 *
 * @author <NAME> <<EMAIL>>
 * @since  22 Apr 2007
 * @version 1.0.0
 *
 */

/**
 * Enable to use Modalbox script : http://okonet.ru/projects/modalbox/
 *
 * *
 * @author <NAME> <<EMAIL>>
 * @since  15 Apr 2007
 *
 */
function m_link_to($name, $url, $html_options, $modal_options = array())
{
    use_helper('Javascript');
    
    if(array_key_exists('title', $html_options))
    {
        $modal_options = array_merge($modal_options, array('title' => 'this.title'));
    }
    
    $js_options = _options_for_javascript($modal_options);

    $html_options['onclick'] = "Modalbox.show(this.href, " . $js_options . "); return false;";

    return link_to($name, $url, $html_options);
}


function loadRessources()
{
    // Prototype & scriptaculous
    $response = sfContext::getInstance()->getResponse();
    $response->addJavascript(sfConfig::get('sf_prototype_web_dir'). '/js/prototype');
    $response->addJavascript(sfConfig::get('sf_prototype_web_dir'). '/js/scriptaculous');
    
    // FIXME: these 4 files are not loaded automatically 
    // when ModalBox is used in conjonction with sfCombineFilterPlugin, so that we must add them here:
    $response->addJavascript(sfConfig::get('sf_prototype_web_dir'). '/js/builder');
    $response->addJavascript(sfConfig::get('sf_prototype_web_dir'). '/js/effects');
    $response->addJavascript(sfConfig::get('sf_prototype_web_dir'). '/js/dragdrop'); // needed for sorting lists in modalboxes
    $response->addJavascript(sfConfig::get('sf_prototype_web_dir'). '/js/controls'); // needed for autocomplete in modalboxes
    
    $response->addJavascript('/sfModalBoxPlugin/js/modalbox', 'last');
    $response->addJavascript('/static/js/submit', 'last');
    $response->addStylesheet('/sfModalBoxPlugin/css/modalbox');
}

loadRessources();
{'fraction_non_alphanumeric': 0.164587852494577, 'fraction_numerical': 0.008676789587852495, 'mean_word_length': 4.409090909090909, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 36, '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': '5820437', 'n_tokens_mistral': 1230, 'n_tokens_neox': 1178, 'n_words': 217}