AnonSec Shell
Server IP : 162.214.74.102  /  Your IP : 216.73.217.80
Web Server : Apache
System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64
User : lrsys ( 1015)
PHP Version : 5.6.40
Disable Function : exec,passthru,shell_exec,system
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/lrsys/public_html/lrsys_apps/meridional/ui/lib/jslib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/lrsys/public_html/lrsys_apps/meridional/ui/lib/jslib/product-manufacturer.js
$(document).ready(function () {

    var _url = $("#_url").val();


   //formulario para adicionar
    var form_manufacturer = "<form class=\"form-horizontal push-10\" method=\"post\" onsubmit=\"return false;\">\n  \n\
        <div class=\"form-group\">\n        <div class=\"col-xs-12\">\n            <div class=\"form-material floating open\">\n                <input class=\"form-control\" type=\"text\" id=\"manufacturer_name\" maxlength='10' name=\"manufacturer_name\">\n                <label for=\"envato_api_key\">" + _L['Manufacturer Name']+ "<span class='red'>*</span></label>\n                           </div>\n        </div>\n    </div>\n\n\n\
        <div class=\"form-group\">\n        <div class=\"col-xs-12\">\n            <div class=\"form-material floating open\">\n                <input class=\"form-control\" type=\"text\" id=\"manufacturer_code\" maxlength='10' name=\"manufacturer_code\">\n                <label for=\"envato_api_key\">" + _L['Code'] + "</label>\n                           </div>\n        </div>\n    </div>\n\n\n\
      </form>";


   
    //adiciona novo
    $("#add_new_manufacturer").click(function(e){
        var box =   bootbox.dialog({
           title: _L['Add New Manufacturer'],
           message: form_manufacturer,
           buttons: {
               success: {
                   label: _L['Save'],
                   className: "btn-primary",
                   callback: function () {
                       var name_val = $('#manufacturer_name').val();
                       var code_val = $('#manufacturer_code').val();
                       $.post(  _url + "product_manufacturer/add-post/msg", { name: name_val,code:code_val })
                           .done(function( data ) {
                               if ($.isNumeric(data)) {
                                   location.reload();
                               } else {
                                   bootbox.alert(data);
                               }
                           });
                        }
                    }
                },
                show: false
            }
        );
        e.preventDefault();
        box.modal('show');
    });

    //excluir
    $(".cdelete").click(function (e) {
        e.preventDefault();
        var id =  $( this ).attr( "data-id" );
        bootbox.confirm(_L['are_you_sure'], function(result) {
            if(result){
                var _url = $("#_url").val();
                window.location.href = _url + "product_manufacturer/delete/" + id;
            }
        });
    });


    $(".edit").click(function (e) {
        //recebe os parametros
        var name = $( this ).attr( "data-name" );
        var code = $( this ).attr( "data-code" );
        var id = $( this ).attr( "data-id" );
        
        var box =   bootbox.dialog({
           title: _L['Edit'],
           message: form_manufacturer,
           buttons: {
               success: {
                   label: _L['Save'],
                   className: "btn-primary",
                   callback: function () {
                       var name_val = $('#manufacturer_name').val();
                       var code_val = $('#manufacturer_code').val();
                       $.post(  _url + "product_manufacturer/edit-post/msg", {id:id, name: name_val,code:code_val })
                           .done(function( data ) {
                               if ($.isNumeric(data)) {
                                   location.reload();
                               }
                               else {
                                   bootbox.alert(data);
                               }
                           });
                        }
                    }
                },
                show: false
            }
        );
        e.preventDefault();
        //atribui os valores
        $('#manufacturer_name').val(name);
        $('#manufacturer_code').val(code);
        box.modal('show');
    });




});

Anon7 - 2022
AnonSec Team