Skip to content

Instantly share code, notes, and snippets.

@scriptdev
scriptdev / .css
Last active April 19, 2024 03:36
ALTERAR COR DE FUNDO DOS CAMPOS DESABILITADOS DO FORMULÁRIO
/*ALTERA COR DE FUNDO DOS CAMPOS DESABILITADOS DO FORMULÁRIO*/
.tselect_disabled, .tfield_disabled, .note-editor.note-frame .note-editing-area .note-editable[contenteditable=false], .note-editor.note-airframe .note-editing-area .note-editable[contenteditable=false], .tfield_disabled+.pickr>button, .tfield_disabled[widget="tpassword"]+button, .tfield_disabled+.input-group-addon, .select2-disable+ .selection .select2-selection, .tcombo_disabled, .form-control:disabled, .form-control[readonly] {
background-color: #f8f9fa !important;
opacity: 1;
color: #000000 !important;
}
@scriptdev
scriptdev / .php
Last active April 19, 2024 03:36
TROCAR TEXTO DA TLabel VIA CÓDIGO (JAVASCRIPT)
<?php
if ($param['tipo_pessoa'] == 'FÍSICA')
{
TScript::create("$('label').filter(function() {return $(this).text().trim() === 'CPF';}).html('CNPJ');");
} elseif ($param['tipo_pessoa'] == 'JURÍDICA') {
TScript::create("$('label').filter(function() {return $(this).text().trim() === 'CNPJ';}).html('CPF');");
@scriptdev
scriptdev / .php
Last active April 19, 2024 03:35
MÁSCARA PORCENTAGEM NO TNumeric
<?php
# 1 - IMPORTAR O jquery.mask.js VIA CDN
# <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.16/jquery.mask.js"></script>
# OU IMPORTAR O ARQUIVO NO jquery.mask.js DIRETO NO SEU PROJETO, DOWNLOAD:
# https://gist.github.com/fabricio-dev-code/eedb80b18e460ae8c811863120d0692b
# 2 - NO __construct DEFINA O ID NO CAMPO QUE VOCÊ DESEJA APLICAR A MÁSCARA DE %
$porcentual->id = 'porcentual';
@scriptdev
scriptdev / .php
Created February 6, 2023 18:26
ADICIONAR ÍCONE DO Font Awesome NO TÍTULO DO FORMULÁRIO
<?php
public function __construct( $param )
{
parent::__construct();
$this->form = new BootstrapFormBuilder(self::$formName);
$this->form->setFormTitle("<i class=\"fas fa-chart-pie\"></i> FLUXO DE CAIXA);
@DraTeots
DraTeots / ComPort over Network.md
Last active April 19, 2024 03:34
ComPort over Network
@alubbock
alubbock / datatable-example.ipynb
Last active April 19, 2024 03:34
Sortable, searchable Pandas DataFrames in Jupyter Notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@scriptdev
scriptdev / .css
Created February 9, 2023 17:00
ALTERAR Z-INDEX JANELA SWEET ALERT
/*Z-INDEX JANELA SWEET ALERT*/
.swal2-container {
z-index: 9999 !important;
}
@scriptdev
scriptdev / .php
Last active April 19, 2024 03:33
EXTRAIR EXTENSÃO e NOME DO ARQUIVO EM PHP
<?php
public function onDownload($param = null)
{
try
{
$arquivo = $param['arquivo']; # app/output/1/contrato_aluguel.pdf
$extensao = pathinfo($arquivo, PATHINFO_EXTENSION);
$nome = pathinfo($arquivo, PATHINFO_FILENAME);
@scriptdev
scriptdev / .php
Last active April 19, 2024 03:33
MÉTODO PARA BAIXAR ARQUIVO ZIP "COMPACTADO"
<?php
public function onDownloadZip($param = null)
{
try
{
$arquivo = $param['arquivo'];
if (file_exists($arquivo))
{
@scriptdev
scriptdev / .php
Last active April 19, 2024 03:33
LISTAR A QUANTIDADE DE DIAS DE UM MÊS EM PHP
<?php
$dias = cal_days_in_month(CAL_GREGORIAN, 8, 2023); # 31 DIAS
echo "EXISTEM {$dias} DIAS DO MÊS DE AGOSTO DE 2023";
/*
cal_days_in_month($calendar, $month, $year)
calendar