1'use strict'; 2 3var Ajax = require('../../core/ajax.js'); 4var more = require('../../core/load-more.js'); 5const Modal = require('../../core/modal'); 6more('/income/requests/', 'income/request-row.ejs'); 7 8$('.js-refund').click(function(e) { 9 e.preventDefault(); 10 11 if (!confirm(I18n.t('common.msg.confirm_cancel_request'))) { 12 return; 13 } 14 15 let id = $(this).data('id'); 16 let project_id = $(this).data('project-id'); 17 Ajax.deleteJSON(`/income/request-cancel?id=${id}&project_id=${project_id}`, function(result) { 18 if (result.response) { 19 window.location.reload(); 20 } else if(result.error && result.error.code && result.error.code === 403 ) { 21 showErrorModal(I18n.t('project.roles.errors.forbidden')); 22 } else { 23 showErrorModal(result.error.message); 24 } 25 }); 26}); 27 28function showErrorModal(message) { 29 $('#pending-request-message-text').html(message); 30 Modal.show('pending-request-alert'); 31} 32 33$(document).on('click', '.js-pending-request-alert', function() { 34 Modal.hide(); 35});
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.