Replace uri with url

This commit is contained in:
James Cole
2022-04-12 18:19:30 +02:00
parent ac5c11a8d7
commit 50f87a210a
101 changed files with 449 additions and 486 deletions

View File

@@ -18,8 +18,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/** global: autoCompleteUri */
$(function () {
"use strict";
$('.link-modal').click(getLinkModal);
@@ -33,7 +31,7 @@ $(function () {
function getLinkModal(e) {
var button = $(e.currentTarget);
var journalId = parseInt(button.data('journal'));
var url = modalDialogURI.replace('%JOURNAL%', journalId);
var url = modalDialogURL.replace('%JOURNAL%', journalId);
console.log(url);
$.get(url).done(function (data) {
$('#linkJournalModal').html(data).modal('show');
@@ -53,7 +51,7 @@ function makeAutoComplete() {
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('name'),
queryTokenizer: Bloodhound.tokenizers.whitespace,
prefetch: {
url: acURI + '?uid=' + uid,
url: acURL + '?uid=' + uid,
filter: function (list) {
return $.map(list, function (item) {
return item;
@@ -61,7 +59,7 @@ function makeAutoComplete() {
}
},
remote: {
url: acURI + '?query=%QUERY&uid=' + uid,
url: acURL + '?query=%QUERY&uid=' + uid,
wildcard: '%QUERY',
filter: function (list) {
return $.map(list, function (item) {
@@ -78,7 +76,7 @@ function makeAutoComplete() {
function selectedJournal(event, journal) {
$('#journal-selector').hide();
$('#journal-selection').show();
$('#selected-journal').html('<a href="' + groupURI.replace('%GROUP%', journal.transaction_group_id) + '">' + journal.description + '</a>').show();
$('#selected-journal').html('<a href="' + groupURL.replace('%GROUP%', journal.transaction_group_id) + '">' + journal.description + '</a>').show();
$('input[name="opposing"]').val(journal.id);
}