Author: david
Date: 2008-10-27 09:47:21 -0700 (Mon, 27 Oct 2008)
New Revision: 1502

Added:
   trunk/qubit/apps/qubit/modules/settings/actions/updateAction.class.php
Modified:
   trunk/qubit/
   trunk/qubit/apps/qubit/config/settings.yml.tmpl
   trunk/qubit/apps/qubit/modules/browse/actions/sidebarComponent.class.php
   trunk/qubit/apps/qubit/modules/browse/templates/_sidebar.php
   trunk/qubit/apps/qubit/modules/search/actions/sidebarComponent.class.php
   trunk/qubit/apps/qubit/modules/search/templates/_sidebar.php
   trunk/qubit/apps/qubit/modules/settings/actions/deleteAction.class.php
   trunk/qubit/apps/qubit/modules/settings/actions/listAction.class.php
   trunk/qubit/apps/qubit/modules/settings/templates/listSuccess.php
   trunk/qubit/config/package.xml
   trunk/qubit/lib/form/SettingsGenericForm.class.php
   trunk/qubit/lib/form/SettingsGlobalForm.class.php
   trunk/qubit/lib/form/SettingsSiteInformationForm.class.php
   trunk/qubit/lib/vendor/symfony/
   trunk/qubit/test/seleniumIDE/Test_suite_1/
   trunk/qubit/test/seleniumIDE/Test_suite_2/
   trunk/qubit/test/seleniumIDE/Test_suite_3/
   trunk/qubit/web/images/logo.png
   trunk/qubit/web/install/index.php
   trunk/qubit/web/vendor/drupal/misc/collapse.js
   trunk/qubit/web/vendor/yui/assets/skins/sam/sprite.png
   trunk/qubit/web/vendor/yui/button/assets/skins/sam/button.css
   
trunk/qubit/web/vendor/yui/button/assets/skins/sam/menu-button-arrow-disabled.png
   trunk/qubit/web/vendor/yui/button/assets/skins/sam/menu-button-arrow.png
   
trunk/qubit/web/vendor/yui/button/assets/skins/sam/split-button-arrow-active.png
   
trunk/qubit/web/vendor/yui/button/assets/skins/sam/split-button-arrow-disabled.png
   
trunk/qubit/web/vendor/yui/button/assets/skins/sam/split-button-arrow-focus.png
   
trunk/qubit/web/vendor/yui/button/assets/skins/sam/split-button-arrow-hover.png
   trunk/qubit/web/vendor/yui/button/assets/skins/sam/split-button-arrow.png
   trunk/qubit/web/vendor/yui/button/button-min.js
   trunk/qubit/web/vendor/yui/container/assets/skins/sam/container.css
   trunk/qubit/web/vendor/yui/container/container-min.js
   trunk/qubit/web/vendor/yui/container/container_core-min.js
   trunk/qubit/web/vendor/yui/element/element-beta-min.js
   trunk/qubit/web/vendor/yui/menu/assets/skins/sam/menu.css
   
trunk/qubit/web/vendor/yui/menu/assets/skins/sam/menubaritem_submenuindicator.png
   
trunk/qubit/web/vendor/yui/menu/assets/skins/sam/menubaritem_submenuindicator_disabled.png
   trunk/qubit/web/vendor/yui/menu/assets/skins/sam/menuitem_checkbox.png
   
trunk/qubit/web/vendor/yui/menu/assets/skins/sam/menuitem_checkbox_disabled.png
   
trunk/qubit/web/vendor/yui/menu/assets/skins/sam/menuitem_submenuindicator.png
   
trunk/qubit/web/vendor/yui/menu/assets/skins/sam/menuitem_submenuindicator_disabled.png
   trunk/qubit/web/vendor/yui/menu/menu-min.js
   trunk/qubit/web/vendor/yui/treeview/assets/skins/sam/treeview-loading.gif
   trunk/qubit/web/vendor/yui/treeview/assets/skins/sam/treeview-sprite.gif
   trunk/qubit/web/vendor/yui/treeview/assets/skins/sam/treeview.css
   trunk/qubit/web/vendor/yui/treeview/treeview-min.js
   trunk/qubit/web/vendor/yui/yahoo-dom-event/yahoo-dom-event.js
Log:
Rollback changes from r1495:1496 (Open divs on submit in Admin>Settings). Issue 
#472 is now "Won't fix" and new priority is to remove the need for multiple 
submits of same info object.


Property changes on: trunk/qubit
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: trunk/qubit/apps/qubit/config/settings.yml.tmpl
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: 
trunk/qubit/apps/qubit/modules/browse/actions/sidebarComponent.class.php
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: 
trunk/qubit/apps/qubit/modules/browse/templates/_sidebar.php
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: 
trunk/qubit/apps/qubit/modules/search/actions/sidebarComponent.class.php
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: 
trunk/qubit/apps/qubit/modules/search/templates/_sidebar.php
___________________________________________________________________
Deleted: svn:mergeinfo
   - 

Modified: trunk/qubit/apps/qubit/modules/settings/actions/deleteAction.class.php
===================================================================
--- trunk/qubit/apps/qubit/modules/settings/actions/deleteAction.class.php      
2008-10-24 23:56:20 UTC (rev 1501)
+++ trunk/qubit/apps/qubit/modules/settings/actions/deleteAction.class.php      
2008-10-27 16:47:21 UTC (rev 1502)
@@ -35,7 +35,7 @@
     // TODO: else populate an error?
 
     $this->refreshSettings();
-    return 
$this->redirect('settings/list?i18n_languages_cs='.$request->getParameter('i18n_languages_cs',
 1));
+    return $this->redirect('settings/list');
   }
 
   private function refreshSettings()

Modified: trunk/qubit/apps/qubit/modules/settings/actions/listAction.class.php
===================================================================
--- trunk/qubit/apps/qubit/modules/settings/actions/listAction.class.php        
2008-10-24 23:56:20 UTC (rev 1501)
+++ trunk/qubit/apps/qubit/modules/settings/actions/listAction.class.php        
2008-10-27 16:47:21 UTC (rev 1502)
@@ -83,7 +83,7 @@
         {
           // Do update and redirect to avoid repeat submit wackiness
           $this->updateGlobalSettings();
-          
$this->redirect('settings/list?global_cs='.$request->getParameter('global_settings[collapse_state]',
 0));
+          $this->redirect('settings/list');
         }
       }
       
@@ -95,7 +95,7 @@
         {
           // Do update and redirect to avoid repeat submit wackiness
           $this->updateSiteInformationSettings();
-          
$this->redirect('settings/list?site_information_cs='.$request->getParameter('site_information[collapse_state]',0));
+          $this->redirect('settings/list');
         }
       }
       
@@ -107,7 +107,7 @@
         {
           // Do update and redirect to avoid repeat submit wackiness
           $this->updateDefaultTemplateSettings($this->defaultTemplateForm);
-          
$this->redirect('settings/list?default_template_cs='.$request->getParameter('default_template[collapse_state]',
 0));
+          $this->redirect('settings/list');
         }
       }
       
@@ -119,27 +119,19 @@
         {
           // Do update and redirect to avoid repeat submit wackiness
           $this->updateUiLabelSettings($this->uiLabelForm);
-          
$this->redirect('settings/list?ui_label_cs='.$request->getParameter('ui_label[collapse_state]',
 0));
+          $this->redirect('settings/list');
         }
       }
-      
-      if (null !==$request->getParameter('language_code'))
-      {
-        // Do update and redirect to avoid repeat submit wackiness
-        $this->updateI18nLanguagesSettings($request);
-        
$this->redirect('settings/list?i18n_languages_cs='.$request->getParameter('i18n_languages[collapse_state]',
 0));
-      }
     }
    
     // Populate forms
-    $this->populateGlobalForm($request);
-    $this->populateSiteInformationForm($request);
-    $this->populateDefaultTemplateForm($request, $this->defaultTemplateForm);
-    $this->populateUiLabelForm($request, $this->uiLabelForm);
+    $this->populateGlobalForm();
+    $this->populateSiteInformationForm();
+    $this->populateDefaultTemplateForm($this->defaultTemplateForm);
+    $this->populateUiLabelForm($this->uiLabelForm);
     
-    // Populate i18n form - the last symfony 1.0 form holdout
+    // Last symfony 1.0 forms holdout
     $this->i18nLanguages = QubitSetting::getByScope('i18n_languages');
-    $this->i18nLanguagesCollapseState = 
($request->getParameter('i18n_languages[collapse_state]',0) || 
$request->getParameter('i18n_languages_cs',0)) ? 1 : 0;
     
     // make vars available to template
     $this->availableLanguages = self::$availableLanguges;
@@ -148,7 +140,7 @@
   /**
    * Populate the Global form with database values (non-localized)
    */
-  protected function populateGlobalForm($request)
+  protected function populateGlobalForm()
   {
     // Get global settings
     $version = QubitSetting::getSettingByName('version');
@@ -156,11 +148,9 @@
     $refImageMaxWidth = 
QubitSetting::getSettingByName('reference_image_maxwidth');
     $hitsPerPage = QubitSetting::getSettingByName('hits_per_page');
     $multiRepository = QubitSetting::getSettingByName('multi_repository');
-    $collapseState = 
($request->getParameter('global_settings[collapse_state]',0) || 
$request->getParameter('global_cs',0)) ? 1 : 0;
         
     // Set defaults for global form
     $this->globalForm->setDefaults(array(
-      'collapse_state' => $collapseState,
       'version' => (isset($version)) ? 
$version->getValue(array('sourceCulture'=>true)) : null,
       'upload_dir' => (isset($uploadDir)) ? 
$uploadDir->getValue(array('sourceCulture'=>true)) : null,
       'reference_image_maxwidth' => (isset($refImageMaxWidth)) ? 
$refImageMaxWidth->getValue(array('sourceCulture'=>true)) : null,
@@ -223,17 +213,14 @@
   /**
    * Populate the site information settings from the database (localized)
    */
-  protected function populateSiteInformationForm($request)
+  protected function populateSiteInformationForm()
   {
     // Get site information settings
     $this->siteTitle = (null !== $siteTitle = 
QubitSetting::getSettingByName('site_title')) ? $siteTitle : new QubitSetting;
     $this->siteDescription = (null !== $siteDescription = 
QubitSetting::getSettingByName('site_description')) ? $siteDescription : new 
QubitSetting;
-    
-    $collapseState = 
($request->getParameter('site_information[collapse_state]',0) || 
$request->getParameter('site_information_cs',0)) ? 1 : 0;
 
     // Set defaults values
     $this->siteInformationForm->setDefaults(array(
-      'collapse_state' => $collapseState,
       'site_title' => $this->siteTitle->getValue(array('culture' => 
$this->culture)),
       'site_description' => $this->siteDescription->getValue(array('culture' 
=> $this->culture))
     ));
@@ -281,10 +268,8 @@
   /**
    * Populate the default template settings from the database (non-localized)
    */
-  protected function populateDefaultTemplateForm($request, $form)
-  {
-    $collapseState = 
($request->getParameter('default_template[collapse_state]',0) || 
$request->getParameter('default_template_cs',0)) ? 1 : 0;
-    $form->setDefault('collapse_state', $collapseState);
+  protected function populateDefaultTemplateForm($form)
+  { 
     foreach ($form->getSettings() as $setting)
     {
       $form->setDefault($setting->getName(), 
$setting->getValue(array('sourceCulture' => true)));    
@@ -319,10 +304,8 @@
   /**
    * Populate the ui_label form with database values (localized)
    */
-  protected function populateUiLabelForm($request, $form)
+  protected function populateUiLabelForm($form)
   { 
-    $collapseState = ($request->getParameter('ui_label[collapse_state]',0) || 
$request->getParameter('ui_label_cs',0)) ? 1 : 0;
-    $form->setDefault('collapse_state', $collapseState);
     foreach ($form->getSettings() as $setting)
     {
       $form->setDefault($setting->getName(), $setting->getValue());    
@@ -354,35 +337,4 @@
     return $this;
   }
   
-  /**
-   * Update ui_label db values with form values (localized)
-   * 
-   * @return $this
-   */
-  protected function updateI18nLanguagesSettings($request)
-  {
-    // we are adding a new language
-    sfLoader::loadHelpers(array('I18N'));
-
-    $setting = new QubitSetting;
-    $setting->setName($request->getParameter('language_code'));
-    $setting->setScope('i18n_languages');
-    $setting->setEditable(true);
-    $setting->setDeleteable(true);
-    
$setting->setValue(format_language($request->getParameter('language_code'), 
$request->getParameter('language_code')));
-    
$setting->getCurrentSettingI18n()->setCulture($request->getParameter('language_code'));
-
-    $setting->save();
-
-    $this->refreshSettings();
-    return $this;
-  }
-  
-  protected function refreshSettings()
-  {
-    // clear the file cache containing the settings
-    $fileCache = new sfFileCache(array('cache_dir' => 
sfConfig::get('sf_app_cache_dir').'/settings'));
-    $fileCache->clean();
-  }
-} // End class
-
+} // End class
\ No newline at end of file

Copied: trunk/qubit/apps/qubit/modules/settings/actions/updateAction.class.php 
(from rev 1495, 
trunk/qubit/apps/qubit/modules/settings/actions/updateAction.class.php)
===================================================================
--- trunk/qubit/apps/qubit/modules/settings/actions/updateAction.class.php      
                        (rev 0)
+++ trunk/qubit/apps/qubit/modules/settings/actions/updateAction.class.php      
2008-10-27 16:47:21 UTC (rev 1502)
@@ -0,0 +1,96 @@
+<?php
+
+/*
+ * This file is part of the Qubit Toolkit.
+ * Copyright (C) 2006-2008 Peter Van Garderen <[EMAIL PROTECTED]>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+/**
+ * Settings update controller.
+ * 
+ * @package    qubit
+ * @subpackage settings
+ * @version    svn: $Id$
+ * @author     David Juhasz <[EMAIL PROTECTED]>
+ */
+class SettingsUpdateAction extends sfAction
+{
+  public function execute($request)
+  {
+    // determine what we are updating based on the request vars
+    if ($this->getRequestParameter('new_setting_name') && 
$this->getRequestParameter('new_setting_value'))
+    {
+      // we are adding a new setting
+      $setting = new QubitSetting;
+      $setting->setName($this->getRequestParameter('new_setting_name'));
+      $setting->setScope($this->getRequestParameter('fieldset'));
+      $setting->setEditable(true);
+      $setting->setDeleteable(true);
+      $setting->setValue($this->getRequestParameter('new_setting_value'));
+
+      $setting->save();
+    }
+    else if ($this->getRequestParameter('language_code'))
+    {
+      // we are adding a new language
+      sfLoader::loadHelpers(array('I18N'));
+
+      $setting = new QubitSetting;
+      $setting->setName($this->getRequestParameter('language_code'));
+      $setting->setScope('i18n_languages');
+      $setting->setEditable(true);
+      $setting->setDeleteable(true);
+      
$setting->setValue(format_language($this->getRequestParameter('language_code'), 
$this->getRequestParameter('language_code')));
+      
$setting->getCurrentSettingI18n()->setCulture($this->getRequestParameter('language_code'));
+
+      $setting->save();
+
+      // go directly back, do not update anything else
+      $this->refreshSettings();
+      return $this->redirect('settings/list');
+    }
+
+    // update any existing values
+    $parameters = $this->getRequest()->getParameterHolder()->getAll();
+
+    foreach ($parameters as $parameter => $value)
+    {
+      if (is_numeric($parameter))
+      {
+        $setting = QubitSetting::getById($parameter);
+        $this->forward404Unless($setting);
+
+        if ($setting->isEditable())
+        {
+          $setting->setValue($value);
+          $setting->save();
+        }
+      }
+    }
+
+    $this->refreshSettings();
+    return $this->redirect('settings/list');
+  }
+
+  private function refreshSettings()
+  {
+    // clear the file cache containing the settings
+    $fileCache = new sfFileCache(array('cache_dir' => 
sfConfig::get('sf_app_cache_dir').'/settings'));
+    $fileCache->clean();
+  }
+    
+}
\ No newline at end of file

Modified: trunk/qubit/apps/qubit/modules/settings/templates/listSuccess.php
===================================================================
--- trunk/qubit/apps/qubit/modules/settings/templates/listSuccess.php   
2008-10-24 23:56:20 UTC (rev 1501)
+++ trunk/qubit/apps/qubit/modules/settings/templates/listSuccess.php   
2008-10-27 16:47:21 UTC (rev 1502)
@@ -3,8 +3,8 @@
 <!-- Global settings table -->
 <div class="tableHeader" style="margin-bottom: 10px;"><?php echo __('global') 
?></div>
 <fieldset class="collapsible collapsed">
-<legend><?php echo __('global') ?></legend>
-<form action="<?php echo url_for('settings/list') ?>" method="POST">
+  <legend><?php echo __('global') ?></legend>
+  <form action="<?php echo url_for('settings/list') ?>" method="POST">
   <table class="list">
   <thead>
     <tr>
@@ -24,16 +24,14 @@
     </tr>
   </tbody>
   </table>
-</form>
+  </form>
 </fieldset>
 
 <!-- Site information form -->
 <div class="tableHeader" style="margin-bottom: 10px;"><?php echo __('site 
information') ?></div>
 <fieldset class="collapsible collapsed">
-<legend><?php echo __('site information') ?></legend>
-<form action="<?php echo url_for('settings/list') ?>" method="POST">
-  <?php echo $siteInformationForm->renderGlobalErrors() ?>
-  <?php echo $siteInformationForm['collapse_state'] ?>
+  <legend><?php echo __('site information') ?></legend>
+  <form action="<?php echo url_for('settings/list') ?>" method="POST">
   <table class="list">
   <thead>
     <tr>
@@ -76,14 +74,14 @@
     </tr>
   </tbody>
   </table>
-</form>
+  </form>
 </fieldset>
 
 <!-- Default template form -->
 <div class="tableHeader" style="margin-bottom: 10px;"><?php echo __('default 
template') ?></div>
 <fieldset class="collapsible collapsed">
-<legend><?php echo __('default template') ?></legend>
-<form action="<?php echo url_for('settings/list') ?>" method="POST">
+  <legend><?php echo __('default template') ?></legend>
+  <form action="<?php echo url_for('settings/list') ?>" method="POST">
   <table class="list">
     <thead>
       <tr>
@@ -105,16 +103,14 @@
       </tr>
     </tbody>
   </table>
-</form>
+  </form>
 </fieldset>
 
 <!-- UI Label Form -->
 <div class="tableHeader" style="margin-bottom: 10px;"><?php echo __('user 
interface label') ?></div>
 <fieldset class="collapsible collapsed">
-<legend><?php echo __('user interface label') ?></legend>
-<form action="<?php echo url_for('settings/list') ?>" method="POST">
-  <?php echo $siteInformationForm->renderGlobalErrors() ?>
-  <?php echo $uiLabelForm['collapse_state'] ?>
+  <legend><?php echo __('user interface label') ?></legend>
+  <form action="<?php echo url_for('settings/list') ?>" method="POST">
   <table class="list">
     <thead>
       <tr>
@@ -155,16 +151,16 @@
       </tr>
     </tbody>
   </table>
-</form>
+  </form>
 </fieldset>
 
 
 <!-- I18n Languages Form -->
 <div class="tableHeader" style="margin-bottom: 10px;"><?php echo __('i18n 
languages') ?></div>
 <fieldset class="collapsible collapsed">
-<legend><?php echo __('i18n languages') ?></legend>
-<form action="<?php echo url_for('settings/list') ?>" method="POST">
-  <input type="hidden" class="collapse_state" 
name="i18n_languages[collapse_state]" value="<?php echo 
$i18nLanguagesCollapseState ?>"/>
+  <legend><?php echo __('i18n languages') ?></legend>
+  <form action="<?php echo url_for('settings/update') ?>" method="POST">
+  
   <table class="list">
     <thead>
       <tr>
@@ -173,7 +169,7 @@
         <th/>
       </tr>
     </thead>
-  
+
     <tbody>
     <?php foreach ($i18nLanguages as $setting): ?>
       <tr>
@@ -185,8 +181,7 @@
         </td>
         <td>
           <?php if ($setting->isDeleteable()): ?>
-            <?php $urlString = 
'settings/delete?id='.$setting->getId().'&i18n_languages_cs=1' ?>
-            <?php echo link_to(image_tag('delete', 'valign=top'), $urlString, 
array('post' => 'true', 'confirm' => __('are you sure?'))) ?>
+            <?php echo link_to(image_tag('delete', 'valign=top'), 
'settings/delete?id='.$setting->getId(), array('post' => 'true', 'confirm' => 
__('are you sure?'))) ?>
           <?php endif; ?>
         </td>
       </tr>
@@ -204,5 +199,5 @@
       </tr>
     </tbody>
   </table>
-</form>
+  </form>
 </fieldset>
\ No newline at end of file


Property changes on: trunk/qubit/config/package.xml
___________________________________________________________________
Deleted: svn:mergeinfo
   - 

Modified: trunk/qubit/lib/form/SettingsGenericForm.class.php
===================================================================
--- trunk/qubit/lib/form/SettingsGenericForm.class.php  2008-10-24 23:56:20 UTC 
(rev 1501)
+++ trunk/qubit/lib/form/SettingsGenericForm.class.php  2008-10-27 16:47:21 UTC 
(rev 1502)
@@ -31,16 +31,13 @@
 {
   public function configure()
   {
-    $widgets['collapse_state'] = new sfWidgetFormInputHidden(array(), 
array('class'=>'collapse_state'));
-    $validators['collapse_state'] = new 
sfValidatorNumber(array('required'=>false));
-    
     // Build widgets and validators
     foreach($this->getSettings() as $setting) {
       $widgets[$setting->getName()] = new sfWidgetFormInput;
       $validators[$setting->getName()] = new 
sfValidatorString(array('required'=>$this->areFieldsRequired()));
     }
     
-    // Add widgets and validators
+    // Set them
     $this->setWidgets($widgets);
     $this->setValidators($validators);
     

Modified: trunk/qubit/lib/form/SettingsGlobalForm.class.php
===================================================================
--- trunk/qubit/lib/form/SettingsGlobalForm.class.php   2008-10-24 23:56:20 UTC 
(rev 1501)
+++ trunk/qubit/lib/form/SettingsGlobalForm.class.php   2008-10-27 16:47:21 UTC 
(rev 1502)
@@ -39,7 +39,6 @@
   {
     // Build widgets
     $this->setWidgets(array(
-      'collapse_state' => new sfWidgetFormInputHidden(array(), 
array('class'=>'collapse_state')),
       'version' => new sfWidgetFormInput(array(), array('class'=>'disabled', 
'disabled'=>true)),
       'upload_dir' => new sfWidgetFormInput(array(), 
array('class'=>'disabled', 'disabled'=>true)),
       'reference_image_maxwidth' => new sfWidgetFormInput,
@@ -96,7 +95,6 @@
     $this->validatorSchema['version'] = new sfValidatorString(array('required' 
=> false));
     $this->validatorSchema['upload_dir'] = new 
sfValidatorString(array('required' => false));
     $this->validatorSchema['multi_repository'] = new 
sfValidatorNumber(array('required' => false));
-    $this->validatorSchema['collapse_state'] = new 
sfValidatorNumber(array('required' => false));
     
     // Set decorator
     $decorator = new QubitWidgetFormSchemaFormatterList($this->widgetSchema);

Modified: trunk/qubit/lib/form/SettingsSiteInformationForm.class.php
===================================================================
--- trunk/qubit/lib/form/SettingsSiteInformationForm.class.php  2008-10-24 
23:56:20 UTC (rev 1501)
+++ trunk/qubit/lib/form/SettingsSiteInformationForm.class.php  2008-10-27 
16:47:21 UTC (rev 1502)
@@ -33,7 +33,6 @@
   {
     // Build widgets
     $this->setWidgets(array(
-      'collapse_state' => new sfWidgetFormInputHidden(array(), 
array('class'=>'collapse_state')),
       'site_title' => new sfWidgetFormInput,
       'site_description' => new sfWidgetFormInput
     ));
@@ -52,7 +51,6 @@
     // $this->widgetSchema->setHelps();
     
     // Validators
-    $this->validatorSchema['collapse_state'] = new 
sfValidatorNumber(array('required'=>false));
     $this->validatorSchema['site_title'] = new 
sfValidatorString(array('required'=>false));
     $this->validatorSchema['site_description'] = new 
sfValidatorString(array('required'=>false));
     


Property changes on: trunk/qubit/lib/vendor/symfony
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: trunk/qubit/test/seleniumIDE/Test_suite_1
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: trunk/qubit/test/seleniumIDE/Test_suite_2
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: trunk/qubit/test/seleniumIDE/Test_suite_3
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: trunk/qubit/web/images/logo.png
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: trunk/qubit/web/install/index.php
___________________________________________________________________
Deleted: svn:mergeinfo
   - 

Modified: trunk/qubit/web/vendor/drupal/misc/collapse.js
===================================================================
--- trunk/qubit/web/vendor/drupal/misc/collapse.js      2008-10-24 23:56:20 UTC 
(rev 1501)
+++ trunk/qubit/web/vendor/drupal/misc/collapse.js      2008-10-27 16:47:21 UTC 
(rev 1502)
@@ -1,4 +1,3 @@
-// Requires jQuery library http://docs.jquery.com/Downloading_jQuery
 // $Id$
 
 /**
@@ -24,7 +23,6 @@
         Drupal.collapseScrollIntoView(this.parentNode);
       }
     });
-    $("input.collapse_state", fieldset).each(function() {this.value = 1});
   }
   else {
     $('div.action', fieldset).hide();
@@ -32,7 +30,6 @@
       $(this.parentNode).addClass('collapsed');
       this.parentNode.animating = false;
     });
-    $("input.collapse_state", fieldset).each(function() {this.value = 0});
   }
 };
 
@@ -56,35 +53,25 @@
 Drupal.behaviors.collapse = function (context) {
   $('fieldset.collapsible > legend:not(.collapse-processed)', 
context).each(function() {
     var fieldset = $(this.parentNode);
-    
-    // Get initial state of div from "collapse_state" form field
-    var initState = $("input.collapse_state", fieldset).attr("value");
-    
     // Expand if there are errors inside
-    if (initState == 1 || $('input.error, textarea.error, select.error, 
.validation_error, .form_error', fieldset).size() > 0) {
+    if ($('input.error, textarea.error, select.error', fieldset).size() > 0) {
       fieldset.removeClass('collapsed');
     }
 
     // Turn the legend into a clickable link and wrap the contents of the 
fieldset
     // in a div for easier animation
     var text = this.innerHTML;
-    $(this).empty().append($('<a href="#">'+ text +'</a>').click(function() {
-      var fieldset = $(this).parents('fieldset:first')[0];
-      // Don't animate multiple times
-      if (!fieldset.animating) {
-        fieldset.animating = true;
-        Drupal.toggleFieldset(fieldset);
-      }
-      return false;
-    }))
-    .after($('<div class="fieldset-wrapper"></div>')
-    .append(fieldset.children(':not(legend):not(.action)')))
-    .addClass('collapse-processed');
-  
-    // Mark div collapsed
-    
-    if (fieldset.hasClass('collapsed')) {
-      $("input.collapse_state", fieldset).each(function() {this.value = 0});
-    }
+      $(this).empty().append($('<a href="#">'+ text +'</a>').click(function() {
+        var fieldset = $(this).parents('fieldset:first')[0];
+        // Don't animate multiple times
+        if (!fieldset.animating) {
+          fieldset.animating = true;
+          Drupal.toggleFieldset(fieldset);
+        }
+        return false;
+      }))
+      .after($('<div class="fieldset-wrapper"></div>')
+      .append(fieldset.children(':not(legend):not(.action)')))
+      .addClass('collapse-processed');
   });
 };


Property changes on: trunk/qubit/web/vendor/yui/assets/skins/sam/sprite.png
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: 
trunk/qubit/web/vendor/yui/button/assets/skins/sam/button.css
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: 
trunk/qubit/web/vendor/yui/button/assets/skins/sam/menu-button-arrow-disabled.png
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: 
trunk/qubit/web/vendor/yui/button/assets/skins/sam/menu-button-arrow.png
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: 
trunk/qubit/web/vendor/yui/button/assets/skins/sam/split-button-arrow-active.png
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: 
trunk/qubit/web/vendor/yui/button/assets/skins/sam/split-button-arrow-disabled.png
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: 
trunk/qubit/web/vendor/yui/button/assets/skins/sam/split-button-arrow-focus.png
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: 
trunk/qubit/web/vendor/yui/button/assets/skins/sam/split-button-arrow-hover.png
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: 
trunk/qubit/web/vendor/yui/button/assets/skins/sam/split-button-arrow.png
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: trunk/qubit/web/vendor/yui/button/button-min.js
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: 
trunk/qubit/web/vendor/yui/container/assets/skins/sam/container.css
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: trunk/qubit/web/vendor/yui/container/container-min.js
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: trunk/qubit/web/vendor/yui/container/container_core-min.js
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: trunk/qubit/web/vendor/yui/element/element-beta-min.js
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: trunk/qubit/web/vendor/yui/menu/assets/skins/sam/menu.css
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: 
trunk/qubit/web/vendor/yui/menu/assets/skins/sam/menubaritem_submenuindicator.png
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: 
trunk/qubit/web/vendor/yui/menu/assets/skins/sam/menubaritem_submenuindicator_disabled.png
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: 
trunk/qubit/web/vendor/yui/menu/assets/skins/sam/menuitem_checkbox.png
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: 
trunk/qubit/web/vendor/yui/menu/assets/skins/sam/menuitem_checkbox_disabled.png
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: 
trunk/qubit/web/vendor/yui/menu/assets/skins/sam/menuitem_submenuindicator.png
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: 
trunk/qubit/web/vendor/yui/menu/assets/skins/sam/menuitem_submenuindicator_disabled.png
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: trunk/qubit/web/vendor/yui/menu/menu-min.js
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: 
trunk/qubit/web/vendor/yui/treeview/assets/skins/sam/treeview-loading.gif
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: 
trunk/qubit/web/vendor/yui/treeview/assets/skins/sam/treeview-sprite.gif
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: 
trunk/qubit/web/vendor/yui/treeview/assets/skins/sam/treeview.css
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: trunk/qubit/web/vendor/yui/treeview/treeview-min.js
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


Property changes on: 
trunk/qubit/web/vendor/yui/yahoo-dom-event/yahoo-dom-event.js
___________________________________________________________________
Deleted: svn:mergeinfo
   - 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" 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.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to