644 lines
41 KiB
Plaintext
644 lines
41 KiB
Plaintext
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Proyecto.aspx.cs" Inherits="OI_Proyecto" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
|
<style>
|
|
.btn.newsubpro {
|
|
margin-left: 3px;
|
|
padding: 2px 4px;
|
|
}
|
|
</style>
|
|
<style>
|
|
.gantt-samples-banner_controls_bar.controls_bar {
|
|
margin: 0;
|
|
//position: absolute;
|
|
top: -30px;
|
|
width: 100%;
|
|
right: 0;
|
|
left: 0;
|
|
}
|
|
|
|
.controls_bar {
|
|
border-top: 1px solid #bababa;
|
|
border-bottom: 1px solid #bababa;
|
|
clear: both;
|
|
height: 28px;
|
|
background: #f1f1f1;
|
|
color: #494949;
|
|
font-family: Arial, sans-serif;
|
|
font-size: 13px;
|
|
padding-left: 10px;
|
|
line-height: 25px;
|
|
}
|
|
|
|
.gantt-samples-banner_controls_bar.controls_bar, .gantt_scale_line .gantt_scale_cell, .gantt_grid_scale .gantt_grid_head_cell, .gantt_grid_scale .gantt_grid_head_cell a, .gantt_grid_scale .gantt_grid_head_cell a:hover {
|
|
background-color: #95a5a6 !important;
|
|
color: #FFF !important;
|
|
}
|
|
</style>
|
|
<%--<link href="/Metronic/assets/global/plugins/GantJS/jsgantt.css" rel="stylesheet" type="text/css" />--%>
|
|
<link rel="stylesheet" href="/Metronic/assets/global/plugins/dhtmlxgantt/dhtmlxgantt.css" type="text/css">
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
|
Proyecto:<asp:Label ID="LblAsunto" runat="server" Text=""></asp:Label>
|
|
</asp:Content>
|
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
|
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<li>
|
|
<asp:LinkButton ID="LnkNewProyecto" OnClick="LnkNewProyecto_Click" runat="server"><i class="fa fa-plus"></i> Agregar Proyecto</asp:LinkButton>
|
|
</li>
|
|
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</asp:Content>
|
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
|
<%--<div style="position: relative" class="gantt" id="GanttChartDIV"></div>--%>
|
|
<asp:UpdatePanel ID="UpContenido" runat="server" UpdateMode="Conditional">
|
|
|
|
<ContentTemplate>
|
|
|
|
<div class="gantt-samples-banner_controls_bar controls_bar">
|
|
|
|
<strong>Formato: </strong>
|
|
<label>
|
|
<input name="scales" onclick="zoom_tasks(this)" type="radio" value="week">
|
|
<span>Horas</span></label>
|
|
<label>
|
|
<input name="scales" onclick="zoom_tasks(this)" type="radio" value="trplweek" checked="true">
|
|
<span>Día</span></label>
|
|
<label>
|
|
<input name="scales" onclick="zoom_tasks(this)" type="radio" value="year">
|
|
<span>Mes</span></label>
|
|
<label>
|
|
<input name="scales" onclick="zoom_tasks(this)" type="radio" value="yearyear">
|
|
<span>año</span></label>
|
|
|
|
<div id="filter_hours" style="display: none;">
|
|
|
|
<span> | </span>
|
|
<strong>Mostrar: </strong>
|
|
<label>
|
|
<input name="scales_filter" onclick="set_scale_units(this)" type="radio" value="full_day">
|
|
<span>Dia Completo</span>
|
|
</label>
|
|
<label>
|
|
<input name="scales_filter" onclick="set_scale_units(this)" type="radio" value="work_hours">
|
|
<span>Horario de Oficina</span>
|
|
</label>
|
|
</div>
|
|
<div id="filter_days" style="">
|
|
|
|
<span> | </span>
|
|
<strong>Mostrar: </strong>
|
|
<label>
|
|
<input name="scales_filter" onclick="set_scale_units(this)" type="radio" value="full_week">
|
|
<span>Semana completa</span>
|
|
</label>
|
|
<label>
|
|
<input name="scales_filter" onclick="set_scale_units(this)" type="radio" value="work_week">
|
|
<span>Dias de Trabajo</span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
<div id="gantt_here" style='width: 100%; height: 100vh;'></div>
|
|
|
|
<div id='<%= iddivAgregarProyecto %>' class="modal ADS fade" role="dialog">
|
|
<div class="modal-dialog">
|
|
<asp:UpdatePanel ID="UpModalProyecto" class="modal-content " tabindex="-1" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span> </button>
|
|
<h4 class="modal-title" style="text-align: left">
|
|
<asp:Literal ID="LtlTituloNewProyecto" runat="server">Proyecto</asp:Literal></h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
|
|
<asp:Panel runat="server" ID="portletTarea" class="portlet light smmallpadding bordered">
|
|
<div class="portlet-title">
|
|
<div class="caption font-green">
|
|
<i class="icon-pin font-green"></i>
|
|
<span class="caption-subject bold uppercase">Nuevo</span>
|
|
</div>
|
|
<div class="tools">
|
|
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
|
</div>
|
|
</div>
|
|
<div class="portlet-body rowpadding">
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:TextBox ID="TxtAsunto" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="RFVAsunto" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtAsunto" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Asunto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
|
|
<asp:Label runat="server" Text="Asunto:" AssociatedControlID="TxtAsunto"></asp:Label>
|
|
</div>
|
|
<div class="form-group form-md-line-input">
|
|
<asp:TextBox ID="TxtDescripcion" runat="server" CssClass="form-control" CausesValidation="true" TextMode="MultiLine" Rows="2"></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="RfvDescripcion" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtDescripcion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
|
|
<asp:Label runat="server" Text="Descripción" AssociatedControlID="TxtDescripcion"></asp:Label>
|
|
</div>
|
|
|
|
<%-- <div class="form-group form-md-line-input">
|
|
<asp:DropDownList ID="DdlPara" runat="server" CssClass="form-control select2me input-sm" DataValueField="CveUsuario" DataTextField="Nombre" Width="100%">
|
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
<asp:Label runat="server" AssociatedControlID="DdlPara">Para:</asp:Label>
|
|
<asp:RequiredFieldValidator ID="RFVDdlPara" runat="server" ControlToValidate="DdlPara" Display="None" ErrorMessage="El campo <b>''Para''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
|
|
<ajax:ValidatorCalloutExtender ID="VCERFVDdlPara" runat="server" TargetControlID="RFVDdlPara" HighlightCssClass="vco" Width="300px"></ajax:ValidatorCalloutExtender>
|
|
</div>--%>
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
|
|
<asp:GridView ID="GVUsuariosB" runat="server" AutoGenerateColumns="false" DataKeyNames="CveUsuario,Nombre,Correo,Empresa"
|
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD GVUsuarios" GridLines="None" data-height="200"
|
|
OnRowDataBound="GVUsuariosB_RowDataBound">
|
|
<Columns>
|
|
<asp:TemplateField>
|
|
<ItemStyle HorizontalAlign="Center" Width="50px" />
|
|
<HeaderTemplate>Para</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:CheckBox ID="ChkPara" Text=" " runat="server" />
|
|
<%--<asp:CheckBox ID="ChkPara" CssClass="icheck " data-checkbox="icheckbox_flat-red" runat="server" />--%>
|
|
<ajax:MutuallyExclusiveCheckBoxExtender ID="MECBE" runat="server" TargetControlID="ChkPara" Key="Para"></ajax:MutuallyExclusiveCheckBoxExtender>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField>
|
|
<ItemStyle HorizontalAlign="Center" Width="50px" />
|
|
<HeaderTemplate>
|
|
C. C. Para
|
|
<br />
|
|
<%--<a id="chkAll" onclick="chkAll_OncLick(1);" class="linkCorreo" data-toggle="tooltip" title="Seleccionar todos(Visibles)"><i class="fa fa-check-square-o"></i></a>
|
|
<a id="UnchkAll" onclick="chkAll_OncLick(0);" class="linkCorreo" data-toggle="tooltip" title="Quitar seleccion todos(Visibles)"><i class="fa fa-square-o"></i></a>--%>
|
|
</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:CheckBox ID="ChkCCP" CssClass="ChkOk" Checked="false" runat="server" />
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>Usuario</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:Literal ID="LtlNombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>Rol</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:Literal ID="LtlRol" runat="server" Text='<%# Eval("Rol") %>'></asp:Literal>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
</asp:GridView>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<div class="input-group form-group form-md-line-input date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
|
|
<asp:TextBox ID="txtFechaI" runat="server" autocomplete="false" CssClass="form-control ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="RFVtxtFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
|
|
<asp:Label AssociatedControlID="txtFechaI" runat="server" Text="Fecha Inicio"></asp:Label>
|
|
<%--<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999 99:99" MaskType="DateTime" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>--%>
|
|
<ajax:ValidatorCalloutExtender ID="VcoFechaI" runat="server" HighlightCssClass="vco" TargetControlID="RFVtxtFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<div class="input-group form-group form-md-line-input date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
|
|
<asp:TextBox ID="txtFechaF" runat="server" autocomplete="false" CssClass="form-control ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px " placeholder=""></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="RFVtxtFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
|
|
<asp:Label AssociatedControlID="txtFechaF" runat="server" Text="Fecha Fin"></asp:Label>
|
|
<%--<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999 99:99" MaskType="DateTime" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>--%>
|
|
<ajax:ValidatorCalloutExtender ID="VcoFechaF" runat="server" HighlightCssClass="vco" TargetControlID="RFVtxtFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<div class="form-group form-md-line-input">
|
|
<asp:DropDownList ID="DdlPrioridad" runat="server" CssClass="form-control select2me input-sm" Width="100%">
|
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
|
<asp:ListItem Text="Baja" Value="1" class="itembaja"></asp:ListItem>
|
|
<asp:ListItem Text="Media" Value="2" class="itemmedia"></asp:ListItem>
|
|
<asp:ListItem Text="Alta" Value="3" class="itemalta"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
<asp:RequiredFieldValidator ID="RFVPrioridad" runat="server" ControlToValidate="DdlPrioridad" Display="None" ErrorMessage="El campo <b>''Prioridad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
|
|
<asp:Label runat="server" AssociatedControlID="DdlPrioridad">Prioridad:</asp:Label>
|
|
<ajax:ValidatorCalloutExtender ID="VCOPrio" runat="server" TargetControlID="RFVPrioridad" HighlightCssClass="vco" Width="300px"></ajax:ValidatorCalloutExtender>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="form-group form-md-line-input">
|
|
<asp:DropDownList ID="DdlTema" runat="server" CssClass="form-control select2me input-sm" DataValueField="CveRevision" DataTextField="Revision" Width="100%">
|
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
<asp:Label runat="server" AssociatedControlID="DdlTema">Tema:</asp:Label>
|
|
<asp:RequiredFieldValidator ID="RFVDdlTema" runat="server" ControlToValidate="DdlTema" Display="None" ErrorMessage="El campo <b>''Tema''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
|
|
<ajax:ValidatorCalloutExtender ID="VCERFVDdlTema" runat="server" TargetControlID="RFVDdlTema" HighlightCssClass="vco" Width="300px"></ajax:ValidatorCalloutExtender>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<asp:LinkButton ID="LnkAddTtemaB" OnClick="LnkAddTtemaB_Click" runat="server" CssClass="btn btn-default" Style="margin-top: 15px;"><i class="fa fa-plus"></i></asp:LinkButton>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row" runat="server" id="DvIndicador" visible ="false">
|
|
<div class="col-sm-6">
|
|
<div class="form-group form-md-line-input">
|
|
<asp:DropDownList ID="DdlIndicador" runat="server" CssClass="form-control select2me input-sm" Width="100%">
|
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
|
<asp:ListItem Value="1" class="itembaja">Programación de bolsa aprobada en tiempo</asp:ListItem>
|
|
</asp:DropDownList>
|
|
<asp:Label runat="server" AssociatedControlID="DdlPrioridad">Indicador:</asp:Label>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<div class="form-group form-md-line-input">
|
|
|
|
<asp:DropDownList ID="DdlSubProyecto" runat="server" CssClass="form-control select2me input-sm" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="100%" AppendDataBoundItems="true">
|
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
<asp:Label runat="server" ID="LblSubProyecto" AssociatedControlID="DdlSubProyecto">:</asp:Label>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</asp:Panel>
|
|
<asp:TextBox ID="txtCveEvento" CssClass="hidden txtCveEvento" runat="server"></asp:TextBox>
|
|
<asp:Button ID="BtnopenmodalClickGant" OnClick="BtnopenmodalClickGant_Click" CssClass="hidden BtnopenmodalClickGant" UseSubmitBehavior="false" runat="server" Text="Button" />
|
|
</div>
|
|
<div class="modal-footer">
|
|
<asp:LinkButton ID="btnguardarProyecto" OnClick="btnguardarProyecto_Click" CssClass="btn btn-primary" runat="server">Guardar</asp:LinkButton>
|
|
<button data-dismiss="modal" class="btn btn-danger">Cancelar</button>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
|
|
|
|
<div id='<%= iddivAgregarTema %>' class="modal ADS fade" role="dialog">
|
|
<div class="modal-dialog">
|
|
<asp:UpdatePanel ID="UpModalTema" class="modal-content " tabindex="-1" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div class="modal-header">
|
|
<button type="button" class="close" onclick="closeModal()" aria-label="Close"><span aria-hidden="true">×</span> </button>
|
|
<h4 class="modal-title" style="text-align: left">
|
|
<asp:Literal ID="Literal2" runat="server">Agregar Tema</asp:Literal></h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="form-group form-md-line-input">
|
|
<asp:TextBox ID="TxtTema" runat="server" CssClass="form-control" CausesValidation="true" TextMode="MultiLine" Rows="1"></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="RfvTxtTema" runat="server" ControlToValidate="TxtTema" Display="None" ErrorMessage="El campo <b>''Tema''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="VGMAddTemaTN"></asp:RequiredFieldValidator>
|
|
<asp:Label runat="server" Text="Tema" AssociatedControlID="TxtTema"></asp:Label>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<asp:LinkButton ID="BtnAgregarTema" OnClick="BtnAgregarTema_Click" CssClass="btn btn-primary" ValidationGroup="VGMAddTemaTN" runat="server">Agregar</asp:LinkButton>
|
|
<button id="BtnCerrarModalTema" onclick="closeModal()" class="btn btn-default">Cerrar</button>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</asp:Content>
|
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
|
|
|
<script src="/Metronic/assets/global/plugins/dhtmlxgantt/dhtmlxgantt.js"></script>
|
|
|
|
<script>
|
|
let RCveEvento =<%= RCveEvento %>;
|
|
function NuevoEvento(CveEvento) {
|
|
$('.txtCveEvento').val(CveEvento);
|
|
$('.BtnopenmodalClickGant').click();
|
|
}
|
|
function zoom_tasks(node) {
|
|
switch (node.value) {
|
|
case "week":
|
|
gantt.config.scale_unit = "day";
|
|
gantt.config.date_scale = "%d %M";
|
|
|
|
gantt.config.scale_height = 60;
|
|
gantt.config.min_column_width = 30;
|
|
gantt.config.subscales = [
|
|
{ unit: "hour", step: 1, date: "%H" }
|
|
];
|
|
show_scale_options("hour");
|
|
break;
|
|
case "trplweek":
|
|
gantt.config.min_column_width = 70;
|
|
gantt.config.scale_unit = "day";
|
|
gantt.config.date_scale = "%d %M";
|
|
gantt.config.subscales = [];
|
|
gantt.config.scale_height = 35;
|
|
show_scale_options("day");
|
|
break;
|
|
case "month":
|
|
gantt.config.min_column_width = 70;
|
|
gantt.config.scale_unit = "week";
|
|
gantt.config.date_scale = "Week #%W";
|
|
gantt.config.subscales = [
|
|
{ unit: "day", step: 1, date: "%D" }
|
|
];
|
|
show_scale_options();
|
|
gantt.config.scale_height = 60;
|
|
break;
|
|
case "year":
|
|
gantt.config.min_column_width = 70;
|
|
gantt.config.scale_unit = "month";
|
|
gantt.config.date_scale = "%M";
|
|
gantt.config.scale_height = 60;
|
|
show_scale_options();
|
|
gantt.config.subscales = [
|
|
{ unit: "week", step: 1, date: "#%W" }
|
|
];
|
|
break;
|
|
case "yearyear":
|
|
gantt.config.min_column_width = 70;
|
|
gantt.config.scale_unit = "month";
|
|
gantt.config.date_scale = "%y %M";
|
|
gantt.config.scale_height = 60;
|
|
show_scale_options();
|
|
gantt.config.subscales = [
|
|
{ unit: "month", step: 1, date: "#%M" }
|
|
];
|
|
break;
|
|
}
|
|
set_scale_units();
|
|
gantt.render();
|
|
}
|
|
function show_scale_options(mode) {
|
|
var hourConf = document.getElementById("filter_hours"),
|
|
dayConf = document.getElementById("filter_days");
|
|
if (mode == 'day') {
|
|
hourConf.style.display = "none";
|
|
dayConf.style.display = "";
|
|
dayConf.getElementsByTagName("input")[0].checked = true;
|
|
} else if (mode == "hour") {
|
|
hourConf.style.display = "";
|
|
dayConf.style.display = "none";
|
|
hourConf.getElementsByTagName("input")[0].checked = true;
|
|
} else {
|
|
hourConf.style.display = "none";
|
|
dayConf.style.display = "none";
|
|
}
|
|
}
|
|
function set_scale_units(mode) {
|
|
if (mode && mode.getAttribute) {
|
|
mode = mode.getAttribute("value");
|
|
}
|
|
|
|
switch (mode) {
|
|
case "work_hours":
|
|
gantt.config.subscales = [
|
|
{ unit: "hour", step: 1, date: "%H" }
|
|
];
|
|
gantt.ignore_time = function (date) {
|
|
if (date.getHours() < 9 || date.getHours() > 16) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
};
|
|
|
|
break;
|
|
case "full_day":
|
|
gantt.config.subscales = [
|
|
{ unit: "hour", step: 3, date: "%H" }
|
|
];
|
|
gantt.ignore_time = null;
|
|
break;
|
|
case "work_week":
|
|
gantt.ignore_time = function (date) {
|
|
if (date.getDay() == 0 || date.getDay() == 6) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
};
|
|
|
|
break;
|
|
default:
|
|
gantt.ignore_time = null;
|
|
break;
|
|
}
|
|
gantt.render();
|
|
}
|
|
|
|
var datosGant = [];
|
|
function loadGant() {
|
|
gantt.config.date_format = "%Y-%m-%d %H:%i";
|
|
gantt.config.order_branch = true;
|
|
gantt.i18n.setLocale("es");
|
|
gantt.init("gantt_here");
|
|
gantt.config.columns = [
|
|
{ name: "text", label: "Proyecto ", width: "*", min_width: 350, tree: true, resize: true, template: function (obj) { return "<a href=\"/OI/TareaDetalle.aspx?CveEvento=" + obj.id + "\" target=\"_Blank\">" + obj.text + " </a>" } },
|
|
{ name: "start_date", label: "Inicio", min_width: 90, align: "center" },
|
|
{ name: "end_date", label: "Fin", min_width: 90, align: "center" },
|
|
{ name: "progress", label: "Avance", align: "center", template: function (obj) { return "" + (obj.progress * 100).toFixed(2) + " %" } },
|
|
{ name: "duration", label: "Duración", align: "center" },
|
|
{ name: "new", label: "<a onclick=\"NuevoEvento(" + RCveEvento + ");\" target=\"_Blank\"><i class='fa fa-plus'></i></a>", align: "center", template: function (obj) { return "<a onclick=\"NuevoEvento(" + obj.id + ");\" target=\"_Blank\"><i class='fa fa-plus'></i> </a>" } }
|
|
/*{name:"staff", label:"Holder(s)", template:function(obj){return obj.holder+"("+obj.progress+")"} },*/
|
|
//{ name: "add", label: "" }
|
|
];
|
|
gantt.parse({
|
|
data: datosGant
|
|
//data: [
|
|
// { id: 1, text: "Apertura de Sucursal", start_date: null, duration: null, parent: 0, progress: 0, open: true },
|
|
// { id: 2, text: "Direccion: evaluación de mercado", start_date: "2020/04/29 00:00", end_date: "2020/05/02 00:00",/*duration: 3,*/ parent: 1, progress: 0.25 },
|
|
// { id: 3, text: "RH: Personal requerido/ contrataciones", start_date: "2020/05/04 00:00", duration: 1, parent: 1, progress: 0 },
|
|
// { id: 4, text: "Logistica: inventario Inicial", start_date: "2020/04/26 00:00", duration: 10, parent: 1, progress: 0.50 },
|
|
// { id: 5, text: "Contabilidad: tramites y servicios", start_date: "2020/05/19 00:00", duration: 1, parent: 1, progress: 0 },
|
|
// { id: 6, text: "Propaganda,Mkt: Inaguración", start_date: "2020/05/05 00:00", duration: 6, parent: 1, progress: 0.1 },
|
|
// //{id: 7, text: "", start_date: "2020/05/ 00:00", duration:5, parent:1, progress: 1},
|
|
// //{id: 8, text: "", start_date: "2020/05/ 00:00", duration:5, parent:1, progress: 1},
|
|
|
|
// { id: 7, text: "Asamblea Anual", start_date: null, duration: null, parent: 0, progress: 0, open: true },
|
|
// { id: 8, text: "Contabilidad: Impuestos", start_date: "2020/05/05 00:00", duration: 13, parent: 7, progress: 0.6 },
|
|
// { id: 9, text: "Contabilida: utilidad o pérdida", start_date: "2020/05/06 00:00", duration: 9, parent: 7, progress: 0.5 },
|
|
// { id: 10, text: "Despacho: estategia Fiscal", start_date: "2020/05/14 00:00", duration: 11, parent: 7, progress: 0.33 },
|
|
// { id: 11, text: "Despacho: declaración anual", start_date: "2020/05/23 00:00", duration: 1, parent: 7, progress: 0 },
|
|
// { id: 12, text: "Despacho: informe", start_date: "2020/05/24 00:00", duration: 24, parent: 7, progress: 0 },
|
|
|
|
// { id: 13, text: "Tramites y servicios", start_date: "2020/05/ 00:00", duration: 5, parent: 7, progress: 0 },
|
|
// { id: 14, text: "Renovación licencia SCT", start_date: "2020/05/14 00:00", duration: 4, parent: 13, progress: 0 },
|
|
// { id: 15, text: "Permiso SSA año2020", start_date: "2020/05/18 00:00", duration: 14, parent: 13, progress: 0 },
|
|
// { id: 16, text: "Permiso SAT para Operar", start_date: "2020/05/03 00:00", duration: 6, parent: 13, progress: 0 }
|
|
//]
|
|
|
|
/*,
|
|
links:[
|
|
{id:1, source:2, target:3, type:"0"},
|
|
{id:2, source:3, target:4, type:"0"},
|
|
{id:3, source:5, target:6, type:"0"}
|
|
]*/
|
|
});
|
|
}
|
|
gantt.attachEvent("onBeforeTaskMove", function (id, parent, tindex) {
|
|
console.log(tindex)
|
|
var task = gantt.getTask(id);
|
|
if (task.parent != parent)
|
|
return false;
|
|
return true;
|
|
});
|
|
|
|
gantt.attachEvent("onRowDragEnd", function (id, target,tindex) {
|
|
console.log(tindex)
|
|
debugger;
|
|
drag_id = null;
|
|
gantt.render();
|
|
});
|
|
loadGant();
|
|
|
|
|
|
</script>
|
|
|
|
<%--<script>
|
|
|
|
var g = new JSGantt.GanttChart(document.getElementById('GanttChartDIV'), 'day');
|
|
|
|
g.setOptions({
|
|
vCaptionType: 'Complete', // Set to Show Caption : None,Caption,Resource,Duration,Complete,
|
|
vQuarterColWidth: 36,
|
|
vDateTaskDisplayFormat: 'day dd month yyyy', // Shown in tool tip box
|
|
vDayMajorDateDisplayFormat: 'mon yyyy - Week ww',// Set format to dates in the "Major" header of the "Day" view
|
|
vWeekMinorDateDisplayFormat: 'dd mon', // Set format to display dates in the "Minor" header of the "Week" view
|
|
vLang: 'en',
|
|
vShowTaskInfoLink: 1, // Show link in tool tip (0/1)
|
|
vShowEndWeekDate: 0, // Show/Hide the date for the last day of the week in header for daily
|
|
vAdditionalHeaders: { // Add data columns to your table
|
|
category: {
|
|
title: 'Category'
|
|
},
|
|
sector: {
|
|
title: 'Sector'
|
|
}
|
|
},
|
|
vUseSingleCell: 10000, // Set the threshold cell per table row (Helps performance for large data.
|
|
vFormatArr: ['Day', 'Week', 'Month', 'Hour'], // Even with setUseSingleCell using Hour format on such a large chart can cause issues in some browsers,
|
|
|
|
});
|
|
g.setLang('es');
|
|
// Load from a Json url
|
|
//JSGantt.parseJSON('./fixes/data.json', g);
|
|
|
|
// Or Adding Manually
|
|
//g.AddTaskItemObject({
|
|
// pID: 1,
|
|
// pName: "Define Chart <strong>API</strong><a class='btn btn-default newsubpro'><i class='fa fa-plus'></i></a>",
|
|
// pStart: "2017-02-25",
|
|
// pEnd: "2017-03-17",
|
|
// pPlanStart: "2017-04-01",
|
|
// pPlanEnd: "2017-04-15 12:00",
|
|
// pClass: "ggroupblack",
|
|
// pLink: "",
|
|
// pMile: 0,
|
|
// pRes: "Brian",
|
|
// pComp: 0,
|
|
// pGroup: 0,
|
|
// pParent: 0,
|
|
// pOpen: 1,
|
|
// pDepend: "",
|
|
// pCaption: "",
|
|
// pCost: 1000,
|
|
// pNotes: "Some Notes text",
|
|
// category: "My Category",
|
|
// sector: "Finance"
|
|
//});
|
|
|
|
g.AddTaskItemObject({pID: 1, pName: "Apertura de Sucursal", pStart: "2020/04/29",pEnd:"2020/05/20",pPlanStart: "2020/04/29 00:00",pPlanEnd:"2020/05/20 00:00", vDuration: 0, pParent:0, progress: 0, open: true});
|
|
g.AddTaskItemObject({pID: 2, pName: "Direccion: evaluación de mercado", pStart: "2020/04/29 00:00",pEnd:"2020/05/02 00:00", vDuration:3, pParent:1, progress: 0.25});
|
|
g.AddTaskItemObject({pID: 3, pName: "RH: Personal requerido/ contrataciones", pStart: "2020/05/04 00:00",pEnd:"2020/05/05 00:00", vDuration:1, pParent:1, progress: 0});
|
|
g.AddTaskItemObject({pID: 4, pName: "Logistica: inventario Inicial", pStart: "2020/04/26 00:00",pEnd:"2020/05/06 00:00", vDuration:10, pParent:1, progress: 0.50});
|
|
g.AddTaskItemObject({pID: 5, pName: "Contabilidad: tramites y servicios", pStart: "2020/05/19 00:00",pEnd:"2020/05/20 00:00", pDuration:1, pParent:1, progress: 0});
|
|
g.AddTaskItemObject({pID: 6, pName: "Propaganda,Mkt: Inaguración", pStart: "2020/05/05 00:00",pEnd:"2020/05/11 00:00", vDuration:6, pParent:1, progress: 0.1});
|
|
//{id: 7, text: "", start_date: "2020/05/ 00:00", duration:5, parent:1, progress: 1},
|
|
//{id: 8, text: "", start_date: "2020/05/ 00:00", duration:5, parent:1, progress: 1},
|
|
|
|
|
|
|
|
//g.AddTaskItemObject({pID: 7, pName: "Asamblea Anual", pStart: null, pDuration: 0, vParent:0, progress: 0, open: true});
|
|
//g.AddTaskItemObject({pID: 8, pName: "Contabilidad: Impuestos", pStart: "2020/05/05 00:00",pEnd:"2020/05/18 00:00", vDuration:13, pParent:7, progress: 0.6});
|
|
//g.AddTaskItemObject({pID: 9, pName: "Contabilida: utilidad o pérdida", pStart: "2020/05/06 00:00",pEnd:"2020/05/15 00:00", vDuration:9, pParent:7, progress: 0.5});
|
|
//g.AddTaskItemObject({pID: 10, pName: "Despacho: estategia Fiscal", pStart: "2020/05/14 00:00",pEnd:"2020/05/25 00:00", vDuration:11, pParent:7, progress: 0.33});
|
|
//g.AddTaskItemObject({pID: 11, pName: "Despacho: declaración anual", pStart: "2020/05/23 00:00",pEnd:"2020/05/24 00:00", vDuration:1, pParent:7, progress: 0});
|
|
//g.AddTaskItemObject({pID: 12, pName: "Despacho: informe", pStart: "2020/05/24 00:00", vDuration:24, parent:7, progress: 0});
|
|
|
|
//g.AddTaskItemObject({pID: 13, pName: "Tramites y servicios", pStart: "2020/05/20 00:00",pEnd:"2020/05/25 00:00", vDuration:5, pParent:7, progress: 0});
|
|
//g.AddTaskItemObject({pID: 14, pName: "Renovación licencia SCT", pStart: "2020/05/14 00:00",pEnd:"2020/05/18 00:00", vDuration:4, pParent:13, progress: 0});
|
|
//g.AddTaskItemObject({pID: 15, pName: "Permiso SSA año2020", pStart: "2020/05/18 00:00",pEnd:"2020/06/02 00:00", vDuration:14, pParent:13, progress: 0});
|
|
//g.AddTaskItemObject({pID: 16, pName: "Permiso SAT para Operar", pStart: "2020/05/03 00:00",pEnd:"2020/05/09 00:00", vDuration:6, pParent:13, progress: 0});
|
|
g.Draw();
|
|
|
|
</script>--%>
|
|
|
|
|
|
<script>
|
|
|
|
|
|
function CargaPickers() {
|
|
$.datetimepicker.setLocale('es');
|
|
$('input.ADDateTimePicker').each(function () {
|
|
var TThis = $(this);
|
|
TThis.datetimepicker({
|
|
dayOfWeekStart: 1,
|
|
lang: 'es',
|
|
format: 'd/m/Y H:i',
|
|
formatDate: 'd/m/Y H:i',
|
|
step: 30
|
|
});
|
|
var Div = TThis.parent()
|
|
var boton = document.createElement('span');
|
|
boton.className = "input-group-btn"
|
|
|
|
var subboton = document.createElement('a')
|
|
subboton.className = "btn default btnCalendar"
|
|
subboton.innerHTML = "<i class='fa fa-calendar'></i>"
|
|
subboton.addEventListener('click', function () {
|
|
TThis.datetimepicker('show')
|
|
});
|
|
boton.appendChild(subboton)
|
|
|
|
var agregar = true;
|
|
for (var i = 0; i < Div[0].children.length; i++) {
|
|
if (Div[0].children[i].isEqualNode(boton)) {
|
|
agregar = false;
|
|
}
|
|
}
|
|
if (agregar) {
|
|
Div[0].appendChild(boton);
|
|
}
|
|
//Div[0].appendChild(boton)
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
function ADSReady() {
|
|
CargaPickers();
|
|
}
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
function closeModal() {
|
|
$('#divModalAgregartema').modal('hide');
|
|
}
|
|
</script>
|
|
|
|
</asp:Content>
|
|
|