<< | Index | >>
To instert inital methods by javascript, overwrite to_html() in Form(CenterdCompareSearchForm) class.
in src/view/drugs/centeredsearchform.rb
... def javascripts(context) scripts = '' @additional_javascripts.each do |script| args = { 'type' => 'text/javascript', 'language' => 'JavaScript', } scripts << context.script(args) do script end end scripts end def to_html(context) javascripts(context).to_s << super end ...
see
src/view/searchbar.rb
)
These are stardard way to create link/button with HtmlGrid
link = HtmlGrid::Link.new(:search, model, session, self) args = { :param => "test" } link.href = @lookandfeel._event_url(:home, args) link.value = "test" link
button = HtmlGrid::Button.new(:search, model, @session, self) args = { :param => "normal" } url = @lookandfeel._event_url(:home, args) button.set_attribute("onclick", "document.location.href='#{url}'") button.set_attribute("value", "test") button
SBSM call via initialize
> logout
> __checkout
Request to TOP page call once logout method.
(non-persistent-values are cleared)
SBSM hold only flavor and language value in default.
added :search_form
input also to persistent_user_input[:search_form]
to controll event(allow, disallow) by lookandfeel,
use ENABLED and DISABLED
/path/to/sbsm/lookandfeel.rb
def enabled?(event, default=true) default || self::class::ENABLED.include?(event) end
Added FI/PI links in compare search result list.
tested view on each lookandfeels.
see compare_result_list
in lookandfeelwrapper.