1var indexPaymentInfo = (function($) { 2 3 var self = {}, 4 _options = { 5 ui: { 6 //modal 7 modal: { 8 infoPay: { 9 $el: $('#modal-payment-info'), 10 ui: { 11 $title: $('#modal-payment-info .modal-title'), 12 $body: $('#modal-payment-info .modal-body') 13 } 14 } 15 }, 16 button: { 17 infoPay: '.payments .item' 18 } 19 } 20 }; 21 22 /** 23 * @private 24 */ 25 function _init() { 26 _setUpListeners(); 27 } 28 29 function _setUpListeners() { 30 31 $(document).on('click', _options.ui.button.infoPay, function(e) { 32 e.preventDefault(); 33 var modal = _options.ui.modal.infoPay, 34 id = $(this).attr('data-id'), 35 payment = $.map(self.model, function(item) { 36 if (item.id == id) { 37 return item; 38 } 39 })[0]; 40 41 modal.ui.$title.html(payment.title); 42 modal.ui.$body.html(payment.description); 43 44 if (payment.description !== null) { 45 modal.$el.modal('show'); 46 } 47 }); 48 49 } 50 51 return { 52 options: _options, 53 init: _init 54 } 55 56})(jQuery); 57 58indexPaymentInfo.init();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.