286 lines
15 KiB
Plaintext
286 lines
15 KiB
Plaintext
<%@ Page Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Normatividad.aspx.vb" Inherits="OI_Normatividad" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
|
<style>
|
|
#treeviewarbolmiarbol, .catcuentascontarbol .catcuentasarbol {
|
|
width: 100%;
|
|
}
|
|
|
|
#listviewbuscar {
|
|
width: 50%;
|
|
}
|
|
|
|
|
|
ul.treeviewarbol li > div {
|
|
display: inline-block;
|
|
width: 100px;
|
|
min-height: 15px;
|
|
}
|
|
|
|
ul.treeviewarbol li > div > a {
|
|
display: none;
|
|
}
|
|
|
|
ul.treeviewarbol li > div:hover > a {
|
|
display: inline;
|
|
}
|
|
|
|
ul.treeviewarbol li > label:hover + div > a {
|
|
display: inline;
|
|
}
|
|
|
|
.aradd {
|
|
margin-left: 15px;
|
|
background-color: #1caf9a;
|
|
color: #ffffff;
|
|
font-weight: 300;
|
|
padding: 2px 7px 3px 8px;
|
|
text-align: center;
|
|
height: 15px;
|
|
border-radius: 18px !important;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.aradd::before {
|
|
font: normal normal normal 14px/1 FontAwesome;
|
|
font-size: 9px !important;
|
|
content: "\f067";
|
|
}
|
|
|
|
.aredit {
|
|
margin-left: 15px;
|
|
background-color: #E87E04;
|
|
color: #ffffff;
|
|
font-weight: 300;
|
|
padding: 2px 7px 3px 8px;
|
|
text-align: center;
|
|
height: 15px;
|
|
border-radius: 18px !important;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.aredit::before {
|
|
font: normal normal normal 14px/1 FontAwesome;
|
|
font-size: 9px !important;
|
|
content: "\f040";
|
|
}
|
|
</style>
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
|
<asp:UpdatePanel ID="UpLnkAcciones" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<li>
|
|
<asp:LinkButton ID="LnkNuevo" runat="server" OnClick="LnkNuevo_Click"> <i class="fa fa-plus"></i> Nuevo Título</asp:LinkButton>
|
|
</li>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</asp:Content>
|
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
|
Catálogo de Normatividad
|
|
</asp:Content>
|
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
|
|
|
|
|
<asp:UpdatePanel ID="updatos" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div class="catcuentascontarbol" style="width: 100%; height:600px; overflow-x:scroll;">
|
|
<%-- <div class="catcuentasarbol" style="height:500%">--%>
|
|
<div id="treeviewarbolmiarbol" style="text-align: right">
|
|
<ADS:Arbol runat="server" ID="ArbolCuentas" Style="text-align: left;"></ADS:Arbol>
|
|
</div>
|
|
<%-- </div>--%>
|
|
</div>
|
|
<asp:Button ID="BtnCambiaTitulos" OnClick="BtnCambiaTitulos_Click" ClientIDMode="Static" Style="display: none;" runat="server" />
|
|
|
|
<%-- <asp:TextBox ID="Textbuscar" Style="display: none;" runat="server"></asp:TextBox>
|
|
<asp:HiddenField ID="HdnID" runat="server" Value="" ClientIDMode="Static" />
|
|
<asp:Button ID="editar" runat="server" Style="display: none;" Text="Buscar" />
|
|
<asp:Button ID="agregar" Style="display: none;" runat="server" Text="Buscar" />
|
|
<asp:Button ID="borrar" Style="display: none;" runat="server" Text="borrar" />--%>
|
|
|
|
|
|
|
|
<%-- MODAL AGREGAR-EDITAR --%>
|
|
<div id="DvModalTitulos" class="modal ADS fade" role="dialog">
|
|
<div class="modal-dialog">
|
|
<asp:UpdatePanel ID="UPModalTitulos" class="modal-content rowpadding" 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>
|
|
<asp:Label class="modal-title" ID="ModalTitulo" runat="server" Text="" Font-Size="Larger"></asp:Label>
|
|
</div>
|
|
<div class="modal-body">
|
|
<asp:UpdatePanel ID="UPModalBody" runat="server" UpdateMode="conditional">
|
|
<ContentTemplate>
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-md-5">
|
|
<div class="form-line" style="margin-left: 10px">
|
|
<div class="catcuentas left">Título</div>
|
|
<div class="catcuentas right">
|
|
<asp:TextBox ID="Ttitulo" Style="width: 100%;" runat="server" MaxLength="100"></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="RFVTtitulo" runat="server" ControlToValidate="Ttitulo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Ingrese un <b>''Título''</b><br />por favor." ValidationGroup="GrpNuevacuenta"></asp:RequiredFieldValidator>
|
|
<ajax:ValidatorCalloutExtender ID="VCETtitulo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTtitulo" Width="170px"></ajax:ValidatorCalloutExtender>
|
|
<asp:RequiredFieldValidator ID="RFVTtitulo2" runat="server" ControlToValidate="Ttitulo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Ingrese un <b>''Título''</b><br />por favor." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
<ajax:ValidatorCalloutExtender ID="VCETtitulo2" runat="server" HighlightCssClass="vco" TargetControlID="RFVTtitulo2" Width="170px"></ajax:ValidatorCalloutExtender>
|
|
</div>
|
|
</div>
|
|
<hr style="margin-left: 10px;" />
|
|
|
|
<div class="form-line" style="margin-left: 10px">
|
|
<div class="catcuentas left">Título Padre</div>
|
|
<div class="catcuentas right">
|
|
<asp:DropDownList ID="DdlSubtitulo" DataTextField="Asunto" DataValueField="CveEvento" CssClass="form-control input-sm input-small select2me" Width="100%" runat="server" AutoPostBack="true">
|
|
</asp:DropDownList>
|
|
<asp:RequiredFieldValidator ID="RFVSubtitulo" runat="server" ControlToValidate="DdlSubtitulo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Título Padre''</b> es necesario,<br /> por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpNuevacuenta"></asp:RequiredFieldValidator>
|
|
<ajax:ValidatorCalloutExtender ID="VCOSubtitulo" runat="server" HighlightCssClass="vco" TargetControlID="RFVSubtitulo" Width="270px"></ajax:ValidatorCalloutExtender>
|
|
<br />
|
|
<asp:Label ID="LblSubTitulo" runat="server" Text="" Font-Italic="True" Font-Size="7pt" ClientIDMode="Static"></asp:Label>
|
|
<asp:HiddenField ID="HdnSubTituloDe" ClientIDMode="Static" Value="0" runat="server" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-line" style="margin-left: 10px;">
|
|
<div class="catcuentas left">Observaciones</div>
|
|
<div class="catcuentas right">
|
|
<asp:TextBox ID="TxtObservaciones" Style="width: 100%;" class="Widthall" runat="server" TextMode="MultiLine" Columns="60" Rows="4"></asp:TextBox>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-7">
|
|
<asp:UpdatePanel runat="server">
|
|
<ContentTemplate>
|
|
|
|
<div style="margin-right: 15px; margin-top: 25px;">
|
|
<div class="form-line" style="text-align: right;">
|
|
<asp:LinkButton ID="ImgDownLoadFormato" Text="<i class='fa fa-download'> Descargar formato</i>" OnClick="ImgDownLoadFormato_Click" runat="server" Visible="False" />
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
|
|
<Triggers>
|
|
<asp:PostBackTrigger ControlID="ImgDownLoadFormato" />
|
|
</Triggers>
|
|
</asp:UpdatePanel>
|
|
|
|
<div style="margin: 0px 10px 0px 20px;">
|
|
<div>
|
|
<asp:TextBox ID="Anexo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server" ></asp:TextBox>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</div>
|
|
<div class="modal-footer">
|
|
|
|
<asp:Button ID="Guardar" CssClass="btn btn-primary" Visible="false" runat="server" Text="Guardar" Style="margin-left: 10px; margin-bottom: 10px;" ValidationGroup="GrpGuardar"/>
|
|
<asp:Button ID="nuevacuenta" CssClass="btn btn-success" Visible="false" runat="server" Text="Guardar" Style="margin-left: 10px; margin-bottom: 10px;" ValidationGroup="GrpNuevacuenta" />
|
|
<asp:Button ID="BtnEliminar" CssClass="btn btn-danger" Visible="false" runat="server" Text="Eliminar" Style="margin-left: 10px; margin-bottom: 10px;" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar el título?" data-btn-ok-label="si" />
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</asp:Content>
|
|
|
|
|
|
<asp:Content ID="content7" ContentPlaceHolderID="JS" runat="server">
|
|
<script>
|
|
function buscararbolito(inputid, ulid) {
|
|
|
|
var texto = $("input#" + inputid).val();
|
|
if ((texto == '') && ($('ul#' + ulid))) {
|
|
$('ul#' + ulid + '').removeClass("listainvicible");
|
|
expandir();
|
|
}
|
|
else {
|
|
if ($('ul#' + ulid).hasClass('listainvicible') == false) {
|
|
$('ul#' + ulid).addClass("listainvicible");
|
|
}
|
|
if ($('ul#' + ulid + ' li.livisible')) {
|
|
$('ul#' + ulid + ' li.livisible').removeClass("livisible");
|
|
}
|
|
if ($('ul#' + ulid + ' input:checked')) {
|
|
$('ul#' + ulid + ' input:checked').prop('checked', false);
|
|
}
|
|
if ($('ul#' + ulid + ' li:contains("' + texto + '") > input[type=checkbox]')) {
|
|
$('ul#' + ulid + ' li:contains("' + texto + '") > input[type=checkbox]').prop('checked', true);
|
|
}
|
|
if ($('ul#' + ulid + ' li:contains("' + texto + '")')) {
|
|
$('ul#' + ulid + ' li:contains("' + texto + '")').addClass("livisible");
|
|
}
|
|
if ($('ul#' + ulid + ' label:contains("' + texto + '") ~ ul li')) {
|
|
$('ul#' + ulid + ' label:contains(""' + texto + '"") ~ ul li').addClass("livisible");
|
|
}
|
|
}
|
|
}
|
|
|
|
function expandir() {
|
|
debugger;
|
|
var lis = document.getElementById('C_ArbolCuentas_miarbol').getElementsByTagName("li");
|
|
|
|
for (var indice in lis) {
|
|
var chkId = 'chk' + lis[indice].id
|
|
|
|
if ($get(chkId) != null) {
|
|
document.getElementById(chkId).checked = true;
|
|
}
|
|
}
|
|
}
|
|
|
|
jQuery(document).ready(function () {
|
|
Sys.Application.add_load(function (s, e) {
|
|
buscararbolito('C_ArbolCuentas_Abuscar', 'C_ArbolCuentas_miarbol')
|
|
});
|
|
});
|
|
|
|
function ValidaGuardar(SubCuentaAnterior) {
|
|
debugger;
|
|
$('.popover').remove();
|
|
$("#C_Guardar").removeAttr("aria-describedby");
|
|
|
|
|
|
|
|
if ($get('HdnSubTituloDe').value != SubCuentaAnterior) {
|
|
|
|
setTimeout(
|
|
function () {
|
|
;
|
|
var Text = '';
|
|
|
|
debugger;
|
|
if ($("#Tsubtitulo").length) {
|
|
Text += 'El título sera reasignado al título padre: <b>' + $get('Tsubtitulo').SelectedValue + '</b>.<br/>';
|
|
}
|
|
|
|
$('.popover-title').html(Text);
|
|
}, 10);
|
|
}
|
|
else {
|
|
|
|
$('.popover-title').html('¿Esta seguro de guardar?');
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
</script>
|
|
</asp:Content>
|