diff options
author | 2018-06-24 12:46:17 -0400 | |
---|---|---|
committer | 2018-06-24 12:46:17 -0400 | |
commit | 401c43ef7ae83a3f46743299cf8055af03815888 (patch) | |
tree | 4adcf1cd09057b5198e6407d2486b1df5297633e /templates | |
parent | [Jams] Fix margin on theme label (diff) |
[Jams/Teams] Add day padding to activity feed, disabled submit button to avoid spam
Diffstat (limited to 'templates')
-rw-r--r-- | templates/main/jams/team_view.html | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/templates/main/jams/team_view.html b/templates/main/jams/team_view.html index ec1a49c2..c420f35a 100644 --- a/templates/main/jams/team_view.html +++ b/templates/main/jams/team_view.html @@ -173,8 +173,10 @@ } repo_submit.onclick = () => { + repo_submit.classList.add("uk-disabled"); let repo = repo_url.value; editTeamRepoURL(repo, (success, data) => { + repo_submit.classList.remove("uk-disabled"); if (success) { UIkit.notification({ "message": "Edited repository successfully", @@ -218,8 +220,8 @@ let GITLAB_PROJECT_ID = "{{ team.repo }}"; // the gitlab project id function loadGitLabActivity() { const GITLAB_EVENT_ACTIONS = ["pushed"]; // the actions to filter in the event list - const JAM_START_DATE = "{{ team.jam.date_start.strftime("%Y-%m-%d") }}"; // the start date of the jam, in order to ignore pushes prior to start - const JAM_END_DATE = "{{ team.jam.date_end.strftime("%Y-%m-%d") }}"; // the end date of the jam, in order to ignore pushes after the end + const JAM_START_DATE = "{{ day_delta(team.jam.date_start, -1).strftime("%Y-%m-%d") }}"; // the start date of the jam, in order to ignore pushes prior to start + const JAM_END_DATE = "{{ day_delta(team.jam.date_end, +1).strftime("%Y-%m-%d") }}"; // the end date of the jam, in order to ignore pushes after the end const GITLAB_PROJECT_EVENTS_ENDPOINT = () => `https://gitlab.com/api/v4/projects/${encodeURIComponent(GITLAB_PROJECT_ID)}/events?action=${GITLAB_EVENT_ACTIONS.join(",")}&after=${JAM_START_DATE}&before=${JAM_END_DATE}`; function gitlabBranchURL(branch) { |