Revisión 364
Añadido por Manu Mora Gordillo hace casi 13 años
controlies/trunk/applications/controlies/views/laptops/index.html | ||
---|---|---|
|
||
function print_grid(){
|
||
jQuery("#list").jqGrid({
|
||
url:"/controlies/laptops/call/json/list",
|
||
//url:"/controlies/laptops/call/json/list",
|
||
url:"{{=URL(c='laptops',f='call',args=['json','list'])}}",
|
||
data: "{}",
|
||
datatype: 'json',
|
||
mtype: 'GET',
|
||
... | ... | |
}
|
||
|
||
function getAllLaptopTypes(){
|
||
$.post("/controlies/laptops/call/json/getAllLaptopTypes", function(result) {
|
||
$.post("call/json/getAllLaptopTypes", function(result) {
|
||
$.each( result.response, function(i, l){
|
||
jQuery("#form_data #id_trademark").append("<option value='"+l.id_trademark+"'>"+l.trademark+"</option>");
|
||
});
|
controlies/trunk/applications/controlies/views/laptops/history.html | ||
---|---|---|
|
||
function print_grid_historical(){
|
||
jQuery("#table_history #list_history").jqGrid({
|
||
url:"/controlies/laptops/call/json/listHistory",
|
||
url:"{{=URL(c='laptops',f='call',args=['json','listHistory'])}}",
|
||
data: "{}",
|
||
datatype: 'json',
|
||
mtype: 'GET',
|
||
... | ... | |
}
|
||
|
||
function getAllStates(){
|
||
$.post("/controlies/laptops/call/json/getAllStates", function(result) {
|
||
$.post("call/json/getAllStates", function(result) {
|
||
$.each( result.response, function(i, l){
|
||
jQuery("#form_data_history #id_state").append("<option value='"+l.id_state+"'>"+l.state+"</option>");
|
||
});
|
||
... | ... | |
}
|
||
|
||
function getAllUserTypes(){
|
||
$.post("/controlies/laptops/call/json/getAllUserTypes", function(result) {
|
||
$.post("call/json/getAllUserTypes", function(result) {
|
||
$.each( result.response, function(i, l){
|
||
jQuery("#form_data_history #id_user_type").append("<option value='"+l.id_user_type+"'>"+l.user_type+"</option>");
|
||
});
|
controlies/trunk/applications/controlies/views/laptops_trademarks/index.html | ||
---|---|---|
|
||
function print_grid(){
|
||
jQuery("#list").jqGrid({
|
||
url:"/controlies/laptops_trademarks/call/json/list",
|
||
//url:"/controlies/laptops_trademarks/call/json/list",
|
||
url:"{{=URL(c='laptops_trademarks',f='call',args=['json','list'])}}",
|
||
data: "{}",
|
||
datatype: 'json',
|
||
mtype: 'GET',
|
controlies/trunk/applications/controlies/controllers/laptops.py | ||
---|---|---|
|
||
@service.json
|
||
@auth.requires_login()
|
||
def list():
|
||
def list():
|
||
my = SQLiteConnection()
|
||
l = Laptops(my,"","","")
|
||
response = l.list(request.vars)
|
controlies/trunk/applications/controlies/controllers/usuarios.py | ||
---|---|---|
def list():
|
||
l=conecta()
|
||
u = Users(l,"","","","","","","","","")
|
||
import pdb
|
||
pdb.set_trace()
|
||
response = u.list(request.vars)
|
||
l.close()
|
||
return response
|
controlies/trunk/applications/controlies/modules/SQLiteConnection.py | ||
---|---|---|
|
||
try:
|
||
self.db.users_types.insert(id_user_type='1',user_type='Profesor')
|
||
except:
|
||
pass
|
||
|
||
try:
|
||
self.db.users_types.insert(id_user_type='2',user_type='Alumno')
|
||
except:
|
||
pass
|
||
|
||
|
||
self.db.define_table('laptops_historical',
|
||
Field('id_historical','integer'),
|
||
Field('id_laptop','integer'),
|
||
... | ... | |
primarykey=['id_state'])
|
||
try:
|
||
self.db.states.insert(id_state='1',state='Sin asignar')
|
||
except:
|
||
pass
|
||
|
||
try:
|
||
self.db.states.insert(id_state='2',state='Asignado')
|
||
except:
|
||
pass
|
||
|
||
try:
|
||
self.db.states.insert(id_state='3',state='En reparación')
|
||
except:
|
||
pass
|
||
|
||
|
||
def getDB(self):
|
||
return self.db
|
Exportar a: Unified diff