修改Dojo过滤选择模板

时间:2013-12-08 19:33:15

标签: javascript html dojo

我正在尝试修改Dojo的过滤选择。就像现在一样,它使用输入html标签而不是select,option标签。截至目前,我正在尝试实现这一目标是继承整个FilteringSelect并为其提供我自己的templateString。

var myFilteringSelect = declare([FilteringSelect], {
templateString: '' + 
        '<div class="dijit dijitReset dijitInline dijitLeft" id="widget_${id}" role="${role}">' +
        '   <div class="dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer"' +
        '       data-dojo-attach-point="_buttonNode, _popupStateNode" role="presentation">' +
        //'     <input class="dijitReset dijitInputField dijitArrowButtonInner" type="image" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAA1JREFUGFdj+P//PwMACPwC/ohfBuAAAAAASUVORK5CYII=" alt="" tabIndex="-1" readonly="readonly" role="presentation" ${_buttonInputDisabled} />' +
        '       <input class="dijitReset dijitInputField dijitArrowButtonInner" ' + '' /*'type="image"*/ + ' alt="" tabIndex="-1" readonly="readonly" role="presentation" ${_buttonInputDisabled} />' +
        '       <span class="dropDownText">&#9660;</span>' +
        '   </div>' +
        '   <div class="dijitReset dijitValidationContainer">' +
        '       <input class="dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value="&#935; " type="text" tabIndex="-1" readonly="readonly" role="presentation"/>' +
        '   </div>' +
        '   <div class="dijitReset dijitInputField dijitInputContainer">' +
        '       <input class="dijitReset dijitInputInner" ${!nameAttrSetting} type="text" autocomplete="off" data-dojo-attach-point="textbox,focusNode" role="textbox" aria-haspopup="${hasDownArrow}" />' +
        '   </div>' +
        '</div>',

但是编辑

<input class="dijitReset dijitInputInner" ${!nameAttrSetting} type="text" autocomplete="off" data-dojo-attach-point="textbox,focusNode" role="textbox" aria-haspopup="${hasDownArrow}" />

<select class="dijitReset dijitInputInner" ${!nameAttrSetting} type="text" autocomplete="off" data-dojo-attach-point="textbox,focusNode" role="textbox" aria-haspopup="${hasDownArrow}" /></select>

似乎没有解决问题,因为没有创建选项标签。 谢谢你的帮助。

0 个答案:

没有答案