Changeset 1653

Show
Ignore:
Timestamp:
01/24/2007 11:49:22 PM (23 months ago)
Author:
wei
Message:

Fixed #502

Location:
trunk
Files:
4 added
6 modified

Legend:

Unmodified
Added
Removed
  • trunk/HISTORY

    r1637 r1653  
    22================================= 
    33ENH: Added PRADO_CHMOD constant so that users can specify the permission of PRADO-created directories (Qiang) 
     4ENH: Ticket#519 - Update TActiveRecord implementation (Wei) 
     5ENH: Add Display property to TWebControl (Wei) 
     6BUG: Ticket#517 - Quickstart I18N sample: conflicting module ID (Wei) 
     7BUG: Ticket#521 - comment tag on TActiveButton stop callback (Wei) 
    48 
    59Version 3.1.0 alpha January 15, 2007 
  • trunk/buildscripts/texbuilder/Page2Tex.php

    r1618 r1653  
    212212 
    213213                $html = preg_replace('/<!--(.*)-->/', '', $html); 
     214                $html = preg_replace('/<div class="last-modified">((.|\n)*?)<\/div>/', '', $html); 
    214215 
    215216 
     
    301302                return "<h3 id=\"".($page + (++self::$header_count))."\">"; 
    302303        } 
    303          
     304 
    304305        function set_block_content_id($content) 
    305306        { 
     
    323324                } 
    324325                else 
    325                 {        
     326                { 
    326327                        $changes = str_replace('"source"', '"source block-content" id="code-'.$id.'"', $matches[0]); 
    327328                        return $changes; 
  • trunk/framework/I18N/core/CultureInfo.php

    r1398 r1653  
    415415         * Returns <code>array('Language','Country');</code> 
    416416         * 'Country' is omitted if the culture is neutral. 
    417          * @return array array with language and country as elements. 
     417         * @return string language (country), it may locale code string if english name does not exist. 
    418418         */ 
    419419        function getEnglishName() 
     
    424424 
    425425                $language = $culture->findInfo("Languages/{$lang}"); 
     426                if(count($language) == 0) 
     427                        return $this->culture; 
     428 
    426429                $region = $culture->findInfo("Countries/{$reg}"); 
    427430                if($region) 
  • trunk/framework/Web/UI/WebControls/TStyle.php

    r1398 r1653  
    4444         */ 
    4545        private $_customStyle=null; 
     46        /** 
     47         * @var string display style 
     48         */ 
     49        private $_displayStyle='Fixed'; 
    4650 
    4751        /** 
     
    174178                return $this->_font; 
    175179        } 
    176          
     180 
    177181        /** 
    178182         * @return boolean true if font is set. 
     
    181185        { 
    182186                return $this->_font !== null; 
     187        } 
     188 
     189        /** 
     190         * @param TDisplayStyle control display style, default is TDisplayStyle::Fixed 
     191         */ 
     192        public function setDisplayStyle($value) 
     193        { 
     194                $this->_displayStyle = TPropertyValue::ensureEnum($value, 'TDisplayStyle'); 
     195                switch($this->_displayStyle) 
     196                { 
     197                        case TDisplayStyle::None: 
     198                                $this->_fields['display'] = 'none'; 
     199                                break; 
     200                        case TDisplayStyle::Dynamic: 
     201                                $this->_fields['display'] = ''; //remove the display property 
     202                                break; 
     203                        case TDisplayStyle::Fixed: 
     204                                $this->_fields['visibility'] = 'visible'; 
     205                                break; 
     206                        case TDisplayStyle::Hidden: 
     207                                $this->_fields['visibility'] = 'hidden'; 
     208                                break; 
     209                } 
     210        } 
     211 
     212        /** 
     213         * @return TDisplayStyle display style 
     214         */ 
     215        public function getDisplayStyle() 
     216        { 
     217                return $this->_displayStyle; 
    183218        } 
    184219 
     
    363398                        $writer->addAttribute('class',$this->_class); 
    364399        } 
    365          
     400 
    366401        /** 
    367402         * @return array list of style fields. 
     
    371406                return $this->_fields; 
    372407        } 
     408} 
     409 
     410/** 
     411 * TDisplayStyle defines the enumerable type for the possible styles 
     412 * that a web control can display. 
     413 * 
     414 * The following enumerable values are defined: 
     415 * - None: the control is not displayed and not included in the layout. 
     416 * - Dynamic: the control is displayed and included in the layout, the layout flow is dependent on the control (equivalent to display:'' in css). 
     417 * - Fixed: Similar to Dynamic with CSS "visibility" set "shown". 
     418 * - Hidden: the control is not displayed and is included in the layout. 
     419 * 
     420 * @author Wei Zhuo <weizhuo[at]gmail[dot]com> 
     421 * @version $Id$ 
     422 * @package System.Web.UI.WebControls 
     423 * @since 3.1 
     424 */ 
     425class TDisplayStyle extends TEnumerable 
     426{ 
     427        const None='None'; 
     428        const Dynamic='Dynamic'; 
     429        const Fixed='Fixed'; 
     430        const Hidden='Hidden'; 
    373431} 
    374432 
  • trunk/framework/Web/UI/WebControls/TWebControl.php

    r1398 r1653  
    195195 
    196196        /** 
     197         * @param TDisplayStyle display style of the control, default is TDisplayStyle::Fixed 
     198         */ 
     199        public function setDisplay($value) 
     200        { 
     201                $this->getStyle()->setDisplayStyle($value); 
     202        } 
     203 
     204        /** 
     205         * @return TDisplayStyle display style of the control, default is TDisplayStyle::Fixed 
     206         */ 
     207        public function getDisplay() 
     208        { 
     209                return $this->getStyle()->getDisplayStyle(); 
     210        } 
     211 
     212        /** 
    197213         * @param string the css class of the control 
    198214         */ 
  • trunk/tests/FunctionalTests/validators/tests/DatePickerTestCase.php

    r1476 r1653  
    3030                $this->select("{$base}picker2_month", "label=9"); 
    3131                $this->select("{$base}picker2_day", "label=10"); 
     32                $this->select("{$base}picker2_year", "label=2006"); 
    3233                $this->type("{$base}picker3", "14/4/2006"); 
    3334                $this->type("{$base}picker4", "7/4/2006");