//
Rsd.define('Rsd.tool.PageDataEditor', {
extend: 'Rsd.container.Dialog',
requires: [],
xtype: 'page-editor',
readOnly:false,
requires: [
'Rsd.widget.JsonForm'
],
layout: 'vbox',
width:'80%',
height:'90%',
items: [
{
xtype:'json-form',
readOnly:false,
width:'100%',
height:'100%'
}
],
/**
* 数据源数据结构
*/
dsSchema:null,
//fieldWidth:'33%',
/*
* */
constructor: function PageEditor(config) {
config = config || {};
this.apply(config);
if(this.dsSchema.height)
{
this.height = this.dsSchema.height;
}
if(this.dsSchema.width)
{
this.height = this.dsSchema.width;
}
this.items[0].header={
width:'90%',
position:'top',
align:'left',
content: ' ' + (this.dsSchema.title ||this.dsSchema.$id),
space:0,
style: {
fontSize:'150%',
backgroundColor:'transparent',
lineHeight: 40
}
}
this.items[0].dataIndex = this.dsSchema.dataIndex || this.dsSchema.dataindex || this.dsSchema.name || this.dsSchema.$id;
},
/**
*
* */
load:function load(data)
{
var me = this;
var _data = data||me.data;
//console.log('pageEditor',_data);
me.items[0].loadFields(me.dsSchema);
//
me.items[0].loadData(_data);
}
},function (type) {
});