aboutsummaryrefslogtreecommitdiff
path: root/public/js/activities.js
diff options
context:
space:
mode:
authorMateja Marić <mail@matejamaric.com>2021-03-22 15:21:40 +0100
committerGitHub <noreply@github.com>2021-03-22 15:21:40 +0100
commit6ab102bc4be617255d5eab77faebb1cada65b370 (patch)
tree09fcff5953cc6ca3702335e717ca72f865124d1c /public/js/activities.js
parent21e9e94e76a21516edc3d1e4d0462a0ba75aafa4 (diff)
parentdb976a9fb0434df0095ea9f1b8858213d57e7535 (diff)
downloadyota-laravel-6ab102bc4be617255d5eab77faebb1cada65b370.tar.gz
yota-laravel-6ab102bc4be617255d5eab77faebb1cada65b370.zip
Merge pull request #4 from MatejaMaric/use-vueHEADv2.0.0master
Use Vue.js and Vuex.
Diffstat (limited to 'public/js/activities.js')
-rw-r--r--public/js/activities.js49
1 files changed, 0 insertions, 49 deletions
diff --git a/public/js/activities.js b/public/js/activities.js
deleted file mode 100644
index eacf4d3..0000000
--- a/public/js/activities.js
+++ /dev/null
@@ -1,49 +0,0 @@
-$.ajaxSetup({
- headers: {
- 'X-CSRF-TOKEN': $('input[name="csrf-token"]').attr('content')
- }
-});
-
-jQuery('select#call-sign').change(fillTable);
-jQuery(document).ready(fillTable);
-
-function fillTable() {
- tableData = jQuery('table#ajax-table>tbody').first();
- tableData.html('<tr><td class="font-weight-bold text-center" colspan="7">Loading...</td></tr>');
-
- sign = jQuery('select#call-sign').first().val();
-
- descDiv = jQuery('div#sign-desc-div');
- if (sign === 'all') {
- descDiv.empty();
- } else {
- jQuery.get('/special-calls/show/' + sign, function (data, status) {
- descDiv.html('<div class="card mt-1"><div class="card-body pb-1">' + data + '</div></div>');
- console.log(data);
- });
- }
-
- jQuery.post('/api/activities', {'call-sign': sign}, function (data, status) {
- if (status === 'success') {
- if (data.data.length > 0) {
- tableData.empty();
- for (i = 0, len = data.data.length; i < len; i++) {
- tr = '<tr><td>' + data.data[i].operatorCall + '</td>' +
- '<td>' + data.data[i].fromTime + '</td>' +
- '<td>' + data.data[i].toTime + '</td>' +
- '<td>' + data.data[i].specialCall + '</td>' +
- '<td>' + data.data[i].frequencies + '</td>' +
- '<td>' + data.data[i].modes + '</td>' +
- '<td>' + data.data[i].qso + '</td></tr>';
- tableData.append(tr);
- }
- }
- else {
- tableData.html('<tr><td class="font-weight-bold text-center" colspan="6">No data...</td></tr>');
- }
- }
- else {
- tableData.html('<tr><td class="font-weight-bold text-center" colspan="6">Error!</td></tr>');
- }
- });
-}