You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by mt...@apache.org on 2007/01/05 19:14:03 UTC

svn commit: r493144 - in /incubator/xap/trunk/src/xap: bridges/dojo/WindowBridge.js widgets/dojo/Window.js

Author: mturyn
Date: Fri Jan  5 11:14:02 2007
New Revision: 493144

URL: http://svn.apache.org/viewvc?view=rev&rev=493144
Log:
http://issues.apache.org/jira/browse/XAP-222
The icons and resize bar were ignored by the default visibility setter for bridges. 

Modified:
    incubator/xap/trunk/src/xap/bridges/dojo/WindowBridge.js
    incubator/xap/trunk/src/xap/widgets/dojo/Window.js

Modified: incubator/xap/trunk/src/xap/bridges/dojo/WindowBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/dojo/WindowBridge.js?view=diff&rev=493144&r1=493143&r2=493144
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/dojo/WindowBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/dojo/WindowBridge.js Fri Jan  5 11:14:02 2007
@@ -304,3 +304,8 @@
 }
 
 
+xap.bridges.dojo.WindowBridge.prototype.setVisibleAttribute = function( val ){
+	this.getPeer().setVisible(! (val==xap.xml.XmlTokens.FALSE) );	
+}
+
+

Modified: incubator/xap/trunk/src/xap/widgets/dojo/Window.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/widgets/dojo/Window.js?view=diff&rev=493144&r1=493143&r2=493144
==============================================================================
--- incubator/xap/trunk/src/xap/widgets/dojo/Window.js (original)
+++ incubator/xap/trunk/src/xap/widgets/dojo/Window.js Fri Jan  5 11:14:02 2007
@@ -42,6 +42,7 @@
 
 dojo.lang.extend(xap.widgets.dojo.Window, {
 	widgetType: "Window",
+	_visible:true ,
 	postCreate: function(){
 		xap.widgets.dojo.Window.superclass.postCreate.call(this);	
 		this.aquireResizeHandleObject() ;
@@ -143,6 +144,8 @@
 				] );
 	},
 	
+	
+	
 	setPrevious: function(){
 		this.previous={
 			width: dojo.style.getOuterWidth(this.domNode) || this.width,
@@ -192,6 +195,9 @@
 
 	
 	redisplayTitlebarIcons: function(){
+		if( !this._visible){
+			return ;
+		}
 		for(var action in  this.windowActions ){
 		// Note that we aren't touching the "display" attribute;
 		// this will override ...style.display=""
@@ -202,11 +208,22 @@
 	 },
  
 	showTitleBarIcons: function(){
+		var sAttr = (this._visible)?"visible":"hidden" ;	
 		for(var action in  this.windowActions ){
-			(this[action]).style.visibility = "visible" ;
+			(this[action]).style.visibility = sAttr ;
 		}
-	}
+	},
 	
+	setVisible: function(bVisible){
+		var sAttr = (bVisible)?"visible":"hidden" ;
+		for(var action in  this.windowActions ){
+			(this[action]).style.visibility = sAttr ;
+		}
+		this.domNode.style.visibility=sAttr ;
+		this.resizeBar.style.visibility=sAttr ;
+		
+		this._visible = bVisible ;
+	}	
 	
 });