Author: bshaffer
Date: 2010-03-12 05:49:38 +0100 (Fri, 12 Mar 2010)
New Revision: 28490

Modified:
   
plugins/csDoctrineSlideshowPlugin/trunk/lib/validator/sfValidatorSortableList.class.php
   
plugins/csDoctrineSlideshowPlugin/trunk/lib/widget/sfWidgetFormJQuerySortableList.class.php
   
plugins/csDoctrineSlideshowPlugin/trunk/lib/widget/sfWidgetFormJQuerySortableListMany.class.php
   
plugins/csDoctrineSlideshowPlugin/trunk/modules/slideshow_admin/actions/actions.class.php
Log:
first step towards making this plugin 1.4-compatible

Modified: 
plugins/csDoctrineSlideshowPlugin/trunk/lib/validator/sfValidatorSortableList.class.php
===================================================================
--- 
plugins/csDoctrineSlideshowPlugin/trunk/lib/validator/sfValidatorSortableList.class.php
     2010-03-12 03:50:32 UTC (rev 28489)
+++ 
plugins/csDoctrineSlideshowPlugin/trunk/lib/validator/sfValidatorSortableList.class.php
     2010-03-12 04:49:38 UTC (rev 28490)
@@ -3,13 +3,13 @@
 /**
 * 
 */
-class sfValidatorSortableList extends sfValidatorDoctrineChoiceMany
+class sfValidatorSortableList extends sfValidatorDoctrineChoice
 {
   protected function configure($options = array(), $messages = array())
   {
-
     $this->addOption('position_field', 'position');
     parent::configure($options, $messages);
+    $this->setOption('multiple', true);
   }
   
   protected function doClean($value)

Modified: 
plugins/csDoctrineSlideshowPlugin/trunk/lib/widget/sfWidgetFormJQuerySortableList.class.php
===================================================================
--- 
plugins/csDoctrineSlideshowPlugin/trunk/lib/widget/sfWidgetFormJQuerySortableList.class.php
 2010-03-12 03:50:32 UTC (rev 28489)
+++ 
plugins/csDoctrineSlideshowPlugin/trunk/lib/widget/sfWidgetFormJQuerySortableList.class.php
 2010-03-12 04:49:38 UTC (rev 28490)
@@ -21,7 +21,7 @@
     $this->addOption('selected_list_id', 'selected_'.$table);
     $this->addOption('unselected_list_id', 'unselected_'.$table);
         
-    $this->addOption('choices', $this->getChoices($options)); 
+    $this->addOption('choices'); 
     
     // Parent options
     $this->addOption('class', 'sortable_list');
@@ -43,7 +43,7 @@
    */
   public function render($name, $value = null, $attributes = array(), $errors 
= array())
   {
-    sfProjectConfiguration::getActive()->loadHelpers(array('Form', 
'Javascript', 'Asset', 'Tag'));
+    sfProjectConfiguration::getActive()->loadHelpers(array('JavascriptBase', 
'Asset', 'Tag'));
 
     // As this relation isn't added by the form framework, find the active 
primary keys
     if ($value == null) 
@@ -179,10 +179,10 @@
   }
   
   // Pulls default choices based on the passed options if none exist
-  protected function getChoices($options)
+  public function getChoices()
   {
-    return isset($options['choices']) ?  
-        $options['choices'] : $this->collectionToArray(
+    return $this->getOption('choices') ?  
+        $this->getOption('choices') : $this->collectionToArray(
             Doctrine::getTable($this->getOption('hasManyClass'))
               ->createQuery('a')
               ->orderBy($this->getOption('position_field'))

Modified: 
plugins/csDoctrineSlideshowPlugin/trunk/lib/widget/sfWidgetFormJQuerySortableListMany.class.php
===================================================================
--- 
plugins/csDoctrineSlideshowPlugin/trunk/lib/widget/sfWidgetFormJQuerySortableListMany.class.php
     2010-03-12 03:50:32 UTC (rev 28489)
+++ 
plugins/csDoctrineSlideshowPlugin/trunk/lib/widget/sfWidgetFormJQuerySortableListMany.class.php
     2010-03-12 04:49:38 UTC (rev 28490)
@@ -21,10 +21,10 @@
   }
   
   // Pulls default choices based on the passed options if none exist
-  protected function getChoices($options)
+  public function getChoices()
   {
-    return isset($options['choices']) ?  
-        $options['choices'] : $this->collectionToArray(
+    return $this->getOption('choices') ?  
+        $this->getOption('choices') : $this->collectionToArray(
             Doctrine::getTable($this->getOption('hasManyClass'))
               ->createQuery('s')
               ->leftJoin('s.'.$this->getOption('refClass').' ref')

Modified: 
plugins/csDoctrineSlideshowPlugin/trunk/modules/slideshow_admin/actions/actions.class.php
===================================================================
--- 
plugins/csDoctrineSlideshowPlugin/trunk/modules/slideshow_admin/actions/actions.class.php
   2010-03-12 03:50:32 UTC (rev 28489)
+++ 
plugins/csDoctrineSlideshowPlugin/trunk/modules/slideshow_admin/actions/actions.class.php
   2010-03-12 04:49:38 UTC (rev 28490)
@@ -13,5 +13,4 @@
  */
 class slideshow_adminActions extends autoSlideshow_adminActions
 {
-
 }

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.

Reply via email to