FramesManager.js 601 Bytes
Ext.define('treps.controller.Frames.FramesManager', {
	singleton : true,

        constructor: function() {
        },

	loadFramesStore: function(onAfterLoad) {
		var me = this;

		var store = Ext.getStore('FramesStore');

		if (store == null)
			store = Ext.create('treps.store.Frames');
		else
			store.removeAll();

		store.load(
			{
				scope: me,
				callback: function(records, operation, success)
				{
					if (!success)
					{
						treps.Messages.showError("Cannot get frames list");
						return;
					}
					if (onAfterLoad != null)
						onAfterLoad.call(me,store);
				}
			});
	}
});