--Se agregaron el módulo 603 RepContratosCalendario a ClsPaginas. Se agrega el case a ProcessRequest "contratos_transportes" y la función GetContratos para mostrarlos en calendario(faltan ajustes específicos). Se agrega el apartado de chofer al modal al agregar contratos(falta ver a dónde se asignará esa variable, si se crea otra o se asignada a alguna de las variables ya existentes). Se crea y alimenta RepContratosCalendarios para mostrar el calendario de contratos.
This commit is contained in:
170
Transportes/RepContratosCalendario.aspx
Normal file
170
Transportes/RepContratosCalendario.aspx
Normal file
@@ -0,0 +1,170 @@
|
||||
<%@ Page Title="Transportes V&A - Calendario" Language="VB" MasterPageFile="~/Site.master"
|
||||
AutoEventWireup="false" CodeFile="RepContratosCalendario.aspx.vb" Inherits="RepContratosCalendario" %>
|
||||
|
||||
<%@ Register Assembly="TimePicker" Namespace="MKB.TimePicker" TagPrefix="cc1" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style type="text/css">
|
||||
</style>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
Calendario de contratos
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<div class="portlet light calendar ">
|
||||
<div class="portlet-title ">
|
||||
<div class="caption">
|
||||
<i class="icon-calendar font-green-sharp"></i>
|
||||
<span class="caption-subject font-green-sharp bold uppercase">Contratos</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body">
|
||||
<div id="calendar">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
var PrimeraCargaCalendario = true;
|
||||
var currentUpdateEvent;
|
||||
var addStartDate;
|
||||
var addEndDate;
|
||||
var globalAllDay;
|
||||
var view = null;
|
||||
var date = null;
|
||||
|
||||
function InitCalendar() {
|
||||
$(document).ready(function () {
|
||||
Calendario();
|
||||
});
|
||||
}
|
||||
|
||||
function selectDate(start, end, allDay) {
|
||||
}
|
||||
|
||||
function updateEvent(event, element) {
|
||||
}
|
||||
|
||||
function RadionButtonSelectedValueSet(name, SelectdValue) {
|
||||
$('input[name="' + name + '"][value="' + SelectdValue + '"]').prop('checked', true);
|
||||
}
|
||||
|
||||
function updateEventOnDropResize(event, allDay) {
|
||||
|
||||
//alert("allday: " + allDay);
|
||||
var eventToUpdate = {
|
||||
id: event.id,
|
||||
start: event.start
|
||||
};
|
||||
|
||||
if (event.end === null) {
|
||||
eventToUpdate.end = eventToUpdate.start;
|
||||
}
|
||||
else {
|
||||
eventToUpdate.end = event.end;
|
||||
}
|
||||
|
||||
// FullCalendar 2.x
|
||||
var endDate;
|
||||
if (!event.allDay) {
|
||||
endDate = new Date(eventToUpdate.end + 60 * 60000);
|
||||
endDate = endDate.toJSON();
|
||||
}
|
||||
else {
|
||||
endDate = eventToUpdate.end.toJSON();
|
||||
}
|
||||
|
||||
eventToUpdate.start = eventToUpdate.start.toJSON();
|
||||
eventToUpdate.end = eventToUpdate.end.toJSON(); //endDate;
|
||||
eventToUpdate.allDay = event.allDay;
|
||||
|
||||
PageMethods.ActualizaEvento(eventToUpdate, UpdateTimeSuccess);
|
||||
}
|
||||
|
||||
function eventDropped(event, dayDelta, minuteDelta, allDay, revertFunc) {
|
||||
if ($(this).data("qtip")) $(this).qtip("destroy");
|
||||
updateEventOnDropResize(event);
|
||||
}
|
||||
|
||||
function eventResized(event, dayDelta, minuteDelta, revertFunc) {
|
||||
if ($(this).data("qtip")) $(this).qtip("destroy");
|
||||
|
||||
updateEventOnDropResize(event);
|
||||
}
|
||||
|
||||
function Calendario() {
|
||||
var date = new Date();
|
||||
var d = date.getDate();
|
||||
var m = date.getMonth();
|
||||
var y = date.getFullYear();
|
||||
var h = {};
|
||||
|
||||
if ($('#calendar').width() <= 400) {
|
||||
$('#calendar').addClass("mobile");
|
||||
h = {
|
||||
left: 'title, prev, next',
|
||||
center: '',
|
||||
right: 'today,month,agendaWeek,agendaDay'
|
||||
};
|
||||
} else {
|
||||
$('#calendar').removeClass("mobile");
|
||||
|
||||
h = {
|
||||
left: 'title',
|
||||
center: '',
|
||||
right: 'prev,next,today,month,agendaWeek,agendaDay'
|
||||
};
|
||||
}
|
||||
|
||||
$('#calendar').fullCalendar('destroy'); // destroy the calendar
|
||||
$('#calendar').fullCalendar({ //re-initialize the calendar
|
||||
header: h,
|
||||
monthNames: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"],
|
||||
monthNamesShort: ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'],
|
||||
dayNames: ['Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado'],
|
||||
dayNamesShort: ['Dom', 'Lun', 'Mar', 'Mié', 'Jue', 'Vie', 'Sáb'],
|
||||
buttonText: {
|
||||
today: 'Hoy',
|
||||
week: 'Semana',
|
||||
month: 'Mes',
|
||||
day: 'Día'
|
||||
},
|
||||
eventClick: updateEvent,
|
||||
selectable: true,
|
||||
selectHelper: true,
|
||||
select: selectDate,
|
||||
editable: true,
|
||||
minTime: "08:00:00",
|
||||
maxTime: "19:00:00",
|
||||
events: {
|
||||
url: '/Ashx/CargaEventos.ashx',
|
||||
type: 'GET',
|
||||
data: {
|
||||
U: ' <%= UsuarioActual.CveUsuario %>',
|
||||
E: '<%= UsuarioActual.CveEmpresa %>',
|
||||
METODO: 'contrato_transportes',
|
||||
CveUsuarioPara: $('#DdlTecnico').val(),
|
||||
CveSubProyecto: $('#DdlSubProyecto').val()
|
||||
}
|
||||
},
|
||||
eventDrop: eventDropped,
|
||||
eventResize: eventResized
|
||||
});
|
||||
clickSemana();
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
Reference in New Issue
Block a user