에있는 특정 항목을 바꿉니다. 그래서 shopware 플러그인을 작성 중이며 disabled
입력 필드를 XTemplate에 정의 된 readonly
필드로 변경해야합니다.ExtJS XTemplate은 문자열
나는이 작업을 할 수있는 방법을 찾으려고 노력했지만 아무 것도 만들 수 없습니다.
이 코드는 삭제 된 버전이며, 여러 개의 입력 필드가 있으며 그 중 일부는 비활성화되어 있습니다. 이것은 마지막으로 발생합니다. 힌트를 보내 주시면 감사하겠습니다. :)
/**
* Some function...
*/
createSomeFunction: function() {
var me = this;
return new Ext.XTemplate(
'<tpl for=".">',
//stripped this down
'<p>',
'<strong>'+me.snippets.mediaInfo.adress+'</strong>',
'<input type="text" disabled="disabled" value="{path}" />',
'</p>',
'</div>',
'</div>',
'</tpl>',
{
//formatting functions
someFormattingFunctions: function(value) {
//...
}
}
)
}
https://developer.mozilla.org/en/docs/Web/HTML/Element/input : 원래의 코드를 변경하지 않고 다음과 같이
결과, 우리는 템플릿을 사용자 정의 할 수 있습니다 readOnly에 대한 정보를보십시오. –
disabled = "disabled"를 readonly = "readonly"로 바꾸려고합니다. 이 코드 조각은 shopware에서 가져온 것이므로 직접 편집 할 수는 없으며이를 무시해야하지만 전체 템플릿 대신이 비트를 바꿔야합니다. –