nyroModal icon indicating copy to clipboard operation
nyroModal copied to clipboard

1.6 to 2 conversion - unable to figure out conversion

Open PandaWood opened this issue 9 years ago • 0 comments

I can't understand what needs to be done to v1.6 code to get it to work under v2. I realize the documentation is inadequate, but even with the source code it seems like I just cannot do what I've done before.

This is my old code.

  $.nyroModalSettings
        type: 'iframe'
        minWidth: 700
        minHeight: 420
        showBackground: (elts, settings, callback)->
            elts.bg.css({opacity:0}).fadeTo 200, 0.70, callback
        hideBackground: (elts, settings, callback)->
            elts.bg.fadeOut 100, callback


    $('.someLink a').click (e)->
        e.preventDefault()
        sentence = $(@).closest('td').data('sentence').replace(/\s*/g, '')
        $.nyroModalManual
            title: sentence
            url: $(@).attr('href')

The closest I can get just doesn't work


$('.someLink a').nyroModal
        type: 'iframe'
        sizes:
            minW: 700
            minH: 420
        anim: 
            showBg: (elts, settings, callback)->
                elts.bg.css({opacity:0}).fadeTo 200, 0.70, callback
            hideBg: (elts, settings, callback)->
                elts.bg.fadeOut 100, callback


    $('.grammarLink a').click (e)->
        e.preventDefault()
        sentence = $(@).closest('td').data('sentence').replace(/\s*/g, '')
        url = $(@).attr 'href'
        $.nmManual url, title: sentence

PandaWood avatar May 17 '16 07:05 PandaWood