Skip to content

Instantly share code, notes, and snippets.

View mitchellsimoens's full-sized avatar

Mitchell Simoens mitchellsimoens

View GitHub Profile
@mitchellsimoens
mitchellsimoens / gist:2502066
Created April 26, 2012 19:09
Quick form example
Ext.define('Test.field.Countries', {
extend : 'Ext.form.field.ComboBox',
alias : 'widget.field-countries',
fieldLabel : 'Countries',
queryMode : 'local',
displayField : 'name',
valueField : 'abbr',
store : {
xclass : 'Ext.data.Store',
@mitchellsimoens
mitchellsimoens / gist:1394471
Created November 25, 2011 21:37
Ext.form.field.ComboBox doQuery fix [4.0.7] [4.1.0 PR1]
/**
* @author Mitchell Simoens ([email protected])
*
* This override is to make {@link Ext.form.field.ComboBox} not disrupt
* existing filters on a {@link Ext.data.Store}.
*
* This override only affects the {@link Ext.form.field.ComboBox} if
* queryMode = 'local' and triggerAction = 'query'.
*
* Ext JS versions tested: 4.0.7, 4.1.0 PR1, SDK repo (2011-11-25)
@mitchellsimoens
mitchellsimoens / gist:1394360
Created November 25, 2011 20:27
LoadMask to display when grid is rendered but store is not done loading.
Ext.override(Ext.LoadMask, {
onBeforeLoad: function() {
var me = this;
if (!me.disabled) {
me.loading = true;
}
me.callOverridden(arguments);
}
@mitchellsimoens
mitchellsimoens / server.js
Created October 21, 2011 15:56
Basic server that body is undefined
//nodejs v0.4.13-pre
//express 2.4.7
var express = require('express'),
server = express.createServer(
express.bodyParser(),
express.methodOverride()
);
server.post('/', function(req, res) {