| 
     
      
      
      From: <gem...@li...> - 2012-05-07 09:14:08
      
     
   | 
Revision: 671
          http://gemstracker.svn.sourceforge.net/gemstracker/?rev=671&view=rev
Author:   mennodekker
Date:     2012-05-07 09:13:59 +0000 (Mon, 07 May 2012)
Log Message:
-----------
Allow to set organization max lines from the index controller again, and show at most maxlines, but less if there are less organizations
Modified Paths:
--------------
    trunk/library/classes/Gems/Default/IndexAction.php
    trunk/library/classes/Gems/User/Form/OrganizationFormAbstract.php
Modified: trunk/library/classes/Gems/Default/IndexAction.php
===================================================================
--- trunk/library/classes/Gems/Default/IndexAction.php	2012-05-04 12:49:48 UTC (rev 670)
+++ trunk/library/classes/Gems/Default/IndexAction.php	2012-05-07 09:13:59 UTC (rev 671)
@@ -103,6 +103,7 @@
                     'showToken' => $this->showTokenButton,
                     'showPasswordLost' => $this->showPasswordLostButton,
                     'labelWidthFactor' => $this->labelWidthFactor,
+                    'organizationMaxLines' => $this->organizationMaxLines,
                     ));
 
         Gems_Html::init();
Modified: trunk/library/classes/Gems/User/Form/OrganizationFormAbstract.php
===================================================================
--- trunk/library/classes/Gems/User/Form/OrganizationFormAbstract.php	2012-05-04 12:49:48 UTC (rev 670)
+++ trunk/library/classes/Gems/User/Form/OrganizationFormAbstract.php	2012-05-07 09:13:59 UTC (rev 671)
@@ -169,7 +169,7 @@
             $element->setMultiOptions($orgs);
 
             if ($this->organizationMaxLines > 1) {
-                $element->setAttrib('size', max(count($orgs) + 1, $this->organizationMaxLines));
+                $element->setAttrib('size', min(count($orgs) + 1, $this->organizationMaxLines));
             }
             $this->addElement($element);
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 |