Further changes to begin creating chat page feature.
Big changes this weekend. After splitting the header up, I worked on getting chat messages to work with multiple conversations on one page. This meant creating a function that could accept multiple messages from multiple conversations at one time. The result was successful and messages now arrive as part of a conversation object which contains information such as the other user's name. I had to change the Template.js file for debugging reasons only so it's use elsewhere should not be affected. For util, I added a potentially useful function for the future for loading and executing scripts dynamically. Most of the work was carried out on the chat.* files and the get.php for chat messages which now organises messages into their relevant conversations. Conversations are NOT stored in the database, messages are a means of deciding whether a conversation exists between two people. Changes made to the header file and index.css file were in order to enable chat_msg styles that were originally being used in the index.php file (on user's profiles). Next steps are to implement a flashing title bar and order conversations from most recently received contact from left to right. In other words, when you receive a message from someone, the conversation promotes itself to the leftmost part of the screen. This is an experimental feature but we feel it will make unify unique.
Fixed redirection bug with logging in and returning to the welcome page when already logged in
Renamed mobile.css to index_mobile.css and moved its link tag to index.php after the link tag for index.css so that the left column disappears as expected
Removed old mobile stylesheet from tracking. Fixed notification messages for posts being added to groups that users are members of.
Conversations will now move to the left when they are interacted with (sending/receiving messages)
Fixed non-responsive layout on pages other than index.php. Nav bar now changes on every page and every page can have a mobile stylesheet.
Changed the chat page so that friends appear at the bottom. Next up: I will change it so that no horizontal scrolling is needed.
Changed the chat page again so that scrolling has been replaced by using left and right arrows to navigate between conversations. I might disable normal scrolling events in future and overide them to produce similar behaviour to the left and right buttons. Friends can be selected at the bottom of the page.
Quick fix for password reset.
Fixed chat not scrolling up after new messages incoming.
Made some changes to improve responsiveness on mobile. Also changed some behaviour when starting a new conversation: The current conversation will be switched to any new conversation.
Trying to fix conversations not being exactly in the middle of the screen for small browsers and phones. Fixed issue where not all messages were being pulled (in particular, messages that were not in the most recent 100 messages for ALL conversations were not being pulled)
Made welcome page responsive to mobile screens.
Updated nav bar to include chat and to prevent the notifications div from popping off from the nav bar
Fixed bug where horizontal scrolling was possible. It is now only possible to go to other conversations using the arrows on the page and with the user pictures at the bottom of the page.
Changed position of the friends selection box so that it remains central according to Peters design
Displaying the number of unseen messages in the nav bar now. This may need improving: it does not look great at the moment.
Updated the chat page so that new conversations do go to the left. The title bar now animates itself with the most recent message if the user is on another tab or browser window. Also, fixed bug where a string was being compared with an integer whilst determining the most recently pulled chat messages. This was causing slow performance because many messages were being pulled unecessarily. Storing the user_id of each conversation in the conversation message container itself enabled correct handling of swapping between different conversations. Possible improvements: make all properties relating to a conversation properties of its conversation html element.
Merged chat_page into master branch to begin work on groups