Merge pull request #321 from eReuse/bugfix/3666-label
Bugfix/3666 label
This commit is contained in:
commit
eea6d5c7e7
|
@ -216,7 +216,7 @@ function removeLot() {
|
||||||
|
|
||||||
function removeTag() {
|
function removeTag() {
|
||||||
const devices = TableController.getSelectedDevices();
|
const devices = TableController.getSelectedDevices();
|
||||||
const devices_id = devices.map(dev => dev.data);
|
const devices_id = devices.map(dev => $(dev).attr('data'));
|
||||||
|
|
||||||
if (devices_id.length == 1) {
|
if (devices_id.length == 1) {
|
||||||
const url = "/inventory/tag/devices/".concat(devices_id[0], "/del/");
|
const url = "/inventory/tag/devices/".concat(devices_id[0], "/del/");
|
||||||
|
@ -228,7 +228,7 @@ function removeTag() {
|
||||||
|
|
||||||
function addTag() {
|
function addTag() {
|
||||||
const devices = TableController.getSelectedDevices();
|
const devices = TableController.getSelectedDevices();
|
||||||
const devices_id = devices.map(dev => dev.data);
|
const devices_id = devices.map(dev => $(dev).attr('data'));
|
||||||
|
|
||||||
if (devices_id.length == 1) {
|
if (devices_id.length == 1) {
|
||||||
$("#addingTagModal .pol").hide();
|
$("#addingTagModal .pol").hide();
|
||||||
|
|
|
@ -207,7 +207,7 @@ function removeLot() {
|
||||||
|
|
||||||
function removeTag() {
|
function removeTag() {
|
||||||
const devices = TableController.getSelectedDevices();
|
const devices = TableController.getSelectedDevices();
|
||||||
const devices_id = devices.map(dev => dev.data);
|
const devices_id = devices.map(dev => $(dev).attr("data"));
|
||||||
if (devices_id.length == 1) {
|
if (devices_id.length == 1) {
|
||||||
const url = `/inventory/tag/devices/${devices_id[0]}/del/`;
|
const url = `/inventory/tag/devices/${devices_id[0]}/del/`;
|
||||||
window.location.href = url;
|
window.location.href = url;
|
||||||
|
@ -218,7 +218,7 @@ function removeTag() {
|
||||||
|
|
||||||
function addTag() {
|
function addTag() {
|
||||||
const devices = TableController.getSelectedDevices();
|
const devices = TableController.getSelectedDevices();
|
||||||
const devices_id = devices.map(dev => dev.data);
|
const devices_id = devices.map(dev => $(dev).attr("data"));
|
||||||
if (devices_id.length == 1) {
|
if (devices_id.length == 1) {
|
||||||
$("#addingTagModal .pol").hide();
|
$("#addingTagModal .pol").hide();
|
||||||
$("#addingTagModal .btn-primary").show();
|
$("#addingTagModal .btn-primary").show();
|
||||||
|
|
|
@ -234,9 +234,9 @@ function printpdf() {
|
||||||
if ($("#qrCheck").prop('checked')) {
|
if ($("#qrCheck").prop('checked')) {
|
||||||
var h = hspace + border - img_side/2;
|
var h = hspace + border - img_side/2;
|
||||||
var w = border*2 + img_side;
|
var w = border*2 + img_side;
|
||||||
pdf.text(tag, w, h);
|
pdf.text(String(tag), w, h);
|
||||||
} else {
|
} else {
|
||||||
pdf.text(tag, border, hspace);
|
pdf.text(String(tag), border, hspace);
|
||||||
}
|
}
|
||||||
hspace += line;
|
hspace += line;
|
||||||
};
|
};
|
||||||
|
@ -244,26 +244,26 @@ function printpdf() {
|
||||||
var sn = $(y).data('sid');
|
var sn = $(y).data('sid');
|
||||||
pdf.setFontSize(12);
|
pdf.setFontSize(12);
|
||||||
if (sn) {
|
if (sn) {
|
||||||
pdf.text(sn, border, hspace);
|
pdf.text(String(sn), border, hspace);
|
||||||
hspace += line;
|
hspace += line;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if ($("#serialNumberCheck").prop('checked')) {
|
if ($("#serialNumberCheck").prop('checked')) {
|
||||||
var sn = $(y).data('serial-number');
|
var sn = $(y).data('serial-number');
|
||||||
pdf.setFontSize(12);
|
pdf.setFontSize(12);
|
||||||
pdf.text(sn, border, hspace);
|
pdf.text(String(sn), border, hspace);
|
||||||
hspace += line;
|
hspace += line;
|
||||||
};
|
};
|
||||||
if ($("#manufacturerCheck").prop('checked')) {
|
if ($("#manufacturerCheck").prop('checked')) {
|
||||||
var sn = $(y).data('manufacturer');
|
var sn = $(y).data('manufacturer');
|
||||||
pdf.setFontSize(12);
|
pdf.setFontSize(12);
|
||||||
pdf.text(sn, border, hspace);
|
pdf.text(String(sn), border, hspace);
|
||||||
hspace += line;
|
hspace += line;
|
||||||
};
|
};
|
||||||
if ($("#modelCheck").prop('checked')) {
|
if ($("#modelCheck").prop('checked')) {
|
||||||
var sn = $(y).data('model');
|
var sn = $(y).data('model');
|
||||||
pdf.setFontSize(8);
|
pdf.setFontSize(8);
|
||||||
pdf.text(sn, border, hspace);
|
pdf.text(String(sn), border, hspace);
|
||||||
hspace += line;
|
hspace += line;
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
Reference in New Issue