VYA Viajes
This commit is contained in:
@@ -3,6 +3,30 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||
<style>
|
||||
.select2anothertable {
|
||||
position: absolute;
|
||||
left: 100%;
|
||||
background-color: white;
|
||||
/*top: 50px;*/ top: 21px;
|
||||
/*max-height: 200px;*/ max-height: 229px;
|
||||
/*background-color: #dcdcdc;*/
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.select2anothertable > table > tbody > tr > td:nth-of-type(odd) {
|
||||
background-color: rgba(220, 220, 220, 0.45);
|
||||
}
|
||||
|
||||
.select2anothertable > table > tbody > tr > td {
|
||||
line-height: 21px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.select2anothertable > table > tbody > tr.active {
|
||||
background-color: #5897fb;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
Reporte de solicitudes de traspaso
|
||||
@@ -192,7 +216,7 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-8 form-group form-md-line-input input-iconright" id="DivCaracteristicaOpcion" runat="server">
|
||||
<ADS:Dropdownlost ID="DdlProductoServicio" runat="server" CssClass="form-control input-sm" CssClassDdl="select2me" CssStyle="width: 100%;" DataTextField="PSCodigo" DataValueField="CvePS" ></ADS:Dropdownlost>
|
||||
<ADS:Dropdownlost ID="DdlProductoServicio" runat="server" CssClass="form-control input-sm" CssClassDdl="select2me" CssStyle="width: 100%;" DataTextField="PSCodigo" DataValueField="CvePS" data-estatus="1" ></ADS:Dropdownlost>
|
||||
<label for="<%= DdlProductoServicio.ClientID.ToString()%>">Producto o Servicio:</label>
|
||||
</div>
|
||||
<div class="col-md-2 form-group form-md-line-input input-iconright" id="Div3" runat="server">
|
||||
@@ -338,6 +362,48 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('.DdlPS').on("select2:open", function (e) { $('.select2-container.select2-container--default .select2-dropdown .select2anothertable').remove(); });
|
||||
$("body").on("mouseenter", ".select2-container.select2-container--default.select2-container--open .select2-dropdown li", function (event) {
|
||||
var $this = $(this);
|
||||
var ind = $this.index();
|
||||
$(".select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable tr.active").removeClass('active');
|
||||
$(".select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable tr:nth-child(" + (ind + 2) + ")").addClass('active');
|
||||
//log($this);
|
||||
});
|
||||
var scrollfuncion = function () {
|
||||
var stop = this.scrollTop;
|
||||
$(".select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable").scrollTop(stop);
|
||||
}
|
||||
|
||||
function CargaExistenciaAlmacenes(data, params) {
|
||||
var div = $('<div class="select2anothertable"></div>');
|
||||
$('.select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable').remove();
|
||||
$('.select2-container.select2-container--default.select2-container--open .select2-dropdown').prepend(div);
|
||||
var table = $('<table></table>'); div.append(table);
|
||||
var tbody = $('<tbody></tbody>'); table.append(tbody);
|
||||
$(".select2-container--default .select2-results>.select2-results__options").off("scroll", scrollfuncion);
|
||||
$(".select2-container--default .select2-results>.select2-results__options").scroll(scrollfuncion);
|
||||
var indexd = 0;
|
||||
data.forEach(function (item) {
|
||||
if (indexd == 0) {
|
||||
var tr = $('<tr></tr>'); tbody.append(tr);
|
||||
var td;
|
||||
for (var key in item) {
|
||||
if (!(key == "text" || key == "id")) { td = $('<td style="font-weight:bold;">' + key + '</td>'); tr.append(td); }
|
||||
}
|
||||
}
|
||||
var tr = $('<tr></tr>'); tbody.append(tr);
|
||||
|
||||
var td;
|
||||
for (var key in item) {
|
||||
if (!(key == "text" || key == "id")) { td = $('<td ' + ((item[key] > 0) ? 'style = "font-weight:bold;"' : '') + '>' + item[key] + '</td>'); tr.append(td); }
|
||||
}
|
||||
indexd += 1;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user