diff options
author | xue <> | 2006-12-04 03:15:22 +0000 |
---|---|---|
committer | xue <> | 2006-12-04 03:15:22 +0000 |
commit | 6b5f0bdbfb621ab3e4ec0f23c000b780d030d47f (patch) | |
tree | 0ae63ad93e55a34189c3f4ff5d4cb8e959495fce | |
parent | 562979c4a8fe47952edf7986d4144624e41630f7 (diff) |
merge from 3.0 branch till 1559.
-rw-r--r-- | HISTORY | 6 | ||||
-rw-r--r-- | UPGRADE | 2 | ||||
-rw-r--r-- | framework/TApplication.php | 4 | ||||
-rw-r--r-- | framework/Web/Javascripts/extra/logger.js | 14 | ||||
-rw-r--r-- | framework/Web/Javascripts/js/compressed/logger.js | 8 | ||||
-rw-r--r-- | framework/Web/Javascripts/js/debug/logger.js | 14 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TJavascriptLogger.php | 32 | ||||
-rw-r--r-- | index.html | 2 |
8 files changed, 61 insertions, 21 deletions
@@ -18,9 +18,13 @@ NEW: TCacheDependency, TFileCacheDependency, TDirectoryCacheDependency, TGlobalS Version 3.0.6 December 4, 2006 ============================== +BUG: Ticket#400 - TJavascriptLogger incompatible with Firefox 2.0 RC1 (Wei) BUG: Ticket#442 - TPageService getBasePath in namespace form (Qiang) BUG: Ticket#443 - Template comment tag messed up with HTML comment tag (Qiang) +BUG: Ticket#453 - I18N controls should accept UNIX timestamps (Wei) +BUG: Ticket#463 - TPhpErrorException: Non-static method DateTimeFormatInfo::getInstance() (Wei) BUG: Ticket#467 - typo in TUrlMapping.php (Qiang) +BUG: Ticket#476 - Problem when adding a new text (translate) with MessageSource_XLIFF (Wei) BUG: TTableCell should render only when Text is not set and there's no child (Qiang) BUG: global state was not saved when redirect() is invoked (Qiang) BUG: TPager would not display if it was invisible previously (Qiang) @@ -28,6 +32,7 @@ ENH: Ticket#446 - Added TMetaTagCollection.getMetaTagByID method (Qiang) ENH: Ticket#451 - Modified TUrlMapping to extend from TUrlManager (Qiang) ENH: Ticket#468 - Added support of using all property tags in skins (Qiang) ENH: Ticket#471 - Added methods in TAssetManager to expose published path and URL (Qiang) +ENH: Add ToggleKey for TJavascriptLogger (Wei) CHG: Ticket#437 - __autoload is replaced by spl_autoload_register (Qiang) CHG: Ticket#454 - Redundant PHP Version Check (Qiang) CHG: Ticket#460 - Validators will not perform validation if parents are disabled (Qiang) @@ -37,6 +42,7 @@ CHG: THttpRequest.constructUrl() now encodes ampersand by default (Qiang) CHG: TDataBoundControl will not throw exception if CurrentPageIndex is out of range (Qiang) NEW: TUrlManager (Qiang) + Version 3.0.5 October 23, 2006 ============================== BUG: Ticket#409 - Multiple page services will mess up page caching (Qiang) @@ -30,6 +30,8 @@ Upgrading from v3.0.5 the appearance of existing PRADO applications that use TDataGrid.
- If TUrlMapping is used, you need to set the UrlManager property of
THttpRequest to the module ID of TUrlMapping.
+- TJavascriptLogger toggle key is changed from ALT-D to ALT-J.
+ Use the ToggleKey property chanage to a different key.
Upgrading from v3.0.4
---------------------
diff --git a/framework/TApplication.php b/framework/TApplication.php index be2cce19..8cf97de7 100644 --- a/framework/TApplication.php +++ b/framework/TApplication.php @@ -806,7 +806,9 @@ class TApplication extends TComponent if($this->_configFile===null) { - $this->getRequest()->setAvailableServices(array(self::PAGE_SERVICE_ID)); + $request=$this->getRequest(); + $request->setAvailableServices(array(self::PAGE_SERVICE_ID)); + $request->resolveRequest(); $this->_service=$this->getPageService(); return; } diff --git a/framework/Web/Javascripts/extra/logger.js b/framework/Web/Javascripts/extra/logger.js index 5771f2f4..b21df1ae 100644 --- a/framework/Web/Javascripts/extra/logger.js +++ b/framework/Web/Javascripts/extra/logger.js @@ -200,7 +200,7 @@ LogConsole.prototype = { // Methods
// -------
- initialize : function() {
+ initialize : function(toggleKey) {
this.outputCount = 0
this.tagPattern = Cookie.get('tagPattern') || ".*"
@@ -283,6 +283,12 @@ LogConsole.prototype = { this.logElement.style.position="fixed";
this.logElement.style.bottom="0px";
}
+ var self=this;
+ Event.observe(document, 'keydown', function(e)
+ {
+ if((e.altKey==true) && Event.keyCode(e) == toggleKey ) //Alt+J | Ctrl+J
+ self.toggle();
+ });
// Listen to the logger....
Logger.onupdate.addListener(this.logUpdate.bind(this))
@@ -452,12 +458,6 @@ LogConsole.prototype = { }
}
-// Load the Console when the window loads
-var logConsole;
-Event.OnLoad(function() { logConsole = new LogConsole()});
-
-
-
// -------------------------
// Helper Functions And Junk
diff --git a/framework/Web/Javascripts/js/compressed/logger.js b/framework/Web/Javascripts/js/compressed/logger.js index 342b4234..4588c723 100644 --- a/framework/Web/Javascripts/js/compressed/logger.js +++ b/framework/Web/Javascripts/js/compressed/logger.js @@ -40,7 +40,7 @@ LogEntry=Class.create() LogEntry.prototype={initialize:function(message,tag){this.message=message this.tag=tag}} LogConsole=Class.create() -LogConsole.prototype={commandHistory:[],commandIndex:0,hidden:true,initialize:function(){this.outputCount=0 +LogConsole.prototype={commandHistory:[],commandIndex:0,hidden:true,initialize:function(toggleKey){this.outputCount=0 this.tagPattern=Cookie.get('tagPattern')||".*" this.logElement=document.createElement('div') document.body.appendChild(this.logElement) @@ -97,7 +97,9 @@ if(document.all&&!window.opera) {window.setInterval(this.repositionWindow.bind(this),500)} else {this.logElement.style.position="fixed";this.logElement.style.bottom="0px";} -Logger.onupdate.addListener(this.logUpdate.bind(this)) +var self=this;Event.observe(document,'keydown',function(e) +{if((e.altKey==true)&&Event.keyCode(e)==toggleKey) +self.toggle();});Logger.onupdate.addListener(this.logUpdate.bind(this)) Logger.onclear.addListener(this.clear.bind(this)) for(var i=0;i<Logger.logEntries.length;i++){this.logUpdate(Logger.logEntries[i])} Event.observe(window,'error',function(msg,url,lineNumber){Logger.error("Error in ("+(url||location)+") on line "+lineNumber+"",msg)}) @@ -152,7 +154,7 @@ if(this.commandIndex<this.commandHistory.length-1){this.commandIndex+=1}} else if(e.keyCode==Event.KEY_DOWN&&this.commandHistory.length>0){if(this.commandIndex>0){this.commandIndex-=1} this.inputElement.value=this.commandHistory[this.commandIndex]} else{this.commandIndex=0}}} -var logConsole;Event.OnLoad(function(){logConsole=new LogConsole()});function inspect(o) +function inspect(o) {var objtype=typeof(o);if(objtype=="undefined"){return"undefined";}else if(objtype=="number"||objtype=="boolean"){return o+"";}else if(o===null){return"null";} try{var ostring=(o+"");}catch(e){return"["+typeof(o)+"]";} if(typeof(o)=="function") diff --git a/framework/Web/Javascripts/js/debug/logger.js b/framework/Web/Javascripts/js/debug/logger.js index 5d465d56..37e5028e 100644 --- a/framework/Web/Javascripts/js/debug/logger.js +++ b/framework/Web/Javascripts/js/debug/logger.js @@ -200,7 +200,7 @@ LogConsole.prototype = { // Methods
// -------
- initialize : function() {
+ initialize : function(toggleKey) {
this.outputCount = 0
this.tagPattern = Cookie.get('tagPattern') || ".*"
@@ -283,6 +283,12 @@ LogConsole.prototype = { this.logElement.style.position="fixed";
this.logElement.style.bottom="0px";
}
+ var self=this;
+ Event.observe(document, 'keydown', function(e)
+ {
+ if((e.altKey==true) && Event.keyCode(e) == toggleKey ) //Alt+J | Ctrl+J
+ self.toggle();
+ });
// Listen to the logger....
Logger.onupdate.addListener(this.logUpdate.bind(this))
@@ -452,12 +458,6 @@ LogConsole.prototype = { }
}
-// Load the Console when the window loads
-var logConsole;
-Event.OnLoad(function() { logConsole = new LogConsole()});
-
-
-
// -------------------------
// Helper Functions And Junk
diff --git a/framework/Web/UI/WebControls/TJavascriptLogger.php b/framework/Web/UI/WebControls/TJavascriptLogger.php index a873d8d8..4f206ef4 100644 --- a/framework/Web/UI/WebControls/TJavascriptLogger.php +++ b/framework/Web/UI/WebControls/TJavascriptLogger.php @@ -32,6 +32,12 @@ */
class TJavascriptLogger extends TWebControl
{
+ private static $_keyCodes = array(
+ '0'=>48, '1'=>49, '2'=>50, '3'=>51, '4'=>52, '5'=>53, '6'=>54, '7'=>55, '8'=>56, '9'=>57,
+ 'a'=>65, 'b'=>66, 'c'=>67, 'd'=>68, 'e'=>69, 'f'=>70, 'g'=>71, 'h'=>72,
+ 'i'=>73, 'j'=>74, 'k'=>75, 'l'=>76, 'm'=>77, 'n'=>78, 'o'=>79, 'p'=>80,
+ 'q'=>81, 'r'=>82, 's'=>83, 't'=>84, 'u'=>85, 'v'=>86, 'w'=>87, 'x'=>88, 'y'=>89, 'z'=>90);
+
/**
* @return string tag name of the panel
*/
@@ -41,12 +47,33 @@ class TJavascriptLogger extends TWebControl }
/**
+ * @param string keyboard key for toggling the console, default is J.
+ */
+ public function setToggleKey($value)
+ {
+ $this->setViewState('ToggleKey', $value, 'j');
+ }
+
+ /**
+ * @return string keyboard key for toggling the console.
+ */
+ public function getToggleKey()
+ {
+ return $this->getViewState('ToggleKey', 'j');
+ }
+
+ /**
* Registers the required logger javascript.
* @param TEventParameter event parameter
*/
public function onPreRender($param)
{
- $this->getPage()->getClientScript()->registerPradoScript('logger');
+ $key = strtolower($this->getToggleKey());
+ $code = isset(self::$_keyCodes[$key]) ? self::$_keyCodes[$key] : 74;
+ $js = "var logConsole; Event.OnLoad(function() { logConsole = new LogConsole($code)}); ";
+ $cs = $this->getPage()->getClientScript();
+ $cs->registerBeginScript($this->getClientID(),$js);
+ $cs->registerPradoScript('logger');
}
/**
@@ -56,9 +83,10 @@ class TJavascriptLogger extends TWebControl */
public function renderContents($writer)
{
+ $code = strtoupper($this->getToggleKey());
$info = '(<a href="http://gleepglop.com/javascripts/logger/" target="_blank">more info</a>).';
$link = '<a href="javascript:if(logConsole)logConsole.toggle()">toggle the javascript log console.</a>';
- $usage = 'Press ALT-D (Or CTRL-D on OS X) to';
+ $usage = 'Press ALT-'.$code.' (Or CTRL-'.$code.' on OS X) to';
$writer->write("{$usage} {$link} {$info}");
}
}
@@ -7,7 +7,7 @@ <body>
<h1>PRADO Framework for PHP 5 </h1>
-<p>Version 3.0.5, October 23, 2006<br>
+<p>Version 3.0.6, December 4, 2006<br>
Copyright© 2004-2006 by <a href="http://www.pradosoft.com/">PradoSoft</a><br>
All Rights Reserved.
</p>
|