Sha256: df0740d32282545f891e95dec3751822e1e96742b5145d96351c95ccc46b84b1

Contents?: true

Size: 989 Bytes

Versions: 39

Compression:

Stored size: 989 Bytes

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,
      :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

39 entries across 39 versions & 1 rubygems

Version Path
umlaut-3.3.1 app/service_adaptors/ajax_export.rb
umlaut-3.3.0 app/service_adaptors/ajax_export.rb
umlaut-3.2.0 app/service_adaptors/ajax_export.rb
umlaut-3.1.1 app/service_adaptors/ajax_export.rb
umlaut-3.1.0 app/service_adaptors/ajax_export.rb
umlaut-3.1.0.pre2 app/service_adaptors/ajax_export.rb
umlaut-3.1.0.pre1 app/service_adaptors/ajax_export.rb
umlaut-3.0.5 lib/service_adaptors/ajax_export.rb
umlaut-3.0.4 lib/service_adaptors/ajax_export.rb
umlaut-3.0.3 lib/service_adaptors/ajax_export.rb
umlaut-3.0.2 lib/service_adaptors/ajax_export.rb
umlaut-3.0.1 lib/service_adaptors/ajax_export.rb
umlaut-3.0.0 lib/service_adaptors/ajax_export.rb
umlaut-3.0.0rc1 lib/service_adaptors/ajax_export.rb
umlaut-3.0.0beta10 lib/service_adaptors/ajax_export.rb
umlaut-3.0.0beta9 lib/service_adaptors/ajax_export.rb
umlaut-3.0.0beta8 lib/service_adaptors/ajax_export.rb
umlaut-3.0.0beta7 lib/service_adaptors/ajax_export.rb
umlaut-3.0.0beta6 lib/service_adaptors/ajax_export.rb
umlaut-3.0.0beta5 lib/service_adaptors/ajax_export.rb