Sha256: 29ba7eb77c25c010a7d39fb7a4dbe37a2474b5c7f26ab8d5aa2a880fff994da6
Contents?: true
Size: 795 Bytes
Versions: 3
Compression:
Stored size: 795 Bytes
Contents
class Localization < Netzke::Base # This action will be translated per-class basis if the translation is available, falling back to the default action :action_one action :action_two do |a| a.text = I18n.t('localization.action_two') end action :action_three js_configure do |c| c.translate :property_one, :property_two c.on_render = <<-JS function(ct){ this.callParent(this, ct); this.body.update(this.i18n.propertyOne + " - " + this.i18n.propertyTwo); } JS c.on_action_three = <<-JS function(){ var mask = new Ext.LoadMask(this.body); mask.show(); } JS end def configure(c) super c.title = I18n.t('localization.title') c.bbar = [:action_one, :action_two, :action_three] end end
Version data entries
3 entries across 3 versions & 1 rubygems