'|xns' : 'Roo.data',
data : [
[ 'ComboBox', "ComboBox"],
- [ 'ComboBoxArray', "ComboBoxArray"]
+ [ 'ComboBoxArray', "ComboBoxArray"],
[ 'TextField' , "TextField"],
[ 'NumberField', "NumberField"],
[ 'TextArea', "TextArea"],
//alert("IPC:TEST:" + JSON.stringify(data,null,4));
+ var textFile = null,
+
+ var makeTextFile = function (text) {
+ var data = new Blob([text], {type: 'text/plain'});
+
+ // If we are replacing a previously generated file we need to
+ // manually revoke the object URL to avoid memory leaks.
+ if (textFile !== null) {
+ window.URL.revokeObjectURL(textFile);
+ }
+
+ textFile = window.URL.createObjectURL(data);
+
+ return textFile;
+ };
+
+
+ alert("IPC:TEST:" + makeTextFile(JSON.stringify(data,null,4)));
+ return;
+
var fields = _this.grid.dataSource.reader.recordType.prototype.fields;
el.alwaysQuery = true;
el.triggerAction = 'all';
el.forceSelection = true;
+ el.selectOnFocus = true;
el.minChars = 2;
el.editable = true;
+ el.emptyText = 'Select a value';
el.queryParam = 'query[' + rec.data.display_field + ']';// SET WHEN USED
el.items = [
{
- '*prop' : 'store',
- 'xtype' : 'Store',
- '|xns' : 'Roo.data',
- 'remoteSort' : true,
- '|sortInfo' : '{ direction : \'ASC\', field: \'id\' }',
- listeners : {
- '|beforeload' : 'function (_self, o)' +
- "{\n" +
- " o.params = o.params || {};\n" +
- " // set more here\n" +
- "}\n"
- },
+ 'alwaysQuery' : true,
+ 'triggerAction' : 'all',
+ 'forceSelection': true,
+ 'selectOnFocus' : true,
+ 'minChars' :2,
+ 'editable' : true,
+ 'emptyText' : 'Select a value',
+ 'displayField' : rec.data.display_field,
+ 'valueField' : rec.data.relates_to_col,
+ 'xtype' : 'ComboBox',
+ '$ xns' : 'Roo.form',
+ '* prop' : 'combo',
+ 'queryParam' : 'query[' + rec.data.display_field + ']',
+ 'tpl' : '<div class="x-grid-cell-text x-btn button"><b>{' + rec.data.display_field +'}</b> </div>',
+
items : [
{
- '*prop' : 'proxy',
- 'xtype' : 'HttpProxy',
- 'method' : 'GET',
+ '*prop' : 'store',
+ 'xtype' : 'Store',
'|xns' : 'Roo.data',
- '|url' : "baseURL + '/Roo/" + rec.data.relates_to_table + ".php'",
- },
-
- {
- '*prop' : 'reader',
- 'xtype' : 'JsonReader',
- '|xns' : 'Roo.data',
- 'id' : 'id',
- 'root' : 'data',
- 'totalProperty' : 'total'
-
+ 'remoteSort' : true,
+ '|sortInfo' : '{ direction : \'ASC\', field: \'id\' }',
+ listeners : {
+ '|beforeload' : 'function (_self, o)' +
+ "{\n" +
+ " o.params = o.params || {};\n" +
+ " // set more here\n" +
+ "}\n"
+ },
+ items : [
+ {
+ '*prop' : 'proxy',
+ 'xtype' : 'HttpProxy',
+ 'method' : 'GET',
+ '|xns' : 'Roo.data',
+ '|url' : "baseURL + '/Roo/" + rec.data.relates_to_table + ".php'",
+ },
+ {
+ '*prop' : 'reader',
+ 'xtype' : 'JsonReader',
+ '|xns' : 'Roo.data',
+ 'id' : 'id',
+ 'root' : 'data',
+ 'totalProperty' : 'total'
+ }
+ ]
}
]
}
];
-
- el.queryParam = 'query[' + rec.data.display_field + ']';// SET WHEN USED
-
- el.hiddenName = rec.data.dataIndex // SET WHEN USED eg. project_id
- el.name = rec.data.dataIndex + '_' + rec.data.display_field; // SET WHEN USED eg. project_id_name
-
- el.displayField = rec.data.display_field // SET WHEN USED eg. project_id
- el.valueField = rec.data.relates_to_col
-
- el.tpl = '<div class="x-grid-cell-text x-btn button"><b>{' + rec.data.display_field +'}</b> </div>'; // SET WHEN USED
-
-
-
-
}
if (el.xtype == 'HtmlEditor') {