-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEdit.js
More file actions
56 lines (50 loc) · 1.71 KB
/
Edit.js
File metadata and controls
56 lines (50 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Ext.define('app.view.rCanSg.Edit', {
extend: 'ux.form.Panel',
alternateClassName: 'rCanSgEdit',
xtype: 'rCanSgEdit',
requires: [
'app.view.rCanSg.MapIframe'
],
initComponent:function(){
var me = this;
me.params = me.params || {};
var display = me.viewtype == 'display';
var buttons = display?null:[{text:'OK',scope:this,handler:this.onFormSubmit},{text:'Cancel',scope:this,handler:this.onFormCancel}];
me.userfieldset = new Ext.form.FieldSet({xtype: 'fieldset',title: 'CAN signal',defaults: {xtype:"textfield",anchor: '100%',readOnly:display},
layout: {type: 'form'},
items:[{
xtype:'panel',flex:1,layout:'fit',region:'center',reference: 'contentPanel',height:300,
items:[{
id:'mapframe',
xtype:'mapIframe',
title : 'Gauge',
reference:'mapPanel',
listeners: {
load: function(iframeComponent){
var contentWindow = this.contentWindow = iframeComponent.iframeEl.dom.contentWindow;
var contentPane = this.contentPane = contentWindow.contentPane;
var input = contentWindow.document.getElementById("cansignal");
var sgid = me.get("sgid");
input.value = sgid;
console.log(input.value);
}
}
}]
}]
});
Ext.apply(this, {
items:[me.userfieldset],
buttons:buttons
});
this.callParent();
},
beforeRender:function(){
var me = this;
// var params = {canMessageid:record.data.ID};
var sgid = me.get("sgid");
if(Ext.isEmpty(sgid))return;
me.loadData(sgid);
},
loadData:function(){
},
});