最終年度のプロジェクトのシステムを構築しました。ある部分では、連絡先番号を選択するためのチェックボックスを備えた連絡先テーブルのリストがあり、選択した番号をリストに入力し直さずに、これらの選択した電話番号を受信者リストに追加することを計画しました。
私の問題は、それらをリストに転送する方法がわからないことです。私はEXTJを使用しており、「受信者に追加」というリストに追加するボタンを作成しました。
文法上の誤りがありましたら申し訳ありません。:)
チェックボックスの私のコード
var check = new Ext.grid.CheckboxSelectionModel();
var grid = new Ext.grid.GridPanel({
store: myStore,
autoScroll:true,
sm:check,
listeners:{
'rowdblclick': onRowDoubleClick,
'rowclick': onRowClick
},
columns: [
{id:'sub',header: "Course", width: 30, dataIndex: 'Course'},
{header: "Matrix No", width: 30, dataIndex: 'MatrixNo'},
check,
{header: "Phone No", width : 30, dataIndex: 'PhoneNo'},
],
.
.
.
受信者部分のコード
Ext.onReady(function(){
Ext.QuickTips.init();
.
.
.
.
Ext.form.Field.prototype.msgTarget = 'side';
var bd = Ext.getBody();
var tabs = new Ext.FormPanel({
labelWidth: 75,
border:false,
method: 'post',
width: 600,
url: './php/send.php',
items: {
xtype:'tabpanel',
activeTab: 0,
defaults:{autoHeight:true, bodyStyle:'padding:15px'},
items:[{
layout:'form',
defaults: {width: 475},
defaultType: 'textfield',
items: [{
.
.
.
},{
fieldLabel: 'Recipient',
name: 'recipient',
layout:'column',
height:20,
allowBlank:false,
id:'recipient',
}]
}]
.
.
.
buttons: [{
text: 'Add to Recipient',
handler: function (){
.
.
.
);
}
})
}
}]