0
PopupFirstNameButton.addEventListener('click', FirstNameFunction);
function FirstNameFunction(){
infoWin.close();
dispalyFirstName = 'false';
var row = Ti.UI.createTableViewRow({
className:'sectionrow',
height:50
});
row.add(FirstNameTextField);
tableview.height = row.height + tableview.height;
SearchForPatientsButton.top = tableview.height + 80;
tableview.insertRowBefore(0,row);
FirstNameTextField.addEventListener('click', function() {
//DetailedPatientSearchWindow.close();
var FirstNameWindow = Titanium.UI.createWindow({
backgroundColor: '#1F561E',
url:'FirstNameWindow.js'
}).open();
});
}
var PopupLastNameButton = Titanium.UI.createButton({
backgroundColor:'#FFFFFF',
bottom:160,
left:25,
width:270,
height:40,
title:'Last Name',
color:'#000',
borderRadius:5,
font:{fontSize:16, fontWeight:'bold'}
});
PopupLastNameButton.addEventListener('click', LastNameFunction);
function LastNameFunction(obj){
infoWin.close();
var row = Ti.UI.createTableViewRow({
className:'sectionrow',
height:50
});
row.add(LastNameTextField);
tableview.height = row.height + tableview.height;
SearchForPatientsButton.top = tableview.height + 80;
tableview.insertRowBefore(1,row);
LastNameTextField.addEventListener('click', function() {
//DetailedPatientSearchWindow.close();
var FirstNameWindow = Titanium.UI.createWindow({
backgroundColor: '#1F561E',
url:'LastNameWindow.js'
}).open();
});
}
var PopupGenderButton = Titanium.UI.createButton({
backgroundColor:'#FFFFFF',
bottom:110,
left:25,
width:270,
height:40,
title:'Gender',
color:'#000',
borderRadius:5,
font:{fontSize:16, fontWeight:'bold'}
});
PopupGenderButton.addEventListener('click', function() {
infoWin.close();
var row = Ti.UI.createTableViewRow({
className:'sectionrow',
height:50
});
row.add(GenderTextField);
tableview.height = row.height + tableview.height;
SearchForPatientsButton.top = tableview.height + 80;
tableview.insertRowBefore(2,row);
GenderTextField.addEventListener('click', function() {
var GenderWindow = Titanium.UI.createWindow({
url:'GenderWindow.js',
backgroundColor:'#1F561E'
}).open();
});
});
var PopupDateOfBirthButton = Titanium.UI.createButton({
backgroundColor:'#FFFFFF',
bottom:60,
left:25,
width:270,
height:40,
title:'Date of Birth',
color:'#000',
borderRadius:5,
font:{fontSize:16, fontWeight:'bold'}
});
PopupDateOfBirthButton.addEventListener('click', function() {
infoWin.close();
var row = Ti.UI.createTableViewRow({
className:'sectionrow',
height:50
});
row.add(DateOfBirthTextField);
tableview.height = row.height + tableview.height;
SearchForPatientsButton.top = tableview.height + 80;
tableview.insertRowBefore(3,row);
DateOfBirthTextField.addEventListener('click', function() {
var DateOfBirthWindow = Titanium.UI.createWindow({
url:'DateOfBirthWindow.js',
backgroundColor:'#1F561E'
}).open();
});
});
당신이 tableview.insertRowBefore(3,row);
을보고 비슷한 수 있습니다 ... 난 ...이 얼마나 루프 전체 일을하고 값을 얻을 모르겠습니다 같은 insertRowBefore (인덱스 값 dyanmic을 설정하는 방법 네티타늄으로 TableView를 새로 고칠 수 있습니까?
0, 1, 2 등으로 하드 코딩하지 않고) – theJava
루프와 인덱스 값을 증가 – bh88
방금 전 전체 코드를 업데이트했습니다. 알아낼 수 없습니다 ... 다시 감사합니다. – theJava