Archive for the ‘Patterns’ Category

Ext Extension with Factory Functions File Pattern

Tuesday, September 21st, 2010

See also: Writing a Big Application in Ext Abstract classes with Ext JS Factory Functions in Ext Extensions (Abstract Classes) // vim: ts=4:sw=4:nu:fdc=2:nospell /*global Ext:true, AbstractPanel:true */ /*jslint browser:true, laxbreak:true */ // create namespace Ext.ns('AbstractPanel'); /** * @class AbstractPanel * @extends Ext.Panel * * AbstractPanel File Pattern * * @author Ing. Jozef Sakáloš * @copyright (c) ...

Keeping modified records of EditorGridPanel while paging

Monday, September 28th, 2009

If you modify records of an editable grid with paging and if you then page-out, your changes are lost. Well, they are not lost in fact unless you have set pruneModifiedRecords:true on the strore. The modifications are still available so we just need to apply them. Here is the code ...

Factory Function File Pattern

Tuesday, March 17th, 2009

You know, I'm not very big fan of factory functions, nevertheless, I'm aware of the fact that they may be necessary in some situations. Here is the file pattern that works (briefly tested). Keep each factory function in a separate file name of which should be Namespace.Factory.functionName.js // vim: ts=4:sw=4:nu:fdc=4:nospell /*global Ext, MyNamespace ...

CSS File Pattern

Friday, April 4th, 2008

/** vim: ts=4:sw=4:nu:fdc=4:nospell * * A CSS File * * @author Ing.Jozef Sakáloš * @copyright (c) 2008, by Ing. Jozef Sakáloš * @date 5. April 2008 * @version $Id$ * * @license A CSS File is licensed under the terms ...

Inline Anonymous Funcion Pattern

Thursday, April 3rd, 2008

var msg = "From inline function"; var result = (function(m) { alert(m); return "Result of inline function"; }(msg)); alert(result);

JavaScript Extension File Pattern

Thursday, April 3rd, 2008

// vim: ts=4:sw=4:nu:fdc=4:nospell /*global Ext, AnExtension */ /** * @class AnExtension * @extends Ext.Panel * * AnExtension description * * @author Ing. Jozef Sakáloš * @copyright (c) 2010, by Ing. Jozef Sakáloš * @date * 11. March 2010 * * @version ...

JavaScript Plugin File Pattern

Thursday, April 3rd, 2008

// vim: sw=4:ts=4:nu:nospell:fdc=4 /** * A Plugin * * @author Ing. Jozef Sakáloš * @copyright (c) 2008, by Ing. Jozef Sakáloš * @date 3. April 2008 * @version $Id$ * * @license plugin.js is licensed under the terms of the Open ...

Return Value of Function as items Pattern

Wednesday, April 2nd, 2008

,items:(function(){ var items = []; // populate items array return items; }).createDelegate(this)()

Defer Inline Anonymous Function Pattern

Wednesday, April 2nd, 2008

var text = 'Deferred'; (function() { alert(text); }.defer(2000, this));

PHP File Pattern

Wednesday, April 2nd, 2008

[paypal-donation]