dojo 1.7 IE9小部件函数调用未触发

dojo 1.7 IE9小部件函数调用未触发,dojo,widget,internet-explorer-9,Dojo,Widget,Internet Explorer 9,我正在尝试向自定义托盘添加一个按钮,以调用使用该小部件的工作区中的函数“uiFileInputDlg”。upbtn出现在托盘上,但它不会触发在POST CREATE中连接的DoUpload函数,然后调用“uiFileInputDlg”。 在firefox中可以完美地工作。 我们是用户Dojo1.7.2 -----------模板------------------------- <div class="dijitInline dijitColorPalette"> <d

我正在尝试向自定义托盘添加一个按钮,以调用使用该小部件的工作区中的函数“uiFileInputDlg”。upbtn出现在托盘上,但它不会触发在POST CREATE中连接的DoUpload函数,然后调用“uiFileInputDlg”。 在firefox中可以完美地工作。 我们是用户Dojo1.7.2

-----------模板-------------------------

<div class="dijitInline dijitColorPalette"> <div class="dijitColorPaletteInner" data-dojo-attach-point="divNode" role="grid" tabIndex="${tabIndex}"> </div> <button type="button" id="upbtn" data-dojo-type="dijit.form.Button" data-dojo-props="id:'upbtn'" data-dojo-attach-point="btnUpNode"> Upload New Image </button> </div> 上传新图像 -------------------------小部件--------------------------

<div class="dijitInline dijitColorPalette"> <div class="dijitColorPaletteInner" data-dojo-attach-point="divNode" role="grid" tabIndex="${tabIndex}"> </div> <button type="button" id="upbtn" data-dojo-type="dijit.form.Button" data-dojo-props="id:'upbtn'" data-dojo-attach-point="btnUpNode"> Upload New Image </button> </div> //提供(“meemli.UploadPalette”); 定义(['dojo/_base/declare', “dijit/_WidgetBase”, “dijit/_TemplatedMixin”, 'dojo/i18n!dijit/nls/common', 'dojo/text.../templates/UploadPalette.html', “dijit/_WidgetsInTemplateMixin”, “dojo/_base/lang” ], 函数(declare、w、t、i18n、template、witm、lang){ log('meemli.UploadPalette:需要dijit/nls/common.js而不是dojo/nls/common'+i18n.invalidMessage)

返回declare(“meemli.UploadPalette”,
[dijit.\u小部件,dijit.\u模板化],
{
//摘要:一个键盘可访问的颜色拾取小部件
//说明:
//网格显示各种颜色,因此用户可以选择某种颜色
//可以单独使用,也可以作为弹出窗口使用。
//
//例如:
// |    
//
//例如:
//| var picker=new dijit.colorplate({},srcNode);
//| picker.startup();
//
//defaultTimeout:数字
//按住的键或按钮变为typematic之前的毫秒数
默认超时:500,
//timeoutChangeRate:数字
//用于在事件之间更改typematic计时器的时间分数
//1.0表示每个typematic事件以默认超时间隔触发
//<1.0意味着每个typematic事件以更快的速度触发
超时转换率:0.90,
//调色板:字符串
//网格尺寸,可以是“7x10”或“3x4”。
调色板:“3x3”,
//_值:字符串
//选定颜色的值。
值:null,
//_currentFocus:整数
//当前聚焦颜色的索引。
_当前焦点:0,
//xDim:Integer
//这是水平方向上的颜色数。
_xDim:null,
//_yDim:整数
///这是垂直向下的颜色数。
_yDim:null,
//_选项板:映射
//这表示颜色的值。
//第一级是可用的不同数组的hashmap
//接下来的两个维度表示颜色的列和行。
_调色板:{
“3x3”:[],
“3x2”:[“/images/icons/1.png”、“/images/icons/2.png”、“/images/icons/3.png”、“/images/icons/4.png”、“/images/icons/5.png”、“/images/icons/6.png”]
},
//_imagepath:Map
//这是存储调色板图像的路径
//_图像路径:{
//“3x3”:dojo.moduleUrl(“dijit”、“templates/icons3x3.png”)
//  },
//_paletteCoords:地图
//这是一张用来计算地图坐标的地图
//组成调色板的图像。
_帕莱特库德:{
“leftOffset”:3,“topOffset”:3,
“cWidth”:50,“cHeight”:50
},
//模板路径:字符串
//此小部件模板的路径。
//templateString:dojo.cache(“meemli”,“templates/UploadPalette.html”),
templateString:template,
//_paletteDims:对象
//用于对齐的受支持选项板的大小。
_调色板:{
“3x3”:{“宽度”:“156px”,“高度”:“156px”},//48*3+3px左/上边框+3px右/下边框。。。
“3x2”:{“宽度”:“156px”,“高度”:“109px”}//48*3+3px左/上边框+3px右/下边框。。。
},
//tabIndex:String
//小部件选项卡索引。
马克斯:3,
选项卡索引:“0”,
_库林德斯:0,
DoUpload:function(){
警惕(“你好”);
uiFileInputDlg();//在工作区中输出函数
},
_addImage:函数(url){
row=数学地板(this.\u curIndex/this.maxCols);
col=this.\u curIndex-(行*this.maxCols);
这个;
this.\u yDim=Math.floor(this.\u curIndex/this.maxCols);
this.\u xDim=this.\u curIndex-(row*this.maxCols);
var imgNode=dojo.doc.createElement(“img”);
imgNode.src=url;
//imgNode.style.height=imgNode.style.width=“48px”;
var cellNode=dojo.doc.createElement(“span”);
cellNode.appendChild(imgNode);
cellNode.connectionRefs=新数组();
forEach([“Dijitclick”、“MouseEnter”、“Focus”、“Blur”],函数(处理程序){
cellNode.connectionRefs.push(this.connect(cellNode,“on”+handler.toLowerCase(),“\onCell”+handler));
},这个);
this.divNode.appendChild(cellNode);
var cellStyle=cellNode.style;
cellStyle.top=this.\u paletteCoords.toOffset+(行*this.\u paletteCoords.cHeight)+“px”;
cellStyle.left=this.\u paletteCoords.leftOffset+(col*this.\u paletteCoords.cWidth)+“px”;
cellStyle.height=此._paletteCoords.cHeight+“px”;
cellStyle.width=此._paletteCoords.cWidth+“px”;
//调试(“tlhw:+cellStyle.top+”、“+cellStyle.left+”、“+cellStyle.height+”、“+cellStyle.width”);
//调整大小时,位来。。。
//this.xh=this.xw=“32px”;
//log('this.xh=>'+this.xh);
connect(imgNode,“onload”,this,function()){
//log('IN:CONNECT…this.xh=>'+this.xh);
this.xh=imgNode.height;
this.xw=imgNode.width;
this.xh=(this.xh==0)?this.xh=“32px”:(this.xh+);
this.xw=(this.xw==0)?this.xw=“32px”:(this.xw+);
//var h=parseInt(this.xh);
//var w=parseInt(this.xw);
var hArr=this.xh.split('p');
瓦尔瓦尔
this.connect(this.btnUpNode, "onclick", "DoUpload");
this.connect(this.btnUpNode, "onClick", "DoUpload");