%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/jalalj2hb/www/wp-content/plugins/ninja-forms/client/dashboard/controllers/
Upload File :
Create Path :
Current File : /home/jalalj2hb/www/wp-content/plugins/ninja-forms/client/dashboard/controllers/formsController.js

/*
 * Handles setting up our forms table.
 *
 * Holds a collection of our forms.
 * Replies to requests for form data.
 * Updates form models.
 */
define([ 'models/formModel', 'models/formCollection' ], function( FormModel, FormCollection ) {
	var controller = Marionette.Object.extend( {
		initialize: function() {
			this.forms = new FormCollection();

            nfRadio.channel( 'dashboard' ).reply( 'get:forms', this.getForms, this );

			this.forms.fetch({
				success: function( collection ){
                    nfRadio.channel( 'dashboard' ).trigger( 'fetch:forms', collection );
				}
			});
		},

		getForms: function() {
			return this.forms;
		},
	});

	return controller;
} );

Zerion Mini Shell 1.0