Changeset 1560

Show
Ignore:
Timestamp:
12/03/2006 09:15:22 PM (2 years ago)
Author:
xue
Message:

merge from 3.0 branch till 1559.

Location:
trunk
Files:
8 modified

Legend:

Unmodified
Added
Removed
  • trunk/HISTORY

    r1547 r1560  
    1919Version 3.0.6 December 4, 2006 
    2020============================== 
     21BUG: Ticket#400 - TJavascriptLogger incompatible with Firefox 2.0 RC1 (Wei) 
    2122BUG: Ticket#442 - TPageService getBasePath in namespace form (Qiang) 
    2223BUG: Ticket#443 - Template comment tag messed up with HTML comment tag (Qiang) 
     24BUG: Ticket#453 - I18N controls should accept UNIX timestamps (Wei) 
     25BUG: Ticket#463 - TPhpErrorException: Non-static method DateTimeFormatInfo::getInstance() (Wei) 
    2326BUG: Ticket#467 - typo in TUrlMapping.php (Qiang) 
     27BUG: Ticket#476 - Problem when adding a new text (translate) with MessageSource_XLIFF (Wei) 
    2428BUG: TTableCell should render   only when Text is not set and there's no child (Qiang) 
    2529BUG: global state was not saved when redirect() is invoked (Qiang) 
     
    2933ENH: Ticket#468 - Added support of using all property tags in skins (Qiang) 
    3034ENH: Ticket#471 - Added methods in TAssetManager to expose published path and URL (Qiang) 
     35ENH: Add ToggleKey for TJavascriptLogger (Wei) 
    3136CHG: Ticket#437 - __autoload is replaced by spl_autoload_register (Qiang) 
    3237CHG: Ticket#454 - Redundant PHP Version Check (Qiang) 
     
    3742CHG: TDataBoundControl will not throw exception if CurrentPageIndex is out of range (Qiang) 
    3843NEW: TUrlManager (Qiang) 
     44 
    3945 
    4046Version 3.0.5 October 23, 2006 
  • trunk/UPGRADE

    r1551 r1560  
    3131- If TUrlMapping is used, you need to set the UrlManager property of 
    3232  THttpRequest to the module ID of TUrlMapping. 
     33- TJavascriptLogger toggle key is changed from ALT-D to ALT-J.  
     34   Use the ToggleKey property chanage to a different key. 
    3335 
    3436Upgrading from v3.0.4 
  • trunk/framework/TApplication.php

    r1541 r1560  
    807807                if($this->_configFile===null) 
    808808                { 
    809                         $this->getRequest()->setAvailableServices(array(self::PAGE_SERVICE_ID)); 
     809                        $request=$this->getRequest(); 
     810                        $request->setAvailableServices(array(self::PAGE_SERVICE_ID)); 
     811                        $request->resolveRequest(); 
    810812                        $this->_service=$this->getPageService(); 
    811813                        return; 
  • trunk/framework/Web/Javascripts/extra/logger.js

    r1458 r1560  
    201201  // ------- 
    202202 
    203   initialize : function() { 
     203  initialize : function(toggleKey) { 
    204204    this.outputCount = 0 
    205205    this.tagPattern = Cookie.get('tagPattern') || ".*" 
     
    284284                this.logElement.style.bottom="0px"; 
    285285        } 
     286        var self=this; 
     287        Event.observe(document, 'keydown', function(e) 
     288        {  
     289                if((e.altKey==true) && Event.keyCode(e) == toggleKey ) //Alt+J | Ctrl+J 
     290                        self.toggle(); 
     291        }); 
    286292 
    287293    // Listen to the logger.... 
     
    452458        } 
    453459} 
    454  
    455 // Load the Console when the window loads 
    456 var logConsole; 
    457 Event.OnLoad(function() { logConsole = new LogConsole()}); 
    458  
    459  
    460460 
    461461 
  • trunk/framework/Web/Javascripts/js/compressed/logger.js

    r1458 r1560  
    4141this.tag=tag}} 
    4242LogConsole=Class.create() 
    43 LogConsole.prototype={commandHistory:[],commandIndex:0,hidden:true,initialize:function(){this.outputCount=0 
     43LogConsole.prototype={commandHistory:[],commandIndex:0,hidden:true,initialize:function(toggleKey){this.outputCount=0 
    4444this.tagPattern=Cookie.get('tagPattern')||".*" 
    4545this.logElement=document.createElement('div') 
     
    9898else 
    9999{this.logElement.style.position="fixed";this.logElement.style.bottom="0px";} 
    100 Logger.onupdate.addListener(this.logUpdate.bind(this)) 
     100var self=this;Event.observe(document,'keydown',function(e) 
     101{if((e.altKey==true)&&Event.keyCode(e)==toggleKey) 
     102self.toggle();});Logger.onupdate.addListener(this.logUpdate.bind(this)) 
    101103Logger.onclear.addListener(this.clear.bind(this)) 
    102104for(var i=0;i<Logger.logEntries.length;i++){this.logUpdate(Logger.logEntries[i])} 
     
    153155this.inputElement.value=this.commandHistory[this.commandIndex]} 
    154156else{this.commandIndex=0}}} 
    155 var logConsole;Event.OnLoad(function(){logConsole=new LogConsole()});function inspect(o) 
     157function inspect(o) 
    156158{var objtype=typeof(o);if(objtype=="undefined"){return"undefined";}else if(objtype=="number"||objtype=="boolean"){return o+"";}else if(o===null){return"null";} 
    157159try{var ostring=(o+"");}catch(e){return"["+typeof(o)+"]";} 
  • trunk/framework/Web/Javascripts/js/debug/logger.js

    r1458 r1560  
    201201  // ------- 
    202202 
    203   initialize : function() { 
     203  initialize : function(toggleKey) { 
    204204    this.outputCount = 0 
    205205    this.tagPattern = Cookie.get('tagPattern') || ".*" 
     
    284284                this.logElement.style.bottom="0px"; 
    285285        } 
     286        var self=this; 
     287        Event.observe(document, 'keydown', function(e) 
     288        {  
     289                if((e.altKey==true) && Event.keyCode(e) == toggleKey ) //Alt+J | Ctrl+J 
     290                        self.toggle(); 
     291        }); 
    286292 
    287293    // Listen to the logger.... 
     
    452458        } 
    453459} 
    454  
    455 // Load the Console when the window loads 
    456 var logConsole; 
    457 Event.OnLoad(function() { logConsole = new LogConsole()}); 
    458  
    459  
    460460 
    461461 
  • trunk/framework/Web/UI/WebControls/TJavascriptLogger.php

    r1458 r1560  
    3333class TJavascriptLogger extends TWebControl 
    3434{ 
     35        private static $_keyCodes = array( 
     36                '0'=>48, '1'=>49, '2'=>50, '3'=>51, '4'=>52, '5'=>53, '6'=>54, '7'=>55, '8'=>56, '9'=>57,  
     37                'a'=>65, 'b'=>66, 'c'=>67, 'd'=>68, 'e'=>69, 'f'=>70, 'g'=>71, 'h'=>72, 
     38                'i'=>73, 'j'=>74, 'k'=>75, 'l'=>76, 'm'=>77, 'n'=>78, 'o'=>79, 'p'=>80, 
     39                'q'=>81, 'r'=>82, 's'=>83, 't'=>84, 'u'=>85, 'v'=>86, 'w'=>87, 'x'=>88, 'y'=>89, 'z'=>90); 
     40 
    3541        /** 
    3642         * @return string tag name of the panel 
     
    4248 
    4349        /** 
     50         * @param string keyboard key for toggling the console, default is J. 
     51         */ 
     52        public function setToggleKey($value) 
     53        { 
     54                $this->setViewState('ToggleKey', $value, 'j'); 
     55        } 
     56 
     57        /** 
     58         * @return string keyboard key for toggling the console. 
     59         */ 
     60        public function getToggleKey() 
     61        { 
     62                return $this->getViewState('ToggleKey', 'j'); 
     63        } 
     64 
     65        /** 
    4466         * Registers the required logger javascript. 
    4567         * @param TEventParameter event parameter 
     
    4769        public function onPreRender($param) 
    4870        { 
    49                 $this->getPage()->getClientScript()->registerPradoScript('logger'); 
     71                $key = strtolower($this->getToggleKey()); 
     72                $code = isset(self::$_keyCodes[$key]) ? self::$_keyCodes[$key] : 74; 
     73                $js = "var logConsole; Event.OnLoad(function() { logConsole = new LogConsole($code)}); "; 
     74                $cs = $this->getPage()->getClientScript(); 
     75                $cs->registerBeginScript($this->getClientID(),$js); 
     76                $cs->registerPradoScript('logger'); 
    5077        } 
    5178 
     
    5784        public function renderContents($writer) 
    5885        { 
     86                $code = strtoupper($this->getToggleKey()); 
    5987                $info = '(<a href="http://gleepglop.com/javascripts/logger/" target="_blank">more info</a>).'; 
    6088                $link = '<a href="javascript:if(logConsole)logConsole.toggle()">toggle the javascript log console.</a>'; 
    61                 $usage = 'Press ALT-D (Or CTRL-D on OS X) to'; 
     89                $usage = 'Press ALT-'.$code.' (Or CTRL-'.$code.' on OS X) to'; 
    6290                $writer->write("{$usage} {$link} {$info}"); 
    6391        } 
  • trunk/index.html

    r1482 r1560  
    88<body> 
    99<h1>PRADO Framework for PHP 5 </h1> 
    10 <p>Version 3.0.5, October 23, 2006<br> 
     10<p>Version 3.0.6, December 4, 2006<br> 
    1111Copyright&copy; 2004-2006 by <a href="http://www.pradosoft.com/">PradoSoft</a><br> 
    1212All Rights Reserved.