Sha256: f94889f1ef8fb4e175be9545a0c4e7a6794e6bf06594f8881089fdac0efed6d9
Contents?: true
Size: 650 Bytes
Versions: 10
Compression:
Stored size: 650 Bytes
Contents
class @FormPopup.Initializer extends Backbone.View _popupViews : [] showPopup : (model) -> popupView = FormPopup.View.init model @addPopup popupView @$el.append popupView.$el addPopup : (popup) -> popup.on 'close', @_onPopupClose @_last().hide() if @_hasPopups() @_popupViews.push popup _onPopupClose : () => @_popupViews.pop() @_last().show() if @_hasPopups() _last : () -> _.last @_popupViews _hasPopups : () -> @_popupViews.length > 0 @getInstance : () -> instance = null do () -> instance ||= new @FormPopup.Initializer el : document.getElementById 'pad-wrapper'
Version data entries
10 entries across 10 versions & 1 rubygems