Development

Changeset 8323

You must first sign up to be able to contribute.

Changeset 8323

Show
Ignore:
Timestamp:
04/05/08 20:43:39 (6 months ago)
Author:
FabianLange
Message:

removed prototype dependency from double_list javascript in ObjectAdmin?. closes #2824

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/data/web/sf/sf_admin/js/double_list.js

    r5345 r8323  
    11 
    2 function double_list_move(src, dest
     2function double_list_move(srcId, destId
    33{ 
     4  var src=document.getElementById(srcId); 
     5  var dest=document.getElementById(destId); 
    46  for (var i = 0; i < src.options.length; i++) 
    57  { 
     
    1315} 
    1416 
    15 function double_list_submit(form_name
     17function double_list_submit(
    1618{ 
    17   // default id to allow using a custom form id 
    18   if( ! form_name ) { 
    19     var form_name = 'sf_admin_edit_form'; 
    20   } 
    21  
    22   var form = $(form_name); 
     19  var form = document.getElementById('sf_admin_edit_form'); 
    2320  var element; 
    2421 
  • branches/1.1/lib/helper/ObjectAdminHelper.php

    r7757 r8323  
    66 * This file is part of the symfony package. 
    77 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com> 
    8  *  
     8 * 
    99 * For the full copyright and license information, please view the LICENSE 
    1010 * file that was distributed with this source code. 
     
    6464  // get the lists of objects 
    6565  list($all_objects, $objects_associated, $associated_ids) = _get_object_list($object, $method, $options, $callback); 
    66    
     66 
    6767  $objects_unassociated = array(); 
    6868  foreach ($all_objects as $object) 
     
    103103'; 
    104104 
    105   $response = sfContext::getInstance()->getResponse(); 
    106   $response->addJavascript(sfConfig::get('sf_prototype_web_dir').'/js/prototype'); 
    107   $response->addJavascript(sfConfig::get('sf_admin_web_dir').'/js/double_list'); 
     105  sfContext::getInstance()->getResponse()->addJavascript(sfConfig::get('sf_admin_web_dir').'/js/double_list.js'); 
    108106 
    109107  return sprintf($html, 
    110108    $label_all, 
    111109    $select1, 
    112     submit_image_tag(sfConfig::get('sf_admin_web_dir').'/images/next.png', "style=\"border: 0\" onclick=\"double_list_move(\$('{$name1}'), \$('{$name2}')); return false;\""), 
    113     submit_image_tag(sfConfig::get('sf_admin_web_dir').'/images/previous.png', "style=\"border: 0\" onclick=\"double_list_move(\$('{$name2}'), \$('{$name1}')); return false;\""), 
     110    submit_image_tag(sfConfig::get('sf_admin_web_dir').'/images/next.png', "style=\"border: 0\" onclick=\"double_list_move('{$name1}), '{$name2}'); return false;\""), 
     111    submit_image_tag(sfConfig::get('sf_admin_web_dir').'/images/previous.png', "style=\"border: 0\" onclick=\"double_list_move('{$name2}', '{$name1}'); return false;\""), 
    114112    $label_assoc, 
    115113    $select2