Created
July 8, 2013 21:04
-
-
Save marti1125/5952483 to your computer and use it in GitHub Desktop.
backgrid and groove in play framework
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ObjectModelCentroPeriodoDto = Backbone.Model.extend({}); | |
var ObjectsCentroPeriodoDto = Backbone.Collection.extend({ | |
model: ObjectModelCentroPeriodoDto, | |
url: "clases/listSesionesPorClase?idClase=${clase.id}" | |
}); | |
collectionCentroPeriodoDto = new ObjectsCentroPeriodoDto(); | |
var columnsCentroPeriodoDto = [ | |
{ | |
name: "fechaSesion", | |
label: "Fecha De Sesion", | |
cell: shortDate, | |
editable: false | |
}, | |
{ | |
name: "docenteAsignado", | |
label: "Docente", | |
cell: "string", | |
editable: false | |
}, | |
{ | |
name: "horaInicio", | |
label: "Hora De Inicio", | |
cell: time, | |
editable: false | |
}, | |
{ | |
name: "horaFin", | |
label: "Hora De Fin", | |
cell: "time", | |
editable: false | |
}, | |
{ | |
name: "aula", | |
label: "Aula", | |
cell: "string", | |
editable: false | |
} | |
]; | |
var gridCentroPeriodoDto = new Backgrid.Grid({ | |
columns: columnsCentroPeriodoDto, | |
collection: collectionCentroPeriodoDto | |
}); | |
$("#list${cadenaAleatoria}").append(gridCentroPeriodoDto.render().$el); | |
collectionCentroPeriodoDto.fetch({ | |
reset: true | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment