/*
 * File: app/store/fileStore.js
 *
 * This file was generated by Sencha Architect version 3.0.2.
 * http://www.sencha.com/products/architect/
 *
 * This file requires use of the Ext JS 4.2.x library, under independent license.
 * License of Sencha Architect does not include license for Ext JS 4.2.x. For more
 * details see http://www.sencha.com/license or contact license@sencha.com.
 *
 * This file will be auto-generated each and everytime you save your project.
 *
 * Do NOT hand edit this file.
 */

Ext.define('MyApp.store.fileStore', {
	extend: 'Ext.data.Store',

	requires: [
		'MyApp.model.fileModel',
		'Ext.data.proxy.Ajax',
		'Ext.data.reader.Json'
	],

	constructor: function(cfg) {
		var me = this;
		cfg = cfg || {};
		me.callParent([Ext.apply({
			autoLoad: true,
			autoSync: true,
			model: 'MyApp.model.fileModel',
			storeId: 'fileStore',
			proxy: {
				type: 'ajax',
				url: '../../service/archive_um_data.php',
				reader: {
					type: 'json',
					root: 'result'
				}
			},
			listeners: {
				load: {
					fn: me.onJsonstoreLoad,
					scope: me
				}
			}
		}, cfg)]);
	},

	onJsonstoreLoad: function(store, records, successful, eOpts) {
		//console.log("Load is executed now");
		MyApp.app.getController('LicenseController').getDeleteLicBtn().disable();
	}

});