Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View MikeTatsky's full-sized avatar

Mike Tatsky MikeTatsky

View GitHub Profile
@MikeTatsky
MikeTatsky / Combo.js
Created November 12, 2022 06:56
Sub search for combo
Fancy.Combo.prototype.onSubSearchChange = function(field, value){
var me = this,
lis = me.list.select('li'),
height = 0,
maxListHeight = me.listRowHeight * me.maxListRows;
value = value.toLocaleLowerCase();
F.each(me.data, function(item, i){
if (new RegExp(value).test(item[me.displayKey].toLocaleLowerCase())){
Fancy.MODULESDIR = 'https://unpkg.com/fancygrid@1.7.141/client/modules/;'
@MikeTatsky
MikeTatsky / App.js
Last active February 4, 2020 20:16
React FancyGrid
import React, { Component } from 'react';
import { Fancy, Grid } from 'fancygrid-react';
import 'fancygrid/client/modules/sort.min';
import 'fancygrid/client/modules/dom.min';
import 'fancygrid/client/modules/edit.min';
import 'fancygrid/client/modules/grid.min';
import 'fancygrid/client/modules/selection.min';
import 'fancygrid/client/modules/menu.min';
@MikeTatsky
MikeTatsky / ag-grid-columns-resize.js
Last active April 1, 2019 06:36
Sync columns resize for ag-Grid
onColumnResized = {
(e) => {
if (rootStore.viewGrids.length === 1) {
return;
}
if (window._agGridActiveResizeGridIndex !== undefined && window._agGridActiveResizeGridIndex !== gridIndex) {
return;
}
@MikeTatsky
MikeTatsky / Highcharts Cheat Sheet
Created October 21, 2017 09:09 — forked from mulhoon/Highcharts Cheat Sheet
Highcharts Cheat Sheet
$('#container').highcharts({
chart: {
alignTicks: true, // When using multiple axis, the ticks of two or more opposite axes will automatically be aligned by adding ticks to the axis or axes with the least ticks.
animation: true, // Set the overall animation for all chart updating. Animation can be disabled throughout the chart by setting it to false here.
backgroundColor: '#FFF', // The background color or gradient for the outer chart area.
borderColor: '#4572A7', // The color of the outer chart border.
borderRadius: 5, // The corner radius of the outer chart border. In export, the radius defaults to 0. Defaults to 5.
borderWidth: 0, // The pixel width of the outer chart border.
className: null, // A CSS class name to apply to the charts container div, allowing unique CSS styling for each chart.
defaultSeriesType: 'line', // Alias of type.
@MikeTatsky
MikeTatsky / paging.js
Last active August 30, 2017 14:21
FancyGrid - Server side paging and sorting
new FancyGrid({
title: 'Paging & Sorting',
width: 700,
height: 400,
data: {
proxy: {
url: 'paging.php'
}
},
defaults: {
@MikeTatsky
MikeTatsky / countries.json
Created July 25, 2017 10:10 — forked from keeguon/countries.json
A list of countries in JSON
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},
@MikeTatsky
MikeTatsky / form.js
Last active February 16, 2017 05:23
Form sample to edit grid
var form = new FancyForm({
renderTo: 'form',
title: 'User Data',
width: 290,
height: 500,
defaults: {
type: 'string'
},
items: [{
name: 'id',
@MikeTatsky
MikeTatsky / file.js
Last active January 28, 2017 12:29
For Manuk
function searchtags(params){
if(params){
var nprice_from = params.paramroom;
var nprice_to = params.paramroom;
var narea_from = params.paramkorpus;
var narea_to = params.paramarea;
}
else{
var nprice_from = $("#number_price_from").text();
var nprice_to = $("#number_price_to").text();
@MikeTatsky
MikeTatsky / .htaccess-mod_headers
Created November 24, 2016 12:24 — forked from hans2103/.htaccess-mod_headers
.htaccess rules to set cache control.
<IfModule mod_headers.c>
Header set Connection keep-alive
# Cache-control headers
# 2 HOURS
#<filesMatch "*">
Header set Cache-Control "max-age=7200, must-revalidate"
#</filesMatch>
# 480 weeks - 290304000