Basic Sendcloud integration with Shipment rework

This commit is contained in:
Andreas Palm
2022-10-26 23:46:38 +02:00
parent 2b5d01b52a
commit cd93d643f8
24 changed files with 1358 additions and 1390 deletions
@@ -11,35 +11,14 @@ var ShippingMethodCreate = function ($) {
vueElementId: '#shipment-create',
},
search: function (el) {
$.ajax({
url: 'index.php?module=versandarten&action=create&cmd=suche',
type: 'POST',
dataType: 'json',
data: {
val: $(el).val()
}
let val = $(el).val().toLowerCase();
$('.createbutton').each(function() {
let desc = $(this).find('.tilegrid-tile-title').text();
if (desc.toLowerCase().indexOf(val)>=0)
$(this).show();
else
$(this).hide();
})
.done(function (data) {
if (typeof data != 'undefined' && data != null) {
if (typeof data.ausblenden != 'undefined' && data.ausblenden != null) {
me.storage.hideElements = data.ausblenden.split(';');
$.each(me.storage.hideElements, function (k, v) {
if (v != '') {
$('#' + v).hide();
}
});
}
if (typeof data.anzeigen != 'undefined' && data.anzeigen != null) {
me.storage.showElements = data.anzeigen.split(';');
$.each(me.storage.showElements, function (k, v) {
if (v != '') {
$('#' + v).show();
}
});
}
}
});
},
init: function () {
if ($(me.selector.vueElementId).length === 0) {