Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Nov 19th, 2018 70 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. $ = window.HS.jQuery
  2. class DisplayItem
  3.   constructor: (type, c_type, data) ->
  4.     @set_data type, c_type, data
  5.  
  6.   @id
  7.   @data
  8.  
  9.   set_data: (type, c_type, data) =>
  10.     @data = data || {}
  11.     @data.type = type
  12.     @data.c_type = c_type
  13.     @data.domain_id = HotSpots.Application.domain
  14.     @data.page_url= HotSpots.Application.page
  15.     @id = @data.id
  16.     if data
  17.       @set_app data.app
  18.     # @set_tooltip()
  19.  
  20.   set_tooltip: () =>
  21.     if @data.type != 'inline'
  22.       @tip = $("<div id='tt_#{@id}' class='HotSpotsMV-Tooltip'>Click To See More</div>")
  23.  
  24.   set_app: (app) =>
  25.     for test_app of HotSpots.Ui_Applications
  26.       try_app = new HotSpots.Ui_Applications[test_app] app
  27.       if try_app.app_name is app.name
  28.         @app = try_app #new window.HotSpots.Ui_Applications[hs.app.name] app
  29.     @
  30.  
  31.   hover: (e) =>
  32.     e.preventDefault()
  33.     el = $(@eid)
  34.  
  35.     if @tip
  36.       el.prepend @tip
  37.       # @tip.toggle()
  38.       @tip.animate({
  39.         width: 'toggle'
  40.       });
  41.     console.log "hover base"
  42.     HotSpots.Analytics.fire_event 'Hover', @
  43.  
  44.   analytics_data: ()->
  45.     data = @.data
  46.     delete data.app.html
  47.     JSON.stringify(data)
  48.  
  49.   remove: () =>
  50.     $(@eid).remove()
  51.  
  52.   click: () =>
  53.     if not HotSpots.Application.analyticsInited
  54.       HotSpots.Application.initAnalytics()
  55.     HotSpots.Analytics.fire_event 'Click', @
  56.  
  57.     el = $(@eid)
  58.     modal = HotSpots.create(HotSpots.HotSpotModal)
  59.     #el.css "background-image", "url(#{HotSpots.Application.hover_hotspot_image})"
  60.     modal.show({
  61.       app: @app,
  62.       #content: @app.render(),
  63.       target: @eid,
  64.       owner: @,
  65.       on_delete: ()->
  66.         #HotSpots.HotSpotsManager.remove(@)
  67.     })
  68.    
  69.     @
  70.  
  71.  
  72.    
  73. window.HotSpots.Models.DisplayItem = DisplayItem
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top