From 799e297ef25047d31bb014ab482b5f3e649b5c32 Mon Sep 17 00:00:00 2001 From: MartinTonev Date: Fri, 5 Jul 2019 00:59:37 +0200 Subject: [PATCH] Commenting on all pages --- public/bower_components/ReadMe | 1 + public/dist/ReadMe | 3 +++ public/pages/ReadMe | 8 ++++++++ public/pages/admin/Radmins.js | 6 +++--- public/pages/dashboard/Rtimeline.js | 4 +++- public/pages/login.html | 20 ++++++++------------ public/pages/user_requests/Rcomments.js | 3 ++- public/pages/user_requests/Rratings.js | 2 ++ public/pages/users/manageusers.js | 20 ++++---------------- public/plugins/ReadMe | 1 + 10 files changed, 35 insertions(+), 33 deletions(-) create mode 100644 public/bower_components/ReadMe create mode 100644 public/dist/ReadMe create mode 100644 public/pages/ReadMe create mode 100644 public/plugins/ReadMe diff --git a/public/bower_components/ReadMe b/public/bower_components/ReadMe new file mode 100644 index 0000000..4ce41aa --- /dev/null +++ b/public/bower_components/ReadMe @@ -0,0 +1 @@ +In this folder are plugins that come with adminLTE \ No newline at end of file diff --git a/public/dist/ReadMe b/public/dist/ReadMe new file mode 100644 index 0000000..416c9bc --- /dev/null +++ b/public/dist/ReadMe @@ -0,0 +1,3 @@ +This folder contains the css folde which is provided by AmdinLTE +In the img folder are stored any images that are used in the admin panel +And in the js folder is where the javascript files that will be called in multiple places \ No newline at end of file diff --git a/public/pages/ReadMe b/public/pages/ReadMe new file mode 100644 index 0000000..46b8e5e --- /dev/null +++ b/public/pages/ReadMe @@ -0,0 +1,8 @@ +This is the pages folder it contains all the HTML files in sections which are pretty self explanatory + + -admin : all the admin CRUD pages + -dashboard : the statistics and feed pages + -locations : the attractions and stories CRUD pages + -user_requests : the comments and ratings pages + -users : managing users (un/blocking) +The login page is where the index.html in the public folder redirects to. \ No newline at end of file diff --git a/public/pages/admin/Radmins.js b/public/pages/admin/Radmins.js index 1ca063f..3942aa4 100644 --- a/public/pages/admin/Radmins.js +++ b/public/pages/admin/Radmins.js @@ -1,7 +1,7 @@ // Get all admins getAll(); - +//Create table var table = $('#adminTable').DataTable({ "columnDefs": [{ "targets": -1, @@ -11,7 +11,7 @@ var table = $('#adminTable').DataTable({ "targets": [2], "visible": false }]}); - +//Wait for remove button to be pressed and ask user to confirm $('#adminTable tbody').on('click', 'button', function () { var data = table.row($(this).parents('tr')).data(); @@ -26,7 +26,7 @@ $('#adminTable tbody').on('click', 'button', function () { } }); - +//Call all users from the database and on any activity reload the table function getAll() { db.collection("administrator").where('active', '==', true).onSnapshot(function(querySnapshot){ var adminTable = $('#adminTable').DataTable(); diff --git a/public/pages/dashboard/Rtimeline.js b/public/pages/dashboard/Rtimeline.js index 97aadd6..baca14f 100644 --- a/public/pages/dashboard/Rtimeline.js +++ b/public/pages/dashboard/Rtimeline.js @@ -14,6 +14,8 @@ function draw(){ },250); } +//Create a feed item and when data is updated reload the feed item + function createFeedItem(attractionId,attractionName,reviewDoc){ @@ -155,7 +157,7 @@ function createFeedItem(attractionId,attractionName,reviewDoc){ divTimelineBody.appendChild(text); } - + //Apped all items to the div and append the div to the page span.appendChild(iClock); diff --git a/public/pages/login.html b/public/pages/login.html index 6f423ef..77f5ebf 100644 --- a/public/pages/login.html +++ b/public/pages/login.html @@ -71,28 +71,24 @@