Class: ExtUtil
- Inherits:
-
Object
- Object
- ExtUtil
- Defined in:
- lib/extjsml/ext_util.rb
Constant Summary collapse
- ALIAS_TABLE =
TODO move to file
{ :tab => :tabpanel, :div => :container, # column alias :gtext => :gridcolumn, :gboolean => :booleancolumn, :gnumber => :numbercolumn, :gdate => :datecolumn, :gtemplate => :templatecolumn, :gaction => :actioncolumn, :gcurrency => :currencycolumn, :gcheck => :checkcolumn }
- CONTAINER_XTYPE =
[ "div", "container", "panel", "tabpanel", "form", "fieldset", "fieldcontainer" ]
- DATA_COLUNMS =
[ "gridcolumn", "numbercolumn", "booleancolumn", "datecolumn", "currencycolumn", "numericcolumn" ]
- FIELD_XTYPE =
[ "fieldcontainer", "fileuploadfield", "checkbox", "checkboxgroup", "combo", "compositefield", "datefield", "displayfield", "field", "fieldset", "hidden", "htmleditor", "label", "numberfield", "radio", "radiogroup", "textarea", "textfield", "timefield", "trigger", "uxaccount", "uxsettlement", "uxchq", "uxbroker" ]
Class Method Summary collapse
- .all_xtype ⇒ Object
- .container_xtype ⇒ Object
- .data_xtype ⇒ Object
- .field_xtype ⇒ Object
- .FontWidthRatio ⇒ Object
- .random_id ⇒ Object
- .xtype_alias(xtype) ⇒ Object
Class Method Details
.all_xtype ⇒ Object
216 217 218 |
# File 'lib/extjsml/ext_util.rb', line 216 def self.all_xtype return String.get_all_xtypes end |
.container_xtype ⇒ Object
208 209 210 |
# File 'lib/extjsml/ext_util.rb', line 208 def self.container_xtype CONTAINER_XTYPE end |
.data_xtype ⇒ Object
204 205 206 |
# File 'lib/extjsml/ext_util.rb', line 204 def self.data_xtype DATA_COLUNMS end |
.field_xtype ⇒ Object
200 201 202 |
# File 'lib/extjsml/ext_util.rb', line 200 def self.field_xtype FIELD_XTYPE end |
.FontWidthRatio ⇒ Object
212 213 214 |
# File 'lib/extjsml/ext_util.rb', line 212 def self.FontWidthRatio 9 end |
.random_id ⇒ Object
221 222 223 |
# File 'lib/extjsml/ext_util.rb', line 221 def self.random_id "_" + SecureRandom.urlsafe_base64.gsub(/\d|\W/,'') end |
.xtype_alias(xtype) ⇒ Object
196 197 198 |
# File 'lib/extjsml/ext_util.rb', line 196 def self.xtype_alias(xtype) ALIAS_TABLE[xtype.to_sym] || xtype end |