mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
fix #3993
This commit is contained in:
parent
f6ce49b586
commit
276de8a470
2
public/v1/js/app_vue.js
vendored
2
public/v1/js/app_vue.js
vendored
File diff suppressed because one or more lines are too long
2
public/v1/js/create_transaction.js
vendored
2
public/v1/js/create_transaction.js
vendored
File diff suppressed because one or more lines are too long
2
public/v1/js/edit_transaction.js
vendored
2
public/v1/js/edit_transaction.js
vendored
File diff suppressed because one or more lines are too long
16
public/v1/js/ff/firefly.js
vendored
16
public/v1/js/ff/firefly.js
vendored
@ -144,6 +144,11 @@ function listLengthInitial() {
|
|||||||
$('.listLengthTrigger').unbind('click').click(triggerList)
|
$('.listLengthTrigger').unbind('click').click(triggerList)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param e
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
function triggerList(e) {
|
function triggerList(e) {
|
||||||
"use strict";
|
"use strict";
|
||||||
var link = $(e.target);
|
var link = $(e.target);
|
||||||
@ -153,12 +158,13 @@ function triggerList(e) {
|
|||||||
table.find('.overListLength').hide();
|
table.find('.overListLength').hide();
|
||||||
table.attr('data-hidden', 'yes');
|
table.attr('data-hidden', 'yes');
|
||||||
link.text(showFullList);
|
link.text(showFullList);
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
// show all, return false
|
if (table.attr('data-hidden') !== 'no') {
|
||||||
table.find('.overListLength').show();
|
// show all, return false
|
||||||
table.attr('data-hidden', 'no');
|
table.find('.overListLength').show();
|
||||||
link.text(showOnlyTop);
|
table.attr('data-hidden', 'no');
|
||||||
|
link.text(showOnlyTop);
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
@ -124,10 +124,6 @@ export default {
|
|||||||
types = this.defaultAccountTypeFilters.join(',');
|
types = this.defaultAccountTypeFilters.join(',');
|
||||||
}
|
}
|
||||||
this.updateACURI(types);
|
this.updateACURI(types);
|
||||||
},
|
|
||||||
name() {
|
|
||||||
// console.log('Watch: name()');
|
|
||||||
// console.log(this.name);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:
|
methods:
|
||||||
@ -141,7 +137,7 @@ export default {
|
|||||||
for (const key in res.data) {
|
for (const key in res.data) {
|
||||||
if (res.data.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) {
|
if (res.data.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) {
|
||||||
current = res.data[key];
|
current = res.data[key];
|
||||||
current.description = this.escapeHtml(res.data[key].description)
|
current.name_with_balance = this.escapeHtml(res.data[key].name_with_balance)
|
||||||
escapedData.push(current);
|
escapedData.push(current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -151,6 +147,25 @@ export default {
|
|||||||
// any error handler
|
// any error handler
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
escapeHtml: function (string) {
|
||||||
|
|
||||||
|
let entityMap = {
|
||||||
|
'&': '&',
|
||||||
|
'<': '<',
|
||||||
|
'>': '>',
|
||||||
|
'"': '"',
|
||||||
|
"'": ''',
|
||||||
|
'/': '/',
|
||||||
|
'`': '`',
|
||||||
|
'=': '='
|
||||||
|
};
|
||||||
|
|
||||||
|
return String(string).replace(/[&<>"'`=\/]/g, function fromEntityMap(s) {
|
||||||
|
return entityMap[s];
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
updateACURI: function (types) {
|
updateACURI: function (types) {
|
||||||
this.accountAutoCompleteURI =
|
this.accountAutoCompleteURI =
|
||||||
document.getElementsByTagName('base')[0].href +
|
document.getElementsByTagName('base')[0].href +
|
||||||
|
@ -100,7 +100,7 @@ export default {
|
|||||||
for (const key in res.data) {
|
for (const key in res.data) {
|
||||||
if (res.data.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) {
|
if (res.data.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) {
|
||||||
current = res.data[key];
|
current = res.data[key];
|
||||||
current.description = this.escapeHtml(res.data[key].description)
|
current.name = this.escapeHtml(res.data[key].name)
|
||||||
escapedData.push(current);
|
escapedData.push(current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -110,6 +110,25 @@ export default {
|
|||||||
// any error handler
|
// any error handler
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
escapeHtml: function (string) {
|
||||||
|
|
||||||
|
let entityMap = {
|
||||||
|
'&': '&',
|
||||||
|
'<': '<',
|
||||||
|
'>': '>',
|
||||||
|
'"': '"',
|
||||||
|
"'": ''',
|
||||||
|
'/': '/',
|
||||||
|
'`': '`',
|
||||||
|
'=': '='
|
||||||
|
};
|
||||||
|
|
||||||
|
return String(string).replace(/[&<>"'`=\/]/g, function fromEntityMap(s) {
|
||||||
|
return entityMap[s];
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
handleInput(e) {
|
handleInput(e) {
|
||||||
if (typeof this.$refs.input.value === 'string') {
|
if (typeof this.$refs.input.value === 'string') {
|
||||||
this.$emit('input', this.$refs.input.value);
|
this.$emit('input', this.$refs.input.value);
|
||||||
|
Loading…
Reference in New Issue
Block a user