Skip to content

Instantly share code, notes, and snippets.

@marti1125
Created July 8, 2013 21:04
Show Gist options
  • Save marti1125/5952483 to your computer and use it in GitHub Desktop.
Save marti1125/5952483 to your computer and use it in GitHub Desktop.
backgrid and groove in play framework
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