1
0
Fork 0
Browse Source

Add make & model fields

master
sipp11 8 years ago
parent
commit
eaad168c97
  1. 8
      instrument.html
  2. 22
      js/stdb.js

8
instrument.html

@ -133,6 +133,14 @@
<div style="font-size:20px;margin-top:10px">สถานท</div>
<div style="font-size:16px;margin-top:5px;margin-left:5px"><input type="text" id="LcI" name="LcI" value="" placeholder="สถานท"></div>
</div>
<div>
<div style="font-size:20px;margin-top:10px"></div>
<div style="font-size:16px;margin-top:5px;margin-left:5px"><input type="text" id="makeI" name="makeI" value="" placeholder="ยอ"></div>
</div>
<div>
<div style="font-size:20px;margin-top:10px"></div>
<div style="font-size:16px;margin-top:5px;margin-left:5px"><input type="text" id="modelI" name="modelI" value="" placeholder="รน"></div>
</div>
<div>
<div style="font-size:20px;margin-top:10px">โอ(youtube)</div>
<div style="font-size:16px;margin-top:5px;margin-left:5px"><input type="text" id="YlI" name="YlI" value="" placeholder="https://www.youtube.com/watch?v=xxxxx"></div>

22
js/stdb.js

@ -270,9 +270,17 @@ function getData(respone) {
+'<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>'
+'<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 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 class="flexCenterSpace" style="margin-top:20px">'
+'<input type="button" onclick="updateData('+i+')" class="buttonUpdate" value="Update">'
@ -467,7 +475,13 @@ function addData(){
data.location = document.getElementById("LcI").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){
data.clips = dataUri
@ -504,7 +518,9 @@ function updateData(idData){
'caretaker':document.getElementById("cr"+idData).value,
'location':document.getElementById("lc"+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){
dataUpdate.clips = dataUri

Loading…
Cancel
Save