Skip to content

Commit c590701

Browse files
author
Joshua Sprey
committed
(#10) Gravatar should now load via HTTPS in the activity Widget
1 parent 42de5fe commit c590701

File tree

5 files changed

+65
-65
lines changed

5 files changed

+65
-65
lines changed

Diff for: dist/adf-widget-scm.js

+61-61
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,44 @@ angular.module('adf.widget.scm', ['adf.provider', 'chart.js', 'ngSanitize', 'btf
180180
});
181181
}]);
182182

183-
angular.module("adf.widget.scm").run(["$templateCache", function($templateCache) {$templateCache.put("{widgetsPath}/scm/src/activities/activityView.html","<div><div ng-if=!vm.activities class=\"alert alert-info\">There are no activities for your available repositories.</div><div ng-if=\"vm.status == 404 || vm.status == 500\" class=\"alert alert-danger\"><b>Error {{vm.status}}:</b> The endpoint could not be reached, this could mean that the activity plugin is not installed.</div><div ng-if=vm.activities><ul class=media-list><li class=media ng-repeat=\"activity in vm.activities\"><div ng-if=vm.gravatarHash(activity) class=media-left><img class=\"media-object img-thumbnail\" ng-src=\"http://www.gravatar.com/avatar/{{vm.gravatarHash(activity)}}?s=64&d=identicon\"></div><div class=media-body><b>{{activity.repoName}}</b><p ng-bind-html=activity.changeset.description></p><small>{{activity.changeset.author.name}}, {{activity.changeset.date | date: \'yyyy-MM-dd HH:mm\'}}</small></div></li></ul></div></div>");
184-
$templateCache.put("{widgetsPath}/scm/src/edit/edit.html","<form role=form><div class=form-group><label for=repository>Repository</label><select name=repository id=repository class=form-control ng-model=config.repository><option ng-repeat=\"repository in vm.repositories | orderBy: \'name\'\" value={{repository.id}}>{{repository.name}}</option></select></div></form>");
183+
angular.module("adf.widget.scm").run(["$templateCache", function($templateCache) {$templateCache.put("{widgetsPath}/scm/src/activities/activityView.html","<div><div ng-if=!vm.activities class=\"alert alert-info\">There are no activities for your available repositories.</div><div ng-if=\"vm.status == 404 || vm.status == 500\" class=\"alert alert-danger\"><b>Error {{vm.status}}:</b> The endpoint could not be reached, this could mean that the activity plugin is not installed.</div><div ng-if=vm.activities><ul class=media-list><li class=media ng-repeat=\"activity in vm.activities\"><div ng-if=vm.gravatarHash(activity) class=media-left><img class=\"media-object img-thumbnail\" ng-src=\"https://www.gravatar.com/avatar/{{vm.gravatarHash(activity)}}?s=64&d=identicon\"></div><div class=media-body><b>{{activity.repoName}}</b><p ng-bind-html=activity.changeset.description></p><small>{{activity.changeset.author.name}}, {{activity.changeset.date | date: \'yyyy-MM-dd HH:mm\'}}</small></div></li></ul></div></div>");
185184
$templateCache.put("{widgetsPath}/scm/src/charts/line-chart.html","<div><div class=\"alert alert-info\" ng-if=!vm.chart>Please insert a repository path in the widget configuration</div><div ng-if=\"vm.repository.status == 404 || vm.repository.status == 500\" class=\"alert alert-danger\"><b>Error {{vm.repository.status}}</b> the endpoint could not be reached, this could mean that the selected repository does not exist or that the statistics plugin is not installed</div><div ng-if=vm.chart><canvas id=line class=\"chart chart-line\" chart-data=vm.chart.data chart-labels=vm.chart.labels chart-series=vm.chart.series chart-options=vm.chart.options></canvas></div></div>");
186185
$templateCache.put("{widgetsPath}/scm/src/charts/pie-chart.html","<div><div class=\"alert alert-info\" ng-if=!vm.chart>Please insert a repository path in the widget configuration</div><div ng-if=\"vm.repository.status == 404 || vm.repository.status == 500\" class=\"alert alert-danger\"><b>Error {{vm.repository.status}}</b> the endpoint could not be reached, this could mean that the selected repository does not exist or that the statistics plugin is not installed</div><div ng-if=vm.chart><canvas id=pie class=\"chart chart-pie\" chart-legend=true chart-data=vm.chart.data chart-labels=vm.chart.labels chart-options=vm.chart.options></canvas></div></div>");
186+
$templateCache.put("{widgetsPath}/scm/src/edit/edit.html","<form role=form><div class=form-group><label for=repository>Repository</label><select name=repository id=repository class=form-control ng-model=config.repository><option ng-repeat=\"repository in vm.repositories | orderBy: \'name\'\" value={{repository.id}}>{{repository.name}}</option></select></div></form>");
187+
$templateCache.put("{widgetsPath}/scm/src/commits/view.html","<div><div ng-if=!config.repository class=\"alert alert-info\">Please configure a repository</div><div ng-if=\"vm.repository.status == 404 || vm.repository.status == 500\" class=\"alert alert-danger\"><b>Error {{vm.repository.status}}</b> the endpoint could not be reached, this could mean that the selected repository does not exist</div><div ng-if=config.repository><ul class=media-list><li class=media ng-repeat=\"commit in vm.commits\"><div ng-if=vm.gravatarHash(commit) class=media-left><img class=\"media-object img-thumbnail\" ng-src=\"https://www.gravatar.com/avatar/{{vm.gravatarHash(commit)}}?s=64&d=identicon\"></div><div class=media-body><p ng-bind-html=commit.description></p><small>{{commit.author.name}}, {{commit.date | date: \'yyyy-MM-dd HH:mm\'}}</small></div></li></ul></div></div>");
187188
$templateCache.put("{widgetsPath}/scm/src/markdownPreview/edit.html","<form role=form><div class=form-group><p><label for=repository>Repository</label><select name=repository id=repository class=form-control ng-model=config.repository ng-init=vm.getBranchesByRepositoryId(config.repository) ng-change=vm.getBranchesByRepositoryId(config.repository)><option ng-repeat=\"repository in vm.repositories | orderBy: \'name\'\" value={{repository.id}}>{{repository.name}}</option></select></p><p ng-if=vm.branches><label for=branch>Branch</label><select name=branch id=branch class=form-control ng-model=config.branch><option ng-repeat=\"branch in vm.branches| orderBy: \'name\'\" value={{branch.id}}>{{branch.name}}</option></select></p><label for=path>Path to Markdown File</label> <input type=text class=form-control id=path ng-model=config.path></div></form>");
188-
$templateCache.put("{widgetsPath}/scm/src/markdownPreview/view.html","<style>\n div.markdownContent{\n overflow: auto;\n width: 100%;\n }\n</style><div class=\"alert alert-info\" ng-if=!vm.fileContent>Please configure a specific file</div><div ng-if=vm.fileContent btf-markdown=vm.fileContent class=markdownContent></div><div class=\"alert alert-danger\" ng-if=\"vm.fileContent.status == 500 || vm.fileContent.status == 404\"><b>Error {{vm.fileContent.status}}</b> Markdown-File not found. Please check your configuration and try again.</div>");
189-
$templateCache.put("{widgetsPath}/scm/src/commits/view.html","<div><div ng-if=!config.repository class=\"alert alert-info\">Please configure a repository</div><div ng-if=\"vm.repository.status == 404 || vm.repository.status == 500\" class=\"alert alert-danger\"><b>Error {{vm.repository.status}}</b> the endpoint could not be reached, this could mean that the selected repository does not exist</div><div ng-if=config.repository><ul class=media-list><li class=media ng-repeat=\"commit in vm.commits\"><div ng-if=vm.gravatarHash(commit) class=media-left><img class=\"media-object img-thumbnail\" ng-src=\"http://www.gravatar.com/avatar/{{vm.gravatarHash(commit)}}?s=64&d=identicon\"></div><div class=media-body><p ng-bind-html=commit.description></p><small>{{commit.author.name}}, {{commit.date | date: \'yyyy-MM-dd HH:mm\'}}</small></div></li></ul></div></div>");}]);
189+
$templateCache.put("{widgetsPath}/scm/src/markdownPreview/view.html","<style>\n div.markdownContent{\n overflow: auto;\n width: 100%;\n }\n</style><div class=\"alert alert-info\" ng-if=!vm.fileContent>Please configure a specific file</div><div ng-if=vm.fileContent btf-markdown=vm.fileContent class=markdownContent></div><div class=\"alert alert-danger\" ng-if=\"vm.fileContent.status == 500 || vm.fileContent.status == 404\"><b>Error {{vm.fileContent.status}}</b> Markdown-File not found. Please check your configuration and try again.</div>");}]);
190+
191+
192+
angular.module('adf.widget.scm')
193+
.controller('MarkdownPreviewEditController', ["repositories", "SCM", function (repositories, SCM) {
194+
var vm = this;
195+
vm.repositories = repositories;
196+
197+
vm.getBranchesByRepositoryId = function (repositoryId) {
198+
if (repositoryId) {
199+
SCM.getBranchesByRepositoryId(repositoryId).then(function (result) {
200+
// catch repositories without branch support
201+
if (result.status == 400) {
202+
vm.branches = null;
203+
}else{
204+
vm.branches = result.branch;
205+
}
206+
});
207+
}
208+
};
209+
210+
}]);
211+
212+
213+
214+
angular.module('adf.widget.scm')
215+
.controller('MarkdownPreviewController', ["repository", "fileContent", function (repository, fileContent) {
216+
var vm = this;
217+
vm.repository = repository;
218+
vm.fileContent = fileContent;
219+
}]);
220+
190221
/*
191222
* The MIT License
192223
*
@@ -230,35 +261,37 @@ angular.module('adf.widget.scm')
230261
};
231262
}]);
232263

233-
234-
235-
angular.module('adf.widget.scm')
236-
.controller('MarkdownPreviewEditController', ["repositories", "SCM", function (repositories, SCM) {
237-
var vm = this;
238-
vm.repositories = repositories;
239-
240-
vm.getBranchesByRepositoryId = function (repositoryId) {
241-
if (repositoryId) {
242-
SCM.getBranchesByRepositoryId(repositoryId).then(function (result) {
243-
// catch repositories without branch support
244-
if (result.status == 400) {
245-
vm.branches = null;
246-
}else{
247-
vm.branches = result.branch;
248-
}
249-
});
250-
}
251-
};
252-
253-
}]);
264+
/*
265+
* The MIT License
266+
*
267+
* Copyright (c) 2016, Sebastian Sdorra
268+
*
269+
* Permission is hereby granted, free of charge, to any person obtaining a copy
270+
* of this software and associated documentation files (the "Software"), to deal
271+
* in the Software without restriction, including without limitation the rights
272+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
273+
* copies of the Software, and to permit persons to whom the Software is
274+
* furnished to do so, subject to the following conditions:
275+
*
276+
* The above copyright notice and this permission notice shall be included in
277+
* all copies or substantial portions of the Software.
278+
*
279+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
280+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
281+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
282+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
283+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
284+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
285+
* SOFTWARE.
286+
*/
254287

255288

256289

257290
angular.module('adf.widget.scm')
258-
.controller('MarkdownPreviewController', ["repository", "fileContent", function (repository, fileContent) {
291+
.controller('ScmEditController', ["repositories", function(repositories){
259292
var vm = this;
260-
vm.repository = repository;
261-
vm.fileContent = fileContent;
293+
294+
vm.repositories = repositories;
262295
}]);
263296

264297
/*
@@ -523,39 +556,6 @@ angular.module('adf.widget.scm')
523556

524557

525558

526-
angular.module('adf.widget.scm')
527-
.controller('ScmEditController', ["repositories", function(repositories){
528-
var vm = this;
529-
530-
vm.repositories = repositories;
531-
}]);
532-
533-
/*
534-
* The MIT License
535-
*
536-
* Copyright (c) 2016, Sebastian Sdorra
537-
*
538-
* Permission is hereby granted, free of charge, to any person obtaining a copy
539-
* of this software and associated documentation files (the "Software"), to deal
540-
* in the Software without restriction, including without limitation the rights
541-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
542-
* copies of the Software, and to permit persons to whom the Software is
543-
* furnished to do so, subject to the following conditions:
544-
*
545-
* The above copyright notice and this permission notice shall be included in
546-
* all copies or substantial portions of the Software.
547-
*
548-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
549-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
550-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
551-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
552-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
553-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
554-
* SOFTWARE.
555-
*/
556-
557-
558-
559559
angular.module('adf.widget.scm')
560560
.controller('ActivitiesController', ["$sce", "activities", "SCM", function ($sce, activities, SCM) {
561561
var vm = this;

0 commit comments

Comments
 (0)