Descripcion Larga Aplicacion
git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C143
This commit is contained in:
parent
e0714d3ebc
commit
dcc3218690
2 changed files with 94 additions and 4 deletions
|
|
@ -39,6 +39,20 @@ this.getDataModel = function () {
|
||||||
InsertarItem();
|
InsertarItem();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$("#btnDescripcionLarga").unbind("click");
|
||||||
|
$("#btnDescripcionLarga").click(function () {
|
||||||
|
$("#divRespuesta").empty();
|
||||||
|
$("#lblDescripcionLarga").text("Descripción");
|
||||||
|
$("#txtDescripcionLarga").val('');
|
||||||
|
|
||||||
|
|
||||||
|
$('#modalDescripcionLarga-footer').css("display", "block");
|
||||||
|
$('#modalDescripcionLarga').modal('show');
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('#TableItems').TableInit(0, false, true, true, false, null, null);
|
$('#TableItems').TableInit(0, false, true, true, false, null, null);
|
||||||
ObtenerAplicaciones();
|
ObtenerAplicaciones();
|
||||||
|
|
||||||
|
|
@ -46,11 +60,16 @@ this.getDataModel = function () {
|
||||||
}
|
}
|
||||||
this.CargarGridAplicaciones = function (data) {
|
this.CargarGridAplicaciones = function (data) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var TableItems = $('#TableItems').DataTable();
|
var TableItems = $('#TableItems').DataTable();
|
||||||
var lista = data;
|
var lista = data;
|
||||||
|
|
||||||
$.each(lista, function (key, item) {
|
$.each(lista, function (key, item) {
|
||||||
|
|
||||||
|
var btnDescripcionLarga = $("#ucbtDescripcionLarga").html();
|
||||||
|
btnDescripcionLarga = replaceAll("[$DescripcionLarga]", item.DescripcionLarga, btnDescripcionLarga);
|
||||||
|
|
||||||
|
|
||||||
var option = $("#ucItemsCatalogo").html();
|
var option = $("#ucItemsCatalogo").html();
|
||||||
|
|
||||||
|
|
@ -74,10 +93,16 @@ this.CargarGridAplicaciones = function (data) {
|
||||||
option = replaceAll("[$icon]", "fa-times", option);
|
option = replaceAll("[$icon]", "fa-times", option);
|
||||||
option = replaceAll("[$value]", "0", option);
|
option = replaceAll("[$value]", "0", option);
|
||||||
}
|
}
|
||||||
|
|
||||||
TableItems.column(1).visible(false);
|
TableItems.column(1).visible(false);
|
||||||
|
TableItems.column(3).visible(false);
|
||||||
|
|
||||||
TableItems.row.add([stateIcon,
|
TableItems.row.add([stateIcon,
|
||||||
item.IdAplicacion,
|
item.IdAplicacion,
|
||||||
item.Descripcion,
|
item.Descripcion,
|
||||||
|
item.DescripcionLarga,
|
||||||
|
|
||||||
|
btnDescripcionLarga,
|
||||||
option]).draw();
|
option]).draw();
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -87,6 +112,16 @@ this.CargarGridAplicaciones = function (data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
this.VerDescripcionLarga = function (DescripcionLarga) {
|
||||||
|
|
||||||
|
$("#txtDescripcionLarga").val(DescripcionLarga);
|
||||||
|
$('#modalDescripcionLarga').modal('show');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.ObtenerAplicaciones = function (data) {
|
this.ObtenerAplicaciones = function (data) {
|
||||||
|
|
||||||
|
|
@ -107,6 +142,7 @@ this.EditarItem = function (id) {
|
||||||
|
|
||||||
$('#hiddenId').val(id)
|
$('#hiddenId').val(id)
|
||||||
$('#txtDescripcion').val(TableItems.cell(indexes, 2).data());
|
$('#txtDescripcion').val(TableItems.cell(indexes, 2).data());
|
||||||
|
$('#txtAreaDescripcionLarga').val(TableItems.cell(indexes, 3).data());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -142,7 +178,7 @@ this.toggleEnabledItem = function (id, value) {
|
||||||
|
|
||||||
Aplicacion = {
|
Aplicacion = {
|
||||||
IdAplicacion: id,
|
IdAplicacion: id,
|
||||||
Estado: value,
|
Estado: value
|
||||||
}
|
}
|
||||||
|
|
||||||
var uri = CatalogosWCF + '/api/InsertarActualizarAplicacion';
|
var uri = CatalogosWCF + '/api/InsertarActualizarAplicacion';
|
||||||
|
|
@ -165,7 +201,7 @@ this.ActualizarItem = function () {
|
||||||
Aplicacion = {
|
Aplicacion = {
|
||||||
IdAplicacion: $('#hiddenId').val(),
|
IdAplicacion: $('#hiddenId').val(),
|
||||||
Descripcion: $('#txtDescripcion').val(),
|
Descripcion: $('#txtDescripcion').val(),
|
||||||
Estado: 1,
|
DescripcionLarga: $('#txtAreaDescripcionLarga').val()
|
||||||
}
|
}
|
||||||
|
|
||||||
var uri = CatalogosWCF + '/api/InsertarActualizarAplicacion';
|
var uri = CatalogosWCF + '/api/InsertarActualizarAplicacion';
|
||||||
|
|
@ -189,8 +225,9 @@ this.InsertarItem = function () {
|
||||||
|
|
||||||
Aplicacion = {
|
Aplicacion = {
|
||||||
Descripcion: $("#txtDescripcion").val(),
|
Descripcion: $("#txtDescripcion").val(),
|
||||||
|
DescripcionLarga: $("#txtAreaDescripcionLarga").val(),
|
||||||
IdTipoAplicacion: 1,
|
IdTipoAplicacion: 1,
|
||||||
Estado: 1
|
Estado: Estados.Inicial.Codigo
|
||||||
}
|
}
|
||||||
|
|
||||||
var uri = CatalogosWCF + '/api/InsertarActualizarAplicacion';
|
var uri = CatalogosWCF + '/api/InsertarActualizarAplicacion';
|
||||||
|
|
@ -209,8 +246,12 @@ this.CompletarAccion = function () {
|
||||||
this.LimpiarControles = function () {
|
this.LimpiarControles = function () {
|
||||||
|
|
||||||
$('#txtDescripcion').val('');
|
$('#txtDescripcion').val('');
|
||||||
$("#formCatalogo").validateElement("#txtDescripcion");
|
$('#txtAreaDescripcionLarga').val('');
|
||||||
|
|
||||||
|
|
||||||
|
$("#formCatalogo").validateElement("#txtDescripcion");
|
||||||
|
$("#formCatalogo").validateElement("#txtAreaDescripcionLarga");
|
||||||
|
|
||||||
$('#lbTituloAccion').empty();
|
$('#lbTituloAccion').empty();
|
||||||
$('#lbTituloAccion').append('Ingresar Nueva Aplicación');
|
$('#lbTituloAccion').append('Ingresar Nueva Aplicación');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,9 @@
|
||||||
<th></th>
|
<th></th>
|
||||||
<th class="col-sm-1">ID</th>
|
<th class="col-sm-1">ID</th>
|
||||||
<th class="col-sm-4">Descripción</th>
|
<th class="col-sm-4">Descripción</th>
|
||||||
|
<th class="col-sm-4">Detalle</th>
|
||||||
|
|
||||||
|
<th></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
@ -62,6 +65,13 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@*--------------------- Descripcion Larga ---------------------------------------------------------*@
|
||||||
|
<div class="form-group " id="divAreaDescripcionLarga">
|
||||||
|
<label class="col-sm-4 control-label ControlsForms" id="lblAreaDescripcionLarga">Detalle</label>
|
||||||
|
<div class="input-group input-group-sm col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||||
|
<textarea name="txtAreaDescripcionLarga" rows="8" cols="31" id="txtAreaDescripcionLarga" style="resize: none"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -97,6 +107,45 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<div id="ucbtDescripcionLarga" style=" display:none;">
|
||||||
|
<button type="button" id="btnDescripcionLarga" class="btn btn-default btn-xs" onclick="VerDescripcionLarga('[$DescripcionLarga]')" title="Ver Descripción ">
|
||||||
|
<i class="fa fa-search"></i> Ver
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@section Modals{
|
||||||
|
|
||||||
|
@*--------------------- Modal Ver Descripcion Larga ---------------------------------------------------------*@
|
||||||
|
<div class="modal fade" id="modalDescripcionLarga" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" style="display: none;">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
|
<h4 class="modal-title"> <i class="fa fa-comment-o"></i> Descripción </h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form id="formDescripcionLarga">
|
||||||
|
|
||||||
|
@*--------------------- Descripcion Larga ---------------------------------------------------------*@
|
||||||
|
<div class="form-group " id="divDescripcionLarga">
|
||||||
|
<label class="col-sm-4 control-label ControlsForms" id="lblDescripcionLarga">Descripción</label>
|
||||||
|
<div class="input-group input-group-sm col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||||
|
<textarea name="txtDescripcionLarga" rows="8" cols="45" id="txtDescripcionLarga" readonly style="resize: none"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-footer" id="modalDescripcionLarga-footer">
|
||||||
|
<button type="button" class="btn btn-danger btn-sm" data-dismiss="modal">Cerrar</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Scripts.Render("~/Sinort-Scripts/Aplicacion.js")
|
@Scripts.Render("~/Sinort-Scripts/Aplicacion.js")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue