Changeset 1225
- Timestamp:
- 07/02/2006 01:05:42 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 1 removed
- 12 modified
- 17 copied
-
HISTORY (modified) (2 diffs)
-
demos/quickstart/protected/application.xml (modified) (1 diff)
-
demos/quickstart/protected/comments (deleted)
-
demos/quickstart/protected/controls/Layout.tpl (modified) (1 diff)
-
framework/Util/TLogRouter.php (modified) (1 diff)
-
framework/Web/Javascripts/colorpicker/colorpicker.js (modified) (2 diffs)
-
framework/Web/Javascripts/colorpicker/spacer.gif (copied) (copied from branches/3.0/framework/Web/Javascripts/colorpicker/spacer.gif)
-
framework/Web/Javascripts/datepicker/datepicker.js (modified) (2 diffs)
-
framework/Web/Javascripts/js/colorpicker.js (modified) (2 diffs)
-
framework/Web/Javascripts/js/datepicker.js (modified) (2 diffs)
-
framework/Web/UI/WebControls/TBaseValidator.php (modified) (3 diffs)
-
framework/Web/UI/WebControls/TCheckBox.php (modified) (4 diffs)
-
framework/Web/UI/WebControls/THtmlArea.php (modified) (1 diff)
-
framework/Web/UI/WebControls/TRadioButton.php (modified) (1 diff)
-
tests/FunctionalTests/tickets/protected/pages/Home.page (copied) (copied from branches/3.0/tests/FunctionalTests/tickets/protected/pages/Home.page)
-
tests/FunctionalTests/tickets/protected/pages/Home.php (copied) (copied from branches/3.0/tests/FunctionalTests/tickets/protected/pages/Home.php)
-
tests/FunctionalTests/tickets/protected/pages/Ticket200.page (copied) (copied from branches/3.0/tests/FunctionalTests/tickets/protected/pages/Ticket200.page)
-
tests/FunctionalTests/tickets/protected/pages/Ticket200.php (copied) (copied from branches/3.0/tests/FunctionalTests/tickets/protected/pages/Ticket200.php)
-
tests/FunctionalTests/tickets/protected/pages/Ticket202.page (copied) (copied from branches/3.0/tests/FunctionalTests/tickets/protected/pages/Ticket202.page)
-
tests/FunctionalTests/tickets/protected/pages/Ticket205.page (copied) (copied from branches/3.0/tests/FunctionalTests/tickets/protected/pages/Ticket205.page)
-
tests/FunctionalTests/tickets/protected/pages/Ticket205.php (copied) (copied from branches/3.0/tests/FunctionalTests/tickets/protected/pages/Ticket205.php)
-
tests/FunctionalTests/tickets/protected/pages/Ticket207.page (copied) (copied from branches/3.0/tests/FunctionalTests/tickets/protected/pages/Ticket207.page)
-
tests/FunctionalTests/tickets/protected/pages/Ticket227.page (copied) (copied from branches/3.0/tests/FunctionalTests/tickets/protected/pages/Ticket227.page)
-
tests/FunctionalTests/tickets/protected/pages/Ticket246.page (copied) (copied from branches/3.0/tests/FunctionalTests/tickets/protected/pages/Ticket246.page)
-
tests/FunctionalTests/tickets/tests/Ticket205TestCase.php (copied) (copied from branches/3.0/tests/FunctionalTests/tickets/tests/Ticket205TestCase.php)
-
tests/FunctionalTests/tickets/tests/Ticket207TestCase.php (copied) (copied from branches/3.0/tests/FunctionalTests/tickets/tests/Ticket207TestCase.php)
-
tests/FunctionalTests/tickets/tests/Ticket227TestCase.php (copied) (copied from branches/3.0/tests/FunctionalTests/tickets/tests/Ticket227TestCase.php)
-
tests/FunctionalTests/tickets/tests/Ticket246TestCase.php (copied) (copied from branches/3.0/tests/FunctionalTests/tickets/tests/Ticket246TestCase.php)
-
tests/FunctionalTests/validators/protected/pages/Home.page (copied) (copied from branches/3.0/tests/FunctionalTests/validators/protected/pages/Home.page)
-
tests/FunctionalTests/validators/protected/pages/Home.php (copied) (copied from branches/3.0/tests/FunctionalTests/validators/protected/pages/Home.php)
Legend:
- Unmodified
- Added
- Removed
-
trunk/HISTORY
r1219 r1225 14 14 BUG: Ticket#182 - List and validator controls cause problem in child classes (Qiang) 15 15 BUG: Ticket#191 - Duplicated postbacks occur when using TButton with validators (Qiang) 16 BUG: Ticket#207 - Validators ClientSide.OnError triggered twice (Wei) 16 17 BUG: Ticket#213 - PRADO Requirements Checker charset error (Qiang) 18 BUG: Ticket#227 - Enabled property doesn't works with THtmlArea (Wei) 17 19 BUG: Ticket#234 - Postback target could be out of date (Qiang) 18 20 BUG: Ticket#239 - Ondeactivate handler for the first View of MultiView is always fired (Qiang) 19 21 BUG: Ticket#244 - redirect() needs absolute URL (Qiang) 20 22 BUG: Ticket#245 - getIsSecureConnection() is not working correctly (Qiang) 23 BUG: Ticket#246 - TDatePicker wrong popup position in scrolled div (Wei) 21 24 BUG: Ticket#260 - Wrong value of a configuration option in setUseTransparentSessionID (Qiang) 22 25 CHG: ensureChildControls() is now invoked in TControl::initRecursive (Qiang) … … 29 32 ENH: Ticket#256 - Datagrid columns can now be accessed via IDs (Qiang) 30 33 ENH: Ticket#257 - OnSelectedIndexChanged event of TDataList and TDataGrid now passes the original command parameter (Qiang) 34 ENH: Ticket#262 - Added TCheckBox.Value property (Qiang) 31 35 ENH: TRepeater, TDataList and TDataGrid will store data indices in DataKeys if DataKeyField is not set. (Qiang) 32 36 ENH: Added TPageService.BasePageClass property (Qiang) 33 37 ENH: Added TDataGrid.EmptyTemplate property (Qiang) 34 38 ENH: Added paging feature to all TDataBoundControl-derived controls (Qiang) 39 ENH: ClientSide.ObserveChanges="false" to only revalidate client side validator when control changes (Wei) 35 40 NEW: Added TPager (Qiang) 36 41 NEW: Added Dreamweaver taglib extension (Stanislav, Qiang) 42 NEW: Prado Command line script to create a new project, see framework/prado-cli.php (Wei) 37 43 38 44 Version 3.0.1 June 4, 2006 -
trunk/demos/quickstart/protected/application.xml
r1209 r1225 17 17 <paths> 18 18 <using namespace="Application.controls.*" /> 19 <using namespace="Application.comments.*" />20 19 </paths> 21 20 <services> 22 21 <service id="page" class="TPageService" DefaultPage="GettingStarted.Introduction" /> 23 22 </services> 24 <parameters>25 <parameter id="enableNewComment" value="false" />26 </parameters>27 23 </application> -
trunk/demos/quickstart/protected/controls/Layout.tpl
r1167 r1225 33 33 <com:TContentPlaceHolder ID="body" /> 34 34 </div> 35 <com:CommentList Visible="true" />36 35 </td> 37 36 </tr> -
trunk/framework/Util/TLogRouter.php
r943 r1225 23 23 * The format is as follows, 24 24 * <code> 25 * <route class="TFileLogRoute" Categories="System.Web.UI" Levels="Warning" />26 * <route class="TEmailLogRoute" Categories="Application" Levels="Fatal" Emails="admin@pradosoft.com" />25 * <route class="TFileLogRoute" Categories="System.Web.UI" Levels="Warning" /> 26 * <route class="TEmailLogRoute" Categories="Application" Levels="Fatal" Emails="admin@pradosoft.com" /> 27 27 * </code> 28 28 * You can specify multiple routes with different filtering conditions and different -
trunk/framework/Web/Javascripts/colorpicker/colorpicker.js
r1100 r1225 69 69 var constructor = mode == "Basic" ? "getBasicPickerContainer": "getFullPickerContainer" 70 70 this.element = this[constructor](this.options['ID'], this.options['Palette']) 71 document.body.appendChild(this.element);71 this.input.parentNode.appendChild(this.element); 72 72 this.element.style.display = "none"; 73 73 … … 91 91 if(!this.showing) 92 92 { 93 var pos = Position. cumulativeOffset(this.input);93 var pos = Position.positionedOffset(this.input); 94 94 pos[1] += this.input.offsetHeight; 95 95 -
trunk/framework/Web/Javascripts/datepicker/datepicker.js
r1149 r1225 248 248 this.iePopUp.scrolling="no" 249 249 this.iePopUp.frameBorder="0" 250 document.body.appendChild(this.iePopUp);251 } 252 253 document.body.appendChild(this._calDiv);250 this.control.parentNode.appendChild(this.iePopUp); 251 } 252 253 this.control.parentNode.appendChild(this._calDiv); 254 254 255 255 this.update(); … … 543 543 if(!this.showing) 544 544 { 545 var pos = Position. cumulativeOffset(this.control);546 545 var pos = Position.positionedOffset(this.control); 546 547 547 pos[1] += this.getDatePickerOffsetHeight(); 548 548 -
trunk/framework/Web/Javascripts/js/colorpicker.js
r1100 r1225 34 34 {var constructor=mode=="Basic"?"getBasicPickerContainer":"getFullPickerContainer" 35 35 this.element=this[constructor](this.options['ID'],this.options['Palette']) 36 document.body.appendChild(this.element);this.element.style.display="none";if(Prado.Browser().ie)36 this.input.parentNode.appendChild(this.element);this.element.style.display="none";if(Prado.Browser().ie) 37 37 {this.iePopUp=document.createElement('iframe');this.iePopUp.src=Prado.WebUI.TColorPicker.UIImages['button.gif'];this.iePopUp.style.position="absolute" 38 38 this.iePopUp.scrolling="no" … … 43 43 this.show(mode);},show:function(type) 44 44 {if(!this.showing) 45 {var pos=Position. cumulativeOffset(this.input);pos[1]+=this.input.offsetHeight;this.element.style.top=(pos[1]-1)+"px";this.element.style.left=pos[0]+"px";this.element.style.display="block";this.ieHack(type);this._documentClickEvent=this.hideOnClick.bindEvent(this,type);this._documentKeyDownEvent=this.keyPressed.bindEvent(this,type);Event.observe(document.body,"click",this._documentClickEvent);Event.observe(document,"keydown",this._documentKeyDownEvent);this.showing=true;if(type=="Full")45 {var pos=Position.positionedOffset(this.input);pos[1]+=this.input.offsetHeight;this.element.style.top=(pos[1]-1)+"px";this.element.style.left=pos[0]+"px";this.element.style.display="block";this.ieHack(type);this._documentClickEvent=this.hideOnClick.bindEvent(this,type);this._documentKeyDownEvent=this.keyPressed.bindEvent(this,type);Event.observe(document.body,"click",this._documentClickEvent);Event.observe(document,"keydown",this._documentKeyDownEvent);this.showing=true;if(type=="Full") 46 46 {this.observeMouseMovement();var color=Rico.Color.createFromHex(this.input.value);this.inputs.oldColor.style.backgroundColor=color.asHex();this.setColor(color,true);}}},hide:function(event) 47 47 {if(this.showing) -
trunk/framework/Web/Javascripts/js/datepicker.js
r1149 r1225 23 23 this.iePopUp.scrolling="no" 24 24 this.iePopUp.frameBorder="0" 25 document.body.appendChild(this.iePopUp);}26 document.body.appendChild(this._calDiv);this.update();this.updateHeader();this.ieHack(true);previousMonth.hideFocus=true;nextMonth.hideFocus=true;todayButton.hideFocus=true;Event.observe(previousMonth,"click",this.prevMonth.bindEvent(this));Event.observe(nextMonth,"click",this.nextMonth.bindEvent(this));Event.observe(todayButton,"click",this.selectToday.bindEvent(this));Event.observe(this._monthSelect,"change",this.monthSelect.bindEvent(this));Event.observe(this._yearSelect,"change",this.yearSelect.bindEvent(this));Event.observe(this._calDiv,"mousewheel",this.mouseWheelChange.bindEvent(this));Event.observe(calendarBody,"click",this.selectDate.bindEvent(this));Prado.Element.focus(this.control);},ieHack:function(cleanup)25 this.control.parentNode.appendChild(this.iePopUp);} 26 this.control.parentNode.appendChild(this._calDiv);this.update();this.updateHeader();this.ieHack(true);previousMonth.hideFocus=true;nextMonth.hideFocus=true;todayButton.hideFocus=true;Event.observe(previousMonth,"click",this.prevMonth.bindEvent(this));Event.observe(nextMonth,"click",this.nextMonth.bindEvent(this));Event.observe(todayButton,"click",this.selectToday.bindEvent(this));Event.observe(this._monthSelect,"change",this.monthSelect.bindEvent(this));Event.observe(this._yearSelect,"change",this.yearSelect.bindEvent(this));Event.observe(this._calDiv,"mousewheel",this.mouseWheelChange.bindEvent(this));Event.observe(calendarBody,"click",this.selectDate.bindEvent(this));Prado.Element.focus(this.control);},ieHack:function(cleanup) 27 27 {if(this.iePopUp) 28 28 {this.iePopUp.style.display="block";this.iePopUp.style.top=(this._calDiv.offsetTop-1)+"px";this.iePopUp.style.left=(this._calDiv.offsetLeft-1)+"px";this.iePopUp.style.width=Math.abs(this._calDiv.offsetWidth-2)+"px";this.iePopUp.style.height=(this._calDiv.offsetHeight+1)+"px";if(cleanup)this.iePopUp.style.display="none";}},keyPressed:function(ev) … … 93 93 return this.control.offsetHeight;var control=Prado.WebUI.TDatePicker.getDayListControl(this.control);if(control)return control.offsetHeight;var control=Prado.WebUI.TDatePicker.getMonthListControl(this.control);if(control)return control.offsetHeight;var control=Prado.WebUI.TDatePicker.getYearListControl(this.control);if(control)return control.offsetHeight;return 0;},show:function() 94 94 {this.create();if(!this.showing) 95 {var pos=Position. cumulativeOffset(this.control);pos[1]+=this.getDatePickerOffsetHeight();this._calDiv.style.display="block";this._calDiv.style.top=(pos[1]-1)+"px";this._calDiv.style.left=pos[0]+"px";this.ieHack(false);this.documentClickEvent=this.hideOnClick.bindEvent(this);this.documentKeyDownEvent=this.keyPressed.bindEvent(this);Event.observe(document.body,"click",this.documentClickEvent);var date=this.getDateFromInput();if(date)95 {var pos=Position.positionedOffset(this.control);pos[1]+=this.getDatePickerOffsetHeight();this._calDiv.style.display="block";this._calDiv.style.top=(pos[1]-1)+"px";this._calDiv.style.left=pos[0]+"px";this.ieHack(false);this.documentClickEvent=this.hideOnClick.bindEvent(this);this.documentKeyDownEvent=this.keyPressed.bindEvent(this);Event.observe(document.body,"click",this.documentClickEvent);var date=this.getDateFromInput();if(date) 96 96 {this.selectedDate=date;this.setSelectedDate(date);} 97 97 Event.observe(document,"keydown",this.documentKeyDownEvent);this.showing=true;}},getDateFromInput:function() -
trunk/framework/Web/UI/WebControls/TBaseValidator.php
r1169 r1225 125 125 126 126 /** 127 * Adds attributes to renderer. Calls parent implementation and renders the 127 * Adds attributes to renderer. Calls parent implementation and renders the 128 128 * client control scripts. 129 129 * @param THtmlWriter the renderer … … 238 238 $this->updateControlCssClass(); 239 239 } 240 240 241 241 /** 242 242 * Update the ControlToValidate component's css class depending … … 636 636 637 637 /** 638 * @param boolean true to revalidate when the control to validate changes value. 639 */ 640 public function setObserveChanges($value) 641 { 642 $this->setOption('ObserveChanges', TPropertyValue::ensureBoolean($value)); 643 } 644 645 /** 646 * @return boolean true to observe changes. 647 */ 648 public function getObserveChanges() 649 { 650 if(($option=$this->getOption('ObserveChanges'))!==null) 651 return $option; 652 else 653 return true; 654 } 655 656 /** 638 657 * Ensure the string is a valid javascript function. If the string begins 639 658 * with "javascript:" valid javascript function is assumed, otherwise the -
trunk/framework/Web/UI/WebControls/TCheckBox.php
r1200 r1225 61 61 { 62 62 $checked=$this->getChecked(); 63 if(isset($values[$key])!=$checked) 64 { 65 $this->setChecked(!$checked); 66 return true; 67 } 68 else 69 return false; 63 if($newChecked=isset($values[$key])) 64 $this->setValue($values[$key]); 65 $this->setChecked($newChecked); 66 return $newChecked!==$checked; 70 67 } 71 68 … … 132 129 { 133 130 $this->setViewState('Text',$value,''); 131 } 132 133 /** 134 * @return string the value of the checkbox. Defaults to empty. 135 */ 136 public function getValue() 137 { 138 return $this->getViewState('Value',''); 139 } 140 141 /** 142 * @param string the value of the checkbox 143 */ 144 public function setValue($value) 145 { 146 $this->setViewState('Value',$value,''); 134 147 } 135 148 … … 310 323 protected function getValueAttribute() 311 324 { 312 $attributes=$this->getViewState('InputAttributes',null); 313 if($attributes && $attributes->contains('value')) 314 return $attributes->itemAt('value'); 315 else if($this->hasAttribute('value')) 316 return $this->getAttribute('value'); 325 if(($value=$this->getValue())!=='') 326 return $value; 317 327 else 318 return ''; 328 { 329 $attributes=$this->getViewState('InputAttributes',null); 330 if($attributes && $attributes->contains('value')) 331 return $attributes->itemAt('value'); 332 else if($this->hasAttribute('value')) 333 return $this->getAttribute('value'); 334 else 335 return ''; 336 } 319 337 } 320 338 … … 346 364 $writer->addAttribute('id',$clientID); 347 365 $writer->addAttribute('type','checkbox'); 348 if(($value = $this->getValueAttribute()) !=='')366 if(($value=$this->getValueAttribute())!=='') 349 367 $writer->addAttribute('value',$value); 350 368 if(!empty($onclick)) -
trunk/framework/Web/UI/WebControls/THtmlArea.php
r1156 r1225 220 220 protected function addAttributesToRender($writer) 221 221 { 222 if($this->getEnableVisualEdit() )222 if($this->getEnableVisualEdit() && $this->getEnabled(true)) 223 223 { 224 224 $writer->addAttribute('id',$this->getClientID()); -
trunk/framework/Web/UI/WebControls/TRadioButton.php
r1156 r1225 102 102 } 103 103 104 /** 105 * @return string the value attribute to be rendered 106 */ 104 107 protected function getValueAttribute() 105 108 {
