Class: ActionView::Helpers::Tags::TextArea
- Inherits:
-
Base
- Object
- Base
- ActionView::Helpers::Tags::TextArea
- Includes:
- JavaScriptHelper
- Defined in:
- lib/prime/rails/tags/text_area.rb
Overview
:nodoc:
Instance Method Summary collapse
Methods included from JavaScriptHelper
Instance Method Details
#p_render ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/prime/rails/tags/text_area.rb', line 6 def p_render = @options.stringify_keys add_default_name_and_id() if size = .delete("size") ["cols"], ["rows"] = size.split("x") if size.respond_to?(:split) end output = content_tag("textarea", .delete('value') || value_before_type_cast(object), ) clientid = sanitize_to_id(["id"]) = ["var"] ? ["var"] : "widget_"+clientid = = .merge(:id => clientid ) = .to_json script = '$(function() {' script += "PrimeFaces.cw('InputTextarea','#{}',#{})" script += '});' output += p_javascript_tag(script, "id" => clientid+"_s") end |