Revisión 355
Añadido por Manu Mora Gordillo hace casi 13 años
controlies/trunk/applications/controlies/views/laptops/index.html | ||
---|---|---|
|
||
jQuery("#form_history #id_laptop").val(result.response['id_laptop']);
|
||
jQuery("#form_history #serial_number").html(result.response['serial_number']);
|
||
jQuery("#form_history #id_trademark").html(result.response['id_trademark']);
|
||
jQuery("#form_history #id_trademark").html(result.response['trademark']);
|
||
|
||
x = (jQuery(window).width()-850)/2;
|
||
y = (jQuery(window).height()-500)/2;
|
controlies/trunk/applications/controlies/views/laptops/history.html | ||
---|---|---|
caption: "Insertar",
|
||
buttonicon :'ui-icon-plus',
|
||
onClickButton : function (){
|
||
addRecord();
|
||
addRecordHistory();
|
||
}
|
||
});
|
||
jQuery("#list_history").jqGrid('navButtonAdd','#pager_history',{
|
||
caption: "Borrar",
|
||
buttonicon :'ui-icon-trash',
|
||
onClickButton : function (){
|
||
deleteRecord();
|
||
deleteRecordHistory();
|
||
}
|
||
});
|
||
}
|
||
|
||
function addRecord(){
|
||
function addRecordHistory(){
|
||
|
||
jQuery("#messageLoading").show();
|
||
|
controlies/trunk/applications/controlies/modules/Laptops.py | ||
---|---|---|
|
||
def getLaptopData(self):
|
||
|
||
sql="SELECT * FROM laptops p WHERE id_laptop='"+str(self.id_laptop)+"'"
|
||
sql="SELECT l.id_laptop, l.serial_number, l.id_trademark, lt.trademark, lt.model "
|
||
sql=sql+"FROM laptops l, laptops_trademarks lt WHERE l.id_trademark=lt.id_trademark AND l.id_laptop='"+str(self.id_laptop)+"'"
|
||
|
||
db = self.SQLite.getDB()
|
||
result = db.executesql(sql)
|
||
... | ... | |
dataLaptop = {
|
||
"id_laptop":str(result[0][0]),
|
||
"serial_number":result[0][1],
|
||
"id_trademark":str(result[0][2])
|
||
"id_trademark":str(result[0][2]),
|
||
"trademark":str(result[0][3]+"/"+result[0][4])
|
||
}
|
||
return dataLaptop
|
||
|
Exportar a: Unified diff
Algunos bugs