Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/old/app/code/Chronopost/Chronorelais/view/adminhtml/web/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/corals/old/app/code/Chronopost/Chronorelais/view/adminhtml/web/js/shipmentDimensions.js
require([
    'jquery'
], function ($) {
    'use strict';

    var fn = function () {
        buildDimensionsJson();

        $(".adminhtml-order_shipment-new #edit_form, .adminhtml-order-shipment-new #edit_form").on('save', function () {
            buildDimensionsJson();

            return false;
        });

        function buildDimensionsJson()
        {
            var dimensions = {};

            var weights = $('.dimensions-input-container input[name="weight_input"]');
            var widths = $('.dimensions-input-container input[name="width_input"]');
            var heights = $('.dimensions-input-container input[name="height_input"]');
            var lengths = $('.dimensions-input-container input[name="length_input"]');

            for (var i = 0; i < weights.length; i++) {
                var dimension = {};
                dimension.weight = $(weights[i]).val();
                dimension.width = $(widths[i]).val();
                dimension.height = $(heights[i]).val();
                dimension.length = $(lengths[i]).val();
                dimensions[i] = dimension;
            }

            $('#input_dimensions').val(JSON.stringify(dimensions));
        }
    };

    fn();
});

Spamworldpro Mini