Pārlūkot izejas kodu

[purge] remove jsbarcode lib, import

version-14
Prateeksha Singh pirms 7 gadiem
vecāks
revīzija
d54980b665
3 mainītis faili ar 5 papildinājumiem un 6 dzēšanām
  1. +4
    -4
      frappe/public/js/frappe/form/controls/barcode.js
  2. +0
    -2
      frappe/public/js/lib/JsBarcode.all.min.js
  3. +1
    -0
      package.json

+ 4
- 4
frappe/public/js/frappe/form/controls/barcode.js Parādīt failu

@@ -1,3 +1,5 @@
import JsBarcode from "jsbarcode";

frappe.ui.form.ControlBarcode = frappe.ui.form.ControlData.extend({ frappe.ui.form.ControlBarcode = frappe.ui.form.ControlData.extend({
make_wrapper() { make_wrapper() {
// Create the elements for barcode area // Create the elements for barcode area
@@ -5,14 +7,12 @@ frappe.ui.form.ControlBarcode = frappe.ui.form.ControlData.extend({


let $input_wrapper = this.$wrapper.find('.control-input-wrapper'); let $input_wrapper = this.$wrapper.find('.control-input-wrapper');
this.barcode_area = $(`<div class="barcode-wrapper border"><svg height=80></svg></div>`); this.barcode_area = $(`<div class="barcode-wrapper border"><svg height=80></svg></div>`);
frappe.require("assets/frappe/js/lib/JsBarcode.all.min.js", () => {
this.barcode_area.appendTo($input_wrapper);
});
this.barcode_area.appendTo($input_wrapper);
}, },


parse(value) { parse(value) {
// Parse raw value // Parse raw value
return this.get_barcode_html(value);
return value ? this.get_barcode_html(value) : "";
}, },


set_formatted_input(value) { set_formatted_input(value) {


+ 0
- 2
frappe/public/js/lib/JsBarcode.all.min.js
Failā izmaiņas netiks attēlotas, jo tās ir par lielu
Parādīt failu


+ 1
- 0
package.json Parādīt failu

@@ -22,6 +22,7 @@
"frappe-gantt": "^0.1.0", "frappe-gantt": "^0.1.0",
"fuse": "^0.4.0", "fuse": "^0.4.0",
"fuse.js": "^3.2.0", "fuse.js": "^3.2.0",
"jsbarcode": "^3.9.0",
"moment": "^2.20.1", "moment": "^2.20.1",
"redis": "^2.8.0", "redis": "^2.8.0",
"showdown": "^1.8.6", "showdown": "^1.8.6",


Notiek ielāde…
Atcelt
Saglabāt