|
|
@ -270,9 +270,17 @@ function getData(respone) { |
|
|
|
+'<div style="font-size:20px;margin-top:20px">สถานที่</div>' |
|
|
|
+'<div style="font-size:20px;margin-top:20px">สถานที่</div>' |
|
|
|
+'<div style="font-size:16px;margin-top:5px;margin-left:5px"><input type="text" id="lc'+i+'" name="lc'+i+'" placeholder="สถานที่" value="'+dataInstrument[i].location+'"></div>' |
|
|
|
+'<div style="font-size:16px;margin-top:5px;margin-left:5px"><input type="text" id="lc'+i+'" name="lc'+i+'" placeholder="สถานที่" value="'+dataInstrument[i].location+'"></div>' |
|
|
|
+'</div>' |
|
|
|
+'</div>' |
|
|
|
|
|
|
|
+'<div>' |
|
|
|
|
|
|
|
+'<div style="font-size:20px;margin-top:20px">ยี่ห้อ</div>' |
|
|
|
|
|
|
|
+'<div style="font-size:16px;margin-top:5px;margin-left:5px"><input type="text" id="make'+i+'" name="make'+i+'" placeholder="ยี่ห้อ" value="'+dataInstrument[i].make+'"></div>' |
|
|
|
|
|
|
|
+'</div>' |
|
|
|
|
|
|
|
+'<div>' |
|
|
|
|
|
|
|
+'<div style="font-size:20px;margin-top:20px">รุ่น</div>' |
|
|
|
|
|
|
|
+'<div style="font-size:16px;margin-top:5px;margin-left:5px"><input type="text" id="model'+i+'" name="model'+i+'" placeholder="รุ่น" value="'+dataInstrument[i].model+'"></div>' |
|
|
|
|
|
|
|
+'</div>' |
|
|
|
+'<div>' |
|
|
|
+'<div>' |
|
|
|
+'<div style="font-size:20px;margin-top:20px">วีดีโอ(youtube)</div>' |
|
|
|
+'<div style="font-size:20px;margin-top:20px">วีดีโอ(youtube)</div>' |
|
|
|
+'<div style="font-size:16px;margin-top:5px;margin-left:5px"><input type="text" id="yl'+i+'" name="yl'+i+'" placeholder="https://www.youtube.com/watch?v=xxxxx" value="'+dataInstrument[i].model+'"></div>' |
|
|
|
+'<div style="font-size:16px;margin-top:5px;margin-left:5px"><input type="text" id="yl'+i+'" name="yl'+i+'" placeholder="https://www.youtube.com/watch?v=xxxxx" value="'+dataInstrument[i].video+'"></div>' |
|
|
|
+'</div>' |
|
|
|
+'</div>' |
|
|
|
+'<div class="flexCenterSpace" style="margin-top:20px">' |
|
|
|
+'<div class="flexCenterSpace" style="margin-top:20px">' |
|
|
|
+'<input type="button" onclick="updateData('+i+')" class="buttonUpdate" value="Update">' |
|
|
|
+'<input type="button" onclick="updateData('+i+')" class="buttonUpdate" value="Update">' |
|
|
@ -467,7 +475,13 @@ function addData(){ |
|
|
|
data.location = document.getElementById("LcI").value |
|
|
|
data.location = document.getElementById("LcI").value |
|
|
|
} |
|
|
|
} |
|
|
|
if(document.getElementById("YlI").value != ''){ |
|
|
|
if(document.getElementById("YlI").value != ''){ |
|
|
|
data.model = document.getElementById("YlI").value |
|
|
|
data.video = document.getElementById("YlI").value |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(document.getElementById("makeI").value != ''){ |
|
|
|
|
|
|
|
data.make = document.getElementById("makeI").value |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(document.getElementById("modelI").value != ''){ |
|
|
|
|
|
|
|
data.model = document.getElementById("modelI").value |
|
|
|
} |
|
|
|
} |
|
|
|
if(dataUri.length != 0){ |
|
|
|
if(dataUri.length != 0){ |
|
|
|
data.clips = dataUri |
|
|
|
data.clips = dataUri |
|
|
@ -504,7 +518,9 @@ function updateData(idData){ |
|
|
|
'caretaker':document.getElementById("cr"+idData).value, |
|
|
|
'caretaker':document.getElementById("cr"+idData).value, |
|
|
|
'location':document.getElementById("lc"+idData).value, |
|
|
|
'location':document.getElementById("lc"+idData).value, |
|
|
|
'instrument_id':document.getElementById("id"+idData).value, |
|
|
|
'instrument_id':document.getElementById("id"+idData).value, |
|
|
|
'model':document.getElementById("yl"+idData).value, |
|
|
|
'make':document.getElementById("make"+idData).value, |
|
|
|
|
|
|
|
'model':document.getElementById("model"+idData).value, |
|
|
|
|
|
|
|
'video':document.getElementById("yl"+idData).value, |
|
|
|
} |
|
|
|
} |
|
|
|
if(dataUri.length != 0){ |
|
|
|
if(dataUri.length != 0){ |
|
|
|
dataUpdate.clips = dataUri |
|
|
|
dataUpdate.clips = dataUri |
|
|
|