From 7be7e29c1683ffdb1adea4291ebf8c9a629eef5c Mon Sep 17 00:00:00 2001 From: Toxantron Date: Fri, 7 Dec 2018 14:01:25 +0100 Subject: [PATCH 1/3] Improve overview on smaller devices --- src/css/scrumonline.css | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/src/css/scrumonline.css b/src/css/scrumonline.css index 950815c..228c825 100644 --- a/src/css/scrumonline.css +++ b/src/css/scrumonline.css @@ -44,7 +44,13 @@ div.row.topic { margin-bottom: 20px; } div.topic .form-control { - width: 500px; + width: 280px; +} +@media(min-width: 1200px) +{ + div.topic .form-control { + width: 500px; + } } .selectable { @@ -128,19 +134,31 @@ div.card, div.card-flip { /* Card flip */ div.card-overview { perspective: 1000px; - margin-right: -40px; } div.card-overview:first-child { margin-left: 15px; } div.card-overview div.card-container { float: left; - width: 175px; + width: 33%; +} +@media(min-width: 768px) { + div.card-overview { + margin-right: -40px; + } + div.card-overview div.card-container { + width: 160px; + } } @media(min-width: 992px) { div.card-overview { margin-right: -60px; } + div.card-overview div.card-container { + width: 195px; + } +} +@media(min-width: 1200px) { div.card-overview div.card-container { width: 210px; } @@ -153,7 +171,7 @@ div.card.front, div.card.back { left: 0; } div.deletable-card{ - position: relative; + position: relative; height: 212px; width: 142px; } From 1d89d93734b4461092509e39eeea8a3e925ff505 Mon Sep 17 00:00:00 2001 From: Toxantron Date: Sun, 30 Dec 2018 20:27:53 +0100 Subject: [PATCH 2/3] Read topic from server response. Closes #67. --- src/js/main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/js/main.js b/src/js/main.js index 4c5f154..ac634d6 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -401,8 +401,11 @@ scrum.app.controller('MasterController', function ($http, $routeParams, $locatio self.consensus = result.consensus; // If the result has a topic, the team has started estimating - if(result.topic !== '') + if(result.topic !== '') { + self.current.topic = result.topic; + self.current.description = result.description; self.teamComplete = true; + } // Forward result to ticketing system if (self.current.feedback && self.flipped && self.consensus) { From 1af915f10c18a0b1a466eb0fdc517930083753d6 Mon Sep 17 00:00:00 2001 From: Toxantron Date: Fri, 18 Jan 2019 23:10:46 +0100 Subject: [PATCH 3/3] Gitlab plugin --- src/index.php | 2 +- src/js/gitlab-plugin.js | 53 +++++++++++++++++++++++++ src/sample-config.php | 4 +- src/templates/gitlab_source.html | 68 ++++++++++++++++++++++++++++++++ 4 files changed, 125 insertions(+), 2 deletions(-) create mode 100644 src/js/gitlab-plugin.js create mode 100644 src/templates/gitlab_source.html diff --git a/src/index.php b/src/index.php index dac94d0..703b823 100644 --- a/src/index.php +++ b/src/index.php @@ -20,7 +20,7 @@ Online planning poker - + diff --git a/src/js/gitlab-plugin.js b/src/js/gitlab-plugin.js new file mode 100644 index 0000000..002e045 --- /dev/null +++ b/src/js/gitlab-plugin.js @@ -0,0 +1,53 @@ +/*globals scrum */ + +// Add a plugin for github integration +scrum.sources.push({ + // Fixed properties and methods + name: "Gitlab", + position: 4, + view: "templates/gitlab_source.html", + feedback: false, + // Feedback call for completed poll + completed: function(result) { + }, + + // Custom properties and methods + loaded: false, + server: 'https://gitlab.com/', + repo: '', + issues: [], + issue: {}, + + // Private repo + isPrivate: false, + token: '', + + // Load issues from github + load: function() { + var self = this; + + var headers = {}; + if(self.isPrivate) { + headers['Private-Token'] = this.token; + } + + // Build access URL. Gitlab is very picky about that! + var encodedRepo = encodeURIComponent(this.repo); + var uri = this.server; + if(uri.substr(-1) !== '/') + uri += '/'; + uri += 'api/v4/projects/' + encodedRepo + '/issues'; + this.parent.$http + .get(uri, { headers: headers }) + .then(function (response) { + // Convert markdown to HTML + var converter = new showdown.Converter(); + response.data.forEach(function(issue) { + issue.description = converter.makeHtml(issue.description); + }); + self.issues = response.data; + self.issue = self.issues[0]; + self.loaded = true; + }); + } +}); diff --git a/src/sample-config.php b/src/sample-config.php index 24f3300..d0449f0 100644 --- a/src/sample-config.php +++ b/src/sample-config.php @@ -40,7 +40,9 @@ // Plugin to load issues from github 'GitHub', // Plugin to load issues from JIRA - 'JIRA' + 'JIRA', + // Plugin to load issues from Gitlab + 'Gitlab' ]; // Configuration for the server side JIRA controller diff --git a/src/templates/gitlab_source.html b/src/templates/gitlab_source.html new file mode 100644 index 0000000..48b9016 --- /dev/null +++ b/src/templates/gitlab_source.html @@ -0,0 +1,68 @@ + +
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+
+ +
+
+
+
+ + +
+
+
+ +
+
+ + +
+
+ +
+
+
+ {{ master.current.issue.author.name }} +
+
+

#{{ master.current.issue.iid }}: {{ master.current.issue.title }}

+
+
+
+

{{ label.name }}

+
+ +
+
+ {{ master.current.issue.author.name }} created issue on {{ master.current.issue.created_at | date : "medium" }} +
+
+
+ + +
+
+