Changeset 1653
- Timestamp:
- 01/24/2007 11:49:22 PM (23 months ago)
- Location:
- trunk
- Files:
-
- 4 added
- 6 modified
-
HISTORY (modified) (1 diff)
-
buildscripts/texbuilder/Page2Tex.php (modified) (3 diffs)
-
framework/I18N/core/CultureInfo.php (modified) (2 diffs)
-
framework/Web/UI/WebControls/TStyle.php (modified) (5 diffs)
-
framework/Web/UI/WebControls/TWebControl.php (modified) (1 diff)
-
tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.page (added)
-
tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.php (added)
-
tests/FunctionalTests/validators/tests/DatePickerTestCase.php (modified) (1 diff)
-
tests/simple_unit/I18N (added)
-
tests/simple_unit/I18N/CultureInfoTest.php (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/HISTORY
r1637 r1653 2 2 ================================= 3 3 ENH: Added PRADO_CHMOD constant so that users can specify the permission of PRADO-created directories (Qiang) 4 ENH: Ticket#519 - Update TActiveRecord implementation (Wei) 5 ENH: Add Display property to TWebControl (Wei) 6 BUG: Ticket#517 - Quickstart I18N sample: conflicting module ID (Wei) 7 BUG: Ticket#521 - comment tag on TActiveButton stop callback (Wei) 4 8 5 9 Version 3.1.0 alpha January 15, 2007 -
trunk/buildscripts/texbuilder/Page2Tex.php
r1618 r1653 212 212 213 213 $html = preg_replace('/<!--(.*)-->/', '', $html); 214 $html = preg_replace('/<div class="last-modified">((.|\n)*?)<\/div>/', '', $html); 214 215 215 216 … … 301 302 return "<h3 id=\"".($page + (++self::$header_count))."\">"; 302 303 } 303 304 304 305 function set_block_content_id($content) 305 306 { … … 323 324 } 324 325 else 325 { 326 { 326 327 $changes = str_replace('"source"', '"source block-content" id="code-'.$id.'"', $matches[0]); 327 328 return $changes; -
trunk/framework/I18N/core/CultureInfo.php
r1398 r1653 415 415 * Returns <code>array('Language','Country');</code> 416 416 * '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. 418 418 */ 419 419 function getEnglishName() … … 424 424 425 425 $language = $culture->findInfo("Languages/{$lang}"); 426 if(count($language) == 0) 427 return $this->culture; 428 426 429 $region = $culture->findInfo("Countries/{$reg}"); 427 430 if($region) -
trunk/framework/Web/UI/WebControls/TStyle.php
r1398 r1653 44 44 */ 45 45 private $_customStyle=null; 46 /** 47 * @var string display style 48 */ 49 private $_displayStyle='Fixed'; 46 50 47 51 /** … … 174 178 return $this->_font; 175 179 } 176 180 177 181 /** 178 182 * @return boolean true if font is set. … … 181 185 { 182 186 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; 183 218 } 184 219 … … 363 398 $writer->addAttribute('class',$this->_class); 364 399 } 365 400 366 401 /** 367 402 * @return array list of style fields. … … 371 406 return $this->_fields; 372 407 } 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 */ 425 class TDisplayStyle extends TEnumerable 426 { 427 const None='None'; 428 const Dynamic='Dynamic'; 429 const Fixed='Fixed'; 430 const Hidden='Hidden'; 373 431 } 374 432 -
trunk/framework/Web/UI/WebControls/TWebControl.php
r1398 r1653 195 195 196 196 /** 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 /** 197 213 * @param string the css class of the control 198 214 */ -
trunk/tests/FunctionalTests/validators/tests/DatePickerTestCase.php
r1476 r1653 30 30 $this->select("{$base}picker2_month", "label=9"); 31 31 $this->select("{$base}picker2_day", "label=10"); 32 $this->select("{$base}picker2_year", "label=2006"); 32 33 $this->type("{$base}picker3", "14/4/2006"); 33 34 $this->type("{$base}picker4", "7/4/2006");
