Guest User

Untitled

a guest
Jan 22nd, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. class FeatureSet < Netzke::Base
  2. include Netzke::Basepack::DataAccessor
  3.  
  4.  
  5. js_base_class "Ext.panel.Panel"
  6.  
  7. js_mixin :feature_set, :add_panel
  8.  
  9. js_property :layout, 'accordion'
  10. js_property :width, 300
  11. js_property :height, 500
  12. # js_property :component_load_mask, {:msg => null} # due to a probable bug in Ext's Accordion Layout (mask message is mis-layed-out), disabling mask message
  13.  
  14. def js_config #:nodoc:
  15. super.merge({
  16. :animate => true,
  17. :model => config[:model],
  18. :pri => data_class.primary_key
  19. })
  20. end
  21.  
  22.  
  23. endpoint :get_features do |params|
  24. features = data_class.all()
  25. features.map do |f|
  26. {:add_panel => f.name}
  27. end
  28. end
  29.  
  30.  
  31. end
Add Comment
Please, Sign In to add comment