Files
firefly-iii/public/v1/js/ff/admin/update/index.js

42 lines
1.2 KiB
JavaScript
Raw Normal View History

2017-12-28 11:38:40 +01:00
/*
* index.js
* Copyright (c) 2019 thegrumpydictator@gmail.com
2017-12-28 11:38:40 +01:00
*
* This file is part of Firefly III (https://github.com/firefly-iii).
2017-12-28 11:38:40 +01:00
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
2017-12-28 11:38:40 +01:00
*
* This program is distributed in the hope that it will be useful,
2017-12-28 11:38:40 +01:00
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
2017-12-28 11:38:40 +01:00
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2017-12-28 11:38:40 +01:00
*/
2017-12-29 09:05:35 +01:00
/** global: updateCheckUri */
2017-12-28 11:38:40 +01:00
$(function () {
"use strict";
// Enable update button.
$('#update').click(checkUpdate);
});
function checkUpdate() {
// do post update check:
$.post(updateCheckUri).done(function (data) {
alert(data.result);
2017-12-29 09:05:35 +01:00
}).fail(function () {
2017-12-28 11:38:40 +01:00
alert('Error while checking.');
});
return false;
}