EXT.BUTTON 확장
Ext.ux.ImageButton = function(cfg) {
    Ext.ux.ImageButton.superclass.constructor.call(this, cfg);
};
Ext.extend(Ext.ux.ImageButton, Ext.Button, {
    onRender : function(ct, position) {
        this.disabledImgPath = this.disabledImgPath || this.imgPath;
        var tplHTML = '<div><a href="###" class="image-btn"><span> {imgText:htmlEncode}</span></a></div>';
        var tpl = new Ext.Template(tplHTML);
        var btn, targs = {
            imgText : this.text || ""
        };
        btn = tpl.append(ct, targs, true);
        btn.on("click", this.onClick, this);
        this.el = btn;
        if (this.hidden) {
            this.hide();
        }
    },
    disable : function(newImgPath) {
        var replaceImgPath = newImgPath || this.disabledImgPath;
        if (replaceImgPath)
            this.el.dom.firstChild.src = replaceImgPath;
        this.disabled = true;
    },
    enable : function(newImgPath) {
        var replaceImgPath = newImgPath || this.imgPath;
        if (replaceImgPath)
            this.el.dom.firstChild.src = replaceImgPath;
        this.disabled = false;
    }
});
Ext.reg('imagebutton', Ext.ux.ImageButton);
   
.image-btn {background:url(./image/image_bg.gif) left 0;color:#222222;text-decoration:none;height:21px;float:left;cursor:hand;margin:0 5px 0 0;}
.image-btn:hover {background:url(./image/image_bg.gif) left -21px;text-decoration:none;height:20px;}
.image-btn span {background:url(./image/image_bg.gif) right 0;padding:1px 8px 0px 0;vertical-align:middle;margin:0 0 0 8px;float:left;line-height:20px;height:21px;}
.image-btn:hover span {background:url(./image/image_bg.gif) right -20px;color:#000;padding:1px 8px 0px 0;margin:0 0 0 8px;height:21px;}
  
                이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
【Microsoft Edge 편리 기능】URL 바를 카피하면 타이틀을 포함한 Markdown 형식으로 붙여넣기 가능업무로 이용하고 있는 Microsoft 계정으로 관리를 할 수 있는 것이 일인으로 보급되었던 Microsoft Edge에는, URL을 타이틀도 포함한 Markdown 형식으로 copipe 할 수 있는 편리한 기능이 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.