Normalize line endings VIVO-101

This commit is contained in:
Brian Caruso 2013-07-18 15:19:53 -04:00
parent b097a4d754
commit 54f79f2ea7
587 changed files with 91501 additions and 91501 deletions

View file

@ -8,91 +8,91 @@
http://dojotoolkit.org/community/licensing.shtml
*/
dojo.provide("dojo.widget.html.AccordionPane");
dojo.require("dojo.widget.TitlePane");
dojo.widget.html.AccordionPane = function(){
dojo.widget.html.TitlePane.call(this);
this.widgetType = "AccordionPane";
this.open=false;
this.allowCollapse=true;
this.label="";
this.open=false;
this.labelNodeClass="";
this.containerNodeClass="";
}
dojo.inherits(dojo.widget.html.AccordionPane, dojo.widget.html.TitlePane);
dojo.lang.extend(dojo.widget.html.AccordionPane, {
postCreate: function() {
dojo.widget.html.AccordionPane.superclass.postCreate.call(this);
this.domNode.widgetType=this.widgetType;
this.setSizes();
dojo.html.addClass(this.labelNode, this.labelNodeClass);
dojo.html.disableSelection(this.labelNode);
dojo.html.addClass(this.containerNode, this.containerNodeClass);
},
collapse: function() {
//dojo.fx.html.wipeOut(this.containerNode,250);
//var anim = dojo.fx.html.wipe(this.containerNode, 1000, this.containerNode.offsetHeight, 0, null, true);
this.containerNode.style.display="none";
this.open=false;
},
expand: function() {
//dojo.fx.html.wipeIn(this.containerNode,250);
this.containerNode.style.display="block";
//var anim = dojo.fx.html.wipe(this.containerNode, 1000, 0, this.containerNode.scrollHeight, null, true);
this.open=true;
},
getCollapsedHeight: function() {
return dojo.style.getOuterHeight(this.labelNode)+1;
},
setSizes: function() {
var siblings = this.domNode.parentNode.childNodes;
var height=dojo.style.getInnerHeight(this.domNode.parentNode)-this.getCollapsedHeight();
this.siblingWidgets = [];
for (var x=0; x<siblings.length; x++) {
if (siblings[x].widgetType==this.widgetType) {
if (this.domNode != siblings[x]) {
var ap = dojo.widget.byNode(siblings[x]);
this.siblingWidgets.push(ap);
height -= ap.getCollapsedHeight();
}
}
}
for (var x=0; x<this.siblingWidgets.length; x++) {
dojo.style.setOuterHeight(this.siblingWidgets[x].containerNode,height);
}
dojo.style.setOuterHeight(this.containerNode,height);
},
onLabelClick: function() {
this.setSizes();
if (!this.open) {
for (var x=0; x<this.siblingWidgets.length;x++) {
if (this.siblingWidgets[x].open) {
this.siblingWidgets[x].collapse();
}
}
this.expand();
} else {
if (this.allowCollapse) {
this.collapse();
}
}
}
});
dojo.widget.tags.addParseTreeHandler("dojo:AccordionPane");
dojo.provide("dojo.widget.html.AccordionPane");
dojo.require("dojo.widget.TitlePane");
dojo.widget.html.AccordionPane = function(){
dojo.widget.html.TitlePane.call(this);
this.widgetType = "AccordionPane";
this.open=false;
this.allowCollapse=true;
this.label="";
this.open=false;
this.labelNodeClass="";
this.containerNodeClass="";
}
dojo.inherits(dojo.widget.html.AccordionPane, dojo.widget.html.TitlePane);
dojo.lang.extend(dojo.widget.html.AccordionPane, {
postCreate: function() {
dojo.widget.html.AccordionPane.superclass.postCreate.call(this);
this.domNode.widgetType=this.widgetType;
this.setSizes();
dojo.html.addClass(this.labelNode, this.labelNodeClass);
dojo.html.disableSelection(this.labelNode);
dojo.html.addClass(this.containerNode, this.containerNodeClass);
},
collapse: function() {
//dojo.fx.html.wipeOut(this.containerNode,250);
//var anim = dojo.fx.html.wipe(this.containerNode, 1000, this.containerNode.offsetHeight, 0, null, true);
this.containerNode.style.display="none";
this.open=false;
},
expand: function() {
//dojo.fx.html.wipeIn(this.containerNode,250);
this.containerNode.style.display="block";
//var anim = dojo.fx.html.wipe(this.containerNode, 1000, 0, this.containerNode.scrollHeight, null, true);
this.open=true;
},
getCollapsedHeight: function() {
return dojo.style.getOuterHeight(this.labelNode)+1;
},
setSizes: function() {
var siblings = this.domNode.parentNode.childNodes;
var height=dojo.style.getInnerHeight(this.domNode.parentNode)-this.getCollapsedHeight();
this.siblingWidgets = [];
for (var x=0; x<siblings.length; x++) {
if (siblings[x].widgetType==this.widgetType) {
if (this.domNode != siblings[x]) {
var ap = dojo.widget.byNode(siblings[x]);
this.siblingWidgets.push(ap);
height -= ap.getCollapsedHeight();
}
}
}
for (var x=0; x<this.siblingWidgets.length; x++) {
dojo.style.setOuterHeight(this.siblingWidgets[x].containerNode,height);
}
dojo.style.setOuterHeight(this.containerNode,height);
},
onLabelClick: function() {
this.setSizes();
if (!this.open) {
for (var x=0; x<this.siblingWidgets.length;x++) {
if (this.siblingWidgets[x].open) {
this.siblingWidgets[x].collapse();
}
}
this.expand();
} else {
if (this.allowCollapse) {
this.collapse();
}
}
}
});
dojo.widget.tags.addParseTreeHandler("dojo:AccordionPane");

View file

@ -8,18 +8,18 @@
http://dojotoolkit.org/community/licensing.shtml
*/
// this is a stub that will be removed in 0.4, see ../Button2.html for details
dojo.provide("dojo.widget.html.Button2");
dojo.widget.html.Button2 = function(){}
dojo.inherits(dojo.widget.html.Button2, dojo.widget.html.Button);
dojo.lang.extend(dojo.widget.html.Button2, { widgetType: "Button2" });
dojo.widget.html.DropDownButton2 = function(){}
dojo.inherits(dojo.widget.html.DropDownButton2, dojo.widget.html.DropDownButton);
dojo.lang.extend(dojo.widget.html.DropDownButton2, { widgetType: "DropDownButton2" });
dojo.widget.html.ComboButton2 = function(){}
dojo.inherits(dojo.widget.html.ComboButton2, dojo.widget.html.ComboButton);
// this is a stub that will be removed in 0.4, see ../Button2.html for details
dojo.provide("dojo.widget.html.Button2");
dojo.widget.html.Button2 = function(){}
dojo.inherits(dojo.widget.html.Button2, dojo.widget.html.Button);
dojo.lang.extend(dojo.widget.html.Button2, { widgetType: "Button2" });
dojo.widget.html.DropDownButton2 = function(){}
dojo.inherits(dojo.widget.html.DropDownButton2, dojo.widget.html.DropDownButton);
dojo.lang.extend(dojo.widget.html.DropDownButton2, { widgetType: "DropDownButton2" });
dojo.widget.html.ComboButton2 = function(){}
dojo.inherits(dojo.widget.html.ComboButton2, dojo.widget.html.ComboButton);
dojo.lang.extend(dojo.widget.html.ComboButton2, { widgetType: "ComboButton2" });

View file

@ -8,24 +8,24 @@
http://dojotoolkit.org/community/licensing.shtml
*/
dojo.provide("dojo.widget.html.DebugConsole");
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.FloatingPane");
dojo.widget.html.DebugConsole= function(){
dojo.widget.html.FloatingPane.call(this);
dojo.widget.DebugConsole.call(this);
}
dojo.inherits(dojo.widget.html.DebugConsole, dojo.widget.html.FloatingPane);
dojo.lang.extend(dojo.widget.html.DebugConsole, {
fillInTemplate: function() {
dojo.widget.html.DebugConsole.superclass.fillInTemplate.apply(this, arguments);
this.containerNode.id = "debugConsoleClientPane";
djConfig.isDebug = true;
djConfig.debugContainerId = this.containerNode.id;
}
});
dojo.provide("dojo.widget.html.DebugConsole");
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.FloatingPane");
dojo.widget.html.DebugConsole= function(){
dojo.widget.html.FloatingPane.call(this);
dojo.widget.DebugConsole.call(this);
}
dojo.inherits(dojo.widget.html.DebugConsole, dojo.widget.html.FloatingPane);
dojo.lang.extend(dojo.widget.html.DebugConsole, {
fillInTemplate: function() {
dojo.widget.html.DebugConsole.superclass.fillInTemplate.apply(this, arguments);
this.containerNode.id = "debugConsoleClientPane";
djConfig.isDebug = true;
djConfig.debugContainerId = this.containerNode.id;
}
});

View file

@ -8,181 +8,181 @@
http://dojotoolkit.org/community/licensing.shtml
*/
/* TODO:
* - make the dropdown "smart" so it can't get cutoff on bottom of page, sides of page, etc.
*/
dojo.provide("dojo.widget.html.DropdownButton");
dojo.require("dojo.event.*");
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.HtmlWidget");
dojo.require("dojo.uri.Uri");
dojo.require("dojo.dom");
dojo.require("dojo.style");
dojo.require("dojo.html");
dojo.widget.html.DropdownButton = function() {
// mix in the button properties
dojo.widget.DropdownButton.call(this);
dojo.widget.HtmlWidget.call(this);
}
dojo.inherits(dojo.widget.html.DropdownButton, dojo.widget.HtmlWidget);
dojo.lang.extend(dojo.widget.html.DropdownButton, {
// In IE, event handlers on objects inside buttons don't work correctly, so
// we just set onClick on the button itself.
templatePath: dojo.uri.dojoUri("src/widget/templates/HtmlDropDownButtonTemplate.html"),
templateCssPath: dojo.uri.dojoUri("src/widget/templates/HtmlButtonTemplate.css"),
// attach points
button: null,
table: null,
labelCell: null,
borderCell: null,
arrowCell: null,
arrow: null,
fillInTemplate: function(args, frag) {
// input data (containing the anchor for the button itself, plus the
// thing to display when you push the down arrow)
var input = frag["dojo:"+this.widgetType.toLowerCase()]["nodeRef"];
// Recursively expand widgets inside of the <dojo:dropdownButton>
var parser = new dojo.xml.Parse();
var frag = parser.parseElement(input, null, true);
var ary = dojo.widget.getParser().createComponents(frag);
this.a = dojo.dom.getFirstChildElement(input); // the button contents
this.menu = dojo.dom.getNextSiblingElement(this.a); // the menu under the button
this.disabled = dojo.html.hasClass(this.a, "disabled");
if( this.disabled ) {
dojo.html.addClass(this.button, "dojoDisabled");
this.domNode.setAttribute("disabled", "true");
}
dojo.html.disableSelection(this.a);
this.a.style["text-decoration"]="none";
this.labelCell.appendChild(this.a);
this.arrow.src =
dojo.uri.dojoUri("src/widget/templates/images/dropdownButtonsArrow" +
(this.disabled ? "-disabled" : "") + ".gif");
// Attach menu to body so that it appears above other buttons
this.menu.style.position="absolute";
this.menu.style.display="none";
this.menu.style["z-index"] = 99;
document.body.appendChild(this.menu);
},
postCreate: function() {
if ( dojo.render.html.ie ) {
// Compensate for IE's weird padding of button content, which seems to be relative
// to the length of the content
var contentWidth = dojo.style.getOuterWidth(this.table);
this.labelCell.style["left"] = "-" + (contentWidth / 10) + "px";
this.arrowCell.style["left"] = (contentWidth / 10) + "px";
}
// Make menu at least as wide as the button
var buttonWidth = dojo.style.getOuterWidth(this.button);
var menuWidth = dojo.style.getOuterWidth(this.menu);
if ( buttonWidth > menuWidth ) {
dojo.style.setOuterWidth(this.menu, buttonWidth);
}
},
// If someone clicks anywhere else on the screen (including another menu),
// then close this menu.
onCanvasMouseDown: function(e) {
if( !dojo.dom.isDescendantOf(e.target, this.button) &&
!dojo.dom.isDescendantOf(e.target, this.menu) ) {
this.hideMenu();
}
},
eventWasOverArrow: function(e) {
// want to use dojo.html.overElement() but also need to detect clicks
// on the area between the arrow and the edge of the button
var eventX = e.clientX;
var borderX = dojo.style.totalOffsetLeft(this.borderCell);
return (eventX > borderX );
},
onMouseOver: function(e) {
dojo.html.addClass(this.button, "dojoButtonHover");
dojo.html.removeClass(this.button, "dojoButtonNoHover");
},
onMouseOut: function(e) {
dojo.html.removeClass(this.button, "dojoButtonHover");
dojo.html.addClass(this.button, "dojoButtonNoHover");
},
onClick: function(e) {
if ( this.eventWasOverArrow(e) ) {
this._onClickArrow();
} else {
this._onClickButton();
}
},
// Action when the user presses the button
_onClickButton: function(e) {
if ( this.a ) {
if ( this.a.click ) {
this.a.click();
} else if ( this.a.href ) {
location.href = this.a.href;
}
}
},
// Action when user presses the arrow
_onClickArrow: function() {
if ( this.menu.style.display == "none" ) {
this.showMenu();
} else {
this.hideMenu();
}
},
showMenu: function() {
if ( this.disabled )
return;
// Position it accordingly, relative to screen root (since
// it's attached to document.body)
this.menu.style.left = dojo.style.totalOffsetLeft(this.button) + "px";
this.menu.style.top = dojo.style.totalOffsetTop(this.button) + dojo.style.getOuterHeight(this.button) + "px";
// Display the menu; do this funky code below to stop the menu from extending
// all the way to the right edge of the screen.
// TODO: retest simple display="" to confirm that it doesn't work.
try {
this.menu.style.display="table"; // mozilla
} catch(e) {
this.menu.style.display="block"; // IE
}
// If someone clicks somewhere else on the screen then close the menu
dojo.event.connect(document.documentElement, "onmousedown", this, "onCanvasMouseDown");
// When someone clicks the menu, after the menu handles the event,
// close the menu (be careful not to close the menu too early or else
// the menu will never receive the event.)
dojo.event.connect(this.menu, "onclick", this, "hideMenu");
},
hideMenu: function() {
this.menu.style.display = "none";
dojo.event.disconnect(document.documentElement, "onmousedown", this, "onCanvasMouseDown");
dojo.event.disconnect(this.menu, "onclick", this, "hideMenu");
}
});
/* TODO:
* - make the dropdown "smart" so it can't get cutoff on bottom of page, sides of page, etc.
*/
dojo.provide("dojo.widget.html.DropdownButton");
dojo.require("dojo.event.*");
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.HtmlWidget");
dojo.require("dojo.uri.Uri");
dojo.require("dojo.dom");
dojo.require("dojo.style");
dojo.require("dojo.html");
dojo.widget.html.DropdownButton = function() {
// mix in the button properties
dojo.widget.DropdownButton.call(this);
dojo.widget.HtmlWidget.call(this);
}
dojo.inherits(dojo.widget.html.DropdownButton, dojo.widget.HtmlWidget);
dojo.lang.extend(dojo.widget.html.DropdownButton, {
// In IE, event handlers on objects inside buttons don't work correctly, so
// we just set onClick on the button itself.
templatePath: dojo.uri.dojoUri("src/widget/templates/HtmlDropDownButtonTemplate.html"),
templateCssPath: dojo.uri.dojoUri("src/widget/templates/HtmlButtonTemplate.css"),
// attach points
button: null,
table: null,
labelCell: null,
borderCell: null,
arrowCell: null,
arrow: null,
fillInTemplate: function(args, frag) {
// input data (containing the anchor for the button itself, plus the
// thing to display when you push the down arrow)
var input = frag["dojo:"+this.widgetType.toLowerCase()]["nodeRef"];
// Recursively expand widgets inside of the <dojo:dropdownButton>
var parser = new dojo.xml.Parse();
var frag = parser.parseElement(input, null, true);
var ary = dojo.widget.getParser().createComponents(frag);
this.a = dojo.dom.getFirstChildElement(input); // the button contents
this.menu = dojo.dom.getNextSiblingElement(this.a); // the menu under the button
this.disabled = dojo.html.hasClass(this.a, "disabled");
if( this.disabled ) {
dojo.html.addClass(this.button, "dojoDisabled");
this.domNode.setAttribute("disabled", "true");
}
dojo.html.disableSelection(this.a);
this.a.style["text-decoration"]="none";
this.labelCell.appendChild(this.a);
this.arrow.src =
dojo.uri.dojoUri("src/widget/templates/images/dropdownButtonsArrow" +
(this.disabled ? "-disabled" : "") + ".gif");
// Attach menu to body so that it appears above other buttons
this.menu.style.position="absolute";
this.menu.style.display="none";
this.menu.style["z-index"] = 99;
document.body.appendChild(this.menu);
},
postCreate: function() {
if ( dojo.render.html.ie ) {
// Compensate for IE's weird padding of button content, which seems to be relative
// to the length of the content
var contentWidth = dojo.style.getOuterWidth(this.table);
this.labelCell.style["left"] = "-" + (contentWidth / 10) + "px";
this.arrowCell.style["left"] = (contentWidth / 10) + "px";
}
// Make menu at least as wide as the button
var buttonWidth = dojo.style.getOuterWidth(this.button);
var menuWidth = dojo.style.getOuterWidth(this.menu);
if ( buttonWidth > menuWidth ) {
dojo.style.setOuterWidth(this.menu, buttonWidth);
}
},
// If someone clicks anywhere else on the screen (including another menu),
// then close this menu.
onCanvasMouseDown: function(e) {
if( !dojo.dom.isDescendantOf(e.target, this.button) &&
!dojo.dom.isDescendantOf(e.target, this.menu) ) {
this.hideMenu();
}
},
eventWasOverArrow: function(e) {
// want to use dojo.html.overElement() but also need to detect clicks
// on the area between the arrow and the edge of the button
var eventX = e.clientX;
var borderX = dojo.style.totalOffsetLeft(this.borderCell);
return (eventX > borderX );
},
onMouseOver: function(e) {
dojo.html.addClass(this.button, "dojoButtonHover");
dojo.html.removeClass(this.button, "dojoButtonNoHover");
},
onMouseOut: function(e) {
dojo.html.removeClass(this.button, "dojoButtonHover");
dojo.html.addClass(this.button, "dojoButtonNoHover");
},
onClick: function(e) {
if ( this.eventWasOverArrow(e) ) {
this._onClickArrow();
} else {
this._onClickButton();
}
},
// Action when the user presses the button
_onClickButton: function(e) {
if ( this.a ) {
if ( this.a.click ) {
this.a.click();
} else if ( this.a.href ) {
location.href = this.a.href;
}
}
},
// Action when user presses the arrow
_onClickArrow: function() {
if ( this.menu.style.display == "none" ) {
this.showMenu();
} else {
this.hideMenu();
}
},
showMenu: function() {
if ( this.disabled )
return;
// Position it accordingly, relative to screen root (since
// it's attached to document.body)
this.menu.style.left = dojo.style.totalOffsetLeft(this.button) + "px";
this.menu.style.top = dojo.style.totalOffsetTop(this.button) + dojo.style.getOuterHeight(this.button) + "px";
// Display the menu; do this funky code below to stop the menu from extending
// all the way to the right edge of the screen.
// TODO: retest simple display="" to confirm that it doesn't work.
try {
this.menu.style.display="table"; // mozilla
} catch(e) {
this.menu.style.display="block"; // IE
}
// If someone clicks somewhere else on the screen then close the menu
dojo.event.connect(document.documentElement, "onmousedown", this, "onCanvasMouseDown");
// When someone clicks the menu, after the menu handles the event,
// close the menu (be careful not to close the menu too early or else
// the menu will never receive the event.)
dojo.event.connect(this.menu, "onclick", this, "hideMenu");
},
hideMenu: function() {
this.menu.style.display = "none";
dojo.event.disconnect(document.documentElement, "onmousedown", this, "onCanvasMouseDown");
dojo.event.disconnect(this.menu, "onclick", this, "hideMenu");
}
});

View file

@ -8,191 +8,191 @@
http://dojotoolkit.org/community/licensing.shtml
*/
dojo.provide("dojo.widget.html.GoogleMap");
dojo.require("dojo.event.*");
dojo.require("dojo.html");
dojo.require("dojo.math");
dojo.require("dojo.uri.Uri");
dojo.require("dojo.widget.HtmlWidget");
dojo.require("dojo.widget.GoogleMap");
(function(){
var gkey = djConfig["gMapKey"]||djConfig["googleMapKey"];
// the Google API key mechanism sucks. We're hardcoding here for love and affection but I don't like it.
var uri=new dojo.uri.Uri(window.location.href);
if(uri.host=="www.dojotoolkit.org"){
gkey="ABQIAAAACUNdgv_7FGOmUslbm9l6_hRqjp7ri2mNiOEYqetD3xnFHpt5rBSjszDd1sdufPyQKUTyCf_YxoIxvw";
}
else if(uri.host=="blog.dojotoolkit.org"){
gkey="ABQIAAAACUNdgv_7FGOmUslbm9l6_hSkep6Av1xaMhVn3yCLkorJeXeLARQ6fammI_P3qSGleTJhoI5_1JmP_Q";
}
else if(uri.host=="archive.dojotoolkit.org"){
gkey="ABQIAAAACUNdgv_7FGOmUslbm9l6_hTaQpDt0dyGLIHbXMPTzg1kWeAfwRTwZNyrUfbfxYE9yIvRivEjcXoDTg";
}
else if(uri.host=="dojotoolkit.org"){
gkey="ABQIAAAACUNdgv_7FGOmUslbm9l6_hSaOaO_TgJ5c3mtQFnk5JO2zD5dZBRZk-ieqVs7BORREYNzAERmcJoEjQ";
}
if(!dojo.hostenv.post_load_){
var tag = "<scr"+"ipt src='http://maps.google.com/maps?file=api&amp;v=2&amp;key="+gkey+"'></scri"+"pt>";
if(!dj_global["GMap2"]){ // prevent multi-inclusion
document.write(tag);
}
}else{
dojo.debug("cannot initialize map system after the page has been loaded! Please either manually include the script block provided by Google in your page or require() the GoogleMap widget before onload has fired");
}
})();
dojo.widget.html.GoogleMap=function(){
dojo.widget.HtmlWidget.call(this);
dojo.widget.GoogleMap.call(this);
var gm=dojo.widget.GoogleMap;
this.map=null;
this.data=[];
this.datasrc="";
// FIXME: this is pehraps the stupidest way to specify this enum I can think of
this.controls=[gm.Controls.LargeMap,gm.Controls.Scale,gm.Controls.MapType];
};
dojo.inherits(dojo.widget.html.GoogleMap, dojo.widget.HtmlWidget);
dojo.lang.extend(dojo.widget.html.GoogleMap, {
templatePath:null,
templateCssPath:null,
setControls:function(){
var c=dojo.widget.GoogleMap.Controls;
for(var i=0; i<this.controls.length; i++){
var type=this.controls[i];
switch(type){
case c.LargeMap:{
this.map.addControl(new GLargeMapControl());
break;
}
case c.SmallMap:{
this.map.addControl(new GSmallMapControl());
break;
}
case c.SmallZoom:{
this.map.addControl(new GSmallZoomControl());
break;
}
case c.Scale:{
this.map.addControl(new GScaleControl());
break;
}
case c.MapType:{
this.map.addControl(new GMapTypeControl());
break;
}
case c.Overview:{
this.map.addControl(new GOverviewMapControl());
break;
}
default:{
break;
}
}
}
},
findCenter:function(bounds){
var clat=(bounds.getNorthEast().lat()+bounds.getSouthWest().lat())/2;
var clng=(bounds.getNorthEast().lng()+bounds.getSouthWest().lng())/2;
return (new GLatLng(clat,clng));
},
createPinpoint:function(pt,overlay){
var m=new GMarker(pt);
if(overlay){
GEvent.addListener(m,"click",function(){
m.openInfoWindowHtml("<div>"+overlay+"</div>");
});
}
return m;
},
parse:function(table){
this.data=[];
// get the column indices
var h=table.getElementsByTagName("thead")[0];
if(!h){
return;
}
var a=[];
var cols=h.getElementsByTagName("td");
if(cols.length==0){
cols=h.getElementsByTagName("th");
}
for(var i=0; i<cols.length; i++){
var c=cols[i].innerHTML.toLowerCase();
if(c=="long") c="lng";
a.push(c);
}
// parse the data
var b=table.getElementsByTagName("tbody")[0];
if(!b){
return;
}
for(var i=0; i<b.childNodes.length; i++){
if(!(b.childNodes[i].nodeName&&b.childNodes[i].nodeName.toLowerCase()=="tr")){
continue;
}
var cells=b.childNodes[i].getElementsByTagName("td");
var o={};
for(var j=0; j<a.length; j++){
var col=a[j];
if(col=="lat"||col=="lng"){
o[col]=parseFloat(cells[j].innerHTML);
}else{
o[col]=cells[j].innerHTML;
}
}
this.data.push(o);
}
},
render:function(){
var bounds=new GLatLngBounds();
var d=this.data;
var pts=[];
for(var i=0; i<d.length; i++){
bounds.extend(new GLatLng(d[i].lat,d[i].lng));
}
this.map.setCenter(this.findCenter(bounds), this.map.getBoundsZoomLevel(bounds));
for(var i=0; i<this.data.length; i++){
var p=new GLatLng(this.data[i].lat,this.data[i].lng);
var d=this.data[i].description||null;
var m=this.createPinpoint(p,d);
this.map.addOverlay(m);
}
},
initialize:function(args, frag){
if(!GMap2){
dojo.raise("dojo.widget.GoogleMap: The Google Map script must be included (with a proper API key) in order to use this widget.");
}
if(this.datasrc){
this.parse(dojo.byId(this.datasrc));
}
else if(this.domNode.getElementsByTagName("table")[0]){
this.parse(this.domNode.getElementsByTagName("table")[0]);
}
},
postCreate:function(){
// clean the domNode before creating the map.
while(this.domNode.childNodes.length>0){
this.domNode.removeChild(this.domNode.childNodes[0]);
}
this.map=new GMap2(this.domNode);
this.render();
this.setControls();
}
});
dojo.provide("dojo.widget.html.GoogleMap");
dojo.require("dojo.event.*");
dojo.require("dojo.html");
dojo.require("dojo.math");
dojo.require("dojo.uri.Uri");
dojo.require("dojo.widget.HtmlWidget");
dojo.require("dojo.widget.GoogleMap");
(function(){
var gkey = djConfig["gMapKey"]||djConfig["googleMapKey"];
// the Google API key mechanism sucks. We're hardcoding here for love and affection but I don't like it.
var uri=new dojo.uri.Uri(window.location.href);
if(uri.host=="www.dojotoolkit.org"){
gkey="ABQIAAAACUNdgv_7FGOmUslbm9l6_hRqjp7ri2mNiOEYqetD3xnFHpt5rBSjszDd1sdufPyQKUTyCf_YxoIxvw";
}
else if(uri.host=="blog.dojotoolkit.org"){
gkey="ABQIAAAACUNdgv_7FGOmUslbm9l6_hSkep6Av1xaMhVn3yCLkorJeXeLARQ6fammI_P3qSGleTJhoI5_1JmP_Q";
}
else if(uri.host=="archive.dojotoolkit.org"){
gkey="ABQIAAAACUNdgv_7FGOmUslbm9l6_hTaQpDt0dyGLIHbXMPTzg1kWeAfwRTwZNyrUfbfxYE9yIvRivEjcXoDTg";
}
else if(uri.host=="dojotoolkit.org"){
gkey="ABQIAAAACUNdgv_7FGOmUslbm9l6_hSaOaO_TgJ5c3mtQFnk5JO2zD5dZBRZk-ieqVs7BORREYNzAERmcJoEjQ";
}
if(!dojo.hostenv.post_load_){
var tag = "<scr"+"ipt src='http://maps.google.com/maps?file=api&amp;v=2&amp;key="+gkey+"'></scri"+"pt>";
if(!dj_global["GMap2"]){ // prevent multi-inclusion
document.write(tag);
}
}else{
dojo.debug("cannot initialize map system after the page has been loaded! Please either manually include the script block provided by Google in your page or require() the GoogleMap widget before onload has fired");
}
})();
dojo.widget.html.GoogleMap=function(){
dojo.widget.HtmlWidget.call(this);
dojo.widget.GoogleMap.call(this);
var gm=dojo.widget.GoogleMap;
this.map=null;
this.data=[];
this.datasrc="";
// FIXME: this is pehraps the stupidest way to specify this enum I can think of
this.controls=[gm.Controls.LargeMap,gm.Controls.Scale,gm.Controls.MapType];
};
dojo.inherits(dojo.widget.html.GoogleMap, dojo.widget.HtmlWidget);
dojo.lang.extend(dojo.widget.html.GoogleMap, {
templatePath:null,
templateCssPath:null,
setControls:function(){
var c=dojo.widget.GoogleMap.Controls;
for(var i=0; i<this.controls.length; i++){
var type=this.controls[i];
switch(type){
case c.LargeMap:{
this.map.addControl(new GLargeMapControl());
break;
}
case c.SmallMap:{
this.map.addControl(new GSmallMapControl());
break;
}
case c.SmallZoom:{
this.map.addControl(new GSmallZoomControl());
break;
}
case c.Scale:{
this.map.addControl(new GScaleControl());
break;
}
case c.MapType:{
this.map.addControl(new GMapTypeControl());
break;
}
case c.Overview:{
this.map.addControl(new GOverviewMapControl());
break;
}
default:{
break;
}
}
}
},
findCenter:function(bounds){
var clat=(bounds.getNorthEast().lat()+bounds.getSouthWest().lat())/2;
var clng=(bounds.getNorthEast().lng()+bounds.getSouthWest().lng())/2;
return (new GLatLng(clat,clng));
},
createPinpoint:function(pt,overlay){
var m=new GMarker(pt);
if(overlay){
GEvent.addListener(m,"click",function(){
m.openInfoWindowHtml("<div>"+overlay+"</div>");
});
}
return m;
},
parse:function(table){
this.data=[];
// get the column indices
var h=table.getElementsByTagName("thead")[0];
if(!h){
return;
}
var a=[];
var cols=h.getElementsByTagName("td");
if(cols.length==0){
cols=h.getElementsByTagName("th");
}
for(var i=0; i<cols.length; i++){
var c=cols[i].innerHTML.toLowerCase();
if(c=="long") c="lng";
a.push(c);
}
// parse the data
var b=table.getElementsByTagName("tbody")[0];
if(!b){
return;
}
for(var i=0; i<b.childNodes.length; i++){
if(!(b.childNodes[i].nodeName&&b.childNodes[i].nodeName.toLowerCase()=="tr")){
continue;
}
var cells=b.childNodes[i].getElementsByTagName("td");
var o={};
for(var j=0; j<a.length; j++){
var col=a[j];
if(col=="lat"||col=="lng"){
o[col]=parseFloat(cells[j].innerHTML);
}else{
o[col]=cells[j].innerHTML;
}
}
this.data.push(o);
}
},
render:function(){
var bounds=new GLatLngBounds();
var d=this.data;
var pts=[];
for(var i=0; i<d.length; i++){
bounds.extend(new GLatLng(d[i].lat,d[i].lng));
}
this.map.setCenter(this.findCenter(bounds), this.map.getBoundsZoomLevel(bounds));
for(var i=0; i<this.data.length; i++){
var p=new GLatLng(this.data[i].lat,this.data[i].lng);
var d=this.data[i].description||null;
var m=this.createPinpoint(p,d);
this.map.addOverlay(m);
}
},
initialize:function(args, frag){
if(!GMap2){
dojo.raise("dojo.widget.GoogleMap: The Google Map script must be included (with a proper API key) in order to use this widget.");
}
if(this.datasrc){
this.parse(dojo.byId(this.datasrc));
}
else if(this.domNode.getElementsByTagName("table")[0]){
this.parse(this.domNode.getElementsByTagName("table")[0]);
}
},
postCreate:function(){
// clean the domNode before creating the map.
while(this.domNode.childNodes.length>0){
this.domNode.removeChild(this.domNode.childNodes[0]);
}
this.map=new GMap2(this.domNode);
this.render();
this.setControls();
}
});

View file

@ -8,47 +8,47 @@
http://dojotoolkit.org/community/licensing.shtml
*/
dojo.provide("dojo.widget.LinkPane");
dojo.provide("dojo.widget.html.LinkPane");
//
// a div that loads from a URL. (Similar to an iframe, but
// it's in the same environment as the main window)
//
dojo.require("dojo.widget.LinkPane");
dojo.require("dojo.widget.*");
dojo.require("dojo.event.*");
dojo.require("dojo.io.*");
dojo.require("dojo.widget.ContentPane");
dojo.require("dojo.html");
dojo.require("dojo.style");
dojo.require("dojo.dom");
dojo.require("dojo.string");
dojo.widget.html.LinkPane = function(){
dojo.widget.html.ContentPane.call(this);
}
dojo.inherits(dojo.widget.html.LinkPane, dojo.widget.html.ContentPane);
dojo.lang.extend(dojo.widget.html.LinkPane, {
widgetType: "LinkPane",
// I'm using a template because the user may specify the input as
// <a href="foo.html">label</a>, in which case we need to get rid of the
// <a> because we don't want a link.
templateString: '<div class="dojoLinkPane"></div>',
fillInTemplate: function(args, frag){
var source = this.getFragNodeRef(frag);
// If user has specified node contents, they become the label
// (the link must be plain text)
this.label += source.innerHTML;
var source = this.getFragNodeRef(frag);
dojo.html.copyStyle(this.domNode, source);
}
});
dojo.provide("dojo.widget.LinkPane");
dojo.provide("dojo.widget.html.LinkPane");
//
// a div that loads from a URL. (Similar to an iframe, but
// it's in the same environment as the main window)
//
dojo.require("dojo.widget.LinkPane");
dojo.require("dojo.widget.*");
dojo.require("dojo.event.*");
dojo.require("dojo.io.*");
dojo.require("dojo.widget.ContentPane");
dojo.require("dojo.html");
dojo.require("dojo.style");
dojo.require("dojo.dom");
dojo.require("dojo.string");
dojo.widget.html.LinkPane = function(){
dojo.widget.html.ContentPane.call(this);
}
dojo.inherits(dojo.widget.html.LinkPane, dojo.widget.html.ContentPane);
dojo.lang.extend(dojo.widget.html.LinkPane, {
widgetType: "LinkPane",
// I'm using a template because the user may specify the input as
// <a href="foo.html">label</a>, in which case we need to get rid of the
// <a> because we don't want a link.
templateString: '<div class="dojoLinkPane"></div>',
fillInTemplate: function(args, frag){
var source = this.getFragNodeRef(frag);
// If user has specified node contents, they become the label
// (the link must be plain text)
this.label += source.innerHTML;
var source = this.getFragNodeRef(frag);
dojo.html.copyStyle(this.domNode, source);
}
});

View file

@ -8,78 +8,78 @@
http://dojotoolkit.org/community/licensing.shtml
*/
dojo.provide("dojo.widget.html.TaskBar");
dojo.provide("dojo.widget.html.TaskBarItem");
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.FloatingPane");
dojo.require("dojo.widget.HtmlWidget");
dojo.require("dojo.event");
// Icon associated w/a floating pane
dojo.widget.html.TaskBarItem = function(){
dojo.widget.TaskBarItem.call(this);
dojo.widget.HtmlWidget.call(this);
}
dojo.inherits(dojo.widget.html.TaskBarItem, dojo.widget.HtmlWidget);
dojo.lang.extend(dojo.widget.html.TaskBarItem, {
// constructor arguments
iconSrc: '',
caption: 'Untitled',
window: null,
templatePath: dojo.uri.dojoUri("src/widget/templates/HtmlTaskBarItemTemplate.html"),
templateCssPath: dojo.uri.dojoUri("src/widget/templates/HtmlTaskBar.css"),
fillInTemplate: function() {
if ( this.iconSrc != '' ) {
var img = document.createElement("img");
img.src = this.iconSrc;
this.domNode.appendChild(img);
}
this.domNode.appendChild(document.createTextNode(this.caption));
dojo.html.disableSelection(this.domNode);
},
postCreate: function() {
this.window=dojo.widget.getWidgetById(this.windowId);
this.window.explodeSrc = this.domNode;
dojo.event.connect(this.window, "destroy", this, "destroy")
},
onClick: function() {
this.window.show();
}
});
// Collection of widgets in a bar, like Windows task bar
dojo.widget.html.TaskBar = function(){
dojo.widget.html.FloatingPane.call(this);
dojo.widget.TaskBar.call(this);
this._addChildStack = [];
}
dojo.inherits(dojo.widget.html.TaskBar, dojo.widget.html.FloatingPane);
dojo.lang.extend(dojo.widget.html.TaskBar, {
resizable: false,
titleBarDisplay: "none",
addChild: function(child) {
if(!this.containerNode){
this._addChildStack.push(child);
}else if(this._addChildStack.length > 0){
var oarr = this._addChildStack;
this._addChildStack = [];
dojo.lang.forEach(oarr, this.addChild, this);
}
var tbi = dojo.widget.createWidget("TaskBarItem",
{ windowId: child.widgetId,
caption: child.title,
iconSrc: child.iconSrc
});
dojo.widget.html.TaskBar.superclass.addChild.call(this,tbi);
}
});
dojo.provide("dojo.widget.html.TaskBar");
dojo.provide("dojo.widget.html.TaskBarItem");
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.FloatingPane");
dojo.require("dojo.widget.HtmlWidget");
dojo.require("dojo.event");
// Icon associated w/a floating pane
dojo.widget.html.TaskBarItem = function(){
dojo.widget.TaskBarItem.call(this);
dojo.widget.HtmlWidget.call(this);
}
dojo.inherits(dojo.widget.html.TaskBarItem, dojo.widget.HtmlWidget);
dojo.lang.extend(dojo.widget.html.TaskBarItem, {
// constructor arguments
iconSrc: '',
caption: 'Untitled',
window: null,
templatePath: dojo.uri.dojoUri("src/widget/templates/HtmlTaskBarItemTemplate.html"),
templateCssPath: dojo.uri.dojoUri("src/widget/templates/HtmlTaskBar.css"),
fillInTemplate: function() {
if ( this.iconSrc != '' ) {
var img = document.createElement("img");
img.src = this.iconSrc;
this.domNode.appendChild(img);
}
this.domNode.appendChild(document.createTextNode(this.caption));
dojo.html.disableSelection(this.domNode);
},
postCreate: function() {
this.window=dojo.widget.getWidgetById(this.windowId);
this.window.explodeSrc = this.domNode;
dojo.event.connect(this.window, "destroy", this, "destroy")
},
onClick: function() {
this.window.show();
}
});
// Collection of widgets in a bar, like Windows task bar
dojo.widget.html.TaskBar = function(){
dojo.widget.html.FloatingPane.call(this);
dojo.widget.TaskBar.call(this);
this._addChildStack = [];
}
dojo.inherits(dojo.widget.html.TaskBar, dojo.widget.html.FloatingPane);
dojo.lang.extend(dojo.widget.html.TaskBar, {
resizable: false,
titleBarDisplay: "none",
addChild: function(child) {
if(!this.containerNode){
this._addChildStack.push(child);
}else if(this._addChildStack.length > 0){
var oarr = this._addChildStack;
this._addChildStack = [];
dojo.lang.forEach(oarr, this.addChild, this);
}
var tbi = dojo.widget.createWidget("TaskBarItem",
{ windowId: child.widgetId,
caption: child.title,
iconSrc: child.iconSrc
});
dojo.widget.html.TaskBar.superclass.addChild.call(this,tbi);
}
});

View file

@ -8,63 +8,63 @@
http://dojotoolkit.org/community/licensing.shtml
*/
dojo.provide("dojo.widget.html.TitlePane");
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.HtmlWidget");
dojo.require("dojo.lfx.*");
dojo.widget.html.TitlePane = function(){
dojo.widget.HtmlWidget.call(this);
this.widgetType = "TitlePane";
this.labelNode="";
this.labelNodeClass="";
this.containerNodeClass="";
this.label="";
this.open=true;
this.templatePath = dojo.uri.dojoUri("src/widget/templates/TitlePane.html");
}
dojo.inherits(dojo.widget.html.TitlePane, dojo.widget.HtmlWidget);
dojo.lang.extend(dojo.widget.html.TitlePane, {
isContainer: true,
postCreate: function() {
if (this.label) {
this.labelNode.appendChild(document.createTextNode(this.label));
}
if (this.labelNodeClass) {
dojo.html.addClass(this.labelNode, this.labelNodeClass);
}
if (this.containerNodeClass) {
dojo.html.addClass(this.containerNode, this.containerNodeClass);
}
if (!this.open) {
dojo.lfx.wipeOut(this.containerNode,0).play();
}
},
onLabelClick: function() {
if (this.open) {
dojo.lfx.wipeOut(this.containerNode,250).play();
this.open=false;
}else {
dojo.lfx.wipeIn(this.containerNode,250).play();
this.open=true;
}
},
setContent: function(content) {
this.containerNode.innerHTML=content;
},
setLabel: function(label) {
this.labelNode.innerHTML=label;
}
});
dojo.widget.tags.addParseTreeHandler("dojo:TitlePane");
dojo.provide("dojo.widget.html.TitlePane");
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.HtmlWidget");
dojo.require("dojo.lfx.*");
dojo.widget.html.TitlePane = function(){
dojo.widget.HtmlWidget.call(this);
this.widgetType = "TitlePane";
this.labelNode="";
this.labelNodeClass="";
this.containerNodeClass="";
this.label="";
this.open=true;
this.templatePath = dojo.uri.dojoUri("src/widget/templates/TitlePane.html");
}
dojo.inherits(dojo.widget.html.TitlePane, dojo.widget.HtmlWidget);
dojo.lang.extend(dojo.widget.html.TitlePane, {
isContainer: true,
postCreate: function() {
if (this.label) {
this.labelNode.appendChild(document.createTextNode(this.label));
}
if (this.labelNodeClass) {
dojo.html.addClass(this.labelNode, this.labelNodeClass);
}
if (this.containerNodeClass) {
dojo.html.addClass(this.containerNode, this.containerNodeClass);
}
if (!this.open) {
dojo.lfx.wipeOut(this.containerNode,0).play();
}
},
onLabelClick: function() {
if (this.open) {
dojo.lfx.wipeOut(this.containerNode,250).play();
this.open=false;
}else {
dojo.lfx.wipeIn(this.containerNode,250).play();
this.open=true;
}
},
setContent: function(content) {
this.containerNode.innerHTML=content;
},
setLabel: function(label) {
this.labelNode.innerHTML=label;
}
});
dojo.widget.tags.addParseTreeHandler("dojo:TitlePane");

View file

@ -8,176 +8,176 @@
http://dojotoolkit.org/community/licensing.shtml
*/
dojo.provide("dojo.widget.html.Tooltip");
dojo.require("dojo.widget.html.ContentPane");
dojo.require("dojo.widget.Tooltip");
dojo.require("dojo.uri");
dojo.require("dojo.widget.*");
dojo.require("dojo.event");
dojo.require("dojo.style");
dojo.require("dojo.html");
dojo.widget.defineWidget(
"dojo.widget.html.Tooltip",
dojo.widget.html.ContentPane,
{
widgetType: "Tooltip",
isContainer: true,
// Constructor arguments
caption: "",
showDelay: 500,
hideDelay: 100,
connectId: "",
templatePath: dojo.uri.dojoUri("src/widget/templates/HtmlTooltipTemplate.html"),
templateCssPath: dojo.uri.dojoUri("src/widget/templates/HtmlTooltipTemplate.css"),
connectNode: null,
// Tooltip has the following possible states:
// erased - nothing on screen
// displaying - currently being faded in (partially displayed)
// displayed - fully displayed
// erasing - currently being faded out (partially erased)
state: "erased",
fillInTemplate: function(args, frag){
if(this.caption != ""){
this.domNode.appendChild(document.createTextNode(this.caption));
}
this.connectNode = dojo.byId(this.connectId);
dojo.widget.html.Tooltip.superclass.fillInTemplate.call(this, args, frag);
},
postCreate: function(args, frag){
// The domnode was appended to my parent widget's domnode, but the positioning
// only works if the domnode is a child of document.body
document.body.appendChild(this.domNode);
dojo.event.connect(this.connectNode, "onmouseover", this, "onMouseOver");
dojo.widget.html.Tooltip.superclass.postCreate.call(this, args, frag);
},
onMouseOver: function(e) {
this.mouse = {x: e.pageX, y: e.pageY};
if(!this.showTimer){
this.showTimer = setTimeout(dojo.lang.hitch(this, "show"), this.showDelay);
dojo.event.connect(document.documentElement, "onmousemove", this, "onMouseMove");
}
},
onMouseMove: function(e) {
this.mouse = {x: e.pageX, y: e.pageY};
if(dojo.html.overElement(this.connectNode, e) || dojo.html.overElement(this.domNode, e)) {
// If the tooltip has been scheduled to be erased, cancel that timer
// since we are hovering over element/tooltip again
if(this.hideTimer) {
clearTimeout(this.hideTimer);
delete this.hideTimer;
}
} else {
// mouse has been moved off the element/tooltip
// note: can't use onMouseOut to detect this because the "explode" effect causes
// spurious onMouseOut/onMouseOver events (due to interference from outline)
if(this.showTimer){
clearTimeout(this.showTimer);
delete this.showTimer;
}
if((this.state=="displaying"||this.state=="displayed") && !this.hideTimer){
this.hideTimer = setTimeout(dojo.lang.hitch(this, "hide"), this.hideDelay);
}
}
},
show: function() {
if(this.state=="erasing"){
// we are in the process of erasing; when that is finished, display it.
this.displayScheduled=true;
return;
}
if ( this.state=="displaying" || this.state=="displayed" ) { return; }
// prevent IE bleed through (iframe creation is deferred until first show()
// call because apparently it takes a long time)
if(!this.bgIframe){
this.bgIframe = new dojo.html.BackgroundIframe(this.domNode);
}
this.position();
// if rendering using explosion effect, need to set explosion source
this.explodeSrc = [this.mouse.x, this.mouse.y];
this.state="displaying";
dojo.widget.html.Tooltip.superclass.show.call(this);
},
onShow: function() {
dojo.widget.html.Tooltip.superclass.onShow.call(this);
this.state="displayed";
// in the corner case where the user has moved his mouse away
// while the tip was fading in
if(this.eraseScheduled){
this.hide();
this.eraseScheduled=false;
}
},
hide: function() {
if(this.state=="displaying"){
// in the process of fading in. wait until that is finished and then fade out
this.eraseScheduled=true;
return;
}
if ( this.state=="displayed" ) {
this.state="erasing";
if ( this.showTimer ) {
clearTimeout(this.showTimer);
delete this.showTimer;
}
if ( this.hideTimer ) {
clearTimeout(this.hideTimer);
delete this.hideTimer;
}
dojo.event.disconnect(document.documentElement, "onmousemove", this, "onMouseMove");
dojo.widget.html.Tooltip.superclass.hide.call(this);
}
},
onHide: function(){
this.state="erased";
// in the corner case where the user has moved his mouse back
// while the tip was fading out
if(this.displayScheduled){
this.display();
this.displayScheduled=false;
}
},
position: function(){
dojo.html.placeOnScreenPoint(this.domNode, this.mouse.x, this.mouse.y, [10,15], true);
this.bgIframe.onResized();
},
onLoad: function(){
if(this.isShowing()){
// the tooltip has changed size due to downloaded contents, so reposition it
dojo.lang.setTimeout(this, this.position, 50);
dojo.widget.html.Tooltip.superclass.onLoad.apply(this, arguments);
}
},
checkSize: function() {
// checkSize() is called when the user has resized the browser window,
// but that doesn't affect this widget (or this widget's children)
// so it can be safely ignored
}
}
);
dojo.provide("dojo.widget.html.Tooltip");
dojo.require("dojo.widget.html.ContentPane");
dojo.require("dojo.widget.Tooltip");
dojo.require("dojo.uri");
dojo.require("dojo.widget.*");
dojo.require("dojo.event");
dojo.require("dojo.style");
dojo.require("dojo.html");
dojo.widget.defineWidget(
"dojo.widget.html.Tooltip",
dojo.widget.html.ContentPane,
{
widgetType: "Tooltip",
isContainer: true,
// Constructor arguments
caption: "",
showDelay: 500,
hideDelay: 100,
connectId: "",
templatePath: dojo.uri.dojoUri("src/widget/templates/HtmlTooltipTemplate.html"),
templateCssPath: dojo.uri.dojoUri("src/widget/templates/HtmlTooltipTemplate.css"),
connectNode: null,
// Tooltip has the following possible states:
// erased - nothing on screen
// displaying - currently being faded in (partially displayed)
// displayed - fully displayed
// erasing - currently being faded out (partially erased)
state: "erased",
fillInTemplate: function(args, frag){
if(this.caption != ""){
this.domNode.appendChild(document.createTextNode(this.caption));
}
this.connectNode = dojo.byId(this.connectId);
dojo.widget.html.Tooltip.superclass.fillInTemplate.call(this, args, frag);
},
postCreate: function(args, frag){
// The domnode was appended to my parent widget's domnode, but the positioning
// only works if the domnode is a child of document.body
document.body.appendChild(this.domNode);
dojo.event.connect(this.connectNode, "onmouseover", this, "onMouseOver");
dojo.widget.html.Tooltip.superclass.postCreate.call(this, args, frag);
},
onMouseOver: function(e) {
this.mouse = {x: e.pageX, y: e.pageY};
if(!this.showTimer){
this.showTimer = setTimeout(dojo.lang.hitch(this, "show"), this.showDelay);
dojo.event.connect(document.documentElement, "onmousemove", this, "onMouseMove");
}
},
onMouseMove: function(e) {
this.mouse = {x: e.pageX, y: e.pageY};
if(dojo.html.overElement(this.connectNode, e) || dojo.html.overElement(this.domNode, e)) {
// If the tooltip has been scheduled to be erased, cancel that timer
// since we are hovering over element/tooltip again
if(this.hideTimer) {
clearTimeout(this.hideTimer);
delete this.hideTimer;
}
} else {
// mouse has been moved off the element/tooltip
// note: can't use onMouseOut to detect this because the "explode" effect causes
// spurious onMouseOut/onMouseOver events (due to interference from outline)
if(this.showTimer){
clearTimeout(this.showTimer);
delete this.showTimer;
}
if((this.state=="displaying"||this.state=="displayed") && !this.hideTimer){
this.hideTimer = setTimeout(dojo.lang.hitch(this, "hide"), this.hideDelay);
}
}
},
show: function() {
if(this.state=="erasing"){
// we are in the process of erasing; when that is finished, display it.
this.displayScheduled=true;
return;
}
if ( this.state=="displaying" || this.state=="displayed" ) { return; }
// prevent IE bleed through (iframe creation is deferred until first show()
// call because apparently it takes a long time)
if(!this.bgIframe){
this.bgIframe = new dojo.html.BackgroundIframe(this.domNode);
}
this.position();
// if rendering using explosion effect, need to set explosion source
this.explodeSrc = [this.mouse.x, this.mouse.y];
this.state="displaying";
dojo.widget.html.Tooltip.superclass.show.call(this);
},
onShow: function() {
dojo.widget.html.Tooltip.superclass.onShow.call(this);
this.state="displayed";
// in the corner case where the user has moved his mouse away
// while the tip was fading in
if(this.eraseScheduled){
this.hide();
this.eraseScheduled=false;
}
},
hide: function() {
if(this.state=="displaying"){
// in the process of fading in. wait until that is finished and then fade out
this.eraseScheduled=true;
return;
}
if ( this.state=="displayed" ) {
this.state="erasing";
if ( this.showTimer ) {
clearTimeout(this.showTimer);
delete this.showTimer;
}
if ( this.hideTimer ) {
clearTimeout(this.hideTimer);
delete this.hideTimer;
}
dojo.event.disconnect(document.documentElement, "onmousemove", this, "onMouseMove");
dojo.widget.html.Tooltip.superclass.hide.call(this);
}
},
onHide: function(){
this.state="erased";
// in the corner case where the user has moved his mouse back
// while the tip was fading out
if(this.displayScheduled){
this.display();
this.displayScheduled=false;
}
},
position: function(){
dojo.html.placeOnScreenPoint(this.domNode, this.mouse.x, this.mouse.y, [10,15], true);
this.bgIframe.onResized();
},
onLoad: function(){
if(this.isShowing()){
// the tooltip has changed size due to downloaded contents, so reposition it
dojo.lang.setTimeout(this, this.position, 50);
dojo.widget.html.Tooltip.superclass.onLoad.apply(this, arguments);
}
},
checkSize: function() {
// checkSize() is called when the user has resized the browser window,
// but that doesn't affect this widget (or this widget's children)
// so it can be safely ignored
}
}
);

View file

@ -8,173 +8,173 @@
http://dojotoolkit.org/community/licensing.shtml
*/
dojo.provide("dojo.widget.html.YahooMap");
dojo.require("dojo.event.*");
dojo.require("dojo.html");
dojo.require("dojo.math");
dojo.require("dojo.widget.HtmlWidget");
dojo.require("dojo.widget.YahooMap");
(function(){
var yappid = djConfig["yAppId"]||djConfig["yahooAppId"]||"dojotoolkit";
if(!dojo.hostenv.post_load_){
if(yappid == "dojotoolkit"){
dojo.debug("please provide a unique Yahoo App ID in djConfig.yahooAppId when using the map widget");
}
var tag = "<scr"+"ipt src='http://api.maps.yahoo.com/ajaxymap?v=3.0&appid="+yappid+"'></scri"+"pt>";
if(!dj_global["YMap"]){
document.write(tag);
}
}else{
dojo.debug("cannot initialize map system after the page has been loaded! Please either manually include the script block provided by Yahoo in your page or require() the YahooMap widget before onload has fired");
}
})();
dojo.widget.html.YahooMap=function(){
dojo.widget.HtmlWidget.call(this);
dojo.widget.YahooMap.call(this);
this.map=null;
this.datasrc="";
this.data=[];
this.width=0;
this.height=0;
this.controls=["zoomlong","maptype","pan"];
};
dojo.inherits(dojo.widget.html.YahooMap, dojo.widget.HtmlWidget);
dojo.lang.extend(dojo.widget.html.YahooMap, {
widgetType: "YahooMap",
templatePath:null,
templateCssPath:null,
findCenter:function(aPts){
var start=new YGeoPoint(37,-90);
if(aPts.length==0) return start;
var minLat,maxLat, minLon, maxLon, cLat, cLon;
minLat=maxLat=aPts[0].Lat;
minLon=maxLon=aPts[0].Lon;
for(var i=0; i<aPts.length; i++){
minLat=Math.min(minLat,aPts[i].Lat);
maxLat=Math.max(maxLat,aPts[i].Lat);
minLon=Math.min(minLon,aPts[i].Lon);
maxLon=Math.max(maxLon,aPts[i].Lon);
}
cLat=dojo.math.round((minLat+maxLat)/2,6);
cLon=dojo.math.round((minLon+maxLon)/2,6);
return new YGeoPoint(cLat,cLon);
},
setControls:function(){
var c=this.controls;
var t=dojo.widget.YahooMap.Controls;
for(var i=0; i<c.length; i++){
switch(c[i]){
case t.MapType:{
this.map.addTypeControl();
break;
}
case t.Pan:{
this.map.addPanControl();
break;
}
case t.ZoomLong:{
this.map.addZoomLong();
break;
}
case t.ZoomShort:{
this.map.addZoomShort();
break;
}
}
}
},
parse:function(table){
this.data=[];
// get the column indices
var h=table.getElementsByTagName("thead")[0];
if(!h){
return;
}
var a=[];
var cols=h.getElementsByTagName("td");
if(cols.length==0){
cols=h.getElementsByTagName("th");
}
for(var i=0; i<cols.length; i++){
var c=cols[i].innerHTML.toLowerCase();
if(c=="long") c="lng";
a.push(c);
}
// parse the data
var b=table.getElementsByTagName("tbody")[0];
if(!b){
return;
}
for(var i=0; i<b.childNodes.length; i++){
if(!(b.childNodes[i].nodeName&&b.childNodes[i].nodeName.toLowerCase()=="tr")){
continue;
}
var cells=b.childNodes[i].getElementsByTagName("td");
var o={};
for(var j=0; j<a.length; j++){
var col=a[j];
if(col=="lat"||col=="lng"){
o[col]=parseFloat(cells[j].innerHTML);
}else{
o[col]=cells[j].innerHTML;
}
}
this.data.push(o);
}
},
render:function(){
var pts=[];
var d=this.data;
for(var i=0; i<d.length; i++){
var pt=new YGeoPoint(d[i].lat, d[i].lng);
pts.push(pt);
var icon=d[i].icon||null;
if(icon){
icon=new YImage(icon);
}
var m=new YMarker(pt,icon);
if(d[i].description){
m.addAutoExpand("<div>"+d[i].description+"</div>");
}
this.map.addOverlay(m);
}
var c=this.findCenter(pts);
var z=this.map.getZoomLevel(pts);
this.map.drawZoomAndCenter(c,z);
},
initialize:function(args, frag){
if(!YMap || !YGeoPoint){
dojo.raise("dojo.widget.YahooMap: The Yahoo Map script must be included in order to use this widget.");
}
if(this.datasrc){
this.parse(dojo.byId(this.datasrc));
}
else if(this.domNode.getElementsByTagName("table")[0]){
this.parse(this.domNode.getElementsByTagName("table")[0]);
}
},
postCreate:function(){
// clean the domNode before creating the map.
while(this.domNode.childNodes.length>0){
this.domNode.removeChild(this.domNode.childNodes[0]);
}
if(this.width>0&&this.height>0){
this.map=new YMap(this.domNode, YAHOO_MAP_REG, new YSize(this.width, this.height));
}else{
this.map=new YMap(this.domNode);
}
this.setControls();
this.render();
}
});
dojo.provide("dojo.widget.html.YahooMap");
dojo.require("dojo.event.*");
dojo.require("dojo.html");
dojo.require("dojo.math");
dojo.require("dojo.widget.HtmlWidget");
dojo.require("dojo.widget.YahooMap");
(function(){
var yappid = djConfig["yAppId"]||djConfig["yahooAppId"]||"dojotoolkit";
if(!dojo.hostenv.post_load_){
if(yappid == "dojotoolkit"){
dojo.debug("please provide a unique Yahoo App ID in djConfig.yahooAppId when using the map widget");
}
var tag = "<scr"+"ipt src='http://api.maps.yahoo.com/ajaxymap?v=3.0&appid="+yappid+"'></scri"+"pt>";
if(!dj_global["YMap"]){
document.write(tag);
}
}else{
dojo.debug("cannot initialize map system after the page has been loaded! Please either manually include the script block provided by Yahoo in your page or require() the YahooMap widget before onload has fired");
}
})();
dojo.widget.html.YahooMap=function(){
dojo.widget.HtmlWidget.call(this);
dojo.widget.YahooMap.call(this);
this.map=null;
this.datasrc="";
this.data=[];
this.width=0;
this.height=0;
this.controls=["zoomlong","maptype","pan"];
};
dojo.inherits(dojo.widget.html.YahooMap, dojo.widget.HtmlWidget);
dojo.lang.extend(dojo.widget.html.YahooMap, {
widgetType: "YahooMap",
templatePath:null,
templateCssPath:null,
findCenter:function(aPts){
var start=new YGeoPoint(37,-90);
if(aPts.length==0) return start;
var minLat,maxLat, minLon, maxLon, cLat, cLon;
minLat=maxLat=aPts[0].Lat;
minLon=maxLon=aPts[0].Lon;
for(var i=0; i<aPts.length; i++){
minLat=Math.min(minLat,aPts[i].Lat);
maxLat=Math.max(maxLat,aPts[i].Lat);
minLon=Math.min(minLon,aPts[i].Lon);
maxLon=Math.max(maxLon,aPts[i].Lon);
}
cLat=dojo.math.round((minLat+maxLat)/2,6);
cLon=dojo.math.round((minLon+maxLon)/2,6);
return new YGeoPoint(cLat,cLon);
},
setControls:function(){
var c=this.controls;
var t=dojo.widget.YahooMap.Controls;
for(var i=0; i<c.length; i++){
switch(c[i]){
case t.MapType:{
this.map.addTypeControl();
break;
}
case t.Pan:{
this.map.addPanControl();
break;
}
case t.ZoomLong:{
this.map.addZoomLong();
break;
}
case t.ZoomShort:{
this.map.addZoomShort();
break;
}
}
}
},
parse:function(table){
this.data=[];
// get the column indices
var h=table.getElementsByTagName("thead")[0];
if(!h){
return;
}
var a=[];
var cols=h.getElementsByTagName("td");
if(cols.length==0){
cols=h.getElementsByTagName("th");
}
for(var i=0; i<cols.length; i++){
var c=cols[i].innerHTML.toLowerCase();
if(c=="long") c="lng";
a.push(c);
}
// parse the data
var b=table.getElementsByTagName("tbody")[0];
if(!b){
return;
}
for(var i=0; i<b.childNodes.length; i++){
if(!(b.childNodes[i].nodeName&&b.childNodes[i].nodeName.toLowerCase()=="tr")){
continue;
}
var cells=b.childNodes[i].getElementsByTagName("td");
var o={};
for(var j=0; j<a.length; j++){
var col=a[j];
if(col=="lat"||col=="lng"){
o[col]=parseFloat(cells[j].innerHTML);
}else{
o[col]=cells[j].innerHTML;
}
}
this.data.push(o);
}
},
render:function(){
var pts=[];
var d=this.data;
for(var i=0; i<d.length; i++){
var pt=new YGeoPoint(d[i].lat, d[i].lng);
pts.push(pt);
var icon=d[i].icon||null;
if(icon){
icon=new YImage(icon);
}
var m=new YMarker(pt,icon);
if(d[i].description){
m.addAutoExpand("<div>"+d[i].description+"</div>");
}
this.map.addOverlay(m);
}
var c=this.findCenter(pts);
var z=this.map.getZoomLevel(pts);
this.map.drawZoomAndCenter(c,z);
},
initialize:function(args, frag){
if(!YMap || !YGeoPoint){
dojo.raise("dojo.widget.YahooMap: The Yahoo Map script must be included in order to use this widget.");
}
if(this.datasrc){
this.parse(dojo.byId(this.datasrc));
}
else if(this.domNode.getElementsByTagName("table")[0]){
this.parse(this.domNode.getElementsByTagName("table")[0]);
}
},
postCreate:function(){
// clean the domNode before creating the map.
while(this.domNode.childNodes.length>0){
this.domNode.removeChild(this.domNode.childNodes[0]);
}
if(this.width>0&&this.height>0){
this.map=new YMap(this.domNode, YAHOO_MAP_REG, new YSize(this.width, this.height));
}else{
this.map=new YMap(this.domNode);
}
this.setControls();
this.render();
}
});

View file

@ -8,206 +8,206 @@
http://dojotoolkit.org/community/licensing.shtml
*/
// Maintain state of widgets when user hits back/forward button
dojo.provide("dojo.widget.html.stabile");
dojo.widget.html.stabile = {
// Characters to quote in single-quoted regexprs
_sqQuotables: new RegExp("([\\\\'])", "g"),
// Current depth.
_depth: 0,
// Set to true when calling v.toString, to sniff for infinite
// recursion.
_recur: false,
// Levels of nesting of Array and object displays.
// If when >= depth, no display or array or object internals.
depthLimit: 2
};
//// PUBLIC METHODS
// Get the state stored for the widget with the given ID, or undefined
// if none.
//
dojo.widget.html.stabile.getState = function(id){
dojo.widget.html.stabile.setup();
return dojo.widget.html.stabile.widgetState[id];
}
// Set the state stored for the widget with the given ID. If isCommit
// is true, commits all widget state to more stable storage.
//
dojo.widget.html.stabile.setState = function(id, state, isCommit){
dojo.widget.html.stabile.setup();
dojo.widget.html.stabile.widgetState[id] = state;
if(isCommit){
dojo.widget.html.stabile.commit(dojo.widget.html.stabile.widgetState);
}
}
// Sets up widgetState: a hash keyed by widgetId, maps to an object
// or array writable with "describe". If there is data in the widget
// storage area, use it, otherwise initialize an empty object.
//
dojo.widget.html.stabile.setup = function(){
if(!dojo.widget.html.stabile.widgetState){
var text = dojo.widget.html.stabile.getStorage().value;
dojo.widget.html.stabile.widgetState = text ? dj_eval("("+text+")") : {};
}
}
// Commits all widget state to more stable storage, so if the user
// navigates away and returns, it can be restored.
//
dojo.widget.html.stabile.commit = function(state){
dojo.widget.html.stabile.getStorage().value = dojo.widget.html.stabile.description(state);
}
// Return a JSON "description string" for the given value.
// Supports only core JavaScript types with literals, plus Date,
// and cyclic structures are unsupported.
// showAll defaults to false -- if true, this becomes a simple symbolic
// object dumper, but you cannot "eval" the output.
//
dojo.widget.html.stabile.description = function(v, showAll){
// Save and later restore dojo.widget.html.stabile._depth;
var depth = dojo.widget.html.stabile._depth;
var describeThis = function() {
return this.description(this, true);
}
try {
if(v===void(0)){
return "undefined";
}
if(v===null){
return "null";
}
if(typeof(v)=="boolean" || typeof(v)=="number"
|| v instanceof Boolean || v instanceof Number){
return v.toString();
}
if(typeof(v)=="string" || v instanceof String){
// Quote strings and their contents as required.
// Replacing by $& fails in IE 5.0
var v1 = v.replace(dojo.widget.html.stabile._sqQuotables, "\\$1");
v1 = v1.replace(/\n/g, "\\n");
v1 = v1.replace(/\r/g, "\\r");
// Any other important special cases?
return "'"+v1+"'";
}
if(v instanceof Date){
// Create a data constructor.
return "new Date("+d.getFullYear+","+d.getMonth()+","+d.getDate()+")";
}
var d;
if(v instanceof Array || v.push){
// "push" test needed for KHTML/Safari, don't know why -cp
if(depth>=dojo.widget.html.stabile.depthLimit)
return "[ ... ]";
d = "[";
var first = true;
dojo.widget.html.stabile._depth++;
for(var i=0; i<v.length; i++){
// Skip functions and undefined values
// if(v[i]==undef || typeof(v[i])=="function")
// continue;
if(first){
first = false;
}else{
d += ",";
}
d+=arguments.callee(v[i], showAll);
}
return d+"]";
}
if(v.constructor==Object
|| v.toString==describeThis){
if(depth>=dojo.widget.html.stabile.depthLimit)
return "{ ... }";
// Instanceof Hash is good, or if we just use Objects,
// we can say v.constructor==Object.
// IE (5?) lacks hasOwnProperty, but perhaps objects do not always
// have prototypes??
if(typeof(v.hasOwnProperty)!="function" && v.prototype){
throw new Error("description: "+v+" not supported by script engine");
}
var first = true;
d = "{";
dojo.widget.html.stabile._depth++;
for(var key in v){
// Skip values that are functions or undefined.
if(v[key]==void(0) || typeof(v[key])=="function")
continue;
if(first){
first = false;
}else{
d += ", ";
}
var kd = key;
// If the key is not a legal identifier, use its description.
// For strings this will quote the stirng.
if(!kd.match(/^[a-zA-Z_][a-zA-Z0-9_]*$/)){
kd = arguments.callee(key, showAll);
}
d += kd+": "+arguments.callee(v[key], showAll);
}
return d+"}";
}
if(showAll){
if(dojo.widget.html.stabile._recur){
// Save the original definitions of toString;
var objectToString = Object.prototype.toString;
return objectToString.apply(v, []);
}else{
dojo.widget.html.stabile._recur = true;
return v.toString();
}
}else{
// log("Description? "+v.toString()+", "+typeof(v));
throw new Error("Unknown type: "+v);
return "'unknown'";
}
} finally {
// Always restore the global current depth.
dojo.widget.html.stabile._depth = depth;
}
}
//// PRIVATE TO MODULE
// Gets an object (form field) with a read/write "value" property.
//
dojo.widget.html.stabile.getStorage = function(){
if (dojo.widget.html.stabile.dataField) {
return dojo.widget.html.stabile.dataField;
}
var form = document.forms._dojo_form;
return dojo.widget.html.stabile.dataField = form ? form.stabile : {value: ""};
}
// Maintain state of widgets when user hits back/forward button
dojo.provide("dojo.widget.html.stabile");
dojo.widget.html.stabile = {
// Characters to quote in single-quoted regexprs
_sqQuotables: new RegExp("([\\\\'])", "g"),
// Current depth.
_depth: 0,
// Set to true when calling v.toString, to sniff for infinite
// recursion.
_recur: false,
// Levels of nesting of Array and object displays.
// If when >= depth, no display or array or object internals.
depthLimit: 2
};
//// PUBLIC METHODS
// Get the state stored for the widget with the given ID, or undefined
// if none.
//
dojo.widget.html.stabile.getState = function(id){
dojo.widget.html.stabile.setup();
return dojo.widget.html.stabile.widgetState[id];
}
// Set the state stored for the widget with the given ID. If isCommit
// is true, commits all widget state to more stable storage.
//
dojo.widget.html.stabile.setState = function(id, state, isCommit){
dojo.widget.html.stabile.setup();
dojo.widget.html.stabile.widgetState[id] = state;
if(isCommit){
dojo.widget.html.stabile.commit(dojo.widget.html.stabile.widgetState);
}
}
// Sets up widgetState: a hash keyed by widgetId, maps to an object
// or array writable with "describe". If there is data in the widget
// storage area, use it, otherwise initialize an empty object.
//
dojo.widget.html.stabile.setup = function(){
if(!dojo.widget.html.stabile.widgetState){
var text = dojo.widget.html.stabile.getStorage().value;
dojo.widget.html.stabile.widgetState = text ? dj_eval("("+text+")") : {};
}
}
// Commits all widget state to more stable storage, so if the user
// navigates away and returns, it can be restored.
//
dojo.widget.html.stabile.commit = function(state){
dojo.widget.html.stabile.getStorage().value = dojo.widget.html.stabile.description(state);
}
// Return a JSON "description string" for the given value.
// Supports only core JavaScript types with literals, plus Date,
// and cyclic structures are unsupported.
// showAll defaults to false -- if true, this becomes a simple symbolic
// object dumper, but you cannot "eval" the output.
//
dojo.widget.html.stabile.description = function(v, showAll){
// Save and later restore dojo.widget.html.stabile._depth;
var depth = dojo.widget.html.stabile._depth;
var describeThis = function() {
return this.description(this, true);
}
try {
if(v===void(0)){
return "undefined";
}
if(v===null){
return "null";
}
if(typeof(v)=="boolean" || typeof(v)=="number"
|| v instanceof Boolean || v instanceof Number){
return v.toString();
}
if(typeof(v)=="string" || v instanceof String){
// Quote strings and their contents as required.
// Replacing by $& fails in IE 5.0
var v1 = v.replace(dojo.widget.html.stabile._sqQuotables, "\\$1");
v1 = v1.replace(/\n/g, "\\n");
v1 = v1.replace(/\r/g, "\\r");
// Any other important special cases?
return "'"+v1+"'";
}
if(v instanceof Date){
// Create a data constructor.
return "new Date("+d.getFullYear+","+d.getMonth()+","+d.getDate()+")";
}
var d;
if(v instanceof Array || v.push){
// "push" test needed for KHTML/Safari, don't know why -cp
if(depth>=dojo.widget.html.stabile.depthLimit)
return "[ ... ]";
d = "[";
var first = true;
dojo.widget.html.stabile._depth++;
for(var i=0; i<v.length; i++){
// Skip functions and undefined values
// if(v[i]==undef || typeof(v[i])=="function")
// continue;
if(first){
first = false;
}else{
d += ",";
}
d+=arguments.callee(v[i], showAll);
}
return d+"]";
}
if(v.constructor==Object
|| v.toString==describeThis){
if(depth>=dojo.widget.html.stabile.depthLimit)
return "{ ... }";
// Instanceof Hash is good, or if we just use Objects,
// we can say v.constructor==Object.
// IE (5?) lacks hasOwnProperty, but perhaps objects do not always
// have prototypes??
if(typeof(v.hasOwnProperty)!="function" && v.prototype){
throw new Error("description: "+v+" not supported by script engine");
}
var first = true;
d = "{";
dojo.widget.html.stabile._depth++;
for(var key in v){
// Skip values that are functions or undefined.
if(v[key]==void(0) || typeof(v[key])=="function")
continue;
if(first){
first = false;
}else{
d += ", ";
}
var kd = key;
// If the key is not a legal identifier, use its description.
// For strings this will quote the stirng.
if(!kd.match(/^[a-zA-Z_][a-zA-Z0-9_]*$/)){
kd = arguments.callee(key, showAll);
}
d += kd+": "+arguments.callee(v[key], showAll);
}
return d+"}";
}
if(showAll){
if(dojo.widget.html.stabile._recur){
// Save the original definitions of toString;
var objectToString = Object.prototype.toString;
return objectToString.apply(v, []);
}else{
dojo.widget.html.stabile._recur = true;
return v.toString();
}
}else{
// log("Description? "+v.toString()+", "+typeof(v));
throw new Error("Unknown type: "+v);
return "'unknown'";
}
} finally {
// Always restore the global current depth.
dojo.widget.html.stabile._depth = depth;
}
}
//// PRIVATE TO MODULE
// Gets an object (form field) with a read/write "value" property.
//
dojo.widget.html.stabile.getStorage = function(){
if (dojo.widget.html.stabile.dataField) {
return dojo.widget.html.stabile.dataField;
}
var form = document.forms._dojo_form;
return dojo.widget.html.stabile.dataField = form ? form.stabile : {value: ""};
}