Skip to content

Instantly share code, notes, and snippets.

View maiordom's full-sized avatar

Vadim Zhulanov maiordom

View GitHub Profile
/**
* ==============================================================
* au-compare-shadow
* ==============================================================
*/
.au-compare-shadow
position absolute
overflow hidden
getHeadersTmpl: function( types, data ) {
var tmpl = [], group, type, rows, tag, el, isNone, rowData, rowTmpl, rowElement;
for ( var t = 0; t < types.length; t++ ) {
type = types[ t ];
rows = data[ 0 ][ type ].rows;
tag = data[ 0 ][ type ].tag;
group = { html: '', cell: {} };
/* row titles */
@maiordom
maiordom / auth-form.after.js
Created July 15, 2014 10:42
simple refactoring №1
/* global AM:true */
(function( $, window, undefined ) {
'use strict';
var AuthForm = function( $el ) {
this.init( $el );
};
AuthForm.prototype = {
init: function( $el ) {
@maiordom
maiordom / hint.js
Created August 29, 2014 15:46
hint.js
( function ( $, root, undefined ) {
"use strict";
var defaultHintTmpl =
'<div class="au-hint au-hint_default" style="display: none;">\
<div class="au-block-arrow"></div>\
<div class="au-hint__body"></div>\
</div>';
@maiordom
maiordom / region.after.js
Created October 1, 2014 10:29
simple refactoring №3
(function( $ ) {
'use strict';
var ElementRegion = function( $el ) {
this.cacheObjects( $el );
this.bindEvents();
};
ElementRegion.prototype = {
cacheObjects: function( $el ) {
@maiordom
maiordom / hint.after.js
Last active August 29, 2015 14:07
simple refactoring №2
(function ( $, root, undefined ) {
'use strict';
var defaultHintTmpl =
'<div class="au-hint au-hint_default" style="display: none;">\
<div class="au-block-arrow"></div>\
<div class="au-hint__body"></div>\
</div>';
var spoilerHintTmpl =
@maiordom
maiordom / connection_request.css
Created September 12, 2012 04:23
specification
/* ----------------------------- *
* --- Заявка на подключение --- *
-------------------------------- */
.b-ctn__wrapper { font-family: Arial, sans-serif; color: #5A5A5A; }
.b-ctn__section-name { line-height: 50px; background: #F1F1F1; font-size: 16px; font-weight: bold; margin-bottom: 30px; }
.b-ctn__section-name span { display: block; width: 940px; margin: 0 auto; text-transform: uppercase; }
.b-ctn {}
function callBack() {
var from = $( ".b-call-time__from" ),
to = $( ".b-call-time__to" ),
fromField = from.find( ".b-form__field" ),
toField = to.find( ".b-form__field" );
bindEvents( from, checkFrom, fromField );
bindEvents( to, checkTo, toField );
function bindEvents( el, checkFunc, field ) {
var stack = (function() {
var arr = [];
function shift() {
arr.splice( 0, 1 );
arr.length ? arr[ 0 ]() : null;
}
function create( func, funcParams ) {
funcParams.push( shift );
@maiordom
maiordom / style.js
Last active December 25, 2015 18:49
/* global AM:true */
(function( $, window, undefined, document ) {
'use strict';
var WidgetName = function( $el, options ) {
this.init( $el, options );
};
var bind = function( context, callback ) {
return function() {