Netzke::Basepack::GridPanel::Javascript::ClassMethods

Private Instance Methods

js_init_component() click to toggle source

Ext.Component#initComponent, built up from pices (dependent on class-level configuration)

    # File lib/netzke/basepack/grid_panel/javascript.rb, line 33
33:             def js_init_component
34:               # Optional "edit in form"-related events
35:               edit_in_form_events =                 if (this.enableEditInForm) {                  this.getSelectionModel().on('selectionchange', function(selModel){                    var disabled;                    if (!selModel.hasSelection()) {                      disabled = true;                    } else {                      // Disable "edit in form" button if new record is present in selection                      disabled = !selModel.each(function(r){                        if (r.isNew) { return false; }                      });                    };                    this.actions.editInForm.setDisabled(disabled);                  }, this);                } if edit_in_form_available
36:         
37:               # Result
38:                               function(){                  // Original initComponent                  #{js_full_class_name}.superclass.initComponent.call(this);                  #{edit_in_form_events}                }          
39:             end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.