Sha256: 8a356b4ba56e002f364e2a8056bad099d9e9ea6fe01790818841cff988fd865f
Contents?: true
Size: 949 Bytes
Versions: 8
Compression:
Stored size: 949 Bytes
Contents
class LocalizedPanel < Netzke::Base # This action will be translated per-class basis if the translation is available, and fall back to the default when it's not. action :action_one # If you want action's text to be inheritable, this is what you shold do: action :action_two do {:text => I18n.t('localized_panel.action_two')} end action :action_three js_translate :property_one, :property_two js_property :bbar, [:action_one.action, :action_two.action, :action_three.action] def configuration super.tap do |c| c[:title] = I18n.t('localized_panel.title') end end js_method :on_render, <<-JS function(ct){ Netzke.classes.LocalizedPanel.superclass.onRender.call(this, ct); this.body.update(this.i18n.propertyOne + ", " + this.i18n.propertyTwo); } JS js_method :on_action_three, <<-JS function(){ var mask = new Ext.LoadMask(this.body); mask.show(); } JS end
Version data entries
8 entries across 8 versions & 1 rubygems