Visualizacion del Calendario
git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C182
This commit is contained in:
parent
35a7aaf8f2
commit
666ed40a00
1 changed files with 57 additions and 1 deletions
|
|
@ -35,6 +35,8 @@ jQuery(document).ready(function () {
|
||||||
|
|
||||||
$("#tabs").tabs();
|
$("#tabs").tabs();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
IDPropuesta = ObtenerParametros().propuesta;
|
IDPropuesta = ObtenerParametros().propuesta;
|
||||||
IDTipoProyecto = ObtenerParametros().tipo;
|
IDTipoProyecto = ObtenerParametros().tipo;
|
||||||
|
|
||||||
|
|
@ -61,10 +63,19 @@ jQuery(document).ready(function () {
|
||||||
IdPropuestaNormativa = ROT47(IDPropuesta.toString());
|
IdPropuestaNormativa = ROT47(IDPropuesta.toString());
|
||||||
getDataModel();
|
getDataModel();
|
||||||
ObtenerPropuesta();
|
ObtenerPropuesta();
|
||||||
|
|
||||||
|
if ($("#txtPromotorProyecto").val() == UsuarioSistema) {
|
||||||
|
$("#txtFechaFinalizacion").noReadOnly();
|
||||||
|
$('#btnModificar').enable();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this.getDataModel = function () {
|
this.getDataModel = function () {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$("#btnBuscarUsuario").unbind("click");
|
$("#btnBuscarUsuario").unbind("click");
|
||||||
$("#btnBuscarUsuario").click(function () {
|
$("#btnBuscarUsuario").click(function () {
|
||||||
BuscarUsuario();
|
BuscarUsuario();
|
||||||
|
|
@ -127,6 +138,8 @@ this.getDataModel = function () {
|
||||||
GuardarEvento();
|
GuardarEvento();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#txtFechaFinalizacion").datepicker();
|
||||||
|
|
||||||
$("#txtNombreProyecto").readOnly();
|
$("#txtNombreProyecto").readOnly();
|
||||||
$("#txtPromotorProyecto").readOnly();
|
$("#txtPromotorProyecto").readOnly();
|
||||||
$("#txtEmisor").readOnly();
|
$("#txtEmisor").readOnly();
|
||||||
|
|
@ -135,6 +148,7 @@ this.getDataModel = function () {
|
||||||
$("#txtFechaFinalizacion").readOnly();
|
$("#txtFechaFinalizacion").readOnly();
|
||||||
$("#txtFechaMaxima").readOnly();
|
$("#txtFechaMaxima").readOnly();
|
||||||
$("#txtEstado").readOnly();
|
$("#txtEstado").readOnly();
|
||||||
|
$('#btnModificar').disable();
|
||||||
|
|
||||||
CargarUsuarios();
|
CargarUsuarios();
|
||||||
}
|
}
|
||||||
|
|
@ -1332,6 +1346,8 @@ this.EventoGuardado = function (data) {
|
||||||
this.ModalEvento = function (inicio,fin) {
|
this.ModalEvento = function (inicio,fin) {
|
||||||
$('#modalEvento').modal('show');
|
$('#modalEvento').modal('show');
|
||||||
|
|
||||||
|
LimpiarModalevento();
|
||||||
|
|
||||||
var fecha = DateFormatNoTime(inicio);
|
var fecha = DateFormatNoTime(inicio);
|
||||||
if (fecha != "Invalid date")
|
if (fecha != "Invalid date")
|
||||||
$("#txtInicioEvento").val(fecha);
|
$("#txtInicioEvento").val(fecha);
|
||||||
|
|
@ -1343,13 +1359,53 @@ this.ModalEvento = function (inicio,fin) {
|
||||||
$("#txtInicioEvento").readOnly();
|
$("#txtInicioEvento").readOnly();
|
||||||
$("#txtFinEvento").readOnly();
|
$("#txtFinEvento").readOnly();
|
||||||
$("#txtUbicacion").val($("#txtNombreProyecto").val());
|
$("#txtUbicacion").val($("#txtNombreProyecto").val());
|
||||||
|
$("#btnVerAdjuntosEvento").enable();
|
||||||
|
$("#btnGuardarEvento").enable();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
this.ModalEventoPopUp = function (evento) {
|
||||||
|
|
||||||
|
var miEvento = $.grep(model.ProyectoNormativo.Calendario, function (data) {
|
||||||
|
return data.IdCalendario == evento.id;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$('#modalEvento').modal('show');
|
||||||
|
|
||||||
|
LimpiarModalevento();
|
||||||
|
|
||||||
|
$("#txtTituloEvento").val(miEvento[0].Titulo);
|
||||||
|
$("#txtDescripcionEvento").val(miEvento[0].Descripcion);
|
||||||
|
$("#txtUbicacion").val($("#txtNombreProyecto").val());
|
||||||
|
|
||||||
|
$("#btnVerAdjuntosEvento").disable();
|
||||||
|
$("#btnGuardarEvento").disable();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
this.LimpiarModalevento = function () {
|
||||||
|
$("#txtTituloEvento").val("");
|
||||||
|
$("#txtDescripcionEvento").val("");
|
||||||
|
$("#txtUbicacion").val($("#txtNombreProyecto").val());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
this.Calendario = function (data) {
|
this.Calendario = function (data) {
|
||||||
|
|
||||||
$('#modalCalendario').modal('show');
|
$('#modalCalendario').modal('show');
|
||||||
$('#calendar').fullCalendar({
|
$('#calendar').fullCalendar({
|
||||||
|
|
||||||
|
eventClick: function (event) {
|
||||||
|
ModalEventoPopUp(event);
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
selectable: true,
|
selectable: true,
|
||||||
eventLimit: true,
|
eventLimit: true,
|
||||||
events:data,
|
events:data,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue