diff --git a/.github/workflows/docs-checker.yml b/.github/workflows/docs-checker.yml index 80b2469c0c..dade810b64 100644 --- a/.github/workflows/docs-checker.yml +++ b/.github/workflows/docs-checker.yml @@ -18,7 +18,7 @@ jobs: python-version: 3.8 - name: 'Clone repo' - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Validate Docs env: diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 7a17648ff0..4c845dba8c 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -9,7 +9,7 @@ jobs: name: Frappe Linter runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python 3.8 uses: actions/setup-python@v4 @@ -17,7 +17,7 @@ jobs: python-version: 3.8 - name: Install and Run Pre-commit - uses: pre-commit/action@v2.0.3 + uses: pre-commit/action@v3.0.0 - name: Download Semgrep rules run: git clone --depth 1 https://github.com/frappe/semgrep-rules.git frappe-semgrep-rules diff --git a/.github/workflows/patch-mariadb-tests.yml b/.github/workflows/patch-mariadb-tests.yml index ae5802a8e1..60d0ce60af 100644 --- a/.github/workflows/patch-mariadb-tests.yml +++ b/.github/workflows/patch-mariadb-tests.yml @@ -28,7 +28,7 @@ jobs: steps: - name: Clone - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Python uses: actions/setup-python@v4 diff --git a/.github/workflows/publish-assets-develop.yml b/.github/workflows/publish-assets-develop.yml index 6cd3af78f2..037c8c26eb 100644 --- a/.github/workflows/publish-assets-develop.yml +++ b/.github/workflows/publish-assets-develop.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: path: 'frappe' - uses: actions/setup-node@v3 diff --git a/.github/workflows/publish-assets-releases.yml b/.github/workflows/publish-assets-releases.yml index f242a363b4..594229a156 100644 --- a/.github/workflows/publish-assets-releases.yml +++ b/.github/workflows/publish-assets-releases.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: path: 'frappe' - uses: actions/setup-node@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 32c5d53831..f73bed09c7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Entire Repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 persist-credentials: false diff --git a/.github/workflows/server-mariadb-tests.yml b/.github/workflows/server-mariadb-tests.yml index f7f3aae8d0..51d379d5db 100644 --- a/.github/workflows/server-mariadb-tests.yml +++ b/.github/workflows/server-mariadb-tests.yml @@ -37,7 +37,7 @@ jobs: steps: - name: Clone - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Python uses: actions/setup-python@v4 diff --git a/.github/workflows/server-postgres-tests.yml b/.github/workflows/server-postgres-tests.yml index 5116d4198e..d93edad0ec 100644 --- a/.github/workflows/server-postgres-tests.yml +++ b/.github/workflows/server-postgres-tests.yml @@ -40,7 +40,7 @@ jobs: steps: - name: Clone - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Python uses: actions/setup-python@v4 diff --git a/.github/workflows/ui-tests.yml b/.github/workflows/ui-tests.yml index 72fe3e67bb..09b2a3caf8 100644 --- a/.github/workflows/ui-tests.yml +++ b/.github/workflows/ui-tests.yml @@ -36,7 +36,7 @@ jobs: steps: - name: Clone - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Python uses: actions/setup-python@v4 diff --git a/cypress/support/commands.js b/cypress/support/commands.js index c168b0c201..b3708a1dba 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -313,7 +313,12 @@ Cypress.Commands.add('insert_doc', (doctype, args, ignore_duplicate) => { if (ignore_duplicate) { status_codes.push(409); } - expect(res.status).to.be.oneOf(status_codes); + + let message = null; + if (ignore_duplicate && !status_codes.includes(res.status)) { + message = `Document insert failed, response: ${JSON.stringify(res, null, '\t')}`; + } + expect(res.status).to.be.oneOf(status_codes, message); return res.body.data; }); }); diff --git a/frappe/printing/page/print_format_builder/print_format_builder_column_selector.html b/frappe/printing/page/print_format_builder/print_format_builder_column_selector.html index 15d029704b..5292531e4c 100644 --- a/frappe/printing/page/print_format_builder/print_format_builder_column_selector.html +++ b/frappe/printing/page/print_format_builder/print_format_builder_column_selector.html @@ -13,7 +13,7 @@
- +
@@ -23,7 +23,7 @@
diff --git a/frappe/printing/page/print_format_builder/print_format_builder_section.html b/frappe/printing/page/print_format_builder/print_format_builder_section.html index 70a97a15f0..108e5ff01c 100644 --- a/frappe/printing/page/print_format_builder/print_format_builder_section.html +++ b/frappe/printing/page/print_format_builder/print_format_builder_section.html @@ -1,10 +1,10 @@ diff --git a/frappe/public/icons/social/fair.svg b/frappe/public/icons/social/fair.svg index 4cfc77a71f..60c00dc7af 100644 --- a/frappe/public/icons/social/fair.svg +++ b/frappe/public/icons/social/fair.svg @@ -4,11 +4,11 @@ - + - + diff --git a/frappe/public/icons/social/office_365.svg b/frappe/public/icons/social/office_365.svg index d93167741d..77c3559408 100644 --- a/frappe/public/icons/social/office_365.svg +++ b/frappe/public/icons/social/office_365.svg @@ -35,11 +35,11 @@ - + - + diff --git a/frappe/public/icons/timeless/symbol-defs.svg b/frappe/public/icons/timeless/icons.svg similarity index 100% rename from frappe/public/icons/timeless/symbol-defs.svg rename to frappe/public/icons/timeless/icons.svg diff --git a/frappe/public/images/leaflet/spritesheet.svg b/frappe/public/images/leaflet/spritesheet.svg index 3c00f30314..05feda62df 100644 --- a/frappe/public/images/leaflet/spritesheet.svg +++ b/frappe/public/images/leaflet/spritesheet.svg @@ -134,14 +134,14 @@ transform="translate(120,0)" style="fill:#bbbbbb"> { - if ( - window.cordova && - window.cordova.plugins && - window.cordova.plugins.barcodeScanner - ) { - window.cordova.plugins.barcodeScanner.scan(result => { - if (!result.cancelled) { - resolve(result.text); - } - }, reject); - } else { - frappe.require('barcode_scanner.bundle.js', () => { - frappe.barcode.get_barcode().then(barcode => { - resolve(barcode); - }); - }); - } - }); -}; diff --git a/frappe/public/js/frappe/barcode_scanner/quagga.js b/frappe/public/js/frappe/barcode_scanner/quagga.js deleted file mode 100644 index fcab3b4dbe..0000000000 --- a/frappe/public/js/frappe/barcode_scanner/quagga.js +++ /dev/null @@ -1,94 +0,0 @@ -import Quagga from 'quagga/dist/quagga'; -frappe.provide('frappe.barcode'); - -Quagga.onProcessed(function(result) { - let drawingCtx = Quagga.canvas.ctx.overlay, - drawingCanvas = Quagga.canvas.dom.overlay; - - if (result) { - if (result.boxes) { - drawingCtx.clearRect( - 0, - 0, - parseInt(drawingCanvas.getAttribute('width')), - parseInt(drawingCanvas.getAttribute('height')) - ); - result.boxes - .filter(function(box) { - return box !== result.box; - }) - .forEach(function(box) { - Quagga.ImageDebug.drawPath(box, { x: 0, y: 1 }, drawingCtx, { - color: 'green', - lineWidth: 2 - }); - }); - } - - if (result.box) { - Quagga.ImageDebug.drawPath(result.box, { x: 0, y: 1 }, drawingCtx, { - color: '#00F', - lineWidth: 2 - }); - } - - if (result.codeResult && result.codeResult.code) { - Quagga.ImageDebug.drawPath(result.line, { x: 'x', y: 'y' }, drawingCtx, { - color: 'red', - lineWidth: 3 - }); - } - } -}); - -frappe.barcode.get_barcode = function() { - return new Promise(resolve => { - let d = new frappe.ui.Dialog({ - title: __('Scan Barcode'), - fields: [ - { - fieldtype: 'HTML', - fieldname: 'scan_area' - } - ], - on_page_show() { - let $scan_area = d.get_field('scan_area').$wrapper; - $scan_area.addClass('barcode-scanner'); - - Quagga.init( - { - inputStream: { - name: 'Live', - type: 'LiveStream', - target: $scan_area.get(0) - }, - decoder: { - readers: ['code_128_reader'] - } - }, - function(err) { - if (err) { - // eslint-disable-next-line - console.log(err); - return; - } - // eslint-disable-next-line - console.log('Initialization finished. Ready to start'); - Quagga.start(); - } - ); - - Quagga.onDetected(function(result) { - let code = result.codeResult.code; - if (code) { - Quagga.stop(); - d.hide(); - resolve(code); - } - }); - } - }); - - d.show(); - }); -}; diff --git a/frappe/public/js/frappe/file_uploader/FileUploader.vue b/frappe/public/js/frappe/file_uploader/FileUploader.vue index b940d8d773..fa722ff3af 100644 --- a/frappe/public/js/frappe/file_uploader/FileUploader.vue +++ b/frappe/public/js/frappe/file_uploader/FileUploader.vue @@ -65,7 +65,7 @@ diff --git a/frappe/public/js/frappe/form/templates/print_layout.html b/frappe/public/js/frappe/form/templates/print_layout.html index 366a771218..f65eb86bd4 100644 --- a/frappe/public/js/frappe/form/templates/print_layout.html +++ b/frappe/public/js/frappe/form/templates/print_layout.html @@ -25,7 +25,7 @@ {%= __("Settings") %} - + diff --git a/frappe/public/js/frappe/form/templates/timeline_message_box.html b/frappe/public/js/frappe/form/templates/timeline_message_box.html index a38e36c7b5..ad7ddc37e5 100644 --- a/frappe/public/js/frappe/form/templates/timeline_message_box.html +++ b/frappe/public/js/frappe/form/templates/timeline_message_box.html @@ -68,7 +68,7 @@
@@ -41,7 +41,7 @@ - + @@ -55,7 +55,7 @@ diff --git a/frappe/public/js/frappe/ui/sort_selector.html b/frappe/public/js/frappe/ui/sort_selector.html index 81288f305e..6f79f986a1 100644 --- a/frappe/public/js/frappe/ui/sort_selector.html +++ b/frappe/public/js/frappe/ui/sort_selector.html @@ -5,7 +5,7 @@ title="{{ sort_order==="desc" ? "descending" : "ascending" }}"> - + diff --git a/frappe/public/js/frappe/ui/toolbar/navbar.html b/frappe/public/js/frappe/ui/toolbar/navbar.html index 73767d2019..3276ca302a 100644 --- a/frappe/public/js/frappe/ui/toolbar/navbar.html +++ b/frappe/public/js/frappe/ui/toolbar/navbar.html @@ -15,7 +15,7 @@ aria-haspopup="true" > - + diff --git a/frappe/public/js/frappe/views/kanban/kanban_column.html b/frappe/public/js/frappe/views/kanban/kanban_column.html index f2b537aca4..9c9f1eede0 100644 --- a/frappe/public/js/frappe/views/kanban/kanban_column.html +++ b/frappe/public/js/frappe/views/kanban/kanban_column.html @@ -7,7 +7,7 @@