Skip to content

Instantly share code, notes, and snippets.

@redhead
redhead / live-form-validation.js
Created August 26, 2010 21:16
Live Form Validation for Nette 2.0
/**
* Live Form Validation for Nette 2.0
*
* @author Radek Ježdík, MartyIX, David Grudl
*/
var LiveForm = {
options: {
controlErrorClass: 'form-control-error', // CSS class for an invalid control
errorMessageClass: 'form-error-message', // CSS class for an error message
<?php
namespace NetteExtras\Forms;
class ChangeTracker extends \Nette\Forms\HiddenField
{
private $session;
private $modifiedValues;
@Mikulas
Mikulas / FormMacros.php
Created October 3, 2010 11:03 — forked from janmarek/FormMacros.php
Form Macros
<?php
namespace Nette\Templating;
use Nette\Forms\Form;
use Nette\Utils\Strings as String;
use Nette\InvalidStateException;
use Nette\Object;
use Nette\Latte\DefaultMacros;
@fprochazka
fprochazka / LookoutControl.php
Created October 15, 2010 10:41
LookoutControl - Control with fake life cycle
<?php
namespace Kdyby\Control;
use Nette;
use Nette\String;
class LookoutControl extends Nette\Application\Control
@fprochazka
fprochazka / PresenterInfo.php
Created November 19, 2010 01:00
PresenterTree
<?php
namespace Kdyby;
use Nette;
use Nette\Reflection\ClassType;
/**
@fprochazka
fprochazka / ApplicationLock.php
Created November 23, 2010 18:14
Zámek aplikace
<?php
namespace Kdyby\Security;
use Nette;
use Kdyby;
/**
* Globální zámek pro aplikaci, vyžaduje auth handler, ideálně napojit http_authentication
@fprochazka
fprochazka / Headjs.php
Created December 9, 2010 21:10
Inteligent Head JS (http://headjs.com/) loading component
<?php
namespace Kdyby\Component;
use Nette;
use Nette\String;
use Nette\Web\Html;
use Kdyby;
@paranoiq
paranoiq / aaa.txt
Created February 15, 2011 18:24
Cross-browser styling of <fieldset> and <legend> without any additional HTML elements
formátování <fieldset> a <legend> je opravdu vojeb. veškerá řešení,
která jsem našel vyžadovala přidat do kódu nějaké pomocné <div>y nebo
<span>y. takové řešení mi ale nevyhovuje
nakonec jsem dospěl k tomuto. vypadá na pixel stejně ve všech novějších
prohlížečích včetně IE7. v IE6 a starších (bez selektorů + a >) nefunguje
falešný padding
@leif81
leif81 / git_fix_author
Created March 9, 2011 21:50
Written to change the unix name used for a cvs commit to a pretty git name for the user. Implementation borrowed from http://lists.freedesktop.org/archives/portland/2010-October.txt author-conv-file format (same format as git-cvsimport requires):
#!/bin/bash
export $authors_file=author-conv-file
git filter-branch -f --env-filter '
get_name () {
grep "^$1=" "$authors_file" |
sed "s/^.*=\(.*\) <.*>$/\1/"
}
@ondrejmirtes
ondrejmirtes / ConsoleDebug.php
Created March 18, 2011 12:44
PHP Nette CLI comfortable debugging
<?php
namespace Tools;
use Nette\Debug;
use Nette\Environment;
use Nette\Finder;
/**
* Shows exceptions thrown in CLI mode in browser.