Parent

Netzke::MasqueradeSelector

Public Class Methods

js_properties() click to toggle source
    # File lib/netzke/masquerade_selector.rb, line 29
29:     def self.js_properties
30:       {
31:         :after_constructor =>           function(){            this.items.each(function(tab){              tab.on('add', function(ct, cmp){                cmp.on('rowclick', this.rowclickHandler, this);              }, this);            }, this);          }.l,
32: 
33:         :rowclick_handler =>           function(grid, rowIndex, e){            var mode = grid.id.split("__").pop();            var normMode = mode === 'users' ? 'user' : 'role';            this.masquerade = {};            this.masquerade[normMode] = grid.store.getAt(rowIndex).get('id');          }.l
34:       }
35:     end

Public Instance Methods

items() click to toggle source
    # File lib/netzke/masquerade_selector.rb, line 4
 4:     def items
 5:       @items ||= [{
 6:           :name              => "roles",
 7:           :active            => true,
 8:           :class_name => "GridPanel",
 9:           :model   => 'Role',
10:           :columns           => [:id, :name],
11:           :ext_config => {
12:             :header        => false,
13:             :bbar => ['search']
14:           }
15:         },{
16:           :name                 => "users",
17:           :preloaded            => true,
18:           :class_name    => "GridPanel",
19:           :model      => 'User',
20:           :ext_config           => {
21:             :header        => false,
22:             :rows_per_page => 10,
23:             :bbar => ['search']
24:           },
25:           :columns => [:id, :login]
26:       }]
27:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.