Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User interface #3

Merged
merged 17 commits into from
May 1, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
appropriate update problem response
  • Loading branch information
kkatzen committed Apr 29, 2015
commit c5740d53924d6e9f067c5f12840216a5b0294911
1 change: 1 addition & 0 deletions assets/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,7 @@ window.onload = function () {
//breaks here with "Failed to load resource: the server responded with a status of 500 (Internal Server Error)"
$.post("/problem/update", opts, function (problem) {
console.log("heya");
fillProblemDisplay(problem);
var updateSuccessMessage = $("<div class='alert alert-success' role='alert'>Problem Updated</div>");
$("#editProblemError").append(updateSuccessMessage);
curProblem = problem;
Expand Down
3 changes: 2 additions & 1 deletion views/home/admin.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,11 @@ ul {
<textarea name="editOnSubmit" id="editOnSubmit" class="form-control"
style="font-family:Consolas, monospace">
</textarea>
<div id="editProblemError"></div>

<button class="btn btn-success form-control" id="editProblem">Update Problem</button>
<button class="btn btn-danger form-control" id="deleteProblem">Delete Problem</button>

<div id="editProblemError"></div>
</form>
</div>
</div>
Expand Down