Sha256: 5b9e5f372c678b65ec7f6d48a4782affbbfcb252c1ff4ad2bf6faccd2fa1b8b5

Contents?: true

Size: 923 Bytes

Versions: 3

Compression:

Stored size: 923 Bytes

Contents

Ext.define('<%= app_name %>.view.<%= singular_table_name %>.Grid', {
	extend: '<%= app_name %>.ux.grid.Panel',
	alias: 'widget.<%= singular_table_name %>grid',
	requires : ['<%= app_name %>.store.<%= plural_table_name.capitalize %>'],
	
	title: '<%= plural_table_name.capitalize %>',
	
	entitySingular: '<%= singular_table_name.capitalize %>',
	entityPlural: '<%= plural_table_name.capitalize %>',
	editWindow: '<%= app_name %>.view.<%= singular_table_name %>.EditWindow',
	updateWindow: '<%= app_name %>.view.<%= singular_table_name %>.UpdateWindow',
	
	initComponent: function() {
		this.store = <%= app_name %>.store.<%= plural_table_name.capitalize %>;
		this.columns = this.buildColumns();
		this.callParent(arguments);
	},
	
	buildColumns: function() {
		return [
			<% attributes.each_with_index do |attribute, index| %>
				<%= index > 0 ? ',' : '' %>{<%= create_ext_column(attribute) -%>}	
			<% end %>
		];
	}
});

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
extjs_scaffold-0.2.1 lib/generators/extjs_scaffold/scaffold_controller/templates/js/Grid.js
extjs_scaffold-0.2.0 lib/generators/extjs_scaffold/scaffold_controller/templates/js/Grid.js
extjs_scaffold-0.1.1 lib/generators/extjs_scaffold/scaffold_controller/templates/js/Grid.js