Sha256: 28802c732bf30df956af3954c7d3833c403d6e8e54cd0c3ade9875db08c91ad1

Contents?: true

Size: 772 Bytes

Versions: 3

Compression:

Stored size: 772 Bytes

Contents

/**
 * @singleton
 * 
 * application wide formatting
 *
 */
(function() {
	Ext.ns('<%= app_name %>.util');
	
	<%= app_name %>.util.Format = {};
	var AppUtilFormat = <%= app_name %>.util.Format;

	Ext.apply(AppUtilFormat, {
		/**
		* Returns a date as set format - used to control application wide grid dates
		* @return {Function} The date formatting function
		*/
		dateRenderer : function() {
			return function(v) {
				return Ext.util.Format.date(v, 'm/d/Y');
			}
		},
		
		/**
		* Returns an image or empty string - used to control application wide grid booleans
		* @return {Function} The boolean formatting function
		*/
		booleanRenderer: function() {
			return function(v) {
				return v ? '<img src="/images/extjs_scaffold/tick.png">' : '';
			}
		}
	});	
})();

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
extjs_scaffold-0.2.1 lib/generators/extjs_scaffold/install/templates/Format.js
extjs_scaffold-0.2.0 lib/generators/extjs_scaffold/install/templates/Format.js
extjs_scaffold-0.1.1 lib/generators/extjs_scaffold/install/templates/Format.js