EasyUI 편집기를 위한 filebox 확장
1014 단어 EasyUI
$.extend($.fn.datagrid.defaults.editors,{
filebox:{
init:function(container,options){
var input=$("").appendTo(container);
input.filebox(options);
return input;
},
getValue:function(target){
return $(target).filebox("getValue");
},
setValue:function(target,value){
$(target).filebox("setValue",value);
},
resize: function (target, width) {
var input = $(target);
if ($.boxModel == true) {
input.resize('resize', width - (input.outerWidth() - input.width()));
} else {
input.resize('resize', width);
}
}
}
});
Datagrid:
columns: [[{field:'pic', title:'그림','width:100,halign:'center','fit:true,editor:{type:'filebox','options:{}}}]]