mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
This should fix most Javascript errors.
This commit is contained in:
@@ -58,19 +58,19 @@ $(document).ready(function () {
|
||||
}
|
||||
|
||||
|
||||
if ($('input[name="description"]').length > 0 && what !== undefined) {
|
||||
if ($('input[name="description"]').length > 0 && !(typeof what === "undefined")) {
|
||||
$.getJSON('json/transaction-journals/' + what).done(function (data) {
|
||||
$('input[name="description"]').typeahead({source: data});
|
||||
});
|
||||
}
|
||||
// also for multi input:
|
||||
if ($('input[name="description[]"]').length > 0 && what !== undefined) {
|
||||
if ($('input[name="description[]"]').length > 0 && !(typeof what === "undefined")) {
|
||||
$.getJSON('json/transaction-journals/' + what).done(function (data) {
|
||||
$('input[name="description[]"]').typeahead({source: data});
|
||||
});
|
||||
}
|
||||
// and for the (rare) journal_description:
|
||||
if ($('input[name="journal_description"]').length > 0 && what !== undefined) {
|
||||
if ($('input[name="journal_description"]').length > 0 && !(typeof what === "undefined")) {
|
||||
$.getJSON('json/transaction-journals/' + what).done(function (data) {
|
||||
$('input[name="journal_description"]').typeahead({source: data});
|
||||
});
|
||||
|
||||
@@ -8,12 +8,14 @@
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
/** global: what, title, breadcrumbs, middleCrumbName, button, piggiesLength, txt */
|
||||
|
||||
$(document).ready(function () {
|
||||
"use strict";
|
||||
|
||||
// respond to switch buttons when
|
||||
// creating stuff:
|
||||
if (doSwitch) {
|
||||
if (doSwitch == true) {
|
||||
updateButtons();
|
||||
updateForm();
|
||||
updateLayout();
|
||||
@@ -35,6 +37,7 @@ function updateForm() {
|
||||
|
||||
$('input[name="what"]').val(what);
|
||||
switch (what) {
|
||||
default:
|
||||
case 'withdrawal':
|
||||
// show source_id and dest_name:
|
||||
$('#source_account_id_holder').show();
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
/** global: edit_selected_txt, delete_selected_txt */
|
||||
|
||||
$(document).ready(function () {
|
||||
"use strict";
|
||||
$('.mass_edit_all').show();
|
||||
|
||||
Reference in New Issue
Block a user