Commit History

Upphovsman SHA1 Meddelande Datum
  Ankita Kalra 15da3810ff Final iteration making the layout compatible,tags showing the functionality of redirection 6 år sedan
  Andrew Knox Shiels c79440e2ed No longer require AJAX request results to be propagated by front-end code. Now the views receive AJAX POST, do modification, and send to the sockets. 6 år sedan
  Andrew Knox Shiels 54713faf90 Changed database-modifying requests to now use AJAX POST requests instead of using WebSockets. The results from these are then propagated by WebSockets. Not broadcasting error messages solved itself by returning error-coded HTTP responses to erronous AJAX requests. Tested only as far as seeing normal non-erronous requests being serviced, the results propagated, and remaining on refresh. Added new TODO for consumers.py as there now exist redundant consumers. Changed API documentation to reflect AJAX POST usage. 6 år sedan
  Andrew Knox Shiels 8edc10289d Added 404 codes for the '<Object> does not exist' exceptions, added (UNTESTED) functionality to send errors only to the connection making the erroneous request instead of broadcasting it (worked for a tag that doesn't actually exist, testing for all models to follow). Updated API documentation to reflect this change, and added documentation for delete_canvas and delete_project views, which I forgot. Finally, modified delete_project to only allow the owner to delete the project - admins of a project may still delete individual canvases. 6 år sedan
  Andrew Knox Shiels b4691e0887 Added TODO to models.py and views.py (identical TODOs along with NOTEs in views.py detailing code relevant to aforementioned TODO) stating the current functionality for trial users, while not technically broken, is sub-par and was written as a 'quick fix'. It should probably be updated in future. 6 år sedan
  Andrew Knox Shiels 014f91105f Updated requirements, excluding selenium, pytest, twisted as they're not actually used in running the canvas locally. Marked at top of consumers.py and views.py the current known bugs to be fixed in future. 6 år sedan
  Andrew Knox Shiels 20d63c2366 A few singleton elements being passed to the serializer were not having their enclosing brackets trimmed. Fixed this so that they are now being trimmed. 6 år sedan
  Andrew Knox Shiels 3c1715db0d addressed a bug where my working front-end wasn't working right with JSONified single model instances. 6 år sedan
  Andrew Knox Shiels 987001a6c1 Added TODO: to each JSON serialization of a singleton list ie [tag] where it currently does not accept the single element without being encapsulated. 6 år sedan
  Andrew Knox Shiels bca26df672 For known singleton elements being JSONified, had the square brackets removed from the start and end of it, going from [element] to element. Additionally, added some extra try-catch statements for presence of models before editing them, and added the ability for failure callbacks to be executed. There is an error field in what's returned from Consumers.py; if this field contains anything when it arrives at front-end, the error callbacks can be called. The data returned in this case is the error code and the reply text eg. if unauthorised, will return error: 401 and text Unauthorized. 6 år sedan
  Andrew Knox Shiels 6edd5366f7 Allowing the user, admin and owner fields to be blank and null for the blank trial canvas. Made all operations be available on public canvasses. 6 år sedan
  Andrew Knox Shiels 5929a2dfa4 Forgot to update the trial user functionality after adding projects, done so. Enabled null on project owner for the allowance of the AnonymousUser to have a blank project created (if it doesn't exist) for blank trial canvases. 6 år sedan
  Andrew Knox Shiels 7949f8741d Moved removeTag out of front-end (was called for each tag before calling deleteIdea) and included in the delete_idea function in views.py. The same done for moving addTag and removeTag calls out of the editIdeaSuccessCallback and into the edit_idea function in views.py . Those two views.py functions now return the removed tag and its data, and the added and removed tag data for delete_idea and edit_idea respectively. 6 år sedan
  Andrew Knox Shiels 7d078ed956 Changed 'i' and 'c' variables in consumers.py and canvasDetail.js to more descriptive 'ideaListIndex' and 'commentListIndex' respectively, except for where they exist only as iterators of a loop. In tag component 'c' is 'canvas' as it interacts with canvases, not comments. 6 år sedan
  Andrew Knox Shiels 1cda9e3d66 Tidied up the consumers a lot so that every response is of a constant format, highlighted in the API. API also updated. 6 år sedan
  Andrew Knox Shiels b0e96618f0 Added a first draft of what I think an API should be, and modified user permissions to return 401 unauthorized if user isn't in user-set and 403 forbidden if a user isn't in the admin-set 6 år sedan
  Andrew Knox Shiels 84fed90de3 Data for canvasList and ideaList in the tag-popup weren't updating, so I wasn't totally sure if the data was usable on new tag additions. Using prop value instead seems to have fixed it. 6 år sedan
  Andrew Knox Shiels e32770252b moving idea.save() to the try-catch block in remove_tag() fixed the bug, removed await database_sync_to_async as it wasn't updating other user with everything (delete idea was only deleting for the other user and not removing the tags, or the other way around 6 år sedan
  Andrew Knox Shiels 451e23472f Tidied the views up a bit. Changed the consumers calls to view functions to be await database_sync_to_async (issues with delete_idea consumer and remove_tag consumer accessing the database out of order, remove_tag couldn't remove a tag from an idea that had been deleted). 6 år sedan
  Andrew Knox Shiels 5237139b23 Added M2M relation between tags and ideas. Altered view functions to make use of these. remove_tag now removes the current idea from the current tag's idea_set. Delete still removes the tag in its entirety. Add still checks for a tag's existence before creating one. Add and remove tag functions return every tag, every tag's canvas_set and every tag's idea_set to make the updating of these sets on the front-end relatively straightforward. Delete only returns the tag so that the callback can just find its location in its array and remove it. 6 år sedan
  Andrew Knox Shiels 6bf2541800 Added comment resolve functionality for a single comment as well as for all comments on an idea. Also, comment resolve, delete and resolveAll buttons are hidden for non-admin users. 6 år sedan
  Andrew Knox Shiels e4db0c8c18 Added functionality to the deleteUserSuccessCallback where if the current user is the victim user, they are kicked out of the project and back to their own project-list page without the need for a page reload. 6 år sedan
  Andrew Knox Shiels 3dc6a4d911 Modified canvas model, replaced 'is_ethics' boolean with 'canvas_type' integer to allow for privacy canvas and any other canvas type (so long as the category list exists and is of length 9 with a 10th uncategorised slot) which may arise in the future. 6 år sedan
  Andrew Knox Shiels 3ef158e4b6 Moved the collaborator component up to the ProjectDetail page instead of the CanvasDetail page, as user/admin permissions and public toggle option is now a project-level feature instead of an individual canvas feature. 6 år sedan
  Andrew Knox Shiels 2a349e7176 Made more fixes and added more stuff to tags. They now automatically add themselves to a canvas when an idea has its text updated in such a way as to contain the label of a tag previously not in the canvas but in the project. On creation of a tag it is added to all canvasses where it occurs. On deletion of the tag it is deleted from everywhere. 6 år sedan
  Andrew Knox Shiels fe77d36e8d New canvas create was broken, fixed that. Tags automatically add themselves to a second open canvas containing the label as a substring, while they do not do the same if they do not contain the label. When a tag is removed from one canvas, it is reflected in the other by removing the link in the tag popup. Only tested with two canvasses. 6 år sedan
  Andrew Knox Shiels dd85c2f8a2 Added (very untested) project functionality. Users, admins, owner are all moved from Canvas to Project. All canvasses in a project are visible to every user in the project. The same user / admin permissions required as before, but check user in project.users instead of canvas.users. Went ahead with tags existing for all canvasses in a given project (also quite untested). When a tag is created it (should) add itself to any other canvas in the project containing the label as a substring of an idea. Deletion deletes the tag object outright, it doesn't check occurrences in other canvasses. 6 år sedan
  Andrew Knox Shiels 6bf5fed11e 'Resolve all comments' no longer deletes comments, instead it marks them as resolved. Added some basic CSS to distinguish resolved from unresolved. 6 år sedan
  Andrew Knox Shiels 7ab33db9bc Added some basic CSS to tidy the canvas up a bit, mostly for myself, as I was tired of looking at black-and-white left-aligned text fields. Additionally added a boolean to canvas model is_ethics, true for ethics canvas and false for business canvas. If business canvas, the blocks are labelled as a business canvas's would be, with the extra uncategorised block at the bottom. Newly created canvasses have (Business) or (Ethics) at the end of the default title to show their type. For now, on the anonymous user trial of a canvas, tags and collaborators are outright disabled. 6 år sedan
  Andrew Knox Shiels b2ee80a9b3 Fixed a bug where the comments weren't appearing to follow the ideas when the most recently modified idea was moved to the top of the list in its category. Deleted a redundant Vue component for comments (formerly commentListComponent). 6 år sedan