Sha256: 44da846aed567063b6f55345d0e8809d9e39a96b963901866f960f2c79d320a9
Contents?: true
Size: 966 Bytes
Versions: 50
Compression:
Stored size: 966 Bytes
Contents
class Tenon.features.RecordApproval constructor: -> $(document).on 'click', 'a.approve, a.unapprove', @_toggleRecordApproval _toggleRecordApproval: (e) => e.preventDefault() @$link = $(e.currentTarget) @_startIconLoad() @_setTooltip('Loading...') $.getJSON(@$link.attr('href')) .done(@_finishToggle) .fail((data)-> console.log(data)) _finishToggle: => @$link.toggleClass('unapprove approve') if @$link.hasClass('approve') @_setTooltip('Approve') @$link.find('i').toggleClass('fa-spin fa-gear fa-thumbs-up') else @_setTooltip('Unapprove') @$link.find('i').toggleClass('fa-spin fa-gear fa-thumbs-down') _startIconLoad: => @$link.find('i') .removeClass('fa-thumbs-up fa-thumbs-down') .addClass('fa-spin fa-gear') _setTooltip: (tooltip) => @$link .tooltip('hide') .attr('data-original-title', tooltip) .tooltip('fixTitle') .tooltip('show')
Version data entries
50 entries across 50 versions & 1 rubygems