Last active
December 30, 2015 21:09
-
-
Save marti1125/7885287 to your computer and use it in GitHub Desktop.
cell
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
{ | |
name: "rechazo", | |
label: "Rechazos", | |
editable: false, | |
cell: Backgrid.Cell.extend({ | |
render: function () { | |
if(this.model.attributes['rechazos'] > 0) { | |
this.$el.html('<a class="botonrechazo-centro-periodo" data-id="' + this.model.attributes['id'] + '" role=button href="#modalAccionesCPRechazos" data-toggle="modal"><button class="btn">Historial de Rechazos ('+ this.model.attributes['rechazos'] +')</button></a>'); | |
} else { | |
this.$el.html('<button class="btn" disabled>Historial de Rechazos ('+this.model.attributes['rechazos']+')</button>'); | |
} | |
return this; | |
} | |
}) | |
}, | |
//another | |
var collectionnn = collectionCentroPeriodoDto.models; | |
_.each(collectionnn, function (model) { | |
model.set({rechazo: 1}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
change:rechazo will be automatically listened to when you construct the cell