Faserplanung
* Kabelverzeichnis Updates
This commit is contained in:
@@ -7,6 +7,7 @@ function checkendpoints() {
|
||||
$(this).find('.move-endpoint-up').remove();
|
||||
$(this).find('.move-endpoint-down').remove();
|
||||
$(this).find('.remove-endpoint').remove();
|
||||
$(this).closest('.fiberplancablepipe-div').find('.fiberPlanPipe_id').data('index', index);
|
||||
if (index == 0 && endpointcounter - 1 == 0) {
|
||||
// endpointtext = "Startpunkt";
|
||||
} else if (index == 0) {
|
||||
@@ -154,7 +155,6 @@ function generateDestinationmid(destinations, destinationtype, destinationdiv, p
|
||||
$('#' + destinationdiv).append(` <div class="destination-dropdown row">
|
||||
<i class="fa-solid fa-square-caret-up "></i><h4>` + destinationtype + ` (` + destination_typename + `) </h4>
|
||||
</div>`);
|
||||
console.log(destinations);
|
||||
$.each(destinations, function (index, destination) {
|
||||
|
||||
|
||||
@@ -182,10 +182,10 @@ function generateDestinationmid(destinations, destinationtype, destinationdiv, p
|
||||
<div id="` + randid + `_sleeves_div"> </div>
|
||||
|
||||
`);
|
||||
console.log(randid);
|
||||
|
||||
var sleeveoptions = '<option value=""> </option>';
|
||||
$.each(destination.sleeves, function (k, val) {
|
||||
console.log(val);
|
||||
|
||||
sleeveoptions = sleeveoptions + '<option value="' + k + '">' + val + '</option>';
|
||||
});
|
||||
$('#' + randid + '_sleeves_div').append(`<div class="form-group row">
|
||||
@@ -252,7 +252,6 @@ function generateDestination(destination, destinationtype, destinationdiv, param
|
||||
$.each(data.data, function (k, val) {
|
||||
sleeveoptions = sleeveoptions + '<option value="' + val.id + '">' + val.name + '</option>';
|
||||
});
|
||||
console.log(destinationdiv);
|
||||
$('#' + destinationdiv).append(`<div class="form-group row">
|
||||
<label class="col-lg-3 col-form-label" for="lenght">Muffe </label>
|
||||
<div class="col-lg-5">
|
||||
@@ -325,7 +324,7 @@ function generateDestination(destination, destinationtype, destinationdiv, param
|
||||
checkusedfibers($('#' + destinationdiv));
|
||||
}
|
||||
} else if (append === 1) {
|
||||
console.log('cool');
|
||||
|
||||
$('#' + destinationdiv).append(`<div class="form-group row" style="border-top: 1px dotted #9b9b9b;padding-top: 15px;">
|
||||
<label class="col-lg-3 col-form-label" for="lenght">Schrank <i data-popid="` + popid + `" class="fa-regular fa-circle-minus remove-rack"></i></label>
|
||||
<div class="col-lg-5">
|
||||
@@ -364,7 +363,6 @@ function addModule(thistrigger, poprackid, append = 0, param = 0, selected = nul
|
||||
$.each(data.data, function (k, val) {
|
||||
rackoptions = rackoptions + '<option value="' + val.id + '">' + val.name + '</option>';
|
||||
});
|
||||
console.log('cool1');
|
||||
$('#destinationstartpoint').append(`<div class="form-group row" style="border-top: 1px dotted #9b9b9b;padding-top: 15px;">
|
||||
<label class="col-lg-3 col-form-label" for="lenght">Schrank <i data-popid="` + popid + `" class="fa-regular fa-circle-minus remove-rack"></i></label>
|
||||
<div class="col-lg-5">
|
||||
@@ -510,13 +508,14 @@ $(document).ready(function () {
|
||||
$('.fiberplanpipe_id').eq(counter).val(pipesid[counter]);
|
||||
|
||||
$('.fiberPlanPipe_id').eq(counter).trigger("change", "1");
|
||||
checkendpoints();
|
||||
counter++;
|
||||
});
|
||||
} else if (param == 0) {
|
||||
checkendpoints();
|
||||
}
|
||||
$(".select2select").select2({placeholder: ""});
|
||||
}
|
||||
|
||||
checkendpoints();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -558,6 +557,7 @@ $(document).ready(function () {
|
||||
// console.log(param);
|
||||
var options = '<option value=""> </option>';
|
||||
var thisis = $(this);
|
||||
var index = thisis.data('index');
|
||||
$('#destination-div').empty();
|
||||
$('#destination-div').append('<div id="destinationstartpoint" class="destinationpoint"></div><div id="destinationmidpoint" class="destinationpoint"></div><div id="destinationendpoint" class="destinationpoint"></div>');
|
||||
$.getJSON(fiberPlanPipeSubUrl + "&fiberplanpipe_id=" + $.trim($(thisis).val()), {})
|
||||
@@ -631,6 +631,7 @@ $(document).ready(function () {
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
$(thisis).closest(".form-group").next().find('.subpipe-div').html('<select name="fiberplanpipesub[]" required="required" class=" form-control fiberplanpipesub">' + options + '</select>');
|
||||
$(".fiberplanpipesub").select2({
|
||||
placeholder: "",
|
||||
@@ -648,8 +649,9 @@ $(document).ready(function () {
|
||||
checkracks();
|
||||
// $("#fiberplanpipesub option[value=<?php echo $fiberplancables->fiberPlanPipe_sub; ?>]").attr('selected', 'selected');
|
||||
|
||||
} else if (param == 0) {
|
||||
$('.fiberplanpipe-main-div').eq(index).html('test');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
)
|
||||
@@ -861,6 +863,8 @@ $(document).ready(function () {
|
||||
$(this).trigger('change', '1')
|
||||
})
|
||||
$('body').on('click', '.add-pipe', function () {
|
||||
var newindex = $('.fiberplancablepipe-div').length;
|
||||
console.log(newindex);
|
||||
$('#fiberplancablepipes-div').append(`<div class="fiberplancablepipe-div">
|
||||
<div class=" form-group row">
|
||||
<label class="col-lg-3 col-form-label fiberplanpipe-label" for="fiberPlanPipe_id"><span class=" label-text">Rohr *</span> <span class="endpointsymbol"></span></label>
|
||||
@@ -869,7 +873,7 @@ $(document).ready(function () {
|
||||
<option value=""></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-4 pipe-div"><select name="fiberplanpipe[]" required="required" class="select2select form-control fiberPlanPipe_id"></select><input type="hidden" name="fiberplanpipe_id[]" class="fiberplanpipe_id" value="x"></div>
|
||||
<div class="col-lg-4 pipe-div"><select data-index="` + newindex + `" name="fiberplanpipe[]" required="required" class="select2select form-control fiberPlanPipe_id"></select><input type="hidden" name="fiberplanpipe_id[]" class="fiberplanpipe_id" value="x"></div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-form-label" for="fiberPlanPipe_sub">Subrohr
|
||||
@@ -888,8 +892,6 @@ $(document).ready(function () {
|
||||
$('.fiberplancablepipe-div').eq(fiberplancablepipelength - 1).find('.pipe-network').trigger('change');
|
||||
|
||||
|
||||
|
||||
|
||||
$('.select2select').select2({placeholder: ""});
|
||||
checkendpoints();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user