Sha256: 764a0ec5d1e53254f9e3d47867d1483520abc248f55293a9449550f9879b8779

Contents?: true

Size: 1.01 KB

Versions: 20

Compression:

Stored size: 1.01 KB

Contents

# This is an abstract superclass other services over-ride to get
# extra ajaxy windows upon click on link. 
class AjaxExport < Service
  required_config_params :ajax_id, :controller

  def initialize(config)
    super(config)
  end

  # Standard method, used by background service updater. See Service docs. 
  def service_types_generated
    types = [ ServiceTypeValue[:export_citation] ]
    
    return types
  end
  
  def handle(request)    
      
    request.add_service_response(:service=>self, 
      :display_text => @display_text,
      :display_text_i18n => @display_text_i18n,
      :link_supports_ajax_call => true,
      :notes=> @note,
      :service_type_value => 'export_citation'  )

    return request.dispatched(self, true)
  end

  def response_url(service_response, params)
    # Hash that caller will pass to url_for to create an internally
    # facing link.
    return {:controller=>@form_controller, 
     :action=>@form_action, 
     :id => service_response.id, 
     :format => params[:format]}
  end
  
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
umlaut-4.1.7 app/service_adaptors/ajax_export.rb
umlaut-4.1.6 app/service_adaptors/ajax_export.rb
umlaut-4.1.5 app/service_adaptors/ajax_export.rb
umlaut-4.1.4 app/service_adaptors/ajax_export.rb
umlaut-4.1.3 app/service_adaptors/ajax_export.rb
umlaut-4.1.2 app/service_adaptors/ajax_export.rb
umlaut-4.1.1 app/service_adaptors/ajax_export.rb
umlaut-4.1.0 app/service_adaptors/ajax_export.rb
umlaut-4.1.0.pre3 app/service_adaptors/ajax_export.rb
umlaut-4.1.0.pre.2 app/service_adaptors/ajax_export.rb
umlaut-4.1.0.pre.alpha.1 app/service_adaptors/ajax_export.rb
umlaut-4.0.3 app/service_adaptors/ajax_export.rb
umlaut-4.0.2 app/service_adaptors/ajax_export.rb
umlaut-4.0.1 app/service_adaptors/ajax_export.rb
umlaut-4.0.0 app/service_adaptors/ajax_export.rb
umlaut-4.0.0.beta5 app/service_adaptors/ajax_export.rb
umlaut-4.0.0.beta4 app/service_adaptors/ajax_export.rb
umlaut-4.0.0.beta3 app/service_adaptors/ajax_export.rb
umlaut-4.0.0.beta2 app/service_adaptors/ajax_export.rb
umlaut-4.0.0.beta1 app/service_adaptors/ajax_export.rb