This commit is contained in:
502
OI/Proyecto.aspx
502
OI/Proyecto.aspx
@@ -31,9 +31,10 @@
|
||||
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;
|
||||
|
||||
.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" />--%>
|
||||
@@ -62,146 +63,146 @@
|
||||
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="gantt-samples-banner_controls_bar controls_bar">
|
||||
<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;">
|
||||
<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>
|
||||
|
||||
<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="">
|
||||
<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_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>
|
||||
<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="">
|
||||
|
||||
<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">
|
||||
<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>
|
||||
|
||||
<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 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="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="modal-body">
|
||||
|
||||
<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>
|
||||
</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>
|
||||
<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="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 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>
|
||||
</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>
|
||||
<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>
|
||||
<div class="col-sm-6">
|
||||
|
||||
<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: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="DdlTema">Tema:</asp:Label>
|
||||
<asp:Label runat="server" AssociatedControlID="DdlPara">Para:</asp:Label>
|
||||
</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-6">
|
||||
<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>
|
||||
</div>
|
||||
</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>
|
||||
</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>
|
||||
<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>
|
||||
<script src="/Metronic/assets/global/plugins/dhtmlxgantt/dhtmlxgantt.js"></script>
|
||||
@@ -216,135 +217,136 @@
|
||||
$('.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";
|
||||
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();
|
||||
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;
|
||||
}
|
||||
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";
|
||||
}
|
||||
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();
|
||||
}
|
||||
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: "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: "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: 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 },
|
||||
@@ -354,7 +356,7 @@
|
||||
// { 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 },
|
||||
@@ -369,14 +371,30 @@
|
||||
//]
|
||||
|
||||
/*,
|
||||
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"}
|
||||
]*/
|
||||
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>
|
||||
|
||||
@@ -5,17 +5,17 @@
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.sortableList h4 {
|
||||
background-color: #EEE;
|
||||
background-color: #ccc;
|
||||
margin: 0px;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.sortableList {
|
||||
border: 1px solid #eee;
|
||||
width: 250px;
|
||||
width: 258px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,9 @@
|
||||
min-height: 20px;
|
||||
width: 250px;
|
||||
padding: 5px 0 0 0;
|
||||
margin: 0;
|
||||
background-color: #eee;
|
||||
border: dotted #ccc;
|
||||
margin: 4px;
|
||||
}
|
||||
|
||||
.sortableList ul li {
|
||||
@@ -45,17 +47,22 @@
|
||||
padding: 7px 35px 7px 5px;
|
||||
}
|
||||
|
||||
ul.ListSorter > li {
|
||||
background-color: #fff;
|
||||
float: left;
|
||||
}
|
||||
ul.ListSorter > li {
|
||||
background-color: #fff;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.sortableList ul li .btn.edit {
|
||||
padding: 2px 4px;
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
top: 4px;
|
||||
}
|
||||
.sortableList ul li .btn.edit {
|
||||
padding: 2px 4px;
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
top: 4px;
|
||||
}
|
||||
|
||||
.bootomadd {
|
||||
padding: 4px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
@@ -99,7 +106,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</ul>
|
||||
<div class="text-center">
|
||||
<div class="text-center bootomadd">
|
||||
|
||||
<%# String.Format("<a class=\"btn btn-default\" onclick=\"OpenModalNewTareaUserControl(1,-1,{{CveTableroLista:{0}}});\"> <i class=\"fa fa-plus\"'></i> </a>",Eval("CveTableroLista")) %>
|
||||
</div>
|
||||
@@ -170,15 +177,42 @@
|
||||
<asp:UpdatePanel runat="server" ID="Uppositionevento" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnUpPosition" OnClick="BtnUpPosition_Click" runat="server" Text="Agregar" CssClass="btn btn-primary hidden BtnUpPosition" UseSubmitBehavior="false" ValidationGroup="VGMTablzxczxc" />
|
||||
<asp:TextBox ID="Txtcvetablerolista" CssClass=" hidden Txtcvetablerolista" runat="server"></asp:TextBox><asp:TextBox ID="txtCveEvento" CssClass="txtCveEvento hidden" runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCveOrdeList" CssClass=" hidden TxtCveOrdeList" runat="server"></asp:TextBox>
|
||||
<asp:Button ID="BtnOrderList" runat="server" OnClick="BtnOrderList_Click" CssClass="btn btn-primary hidden BtnOrderList" UseSubmitBehavior="false" ValidationGroup="VGMTablzxczxzc" />
|
||||
<asp:TextBox ID="Txtcvetablerolista" CssClass=" hidden Txtcvetablerolista" runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="txtCveEvento" CssClass="txtCveEvento hidden" runat="server"></asp:TextBox>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
let CurrentorderList = ''
|
||||
function GetOrderList() {
|
||||
|
||||
let OrdeList = '';
|
||||
let separator = '';
|
||||
let Orden = 1;
|
||||
$('.ListSorter > li').each(function () {
|
||||
OrdeList = OrdeList + separator + Orden + ':' + $(this).data('cvetablerolista');
|
||||
separator = ',';
|
||||
Orden = Orden + 1;
|
||||
});
|
||||
return OrdeList;
|
||||
}
|
||||
function GetOrderListEvento(ulelement) {
|
||||
|
||||
let OrdeList = '';
|
||||
let separator = '';
|
||||
let Orden = 1;
|
||||
ulelement.find(' li').each(function () {
|
||||
OrdeList = OrdeList + separator + Orden + ':' + $(this).data('cveevento');
|
||||
separator = ',';
|
||||
Orden = Orden + 1;
|
||||
});
|
||||
return OrdeList;
|
||||
}
|
||||
function ADSReady() {
|
||||
|
||||
CurrentorderList = GetOrderList();
|
||||
var cvetablerolistaold = 0;
|
||||
var cvetablerolistanew = 0;
|
||||
|
||||
@@ -190,7 +224,16 @@
|
||||
setTimeout(function () {
|
||||
cvetablerolistanew = $(event.srcElement).data('cvetablerolista');
|
||||
//let cveevento = $(event.srcElement).data('cveevento');
|
||||
//$('.Txtcvetablerolista').val(cvetablerolistanew);
|
||||
|
||||
setTimeout(function () {
|
||||
let OrdeList = GetOrderList();
|
||||
$('.TxtCveOrdeList').val(OrdeList);
|
||||
console.log(OrdeList);
|
||||
if (CurrentorderList != OrdeList) {
|
||||
$('.BtnOrderList').click();
|
||||
}
|
||||
CurrentorderList = OrdeList;
|
||||
}, 20);
|
||||
//$('.txtCveEvento').val(cveevento);
|
||||
//$('.BtnUpPosition').click();
|
||||
}, 20);
|
||||
@@ -202,8 +245,11 @@
|
||||
start: function (event, ui) { cvetablerolistaold = $(event.srcElement).closest('ul').data('cvetablerolista'); },
|
||||
stop: function (event, ui) {
|
||||
setTimeout(function () {
|
||||
cvetablerolistanew = $(event.srcElement).closest('ul').data('cvetablerolista');
|
||||
let ulelement = $(event.srcElement).closest('ul');
|
||||
cvetablerolistanew = ulelement.data('cvetablerolista');
|
||||
let cveevento = $(event.srcElement).data('cveevento');
|
||||
let OrdeList = GetOrderListEvento(ulelement);
|
||||
$('.TxtCveOrdeList').val(OrdeList);
|
||||
$('.Txtcvetablerolista').val(cvetablerolistanew);
|
||||
$('.txtCveEvento').val(cveevento);
|
||||
$('.BtnUpPosition').click();
|
||||
|
||||
@@ -164,9 +164,42 @@ public partial class OI_TableroDetalle : ClsPaginas
|
||||
|
||||
protected void BtnUpPosition_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool continuar = false;
|
||||
using (ClsOIEventos eveobj = new ClsOIEventos())
|
||||
{
|
||||
eveobj.UpEventoLista(Txtcvetablerolista.Text.ToEntero(), txtCveEvento.Text.ToEntero());
|
||||
eveobj.IniciaTransacSQL();
|
||||
continuar =eveobj.UpEventoLista(Txtcvetablerolista.Text.ToEntero(), txtCveEvento.Text.ToEntero());
|
||||
if (continuar)
|
||||
{
|
||||
List<string> orderlist = TxtCveOrdeList.Text.Split(',').ToList<string>();
|
||||
continuar = eveobj.OrdenaTareas(orderlist, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario);
|
||||
}
|
||||
|
||||
if (continuar)
|
||||
{
|
||||
eveobj.Commit();
|
||||
}
|
||||
else
|
||||
{
|
||||
eveobj.RollBack();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void BtnOrderList_Click(object sender, EventArgs e)
|
||||
{
|
||||
List<string> orderlist = TxtCveOrdeList.Text.Split(',').ToList<string>();
|
||||
using (ClsOIEventos eveobj = new ClsOIEventos())
|
||||
{
|
||||
eveobj.IniciaTransacSQL();
|
||||
if(eveobj.OrdenaListas(orderlist,UsuarioActual.CveEmpresa,UsuarioActual.CveUsuario))
|
||||
{
|
||||
eveobj.Commit();
|
||||
}
|
||||
else
|
||||
{
|
||||
eveobj.RollBack();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user