Custom Query (18300 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (142 - 144 of 18300)

Ticket Resolution Summary Owner Reporter
#9081 invalid dijit.layout.BorderContainer resize could be broken in IE6-7 and Opera 9.64 Aleksey Rechinskiy
Description

Hi!

I've spent some time creating a test, that demonstate one major bug, I encountered during upgrading to Dojo 1.3.

Please, take a look into the following simple code. It creates a dijit.layout.BorderContainer?, and sets up a code, that makes this BorderContainer? maximized to a whole visible page. This code runs perfectly fine in dojo 1.2.3 in IE6-7, Firefox 3 and Opera 9.64, but is broken in Dojo 1.3 in IE6-7 and Opera 9.64. It changes height of BorderContainer?, but does not change height of inner ContentPanes? (or in some cases changes it in some strange way - resize browser window some times). In Firefox, however, it works still fine.

Please, correct me if I'm doing something wrong. I'm not completely sure, that my code is valid. However, if it is a bug in Dojo, I'll be happy, when it will be fixed.

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>dijit.layout.BorderContainer resize test</title>

<link href="/js/dojo/dojo/resources/dojo.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/js/dojo/dijit/themes/tundra/tundra.css" media="screen" rel="stylesheet" type="text/css" />
<script type="text/javascript" djConfig="parseOnLoad:true, isDebug:true, popup:false" src="/js/dojo/dojo/dojo.js"></script>
<script type="text/javascript">
    //<![CDATA[
dojo.require("dojo.parser");
dojo.require('dijit.layout.BorderContainer');
dojo.require('dijit.layout.ContentPane');
	//]]>
</script>

<style type="text/css">
body, html { width:100%; height:100%; margin:0; padding:0; }
		
#brdCont {
height:300px;
width:100%;
} 
#innerDiv {
height:100%;
width:100%;
background-color:#FFF0F0;
}

#centerPane{
background-color:#F0FFF0;
}

#rightPane{
background-color:#F0F0FF;
}
</style>

<script type="text/javascript">

getWHeight=function() {
	if (window.self && self.innerHeight) {
		return self.innerHeight;
	}
	if (document.documentElement && document.documentElement.clientHeight) {
		return document.documentElement.clientHeight;
	}
	return 0;
}

var resizeFunc = function(){
	console.log('In resizeFunc');
	
	var offsetTop = 0;
	var brdCont = dojo.byId("brdCont");
	if (!brdCont)
		return;
	for (var elem = brdCont; elem; elem = elem.offsetParent)
	{
		offsetTop += elem.offsetTop;
	}
	var wh = getWHeight();
	//assert we are coherent with Dojo's routine
	var whd = dijit.getViewport();
	if (whd.h != wh){
		console.error('If you see this, getWHeight() is not coherent with dijit.getViewport(), but you shouldn\'t');
		console.dir(whd);
	}
	
	var height = (wh - offsetTop);

	console.log('Window height is '+wh+'px. OffsetTop is '+offsetTop+'px. Going to resize BorderContainer to '+height+'px');
	
	if (height >= 0) {
		brdCont.style.height = height + "px";
		
	}	
}

var myOnLoad = function(){
	//connecting resize function
	dojo.connect(window,"onresize","resizeFunc");
	//and do resize right now
	resizeFunc();	
};

dojo.addOnLoad(myOnLoad);

</script>

</head>
<body class="tundra">
<div style='height:60px; background-color:#FFFFF0;'><center style='padding:20px;'><p>I'm a custom header</p></center></div>

<div id='brdCont' dojoType="dijit.layout.BorderContainer" design="headline" persist="false" gutters="false" liveSplitters="false">

<div id='leftPane' splitter="true" dojoType="dijit.layout.ContentPane" region="left" style="width: 35%;">
	<div id='innerDiv'><center style='padding:20px;'><p>This is left pane</p></center></div>
</div>

<div id="centerPane" dojoType="dijit.layout.ContentPane" region="center" class='trip-view'>
	<h1>Central pane</h1>

</div>

<div id="rightPane" dojoType="dijit.layout.ContentPane" region="right" style="width: 135px;">
	<div id="rp" class="container"><p>Right pane</p></div>
</div>

</div>

</body>
</html>
#9161 fixed Need method in dojo.dnd.Selector to programmatically select containing node Eugene Lazutkin Aleksey Rechinskiy
Description

Hi!

I'm not sure if that feature request wasn't discussed, but I've just finished a quick search over a trac and forums and found nothing.

I use dojo.dnd.Selector and its derived classes as containers for some data, that is also used in some other places on my page. When user clicks on associated with contained node data elsewhere on page, it would be very nice and convenient, if the node in dojo.dnd.Selector will be selected. To do that, I need a method in dojo.dnd.Selector like, say, selectNodeById(nodeId).

Long time ago, in days of AFAIR Dojo 1.1, I wrote a following method in my dojo.dnd.Selector derived class ( it is assumed, that only one node could be selected in container ):

selectNode: function(domNode){
	this.current = dojo.byId(domNode);
	this.selectNone();
	this.anchor = this.current;
	this._addItemClass(this.anchor, "Anchor");
	this.selection[this.current.id] = 1;
}

I think, it could be used as a starting point for selectNodeById() method, but I'm not sure if my method is completely correct, so a small code audit should be done.

I would like to suggest to include selectNodeById() functionality in dojo.dnd.Selector, as I think it would greatly extend dojo.dnd.Selector class and its descendants use-cases.

Thanks!

#9164 patchwelcome Create dojo.dnd.Source moveOnly flag Eugene Lazutkin Aleksey Rechinskiy
Description

Hi!

There is a copyOnly flag in dojo.dnd.Source which makes any node move within a container to initiate the node copy operation. If this flag is not set, the copy occurs only when ctrl key is pressed during a node move.

I would like to suggest to create a complimentary flag - moveOnly, which makes any node move operation a truly move and it doesn't matter if the ctrl (or any other key) is pressed.

I use dojo.dnd.Source as an ordered container for some user data and I need it to allow a move operation only, data copying mustn't happen in any case.

I know the problem can be easily solved by overriding copyState() function in Source- derived class, but with the simple moveOnly flag it wouldn't require any code writing at all.

Note: See TracQuery for help on using queries.