Sha256: 44a61832c0fe13f7ed1ac437ceba07da7a13aea91dcf77d5afafbbfaf67cee11

Contents?: true

Size: 1.13 KB

Versions: 8

Compression:

Stored size: 1.13 KB

Contents

// Editors for grid cells and form fields
Ext.netzke.editors = {
	combo_box: function(c, config){
		var row = Ext.data.Record.create([{name:'id'}])
    var store = new Ext.data.Store({
      proxy: new Ext.data.HttpProxy({url:config.interface.getCbChoices, jsonData:{column:c.name}}),
      reader: new Ext.data.ArrayReader({root:'data', id:0}, row)
    })
    return new Ext.form.ComboBox({
      mode: 'remote',
      displayField:'id',
			valueField:'id',
			triggerAction:'all',
      store: store
    })
	},

	text_field: function(c, config){
		return new Ext.form.TextField({
			selectOnFocus:true
		})
	},
	
	checkbox: function(c, config){
		return new Ext.form.TextField({
			selectOnFocus:true
		})
	},
	
	number_field: function(c, config){
		return new Ext.form.NumberField({
			selectOnFocus:true
		})
	},
	
	// TODO: it's simply a text field for now
	datetime: function(c, config){
		return new Ext.form.TextField({
			selectOnFocus:true
		})
	}
};

// Mapping of showsAs field to grid filters
Ext.netzke.filterMap = {
	number_field:'Numeric',
	text_field:'String',
	datetime:'String',
	checkbox:'Boolean',
	combo_box:'String',
	date:'Date'
}

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
skozlov-netzke-basepack-0.1.1.1 javascripts/basepack.js
skozlov-netzke-basepack-0.1.1.2 javascripts/basepack.js
skozlov-netzke-basepack-0.1.1 javascripts/basepack.js
netzke-basepack-0.1.3 javascripts/basepack.js
netzke-basepack-0.1.4.1 javascripts/basepack.js
netzke-basepack-0.1.3.1 javascripts/basepack.js
netzke-basepack-0.1.2 javascripts/basepack.js
netzke-basepack-0.1.2.1 javascripts/basepack.js